From: Pekka Riikonen Date: Fri, 7 Nov 2003 18:19:04 +0000 (+0000) Subject: Break loop after we found public key from attrs in WHOIS. X-Git-Tag: silc.toolkit.0.9.11~19 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=291414c1a904a0e210114b395924646a4885f9be;p=silc.git Break loop after we found public key from attrs in WHOIS. --- diff --git a/apps/silcd/command_reply.c b/apps/silcd/command_reply.c index 97fc56c7..530f593b 100644 --- a/apps/silcd/command_reply.c +++ b/apps/silcd/command_reply.c @@ -315,8 +315,9 @@ silc_server_command_reply_whois_save(SilcServerCommandReplyContext cmd) if (attrs) { silc_dlist_start(attrs); while ((attr = silc_dlist_get(attrs)) != SILC_LIST_END) { - switch (silc_attribute_get_attribute(attr)) { - case SILC_ATTRIBUTE_USER_PUBLIC_KEY: + if (silc_attribute_get_attribute(attr) == + SILC_ATTRIBUTE_USER_PUBLIC_KEY) { + if (!silc_attribute_get_object(attr, &pk, sizeof(pk))) continue; @@ -355,9 +356,6 @@ silc_server_command_reply_whois_save(SilcServerCommandReplyContext cmd) silc_free(pk.type); silc_free(pk.data); break; - - default: - break; } }