mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-31 17:49:11 +00:00
Move NewConnection handling from callbacks to New_Connection()
This commit is contained in:
parent
03cde2efd3
commit
1b73e68e6e
@ -124,9 +124,7 @@ static void
|
|||||||
cb_listen(int sock, short irrelevant)
|
cb_listen(int sock, short irrelevant)
|
||||||
{
|
{
|
||||||
(void) irrelevant;
|
(void) irrelevant;
|
||||||
if (New_Connection( sock ) >= 0)
|
(void) New_Connection(sock);
|
||||||
NumConnections++;
|
|
||||||
LogDebug("Total number of connections now %ld.", NumConnections);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -146,9 +144,6 @@ cb_listen_ssl(int sock, short irrelevant)
|
|||||||
fd = New_Connection(sock);
|
fd = New_Connection(sock);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NumConnections++;
|
|
||||||
LogDebug("Total number of connections now %ld.", NumConnections);
|
|
||||||
io_event_setcb(My_Connections[fd].sock, cb_clientserver_ssl);
|
io_event_setcb(My_Connections[fd].sock, cb_clientserver_ssl);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1361,6 +1356,9 @@ New_Connection(int Sock)
|
|||||||
* DNS and IDENT resolver subprocess using the "penalty" mechanism.
|
* DNS and IDENT resolver subprocess using the "penalty" mechanism.
|
||||||
* If there are results earlier, the delay is aborted. */
|
* If there are results earlier, the delay is aborted. */
|
||||||
Conn_SetPenalty(new_sock, 4);
|
Conn_SetPenalty(new_sock, 4);
|
||||||
|
|
||||||
|
NumConnections++;
|
||||||
|
LogDebug("Total number of connections now %ld.", NumConnections);
|
||||||
return new_sock;
|
return new_sock;
|
||||||
} /* New_Connection */
|
} /* New_Connection */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user