X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fcommand.c;h=c0c058d00aa865054db8f0cd17ff918ed946c2ea;hb=33fde1853daddd7f34565507cb96652f0cec4ee2;hp=48a0fa56231cd50841b5b8f375d6fd1d5731c718;hpb=77599da05bae9b355f600d63f9be8c285ff0ea4d;p=silc.git diff --git a/lib/silcclient/command.c b/lib/silcclient/command.c index 48a0fa56..c0c058d0 100644 --- a/lib/silcclient/command.c +++ b/lib/silcclient/command.c @@ -322,9 +322,8 @@ SILC_CLIENT_CMD_FUNC(nick_change) SilcClientConnection conn = cmd->conn; SilcClientCommandReplyContext reply = (SilcClientCommandReplyContext)context2; - SilcCommandStatus status; + SilcCommandStatus status = silc_command_get_status(reply->payload); - SILC_GET16_MSB(status, silc_argument_get_arg_type(reply->args, 1, NULL)); if (status == SILC_STATUS_OK) { /* Set the nickname */ silc_idcache_del_by_context(conn->client_cache, conn->local_entry); @@ -749,9 +748,8 @@ SILC_CLIENT_CMD_FUNC(kill_remove) SilcClientCommandContext cmd = (SilcClientCommandContext)context; SilcClientCommandReplyContext reply = (SilcClientCommandReplyContext)context2; - SilcCommandStatus status; + SilcCommandStatus status = silc_command_get_status(reply->payload); - SILC_GET16_MSB(status, silc_argument_get_arg_type(reply->args, 1, NULL)); if (status == SILC_STATUS_OK) { /* Remove with timeout */ silc_schedule_task_add(cmd->client->schedule, cmd->conn->sock->sock, @@ -2167,9 +2165,7 @@ SILC_CLIENT_CMD_FUNC(getkey) } else { SilcClientCommandReplyContext reply = (SilcClientCommandReplyContext)context2; - SilcCommandStatus status; - unsigned char *tmp = silc_argument_get_arg_type(reply->args, 1, NULL); - SILC_GET16_MSB(status, tmp); + SilcCommandStatus status = silc_command_get_status(reply->payload); /* If nickname was not found, then resolve the server. */ if (status == SILC_STATUS_ERR_NO_SUCH_NICK) {