From: Pekka Riikonen Date: Fri, 2 Feb 2001 09:25:08 +0000 (+0000) Subject: Do not send send_remove_id if standalone server. X-Git-Tag: SILC.0.1~277 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=bc86050989834f682b9067eac895cee1974f9a87 Do not send send_remove_id if standalone server. --- diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 656cf67c..db82e83d 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -1914,6 +1914,8 @@ SILC_SERVER_CMD_FUNC(join) goto out; } client_id = silc_id_payload_parse_id(tmp, tmp_len); + if (!client_id) + goto out; /* Get cipher name */ cipher = silc_argument_get_arg_type(cmd->args, 4, NULL); diff --git a/apps/silcd/server.c b/apps/silcd/server.c index 4a55bac6..e5157b92 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -1630,7 +1630,7 @@ void silc_server_free_sock_user_data(SilcServer server, /* XXX must take some info to history before freeing */ /* Send REMOVE_ID packet to routers. */ - if (!server->standalone) + if (!server->standalone && server->router) silc_server_send_remove_id(server, server->router->connection, server->server_type == SILC_SERVER ? FALSE : TRUE, user_data->id, @@ -1647,10 +1647,11 @@ void silc_server_free_sock_user_data(SilcServer server, SilcServerEntry user_data = (SilcServerEntry)sock->user_data; /* Send REMOVE_ID packet to routers. */ - silc_server_send_remove_id(server, server->router->connection, - server->server_type == SILC_SERVER ? - FALSE : TRUE, user_data->id, - SILC_ID_SERVER_LEN, SILC_ID_SERVER); + if (!server->standalone && server->router) + silc_server_send_remove_id(server, server->router->connection, + server->server_type == SILC_SERVER ? + FALSE : TRUE, user_data->id, + SILC_ID_CLIENT_LEN, SILC_ID_CLIENT); break; } break;