+Sun Mar 11 20:25:06 EET 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+ * Fixed a minor bug if WHOIS and IDENTIFY command parsing that
+ just surfaced after chaning the JOIN procedure.
+
Sun Mar 11 14:59:05 EET 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
* Added silc_client_get_clients_by_list to get client entries
*client_id_count = 1;
/* Take all ID's from the command packet */
- if (argc > 3) {
- for (k = 1, i = 4; i < argc + 1; i++) {
- tmp = silc_argument_get_arg_type(cmd->args, i, &len);
+ if (argc > 1) {
+ for (k = 1, i = 1; i < argc; i++) {
+ tmp = silc_argument_get_arg_type(cmd->args, i + 3, &len);
if (tmp) {
*client_id = silc_realloc(*client_id, sizeof(**client_id) *
(*client_id_count + 1));
if (!entry->username) {
packet = silc_command_reply_payload_encode_va(SILC_COMMAND_IDENTIFY,
- SILC_STATUS_OK, ident, 2,
+ status, ident, 2,
2, idp->data, idp->len,
3, nh, strlen(nh));
} else {
}
packet = silc_command_reply_payload_encode_va(SILC_COMMAND_IDENTIFY,
- SILC_STATUS_OK, ident, 3,
+ status, ident, 3,
2, idp->data, idp->len,
3, nh, strlen(nh),
4, uh, strlen(uh));
tmp = silc_argument_get_arg_type(cmd->args, 1, NULL);
SILC_GET16_MSB(status, tmp);
- if (status != SILC_STATUS_OK) {
+ if (status != SILC_STATUS_OK &&
+ status != SILC_STATUS_LIST_START &&
+ status != SILC_STATUS_LIST_ITEM &&
+ status != SILC_STATUS_LIST_END) {
if (status == SILC_STATUS_ERR_NO_SUCH_NICK) {
/* Take nickname which may be provided */
tmp = silc_argument_get_arg_type(cmd->args, 3, NULL);
}
/* Display one whois reply */
- if (status == SILC_STATUS_OK) {
+ if (status == SILC_STATUS_OK ||
+ status == SILC_STATUS_LIST_START ||
+ status == SILC_STATUS_LIST_ITEM ||
+ status == SILC_STATUS_LIST_END) {
unsigned int len;
unsigned char *id_data;
char *nickname;
}
}
- if (status == SILC_STATUS_LIST_START) {
-
- }
-
- if (status == SILC_STATUS_LIST_END) {
-
+ if (status != SILC_STATUS_OK &&
+ status != SILC_STATUS_LIST_END) {
+ silc_client_command_reply_free(cmd);
+ return;
}
/* Execute any pending command callbacks */