updates.
authorPekka Riikonen <priikone@silcnet.org>
Fri, 3 May 2002 11:08:20 +0000 (11:08 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 3 May 2002 11:08:20 +0000 (11:08 +0000)
TODO
lib/silcclient/client_notify.c
lib/silcclient/command.c

diff --git a/TODO b/TODO
index 6440e21827502cdecb4368a7f900892d370765df..66547e95bef16fa8703b4c143de4014708af860c 100644 (file)
--- 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.
index 9b825954f2deb2f9618be991fc39f478a84eaa33..7a2d83e5af7fe7b54b1485435d14a4d9dd30a6cc 100644 (file)
@@ -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);
     }
index 913530b2ba44cbfa56aa859763936964021b568f..15af4c3801a92516b59bff6ccce560c2e09dac4d 100644 (file)
@@ -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;
   }