Prevent endless user info resolving USERS
authorPekka Riikonen <priikone@silcnet.org>
Fri, 20 Dec 2002 09:48:50 +0000 (09:48 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 20 Dec 2002 09:48:50 +0000 (09:48 +0000)
CHANGES
lib/silcclient/command_reply.c

diff --git a/CHANGES b/CHANGES
index 14f21122c1f359418fe4f6a81fa2671ce7148f62..9ed15f3839a965ee2f7cac8ef33d51d4db29cabe 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+Fri Dec 20 10:47:59 CET 2002  Pekka Riikonen <priikone@silcnet.org>
+
+       * Prevent endless resolving of user informations in USERS
+         command by checking the command reply status correctly.
+         Affected file lib/silcclient/command_reply.c.
+
 Tue Dec 17 10:05:00 CET 2002  Pekka Riikonen <priikone@silcnet.org>
 
        * Fixed file writing on WIN32 to use O_BINARY flag.  Affected
index 940af4441dbc76b57a8a4d4c84c5523508905bce..0ae2890bf8c233eee94188c01c2014e99e75a909 100644 (file)
@@ -1744,6 +1744,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(users)
 {
   SilcClientCommandReplyContext cmd = (SilcClientCommandReplyContext)context;
   SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data;
+  SilcClientCommandReplyContext r = (SilcClientCommandReplyContext)context2;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -1754,6 +1755,13 @@ SILC_CLIENT_CMD_REPLY_FUNC(users)
     goto out;
   }
 
+  if (r && !silc_command_get_status(r->payload, NULL, &cmd->error)) {
+    SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
+       "%s", silc_get_status_message(cmd->error));
+    COMMAND_REPLY_ERROR;
+    goto out;
+  }
+
   if (silc_client_command_reply_users_save(cmd, cmd->status, TRUE,
                                           silc_client_command_reply_users_cb,
                                           silc_client_command_reply_users))