+Fri Feb 2 11:42:56 EET 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+ * Added extra parameter, command identifier, to the
+ silc_client_send_command so that explicit command identifier
+ can be defined.
+
+ Changed that ID list routines uses specific command identifier
+ when sending WHOIS/IDENTIFY requests to the server so that they
+ can be identified when the reply comes back.
+
+ Affected files lib/silcclient/command.[ch],
+ lib/silcclient/client.c and lib/silcclient/idlist.[ch].
+
Thu Feb 1 23:31:21 EET 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
* Fixed channel ID decoding in server's JOIN command reply in
SilcPacketContext *p = silc_packet_context_dup(packet);
p->context = (void *)client;
p->sock = sock;
- silc_client_command_pending(conn, SILC_COMMAND_WHOIS, 0,
+ silc_client_command_pending(conn, SILC_COMMAND_WHOIS, SILC_IDLIST_IDENT,
silc_client_notify_by_server_pending, p);
goto out;
}
SilcPacketContext *p = silc_packet_context_dup(packet);
p->context = (void *)client;
p->sock = sock;
- silc_client_command_pending(conn, SILC_COMMAND_WHOIS, 0,
+ silc_client_command_pending(conn, SILC_COMMAND_WHOIS, SILC_IDLIST_IDENT,
silc_client_notify_by_server_pending, p);
goto out;
}
SilcPacketContext *p = silc_packet_context_dup(packet);
p->context = (void *)client;
p->sock = sock;
- silc_client_command_pending(conn, SILC_COMMAND_WHOIS, 0,
+ silc_client_command_pending(conn, SILC_COMMAND_WHOIS, SILC_IDLIST_IDENT,
silc_client_notify_by_server_pending, p);
goto out;
}
encoded into correct form in correct order. */
void silc_client_send_command(SilcClient client, SilcClientConnection conn,
- SilcCommand command, unsigned int argc, ...)
+ SilcCommand command, unsigned short ident,
+ unsigned int argc, ...)
{
SilcBuffer packet;
va_list ap;
va_start(ap, argc);
- packet = silc_command_payload_encode_vap(command, 0, argc, ap);
+ packet = silc_command_payload_encode_vap(command, ident, argc, ap);
silc_client_packet_send(client, conn->sock, SILC_PACKET_COMMAND,
NULL, 0, NULL, NULL, packet->data,
packet->len, TRUE);
/* Prototypes */
void silc_client_command_free(SilcClientCommandContext cmd);
void silc_client_send_command(SilcClient client, SilcClientConnection conn,
- SilcCommand command, unsigned int argc, ...);
+ SilcCommand command, unsigned short ident,
+ unsigned int argc, ...);
SilcClientCommand *silc_client_command_find(const char *name);
void silc_client_command_pending(SilcClientConnection conn,
SilcCommand reply_cmd,
return NULL;
} else {
SilcBuffer idp = silc_id_payload_encode(client_id, SILC_ID_CLIENT);
- silc_client_send_command(client, conn, SILC_COMMAND_WHOIS, 1,
+ silc_client_send_command(client, conn, SILC_COMMAND_WHOIS,
+ SILC_IDLIST_IDENT, 1,
3, idp->data, idp->len);
return NULL;
}
unsigned char iv[SILC_CIPHER_MAX_IV_SIZE];
} *SilcChannelEntry;
+/* Command identifier used by ID list routines when sending WHOIS/IDENTIFY
+ commands to routers. */
+#define SILC_IDILIST_IDENT 3333
+
/* Prototypes */
SilcClientEntry silc_idlist_get_client(SilcClient client,