mirror of
https://github.com/osmarks/ngircd.git
synced 2025-05-03 16:04:06 +00:00
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 []) ...
This commit is contained in:
parent
4888984429
commit
c16133c5ee
@ -186,7 +186,6 @@ Init_New_Client(CONN_ID Idx, CLIENT *Introducer, CLIENT *TopServer,
|
|||||||
|
|
||||||
assert(Idx >= NONE);
|
assert(Idx >= NONE);
|
||||||
assert(Introducer != NULL);
|
assert(Introducer != NULL);
|
||||||
assert(Hostname != NULL);
|
|
||||||
|
|
||||||
client = New_Client_Struct();
|
client = New_Client_Struct();
|
||||||
if (!client)
|
if (!client)
|
||||||
|
@ -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) {
|
if (!c) {
|
||||||
Log(LOG_ALERT,
|
Log(LOG_ALERT,
|
||||||
"Can't accept connection: can't create client structure!");
|
"Can't accept connection: can't create client structure!");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user