]> arthur.barton.de Git - ngircd-alex.git/commitdiff
New_Connection(): don't set the client hostname twice
authorAlexander Barton <alex@barton.de>
Wed, 25 Jan 2012 16:11:44 +0000 (17:11 +0100)
committerAlexander Barton <alex@barton.de>
Wed, 25 Jan 2012 16:11:44 +0000 (17:11 +0100)
Setting the hostname twice doesn't do much harm a lot, but isn't elegant.
And for IPv6 addresses, it isn't correct the first time (missing []) ...

src/ngircd/client.c
src/ngircd/conn.c

index 078449c0b1c882cd2eeab92ca11409c686a7d46e..7e28e8fb1035006d540e9f3e4b7ba7d720944662 100644 (file)
@@ -186,7 +186,6 @@ Init_New_Client(CONN_ID Idx, CLIENT *Introducer, CLIENT *TopServer,
 
        assert(Idx >= NONE);
        assert(Introducer != NULL);
 
        assert(Idx >= NONE);
        assert(Introducer != NULL);
-       assert(Hostname != NULL);
 
        client = New_Client_Struct();
        if (!client)
 
        client = New_Client_Struct();
        if (!client)
index 71dc939f0e3ce0ce5a46107ed555cfa7334e398d..82dbb288d9e281e0a4c72ec4ff9f3bfce1e218b1 100644 (file)
@@ -1438,7 +1438,7 @@ New_Connection(int Sock)
                return -1;
        }
 
                return -1;
        }
 
-       c = Client_NewLocal(new_sock, ip_str, CLIENT_UNKNOWN, false);
+       c = Client_NewLocal(new_sock, NULL, CLIENT_UNKNOWN, false);
        if (!c) {
                Log(LOG_ALERT,
                    "Can't accept connection: can't create client structure!");
        if (!c) {
                Log(LOG_ALERT,
                    "Can't accept connection: can't create client structure!");