From 38685840f29a35f1dab68be00406e1c90808def0 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Wed, 30 Jan 2002 11:33:31 +0000 Subject: [PATCH] updates --- CHANGES | 9 +++++++++ apps/silcd/command_reply.c | 16 +++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 14f2f245..96fd1d61 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,15 @@ Wed Jan 30 11:11:47 CET 2002 Pekka Riikonen sender's command context, fixed now. The affected file is silcd/command.c. + * Create the key in JOIN command of the router did not return + the channel key, added check for this. Affected file is + silcd/command.c. + + * Fixed a channel ID update bug in JOIN command reply. Do + not directly upgrade the ID but call the function + silc_idlist_replace_channel_id if the ID was changed. + Affected file silcd/command_reply.c. + Tue Jan 29 19:49:31 EET 2002 Pekka Riikonen * Applied patches from cras: diff --git a/apps/silcd/command_reply.c b/apps/silcd/command_reply.c index 0b4ca602..d9fbe6a8 100644 --- a/apps/silcd/command_reply.c +++ b/apps/silcd/command_reply.c @@ -823,6 +823,8 @@ SILC_SERVER_CMD_REPLY_FUNC(join) silc_buffer_pull_tail(keyp, SILC_BUFFER_END(keyp)); silc_buffer_put(keyp, tmp, len); } + + /* Parse the Channel ID */ id = silc_id_payload_parse_id(id_string, id_len); if (!id) goto out; @@ -891,19 +893,19 @@ SILC_SERVER_CMD_REPLY_FUNC(join) server->stat.my_channels++; } else { /* The entry exists. */ - silc_free(cache->id); - entry->id = id; - cache->id = entry->id; + + /* If ID has changed, then update it to the cache too. */ + if (!SILC_ID_CHANNEL_COMPARE(channel->id, id)) + silc_idlist_replace_channel_id(server->local_list, channel->id, id); + entry->disabled = FALSE; /* Remove the founder auth data if the mode is not set but we have them in the entry */ if (!(mode & SILC_CHANNEL_MODE_FOUNDER_AUTH) && entry->founder_key) { silc_pkcs_public_key_free(entry->founder_key); - if (entry->founder_passwd) { - silc_free(entry->founder_passwd); - entry->founder_passwd = NULL; - } + silc_free(entry->founder_passwd); + entry->founder_passwd = NULL; } } -- 2.24.0