return;
SILC_LOG_DEBUG(("Remove client %s from all channels",
- client->nickname ? client->nickname : ""));
+ client->nickname ? client->nickname :
+ (unsigned char *)""));
if (silc_hash_table_find(clients, client, NULL, NULL))
silc_hash_table_del(clients, client);
/* Remove the client from all channels. This generates new keys to the
channels as well. */
silc_server_remove_from_channels(server, NULL, remote_client, FALSE,
- NULL, TRUE);
+ NULL, TRUE, FALSE);
/* Remove the client entry, If it is locally connected then we will also
disconnect the client here */
unsigned char *tmp = NULL;
SilcUInt32 len = 0, t;
SilcHashTableList htl;
- SilcBuffer entry;
+ SilcBuffer entry, idp = NULL;
bool ret = FALSE;
if (type < 1 || type > 3 || !check)
return FALSE;
}
if (type == 3) {
- tmp = silc_id_id2str(check, SILC_ID_CLIENT);
- if (!tmp)
+ idp = silc_id_payload_encode(check, SILC_ID_CLIENT);
+ if (!idp)
return FALSE;
- len = silc_id_get_len(check, SILC_ID_CLIENT);
+ tmp = idp->data;
+ len = idp->len;
}
/* Compare the list */
}
silc_hash_table_list_reset(&htl);
- silc_free(tmp);
+ if (!idp)
+ silc_free(tmp);
+ silc_buffer_free(idp);
return ret;
}
/* Delete from the invite list */
silc_hash_table_list(list, &htl);
while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp2)) {
- if (type == 2 && !memcmp(tmp2->data, tmp, len)) {
- silc_hash_table_del_by_context(list, (void *)2, tmp2);
+ if (type == 3 && !memcmp(tmp2->data, tmp, len)) {
+ silc_hash_table_del_by_context(list, (void *)3, tmp2);
silc_buffer_free(tmp2);
break;
}