X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fsilcclient%2Fcommand_reply.c;h=0ae2890bf8c233eee94188c01c2014e99e75a909;hp=d615c14204e31f67138afae054961ae7c7e55b58;hb=382d15d447b7a95390decfa783836ae4fe255b3d;hpb=3cf38201f9ffaad2da53757ed48a5546e1d03636 diff --git a/lib/silcclient/command_reply.c b/lib/silcclient/command_reply.c index d615c142..0ae2890b 100644 --- a/lib/silcclient/command_reply.c +++ b/lib/silcclient/command_reply.c @@ -1744,6 +1744,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(users) { SilcClientCommandReplyContext cmd = (SilcClientCommandReplyContext)context; SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data; + SilcClientCommandReplyContext r = (SilcClientCommandReplyContext)context2; SILC_LOG_DEBUG(("Start")); @@ -1754,6 +1755,13 @@ SILC_CLIENT_CMD_REPLY_FUNC(users) goto out; } + if (r && !silc_command_get_status(r->payload, NULL, &cmd->error)) { + SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR, + "%s", silc_get_status_message(cmd->error)); + COMMAND_REPLY_ERROR; + goto out; + } + if (silc_client_command_reply_users_save(cmd, cmd->status, TRUE, silc_client_command_reply_users_cb, silc_client_command_reply_users)) @@ -1818,6 +1826,14 @@ SILC_CLIENT_CMD_REPLY_FUNC(getkey) goto out; } + /* Save fingerprint */ + if (!client_entry->fingerprint) { + client_entry->fingerprint = silc_calloc(20, sizeof(unsigned char)); + client_entry->fingerprint_len = 20; + silc_hash_make(cmd->client->sha1hash, tmp + 4, len - 4, + client_entry->fingerprint); + } + /* Notify application */ COMMAND_REPLY((SILC_ARGS, id_type, client_entry, public_key)); } else if (id_type == SILC_ID_SERVER) {