Fix compilation warnings
[silc.git] / lib / silcclient / command_reply.c
index 7a7fa2b1028af8507218c5aff3c5a2e5c54391ad..57c339aaf334adbb5e1a3d3699a000d6039cf46a 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2007 Pekka Riikonen
+  Copyright (C) 1997 - 2014 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -738,6 +738,12 @@ SILC_FSM_STATE(silc_client_command_reply_nick)
     goto out;
   }
 
+  /* All auto-generated private message keys must be rekeyed because
+     we changed nick and others may not know about it. */
+  conn->internal->ake_generation++;
+  SILC_LOG_DEBUG(("AKE keys will be rekeyed, generation %u",
+                 conn->internal->ake_generation));
+
   silc_rwlock_unlock(conn->local_entry->internal.lock);
 
   /* Notify application */
@@ -1361,7 +1367,7 @@ SILC_FSM_STATE(silc_client_command_reply_motd)
          line[0] = ' ';
 
        if (cmd->verbose)
-         SAY(client, conn, SILC_CLIENT_MESSAGE_INFO, "%s", line);
+         SAY(client, conn, SILC_CLIENT_MESSAGE_AUDIT, "%s", line);
 
        if (!strlen(cp))
          break;
@@ -2016,7 +2022,7 @@ SILC_FSM_STATE(silc_client_command_reply_getkey)
   SilcServerEntry server_entry;
   unsigned char *tmp;
   SilcUInt32 len;
-  SilcPublicKey public_key;
+  SilcPublicKey public_key = NULL;
   SilcID id;
 
   /* Sanity checks */