+Thu Apr 14 20:25:08 EEST 2005 Pekka Riikonen <priikone@silcnet.org>
+
+ * Handle empty LIST command reply correcttly in server. Affected
+ file silcd/command_reply.c.
+
+ * Handle empty LIST command reply correctly in client library.
+ The application will now receive one LIST command reply with
+ all arguments set to NULL if there are no channels. Updated
+ Client Library documentation accordingly. Affected file
+ lib/silcclient/command_reply.c.
+
Tue Apr 12 00:02:09 EEST 2005 Pekka Riikonen <priikone@silcnet.org>
* Added channel name string stringprep profile to the protocol
COMMAND_CHECK_STATUS;
tmp = silc_argument_get_arg_type(cmd->args, 2, &len);
+ if (!tmp)
+ goto out;
channel_id = silc_id_payload_parse_id(tmp, len, NULL);
if (!channel_id)
goto out;
<td><small>
Returns the list of channel in the SILC network. Each call of command reply
returns one channel. This means that the command reply is called multiple
-times to return list of channels. The 'channel_topic' may be NULL.
+times to return list of channels. The 'channel', 'channel_name' and
+'channel_topic' may be NULL. However, the 'channel' and 'channel_name'
+are NULL only if there are no channels in the network. In this case
+this reply is called once with all arguments set to NULL. Application
+must be able to handle this situation correctly.
</td>
<td width="50%"><small>SilcChannelEntry channel, char *channel_name,
char *channel_topic, SilcUInt32 user_count
tmp = silc_argument_get_arg_type(cmd->args, 2, &len);
if (!tmp) {
- COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
+ /* There were no channels in the network. */
+ COMMAND_REPLY((SILC_ARGS, NULL, NULL, 0));
goto out;
}