From: Pekka Riikonen Date: Tue, 8 Apr 2008 05:00:40 +0000 (+0300) Subject: Fixed busy-loop in WATCH command when adding public keys. X-Git-Tag: 1.2.beta4~12^2~22 X-Git-Url: http://git.silcnet.org/gitweb/?p=runtime.git;a=commitdiff_plain;h=bc5293b5663c03847ab2400a69dbbeb7f69d439f Fixed busy-loop in WATCH command when adding public keys. If the public key decoding failed the command ended up decoding and failing the same public key for ever. --- diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 12b5ce26..f9b723af 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -4370,8 +4370,10 @@ SILC_SERVER_CMD_FUNC(watch) pk = silc_argument_get_next_arg(pkargs, &type, &pk_len); while (pk) { - if (!silc_public_key_payload_decode(pk, pk_len, &public_key)) + if (!silc_public_key_payload_decode(pk, pk_len, &public_key)) { + pk = silc_argument_get_next_arg(pkargs, &type, &pk_len); continue; + } if (type == 0x03) type = 0x00;