silcd: handle empty LIST command reply
authorPekka Riikonen <priikone@silcnet.org>
Tue, 6 May 2014 15:22:47 +0000 (18:22 +0300)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 6 May 2014 15:22:47 +0000 (18:22 +0300)
If server has only secret channels the server never sends the LIST command
reply back at all.  Check the number of channels to return after taking
the secret channels out.

apps/silcd/command.c

index 213e8feed13edebec257fff173b57c81b6caf38a..7999b3286d2ee9db7105d4d4c4f21f8e44a6d4b1 100644 (file)
@@ -797,7 +797,7 @@ silc_server_command_list_send_reply(SilcServerCommandContext cmd,
       valid_rcount++;
   }
 
-  if (!lch_count && !gch_count) {
+  if (!valid_lcount && !valid_rcount) {
     silc_server_command_send_status_reply(cmd, SILC_COMMAND_LIST,
                                          SILC_STATUS_OK, 0);
     return;