From da880ec5ae123905ba0c6960300eb9d772e9a5cf Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 14 May 2009 01:44:11 +0000 Subject: [PATCH] MGR: Always treat quit RPCs as non-demand so Manager can exit when client is not responding svn path=/trunk/boinc/; revision=18094 --- checkin_notes | 8 ++++++++ clientgui/AsyncRPC.cpp | 14 +++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index 89f6a97a88..5ce2384fae 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4504,3 +4504,11 @@ David 13 May 2009 html/ops/ build_po.php + +Charlie 13 May 2009 + - MGR: Always treat quit RPCs as non-demand so Manager can exit when + client is not responding; don't remove currently active RPC request + from queue when receiving a quit RPC request. + + clientgui/ + AsyncRPC.cpp diff --git a/clientgui/AsyncRPC.cpp b/clientgui/AsyncRPC.cpp index cfb001fdc8..15c81f4262 100755 --- a/clientgui/AsyncRPC.cpp +++ b/clientgui/AsyncRPC.cpp @@ -100,8 +100,11 @@ int AsyncRPC::RPC_Wait(RPC_SELECTOR which_rpc, void *arg1, void *arg2, request.arg2 = arg2; request.arg3 = arg3; request.arg4 = arg4; - request.rpcType = RPC_TYPE_WAIT_FOR_COMPLETION; - + if (which_rpc == RPC_QUIT) { + request.rpcType = RPC_TYPE_ASYNC_NO_REFRESH; + } else { + request.rpcType = RPC_TYPE_WAIT_FOR_COMPLETION; + } retval = m_pDoc->RequestRPC(request, hasPriority); return retval; } @@ -443,7 +446,12 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) { // If we are quitting, cancel any pending RPCs if (request.which_rpc == RPC_QUIT) { - RPC_requests.clear(); + if (current_rpc_request.isActive) { + RPC_requests.erase(RPC_requests.begin()+1, RPC_requests.end()); + + } else { + RPC_requests.clear(); + } } // Check if a duplicate request is already on the queue