Francois Gouget : testbot/testagentd: Better handle unknown RPCs.

Alexandre Julliard julliard at winehq.org
Tue Jan 22 12:57:43 CST 2013


Module: tools
Branch: master
Commit: ee4cf033f28c7b7fce34404f503421c10be9c591
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=ee4cf033f28c7b7fce34404f503421c10be9c591

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Tue Jan 22 04:02:04 2013 +0100

testbot/testagentd: Better handle unknown RPCs.

Only return an error if the unknown RPC parameters have successfully
been parsed. If not the connection state is broken anyway.

---

 testbot/src/testagentd/testagentd.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/testbot/src/testagentd/testagentd.c b/testbot/src/testagentd/testagentd.c
index 13d16e4..3de9a3c 100644
--- a/testbot/src/testagentd/testagentd.c
+++ b/testbot/src/testagentd/testagentd.c
@@ -855,11 +855,12 @@ static void do_unknown(SOCKET client, uint32_t id)
 {
     uint32_t argc;
 
-    if (recv_list_size(client, &argc))
-        skip_entries(client, argc);
-
-    set_status(ST_ERROR, "unknown RPC %s", rpc_name(id));
-    send_error(client);
+    if (recv_list_size(client, &argc) &&
+        skip_entries(client, argc))
+    {
+        set_status(ST_ERROR, "unknown RPC %s", rpc_name(id));
+        send_error(client);
+    }
 }
 
 static void process_rpc(SOCKET client)




More information about the wine-cvs mailing list