From 606daafa5ba28accc8287f809c9cbcb0113d16d5 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 20 Dec 2002 09:48:50 +0000 Subject: [PATCH] Prevent endless user info resolving USERS --- CHANGES | 6 ++++++ lib/silcclient/command_reply.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGES b/CHANGES index 14f21122..9ed15f38 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Fri Dec 20 10:47:59 CET 2002 Pekka Riikonen + + * 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 * Fixed file writing on WIN32 to use O_BINARY flag. Affected diff --git a/lib/silcclient/command_reply.c b/lib/silcclient/command_reply.c index 940af444..0ae2890b 100644 --- a/lib/silcclient/command_reply.c +++ b/lib/silcclient/command_reply.c @@ -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)) -- 2.43.0