From 4ccdf0a2cc7998050acfb7355e594dc73be9d7e9 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 3 May 2002 11:08:20 +0000 Subject: [PATCH] updates. --- TODO | 7 ------- lib/silcclient/client_notify.c | 12 +++++++----- lib/silcclient/command.c | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/TODO b/TODO index 6440e218..66547e95 100644 --- a/TODO +++ b/TODO @@ -106,12 +106,5 @@ Manual (Do these to 0.9 and 1.0). TODO in SILC Protocol ===================== - 2. Define that WHOIS and IDENTIFY commands must send list of errors - if multiple Client ID (or Channel ID and Server ID for IDENTIFY) was - requested and was not found. Each unfound entry must cause an error - command reply to the sender. Also define that errors must be sent - *after* sending successfully found entries (this way receiver may - ignore them). To be included in protocol version 1.1. - 17. Cell wide channel founder support, and permanent channels when founder mode set. diff --git a/lib/silcclient/client_notify.c b/lib/silcclient/client_notify.c index 9b825954..7a2d83e5 100644 --- a/lib/silcclient/client_notify.c +++ b/lib/silcclient/client_notify.c @@ -35,11 +35,12 @@ typedef struct { SILC_TASK_CALLBACK(silc_client_notify_check_client) { SilcClientNotifyResolve res = (SilcClientNotifyResolve)context; - SilcClientConnection conn = res->context; - SilcClient client = conn->client; + SilcClient client = res->context; + SilcClientConnection conn = res->sock->user_data; SilcClientID *client_id = res->packet; silc_client_get_client_by_id_resolve(client, conn, client_id, NULL, NULL); silc_free(client_id); + silc_socket_free(res->sock); silc_free(res); } @@ -87,7 +88,7 @@ static void silc_client_notify_by_server_resolve(SilcClient client, silc_client_command_reply_whois_i, 0, ++conn->cmd_ident); silc_client_command_send(client, conn, SILC_COMMAND_WHOIS, conn->cmd_ident, - 1, 3, idp->data, idp->len); + 1, 4, idp->data, idp->len); silc_client_command_pending(conn, SILC_COMMAND_WHOIS, conn->cmd_ident, silc_client_notify_by_server_pending, res); } else { @@ -308,10 +309,11 @@ void silc_client_notify_by_server(SilcClient client, that we'll remove the client from cache. */ if (!silc_hash_table_count(client_entry->channels)) { SilcClientNotifyResolve res = silc_calloc(1, sizeof(*res)); - res->context = conn; + res->context = client; + res->sock = silc_socket_dup(conn->sock); res->packet = silc_id_dup(client_id, SILC_ID_CLIENT); silc_schedule_task_add(client->schedule, 0, - silc_client_notify_check_client, conn, + silc_client_notify_check_client, res, (5 + (silc_rng_get_rn16(client->rng) % 29)), 0, SILC_TASK_TIMEOUT, SILC_TASK_PRI_NORMAL); } diff --git a/lib/silcclient/command.c b/lib/silcclient/command.c index 913530b2..15af4c38 100644 --- a/lib/silcclient/command.c +++ b/lib/silcclient/command.c @@ -227,7 +227,7 @@ SILC_CLIENT_CMD_FUNC(whois) buffer = silc_id_payload_encode(cmd->conn->local_id, SILC_ID_CLIENT); silc_client_command_send(cmd->client, cmd->conn, SILC_COMMAND_WHOIS, ++conn->cmd_ident, - 1, 3, buffer->data, buffer->len); + 1, 4, buffer->data, buffer->len); silc_buffer_free(buffer); goto out; } -- 2.24.0