mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-07-01 21:43:17 +02:00
@ -234,7 +234,9 @@ int main(int argc, char **argv){
|
||||
}
|
||||
|
||||
if(getnameinfo((struct sockaddr *)&client_address, client_len, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV) == 0){
|
||||
syslog(LOG_PRIORITY, "connected from %s:%s on descriptor %d", hbuf, sbuf, client_sockfd);
|
||||
// Strictly speaking it's not correct to log num_connections+1 connections
|
||||
// but it still gives a good clue how many connections we have at the moment
|
||||
syslog(LOG_PRIORITY, "connected from %s:%s on descriptor %d (active connections: %d)", hbuf, sbuf, client_sockfd, num_connections + 1);
|
||||
}
|
||||
|
||||
if(make_socket_non_blocking(client_sockfd) == -1){
|
||||
|
@ -151,7 +151,7 @@ void free_smtp_session(struct smtp_session *session){
|
||||
|
||||
|
||||
void tear_down_session(struct smtp_session **sessions, int slot, int *num_connections){
|
||||
syslog(LOG_PRIORITY, "disconnected from %s", sessions[slot]->remote_host);
|
||||
syslog(LOG_PRIORITY, "disconnected from %s on descriptor %d (%d active connections)", sessions[slot]->remote_host, sessions[slot]->net.socket, (*num_connections)-1);
|
||||
|
||||
close(sessions[slot]->net.socket);
|
||||
|
||||
|
Reference in New Issue
Block a user