From: Pekka Riikonen Date: Wed, 30 Jan 2002 13:50:44 +0000 (+0000) Subject: updates X-Git-Tag: 1.2.beta1~1681 X-Git-Url: http://git.silcnet.org/gitweb/?p=runtime.git;a=commitdiff_plain;h=2f29684e9e71a2b58536d2cf82e0e928f29e6a44 updates --- diff --git a/TODO b/TODO index d076aa66..a7b0f3af 100644 --- a/TODO +++ b/TODO @@ -310,7 +310,8 @@ least could be done. SIGNOFF of notify at all (using SIGNOFF takes the idea about SERVER_SIGNOFF away entirely). - o Add SilcAsyncOperation to utility library. + o Add SilcAsyncOperation to utility library. Any function that takes + callback as an argument must return SilcAsyncOperation. o Cipher optimizations (asm, that this) at least for i386 would be nice. diff --git a/apps/silcd/command.c b/apps/silcd/command.c index efaa985c..7e08a6ef 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -131,7 +131,6 @@ static int silc_server_is_registered(SilcServer server, silc_server_command_send_status_reply(cmd, command, SILC_STATUS_ERR_NOT_REGISTERED); - silc_server_command_free(cmd); return FALSE; } @@ -159,6 +158,8 @@ SILC_TASK_CALLBACK(silc_server_command_process_timeout) timeout->ctx, timeout->cmd->cmd)) timeout->cmd->cb(timeout->ctx, NULL); + else + silc_server_command_free(timeout->ctx); silc_free(timeout); } @@ -233,15 +234,12 @@ void silc_server_command_process(SilcServer server, silc_server_command_process_timeout, (void *)timeout, 2 - (time(NULL) - client->last_command), 0, - SILC_TASK_TIMEOUT, - SILC_TASK_PRI_NORMAL); + SILC_TASK_TIMEOUT, SILC_TASK_PRI_NORMAL); else silc_schedule_task_add(server->schedule, sock->sock, silc_server_command_process_timeout, - (void *)timeout, - 0, 1, - SILC_TASK_TIMEOUT, - SILC_TASK_PRI_NORMAL); + (void *)timeout, 0, 1, + SILC_TASK_TIMEOUT, SILC_TASK_PRI_NORMAL); return; } @@ -251,6 +249,8 @@ void silc_server_command_process(SilcServer server, cmd->cb(ctx, NULL); else if (silc_server_is_registered(server, sock, ctx, cmd->cmd)) cmd->cb(ctx, NULL); + else + silc_server_command_free(ctx); } /* Allocate Command Context */ @@ -3455,7 +3455,8 @@ SILC_SERVER_CMD_FUNC(join) if (silc_command_get(reply->payload) == SILC_COMMAND_JOIN) { tmp = silc_argument_get_arg_type(reply->args, 6, NULL); SILC_GET32_MSB(created, tmp); - create_key = FALSE; /* Router returned the key already */ + if (silc_argument_get_arg_type(reply->args, 7, NULL) + create_key = FALSE; /* Router returned the key already */ } if (silc_command_get(reply->payload) == SILC_COMMAND_WHOIS && diff --git a/lib/silcutil/silclog.c b/lib/silcutil/silclog.c index cf89958b..8a358309 100644 --- a/lib/silcutil/silclog.c +++ b/lib/silcutil/silclog.c @@ -59,7 +59,7 @@ bool silc_debug_hexdump = FALSE; long silc_log_flushdelay = 300; /* Regular pattern matching expression for the debug output */ -static char *silc_log_debug_string = NULL; +char *silc_log_debug_string = NULL; /* Debug callbacks. If set these are used instead of default ones. */ static SilcLogDebugCb silc_log_debug_cb = NULL;