From: Pekka Riikonen Date: Tue, 3 Mar 2009 05:52:58 +0000 (+0200) Subject: silcd: IDENTIFY command reply didn't save client correctly X-Git-Tag: silc.server.1.1.16~2 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=2e7268cde1710b4901e6db52c0868bd597b88dbc silcd: IDENTIFY command reply didn't save client correctly The IDENTIFY command reply added sometimes new client without duplicating the nickname of the client thus causing odd crashes later when trying to free the nickname. --- diff --git a/apps/silcd/command_reply.c b/apps/silcd/command_reply.c index a31588d6..688b8567 100644 --- a/apps/silcd/command_reply.c +++ b/apps/silcd/command_reply.c @@ -652,7 +652,8 @@ silc_server_command_reply_identify_save(SilcServerCommandReplyContext cmd) to global list since server didn't have it in the lists so it must be global. */ client = silc_idlist_add_client(server->global_list, - nick[0] ? nick : NULL, info, NULL, + nick[0] ? strdup(nick) : NULL, + info, NULL, silc_id_dup(&client_id, SILC_ID_CLIENT), silc_packet_get_context(cmd->sock), NULL); diff --git a/apps/silcd/silcd.c b/apps/silcd/silcd.c index 3d4db10e..cc4d7ff3 100644 --- a/apps/silcd/silcd.c +++ b/apps/silcd/silcd.c @@ -462,7 +462,7 @@ static DebugLevel debug_levels[] = { { 7, "silcd\\.c,server\\.c,command\\.c,server_backup\\.c,packet_send\\.c" }, /* All basic stuff from silcd/ */ - { 10, "silc_server_*,*silc_id_create_*" }, + { 10, "silc_server_*,*silc_id_create_*,*idlist*" }, /* All from silcd/ */ { 15, "*silcd*,*serverid*,silc_server_*,*idlist*" },