~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to client/app_control.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steffen Moeller
  • Date: 2011-10-09 15:50:33 UTC
  • mfrom: (49.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20111009155033-79ps2e1gl07gs8mg
* Fixing FTBFS (Closes: #644796).
* substituted install target with override_dh_auto_install

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
#include "client_msgs.h"
70
70
#include "client_state.h"
71
71
#include "file_names.h"
72
 
#include "procinfo.h"
 
72
#include "proc_control.h"
73
73
#include "sandbox.h"
74
74
 
75
75
#include "app.h"
89
89
    action = check_app_exited();
90
90
    send_heartbeats();
91
91
    send_trickle_downs();
92
 
    graphics_poll();
93
92
    process_control_poll();
94
93
    action |= check_rsc_limits_exceeded();
95
94
    get_msgs();
156
155
    );
157
156
    set_task_state(PROCESS_QUIT_PENDING, "request_exit()");
158
157
    quit_time = gstate.now;
159
 
    descendants.clear();
160
158
    get_descendants(pid, descendants);
161
159
    return 0;
162
160
}
757
755
        set_task_state(PROCESS_ABORT_PENDING, "abort_task");
758
756
        abort_time = gstate.now;
759
757
        request_abort();
760
 
        descendants.clear();
761
758
        get_descendants(pid, descendants);
762
759
    } else {
763
760
        set_task_state(PROCESS_ABORTED, "abort_task");
797
794
//
798
795
int ACTIVE_TASK::request_reread_prefs() {
799
796
    int retval;
 
797
    APP_INIT_DATA aid;
800
798
 
801
799
    link_user_files();
802
800
 
803
 
    retval = write_app_init_file();
 
801
    init_app_init_data(aid);
 
802
    retval = write_app_init_file(aid);
804
803
    if (retval) return retval;
805
804
    graphics_request_queue.msg_queue_send(
806
805
        xml_graphics_modes[MODE_REREAD_PREFS],
813
812
// (e.g. because proxy settings have changed: this is for F@h)
814
813
//
815
814
int ACTIVE_TASK::request_reread_app_info() {
816
 
    int retval = write_app_init_file();
 
815
    APP_INIT_DATA aid;
 
816
    init_app_init_data(aid);
 
817
    int retval = write_app_init_file(aid);
817
818
    if (retval) return retval;
818
819
    process_control_queue.msg_queue_send(
819
820
        "<reread_app_info/>",
1102
1103
bool ACTIVE_TASK::get_app_status_msg() {
1103
1104
    char msg_buf[MSG_CHANNEL_SIZE];
1104
1105
    double fd;
 
1106
    int other_pid;
 
1107
    double dtemp;
1105
1108
 
1106
1109
    if (!app_client_shm.shm) {
1107
1110
        msg_printf(result->project, MSG_INFO,
1135
1138
    parse_double(msg_buf, "<fpops_cumulative>", result->fpops_cumulative);
1136
1139
    parse_double(msg_buf, "<intops_per_cpu_sec>", result->intops_per_cpu_sec);
1137
1140
    parse_double(msg_buf, "<intops_cumulative>", result->intops_cumulative);
 
1141
    if (parse_double(msg_buf, "<bytes_sent>", dtemp)) {
 
1142
        if (dtemp > bytes_sent) {
 
1143
            daily_xfer_history.add(dtemp - bytes_sent, true);
 
1144
        }
 
1145
        bytes_sent = dtemp;
 
1146
    }
 
1147
    if (parse_double(msg_buf, "<bytes_received>", dtemp)) {
 
1148
        if (dtemp > bytes_received) {
 
1149
            daily_xfer_history.add(dtemp - bytes_received, false);
 
1150
        }
 
1151
        bytes_received = dtemp;
 
1152
    }
1138
1153
    parse_int(msg_buf, "<want_network>", want_network);
 
1154
    if (parse_int(msg_buf, "<other_pid>", other_pid)) {
 
1155
        // for now, we handle only one of these
 
1156
        other_pids.clear();
 
1157
        other_pids.push_back(other_pid);
 
1158
    }
1139
1159
    if (current_cpu_time < 0) {
1140
1160
        msg_printf(result->project, MSG_INFO,
1141
1161
            "app reporting negative CPU: %f", current_cpu_time