diff --git a/checkin_notes b/checkin_notes index 73ae007d64..c3d58779d5 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3289,3 +3289,9 @@ David 29 Apr 2010 client/ cs_scheduler.cpp + +Charlie 30 Apr 2010 + - client: Restore RUN_MODE_ALWAYS functionality in network suspension + logic which as lost in code cleanup of 26 Apr 2010. + + cs_prefs.pp diff --git a/client/cs_prefs.cpp b/client/cs_prefs.cpp index 905e8e2ac0..355589dc6e 100644 --- a/client/cs_prefs.cpp +++ b/client/cs_prefs.cpp @@ -242,6 +242,7 @@ void CLIENT_STATE::check_suspend_network() { network_suspended = true; file_xfers_suspended = true; network_suspend_reason = SUSPEND_REASON_USER_REQ; + return; } // was there a recent GUI RPC that needs network? @@ -250,6 +251,15 @@ void CLIENT_STATE::check_suspend_network() { ALLOW_NETWORK_IF_RECENT_RPC_PERIOD ); + switch(network_mode.get_current()) { + case RUN_MODE_ALWAYS: + return; + case RUN_MODE_NEVER: + file_xfers_suspended = true; + if (!recent_rpc) network_suspended = true; + network_suspend_reason = SUSPEND_REASON_USER_REQ; + } + if (global_prefs.daily_xfer_limit_mb) { double up, down; daily_xfer_history.totals( @@ -262,12 +272,6 @@ void CLIENT_STATE::check_suspend_network() { } } - - if (network_mode.get_current() == RUN_MODE_NEVER) { - file_xfers_suspended = true; - if (!recent_rpc) network_suspended = true; - network_suspend_reason = SUSPEND_REASON_USER_REQ; - } if (!global_prefs.run_if_user_active && user_active) { file_xfers_suspended = true; if (!recent_rpc) network_suspended = true;