summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2012-01-25 17:11:44 +0100
committerAlexander Barton <alex@barton.de>2012-01-25 17:11:44 +0100
commitc16133c5ee72256ef5b8fa586e72e5e3598e75bb (patch)
treec3eca50c5c141390ca2db4cc2c7a6903ac27b883
parent48889844299e036515e567aa5f992df18ccdf2d7 (diff)
downloadngircd-c16133c5ee72256ef5b8fa586e72e5e3598e75bb.tar.gz
ngircd-c16133c5ee72256ef5b8fa586e72e5e3598e75bb.zip
New_Connection(): don't set the client hostname twice
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 []) ...
-rw-r--r--src/ngircd/client.c1
-rw-r--r--src/ngircd/conn.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/ngircd/client.c b/src/ngircd/client.c
index 078449c0..7e28e8fb 100644
--- a/src/ngircd/client.c
+++ b/src/ngircd/client.c
@@ -186,7 +186,6 @@ Init_New_Client(CONN_ID Idx, CLIENT *Introducer, CLIENT *TopServer,
 
 	assert(Idx >= NONE);
 	assert(Introducer != NULL);
-	assert(Hostname != NULL);
 
 	client = New_Client_Struct();
 	if (!client)
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 71dc939f..82dbb288 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -1438,7 +1438,7 @@ New_Connection(int Sock)
 		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!");