Invalidate the nickname when the replace_id packet was received
authorPekka Riikonen <priikone@silcnet.org>
Wed, 14 Feb 2001 14:42:01 +0000 (14:42 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 14 Feb 2001 14:42:01 +0000 (14:42 +0000)
and Client ID was changed. This way the server will query the
nickname if someone (client) wants it later.

apps/silcd/packet_receive.c
apps/silcd/testi2.conf

index d8141e9731f09a9f4309316359fefab98e98d720..1ffa088e35ac3822219831af89fcdea595f3a45a 100644 (file)
@@ -364,6 +364,12 @@ void silc_server_replace_id(SilcServer server,
        oidp = silc_id_payload_encode(id, SILC_ID_CLIENT);
        nidp = silc_id_payload_encode(id2, SILC_ID_CLIENT);
 
+       /* The nickname is not valid anymore, set it NULL. This causes that
+          the nickname will be queried if someone wants to know it. */
+       if (client->nickname)
+         silc_free(client->nickname);
+       client->nickname = NULL;
+
        /* Send the NICK_CHANGE notify type to local clients on the channels
           this client is joined to. */
        silc_server_send_notify_on_channels(server, client, 
index 984d93b2c3ada808bc7810dc6e06ab2c5ba1cfe6..11fea2dadf57561fc92dc16e57ce119d4007462b 100644 (file)
@@ -12,14 +12,17 @@ sha1::64:20
 #rsa::1024
 #dss::1024
 
+[Identity]
+nobody:nobody
+
 [AdminInfo]
 Mun huone:Mun servo:Pekka Riikonen:priikone@poseidon.pspt.fi
 
 [ServerInfo]
-lassi.kuo.fi.ssh.com:212.146.8.246:Kuopio, Finland:1334
+lassi.kuo.fi.ssh.com:10.2.1.7:Kuopio, Finland:1334
 
 [ListenPort]
-212.146.8.246:212.146.8.246:1334
+10.2.1.7:10.2.1.7:1334
 
 [Logging]
 infologfile:silcd2.log:10000
@@ -40,10 +43,11 @@ errorlogfile:silcd2.log:10000
 [AdminConnection]
 
 [ServerConnection]
-212.146.8.246:passwd:priikone:1333:1:1
+10.2.1.7:passwd:priikone:1333:1:1
+10.2.1.7:passwd:priikone:1336:1:1
 
 [RouterConnection]
-212.146.8.246:passwd:priikone:1335:1:1:0
+10.2.1.7:passwd:priikone:1335:1:1:0
 
 [DenyConnection]
 [RedirectClient]