if (!server_entry) {
server_entry = silc_idlist_find_server_by_id(server->local_list,
server_id, TRUE, NULL);
- global = TRUE;
+ local = TRUE;
if (!server_entry) {
/* If we are normal server then we might not have the server. Check
whether router was kind enough to send the list of all clients
router = silc_idlist_find_server_by_id(server->local_list,
sender_id, TRUE, NULL);
silc_free(sender_id);
- if (!router)
- goto out;
router_sock = sock;
id_list = server->global_list;
}
+ if (!router)
+ goto out;
+
switch(id_type) {
case SILC_ID_CLIENT:
{
SilcSocketConnection sock = ctx->sock;
SilcServerHBContext hb_context;
SilcUnknownEntry entry = (SilcUnknownEntry)sock->user_data;
- void *id_entry = NULL;
+ void *id_entry;
SILC_LOG_DEBUG(("Start"));
break;
}
default:
+ goto out;
break;
}
sock->type = ctx->conn_type;
/* Add the common data structure to the ID entry. */
- if (id_entry)
- silc_idlist_add_data(id_entry, (SilcIDListData)sock->user_data);
-
+ silc_idlist_add_data(id_entry, (SilcIDListData)sock->user_data);
+
/* Add to sockets internal pointer for fast referencing */
silc_free(sock->user_data);
sock->user_data = id_entry;