From 7eb31c081951a3a53dfcbb66e3c34b530ab4069d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 3 Apr 2004 00:43:55 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=3212 --- checkin_notes | 10 +++++++++- client/cs_files.C | 2 +- client/cs_scheduler.C | 2 +- client/hostinfo_unix.C | 2 +- client/main.C | 29 +++++++++++++++-------------- 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/checkin_notes b/checkin_notes index e8b6f68b59..96c5911a15 100755 --- a/checkin_notes +++ b/checkin_notes @@ -11265,4 +11265,12 @@ Rom April 1 2004 NOTE: Still hasn't fixed the performance issue(s) on my machine though. api/ - boinc_api.c \ No newline at end of file + boinc_api.c + +David April 2 2004 + - Client: fixed for disabling network activity + + cs_files.C + cs_scheduler.C + hostinfo_unix.C + main.C diff --git a/client/cs_files.C b/client/cs_files.C index 1f2e8b24c0..98622d1a5f 100644 --- a/client/cs_files.C +++ b/client/cs_files.C @@ -51,7 +51,7 @@ bool CLIENT_STATE::start_new_file_xfer(PERS_FILE_XFER& pfx) { unsigned int i; int n; - if (activities_suspended) return false; + if (activities_suspended || network_suspended) return false; // limit the number of file transfers per project // diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index dcd1578d99..56db4e113e 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -454,7 +454,7 @@ bool CLIENT_STATE::scheduler_rpc_poll() { switch(scheduler_op->state) { case SCHEDULER_OP_STATE_IDLE: - if (activities_suspended) break; + if (activities_suspended || network_suspended) break; if (exit_when_idle && contacted_sched_server) { should_get_work = false; } else { diff --git a/client/hostinfo_unix.C b/client/hostinfo_unix.C index 4395fdb96d..119030326d 100644 --- a/client/hostinfo_unix.C +++ b/client/hostinfo_unix.C @@ -248,7 +248,7 @@ int HOST_INFO::get_host_info() { // Get model mib[0] = CTL_HW; mib[1] = HW_MODEL; - len = sizeof(host.p_model); + len = sizeof(p_model); sysctl(mib, 2, &p_model, &len, NULL, 0); #endif #endif diff --git a/client/main.C b/client/main.C index 14b7b4c02b..618c4fa69b 100644 --- a/client/main.C +++ b/client/main.C @@ -177,20 +177,21 @@ void resume_client(int a) { BOOL WINAPI ConsoleControlHandler ( DWORD dwCtrlType ){ BOOL bReturnStatus = FALSE; switch( dwCtrlType ){ - case CTRL_C_EVENT: - if(gstate.activities_suspended) - resume_client(NULL); - else - susp_client(NULL); - bReturnStatus = TRUE; - break; - case CTRL_BREAK_EVENT: - case CTRL_CLOSE_EVENT: - case CTRL_LOGOFF_EVENT: - case CTRL_SHUTDOWN_EVENT: - quit_client(NULL); - bReturnStatus = TRUE; - break; + case CTRL_C_EVENT: + if(gstate.activities_suspended) { + resume_client(NULL); + } else { + susp_client(NULL); + } + bReturnStatus = TRUE; + break; + case CTRL_BREAK_EVENT: + case CTRL_CLOSE_EVENT: + case CTRL_LOGOFF_EVENT: + case CTRL_SHUTDOWN_EVENT: + quit_client(NULL); + bReturnStatus = TRUE; + break; } return bReturnStatus; }