updates.
authorPekka Riikonen <priikone@silcnet.org>
Thu, 2 May 2002 07:18:01 +0000 (07:18 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 2 May 2002 07:18:01 +0000 (07:18 +0000)
apps/silcd/command.c
lib/silcclient/command_reply.c

index aeecb572eaa4f552a072f1c6f41affb25a348017..6bf0f49fa82e67b4b5f0ee27d9b4519ab13bf51f 100644 (file)
@@ -240,15 +240,15 @@ void silc_server_command_process(SilcServer server,
     if (!fast && ((cmd->flags & SILC_CF_LAG_STRICT) ||
                  (client->fast_command > 5 && cmd->flags & SILC_CF_LAG)))
       silc_schedule_task_add(server->schedule, sock->sock, 
-                        silc_server_command_process_timeout,
-                        (void *)timeout, 
-                        2 - (time(NULL) - client->last_command), 0,
-                        SILC_TASK_TIMEOUT, SILC_TASK_PRI_NORMAL);
+                            silc_server_command_process_timeout, timeout,
+                            (client->fast_command < 3 ? 0 :
+                             2 - (time(NULL) - client->last_command)),
+                            (client->fast_command < 3 ? 200000 : 0),
+                            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);
+                            silc_server_command_process_timeout, timeout,
+                            0, 1, SILC_TASK_TIMEOUT, SILC_TASK_PRI_NORMAL);
     return;
   }
 
index 35a7e87c261aca18f7401924ae632cc1a213fc62..ddb4b0d34ff8a8928818719b8d0b7c52cb9b0523 100644 (file)
@@ -499,7 +499,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(nick)
   }
 
   argc = silc_argument_get_arg_num(cmd->args);
-  if (argc < 2 || argc > 2) {
+  if (argc < 2 || argc > 3) {
     SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
        "Cannot set nickname: bad reply to command");
     COMMAND_REPLY_ERROR;