mirror of
https://github.com/osmarks/ngircd.git
synced 2025-04-07 08:16:56 +00:00
Add connection/socket information to some log messages
This commit is contained in:
parent
a57748e1a1
commit
d3ef2239e1
@ -238,8 +238,10 @@ cb_connserver(int sock, UNUSED short what)
|
|||||||
static void
|
static void
|
||||||
server_login(CONN_ID idx)
|
server_login(CONN_ID idx)
|
||||||
{
|
{
|
||||||
Log( LOG_INFO, "Connection %d with \"%s:%d\" established. Now logging in ...", idx,
|
Log(LOG_INFO,
|
||||||
My_Connections[idx].host, Conf_Server[Conf_GetServer( idx )].port );
|
"Connection %d (socket %d) with \"%s:%d\" established. Now logging in ...",
|
||||||
|
idx, My_Connections[idx].sock, My_Connections[idx].host,
|
||||||
|
Conf_Server[Conf_GetServer(idx)].port);
|
||||||
|
|
||||||
io_event_setcb( My_Connections[idx].sock, cb_clientserver);
|
io_event_setcb( My_Connections[idx].sock, cb_clientserver);
|
||||||
io_event_add( My_Connections[idx].sock, IO_WANTREAD|IO_WANTWRITE);
|
io_event_add( My_Connections[idx].sock, IO_WANTREAD|IO_WANTWRITE);
|
||||||
@ -1765,14 +1767,17 @@ New_Server( int Server , ng_ipaddr_t *dest)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(LOG_INFO, "Establishing connection for \"%s\" to \"%s\" (%s) port %d ... ",
|
|
||||||
Conf_Server[Server].name, Conf_Server[Server].host, ip_str,
|
|
||||||
Conf_Server[Server].port);
|
|
||||||
|
|
||||||
af_dest = ng_ipaddr_af(dest);
|
af_dest = ng_ipaddr_af(dest);
|
||||||
new_sock = socket(af_dest, SOCK_STREAM, 0);
|
new_sock = socket(af_dest, SOCK_STREAM, 0);
|
||||||
|
|
||||||
|
Log(LOG_INFO,
|
||||||
|
"Establishing connection for \"%s\" to \"%s:%d\" (%s), socket %d ...",
|
||||||
|
Conf_Server[Server].name, Conf_Server[Server].host,
|
||||||
|
Conf_Server[Server].port, ip_str, new_sock);
|
||||||
|
|
||||||
if (new_sock < 0) {
|
if (new_sock < 0) {
|
||||||
Log( LOG_CRIT, "Can't create socket (af %d) : %s!", af_dest, strerror( errno ));
|
Log(LOG_CRIT, "Can't create socket (af %d): %s!",
|
||||||
|
af_dest, strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,8 +151,9 @@ IRC_PASS( CLIENT *Client, REQUEST *Req )
|
|||||||
} else
|
} else
|
||||||
flags = "";
|
flags = "";
|
||||||
Log(LOG_INFO,
|
Log(LOG_INFO,
|
||||||
"Peer announces itself as %s-%s using protocol %d.%d/IRC+ (flags: \"%s\").",
|
"Peer on conenction %d announces itself as %s-%s using protocol %d.%d/IRC+ (flags: \"%s\").",
|
||||||
impl, serverver, protohigh, protolow, flags);
|
Client_Conn(Client), impl, serverver,
|
||||||
|
protohigh, protolow, flags);
|
||||||
} else {
|
} else {
|
||||||
/* The peer seems to be a server supporting the
|
/* The peer seems to be a server supporting the
|
||||||
* "original" IRC protocol (RFC 2813). */
|
* "original" IRC protocol (RFC 2813). */
|
||||||
@ -161,8 +162,9 @@ IRC_PASS( CLIENT *Client, REQUEST *Req )
|
|||||||
else
|
else
|
||||||
flags = "";
|
flags = "";
|
||||||
Log(LOG_INFO,
|
Log(LOG_INFO,
|
||||||
"Peer announces itself as \"%s\" using protocol %d.%d (flags: \"%s\").",
|
"Peer on connection %d announces itself as \"%s\" using protocol %d.%d (flags: \"%s\").",
|
||||||
impl, protohigh, protolow, flags);
|
Client_Conn(Client), impl,
|
||||||
|
protohigh, protolow, flags);
|
||||||
}
|
}
|
||||||
Client_SetFlags(Client, flags);
|
Client_SetFlags(Client, flags);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user