Fixed double free in query code when sending query to router.
+Sun Nov 3 17:59:15 EET 2002 Pekka Riikonen <priikone@silcnet.org>
+
+ * Fixed the INVITE command to not crash Irssi SILC client
+ when given without nickname argument. AFfected file
+ irssi/src/silc/core/client_ops.c.
+
+ * Fixed double free in WHOIS query on normal server when
+ forwarding query to router. Affected file is
+ silcd/server_query.c.
+
+ * Fixed WATCH command reply handling on normal server which
+ was missing altogether. Affected file silcd/command_reply.c.
+ Bug #44.
+
Sat Nov 2 21:26:56 EET 2002 Pekka Riikonen <priikone@silcnet.org>
* Added support for encrypted private key files. Now
/* If we are normal server, send the command to router, since we
want to know all channels in the network. */
- if (!cmd->pending && server->server_type == SILC_SERVER &&
+ if (!cmd->pending && server->server_type != SILC_ROUTER &&
!server->standalone) {
SilcBuffer tmpbuf;
SilcUInt16 old_ident;
SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_WATCH, cmd, 1, 3);
- if (server->server_type == SILC_SERVER && !server->standalone) {
+ if (server->server_type != SILC_ROUTER && !server->standalone) {
if (!cmd->pending) {
/* Send the command to router */
SilcBuffer tmpbuf;
SilcUInt16 old_ident;
+ SILC_LOG_DEBUG(("Forwarding WATCH to router"));
+
old_ident = silc_command_get_ident(cmd->payload);
silc_command_set_ident(cmd->payload, ++server->cmd_ident);
tmpbuf = silc_command_payload_encode_payload(cmd->payload);
/* Received reply from router, just send same data to the client. */
SilcServerCommandReplyContext reply = context2;
SilcStatus status;
+
+ SILC_LOG_DEBUG(("Received reply to WATCH from router"));
silc_command_get_status(reply->payload, &status, NULL);
silc_server_command_send_status_reply(cmd, SILC_COMMAND_WATCH, status,
0);
SILC_SERVER_CMD_REPLY(users, USERS),
SILC_SERVER_CMD_REPLY(getkey, GETKEY),
SILC_SERVER_CMD_REPLY(list, LIST),
+ SILC_SERVER_CMD_REPLY(watch, WATCH),
{ NULL, 0 },
};
/* Get statistics structure */
tmp = silc_argument_get_arg_type(cmd->args, 3, &tmp_len);
- if (server->server_type == SILC_SERVER && tmp) {
+ if (server->server_type != SILC_ROUTER && tmp) {
silc_buffer_set(&buf, tmp, tmp_len);
silc_buffer_unformat(&buf,
SILC_STR_UI_INT(NULL),
/* If we are normal server we'll retrieve network statisticial information
once in a while from the router. */
- if (server->server_type == SILC_SERVER)
+ if (server->server_type != SILC_ROUTER)
silc_schedule_task_add(server->schedule, 0, silc_server_get_stats,
server, 10, 0, SILC_TASK_TIMEOUT,
SILC_TASK_PRI_LOW);
for (i = 0; i < query->ids_count; i++)
silc_free(query->ids[i].id);
silc_free(query->ids);
+ query->ids = NULL;
+ query->ids_count = 0;
silc_free(id);
return;
}
for (i = 0; i < query->ids_count; i++)
silc_free(query->ids[i].id);
silc_free(query->ids);
+ query->ids = NULL;
+ query->ids_count = 0;
silc_free(id);
return;
}
for (i = 0; i < query->ids_count; i++)
silc_free(query->ids[i].id);
silc_free(query->ids);
+ query->ids = NULL;
+ query->ids_count = 0;
silc_free(id);
return;
}