X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fcommand_reply.c;fp=lib%2Fsilcclient%2Fcommand_reply.c;h=8317c61717481920e8c03e7c857dcddf1f45812d;hb=f814e303372b12686d4490d0ec94d670085dd216;hp=73e45893ef9f4011f0eb460b2b0b74453ba9c2f0;hpb=231c599fcb44a00645655e2908cbb13fd29d9339;p=silc.git diff --git a/lib/silcclient/command_reply.c b/lib/silcclient/command_reply.c index 73e45893..8317c617 100644 --- a/lib/silcclient/command_reply.c +++ b/lib/silcclient/command_reply.c @@ -1252,8 +1252,8 @@ SILC_FSM_STATE(silc_client_command_reply_join) } /* Get channel mode */ - tmp = silc_argument_get_arg_type(args, 5, NULL); - if (tmp) + tmp = silc_argument_get_arg_type(args, 5, &len); + if (tmp && len == 4) SILC_GET32_MSB(mode, tmp); channel->mode = mode; @@ -1440,6 +1440,11 @@ SILC_FSM_STATE(silc_client_command_reply_cmode) goto out; } + /* Get founder public key */ + tmp = silc_argument_get_arg_type(args, 4, &len); + if (tmp) + silc_public_key_payload_decode(tmp, len, &public_key); + /* Get channel mode */ tmp = silc_argument_get_arg_type(args, 3, &len); if (!tmp || len != 4) { @@ -1447,11 +1452,6 @@ SILC_FSM_STATE(silc_client_command_reply_cmode) goto out; } - /* Get founder public key */ - tmp = silc_argument_get_arg_type(args, 4, &len); - if (tmp) - silc_public_key_payload_decode(tmp, len, &public_key); - silc_rwlock_wrlock(channel->internal.lock); /* Save the mode */