From: Pekka Riikonen Date: Sun, 17 Jun 2001 12:29:40 +0000 (+0000) Subject: updates. X-Git-Tag: robodoc-323~185 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=642656f4b81874a5373a956a29b26147abd6d3e9;p=silc.git updates. --- diff --git a/CHANGES b/CHANGES index 5fbb25e7..5da26cd7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Sun Jun 17 15:26:05 EEST 2001 Pekka Riikonen + + * Fixed the GETKEY command in the server to check also the + global list. Otherwise the GETKEY would not work correctly + in normal SILC server. Affected file silcd/command.c. + Sat Jun 16 18:00:00 EEST 2001 Pekka Riikonen * Fixed GETKEY crash, it crashed if the command did not succseed. diff --git a/apps/silcd/command.c b/apps/silcd/command.c index bca269c1..6bf0d8be 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -4757,6 +4757,8 @@ SILC_SERVER_CMD_FUNC(getkey) SilcBuffer pk; SilcIdType id_type; + SILC_LOG_DEBUG(("Start")); + tmp = silc_argument_get_arg_type(cmd->args, 1, &tmp_len); if (!tmp) { silc_server_command_send_status_reply(cmd, SILC_COMMAND_GETKEY, @@ -4778,9 +4780,15 @@ SILC_SERVER_CMD_FUNC(getkey) would be locally connected client so send the command further. */ client = silc_idlist_find_client_by_id(server->local_list, client_id, NULL); + if (!client) + client = silc_idlist_find_client_by_id(server->global_list, + client_id, NULL); if ((!client && !cmd->pending && !server->standalone) || - (client && !client->connection)) { + (client && !client->connection && !cmd->pending && + !server->standalone) || + (client && !client->data.public_key && !cmd->pending && + !server->standalone)) { SilcBuffer tmpbuf; uint16 old_ident; SilcSocketConnection dest_sock; @@ -4836,9 +4844,15 @@ SILC_SERVER_CMD_FUNC(getkey) would be locally connected server so send the command further. */ server_entry = silc_idlist_find_server_by_id(server->local_list, server_id, NULL); + if (!server_entry) + server_entry = silc_idlist_find_server_by_id(server->global_list, + server_id, NULL); if ((!server_entry && !cmd->pending && !server->standalone) || - (server_entry && !server_entry->connection)) { + (server_entry && !server_entry->connection && !cmd->pending && + !server->standalone) || + (server_entry && !server_entry->data.public_key && !cmd->pending && + !server->standalone)) { SilcBuffer tmpbuf; uint16 old_ident;