projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ce09506
)
EVENT: output the FD number in the debug log once we know it
author
Wilfried Goesgens
<dothebart@citadel.org>
Tue, 7 Aug 2012 19:07:07 +0000
(21:07 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Tue, 7 Aug 2012 19:07:07 +0000
(21:07 +0200)
citadel/event_client.c
patch
|
blob
|
history
diff --git
a/citadel/event_client.c
b/citadel/event_client.c
index eb8a682fcbad3c8586bad0d188e3193ac1331ab0..7122ffc720035fe0102995cccfbe405346b34f8e 100644
(file)
--- a/
citadel/event_client.c
+++ b/
citadel/event_client.c
@@
-888,10
+888,12
@@
eNextState EvConnectSock(AsyncIO *IO,
fdflags = fcntl(IO->SendBuf.fd, F_GETFL);
if (fdflags < 0) {
EV_syslog(LOG_ERR,
fdflags = fcntl(IO->SendBuf.fd, F_GETFL);
if (fdflags < 0) {
EV_syslog(LOG_ERR,
- "EVENT: unable to get socket flags! %s \n",
+ "EVENT: unable to get socket %d flags! %s \n",
+ IO->SendBuf.fd,
strerror(errno));
StrBufPrintf(IO->ErrMsg,
strerror(errno));
StrBufPrintf(IO->ErrMsg,
- "Failed to get socket flags: %s",
+ "Failed to get socket %d flags: %s",
+ IO->SendBuf.fd,
strerror(errno));
close(IO->SendBuf.fd);
IO->SendBuf.fd = IO->RecvBuf.fd = 0;
strerror(errno));
close(IO->SendBuf.fd);
IO->SendBuf.fd = IO->RecvBuf.fd = 0;
@@
-901,7
+903,8
@@
eNextState EvConnectSock(AsyncIO *IO,
if (fcntl(IO->SendBuf.fd, F_SETFL, fdflags) < 0) {
EV_syslog(
LOG_ERR,
if (fcntl(IO->SendBuf.fd, F_SETFL, fdflags) < 0) {
EV_syslog(
LOG_ERR,
- "EVENT: unable to set socket nonblocking flags! %s \n",
+ "EVENT: unable to set socket %d nonblocking flags! %s \n",
+ IO->SendBuf.fd,
strerror(errno));
StrBufPrintf(IO->ErrMsg,
"Failed to set socket flags: %s",
strerror(errno));
StrBufPrintf(IO->ErrMsg,
"Failed to set socket flags: %s",
@@
-958,12
+961,12
@@
eNextState EvConnectSock(AsyncIO *IO,
}
if (rc >= 0){
}
if (rc >= 0){
- EV
M_syslog(LOG_DEBUG, "connect() immediate success.\n"
);
+ EV
_syslog(LOG_DEBUG, "connect() = %d immediate success.\n", IO->SendBuf.fd
);
set_start_callback(event_base, IO, 0);
return IO->NextState;
}
else if (errno == EINPROGRESS) {
set_start_callback(event_base, IO, 0);
return IO->NextState;
}
else if (errno == EINPROGRESS) {
- EV
M_syslog(LOG_DEBUG, "connect() have to wait now.\n"
);
+ EV
_syslog(LOG_DEBUG, "connect() = %d have to wait now.\n", IO->SendBuf.fd
);
ev_io_init(&IO->conn_event,
IO_connestd_callback,
ev_io_init(&IO->conn_event,
IO_connestd_callback,
@@
-982,7
+985,11
@@
eNextState EvConnectSock(AsyncIO *IO,
IO->conn_fail_immediate.data = IO;
ev_idle_start(event_base, &IO->conn_fail_immediate);
IO->conn_fail_immediate.data = IO;
ev_idle_start(event_base, &IO->conn_fail_immediate);
- EV_syslog(LOG_ERR, "connect() failed: %s\n", strerror(errno));
+ EV_syslog(LOG_ERR,
+ "connect() = %d failed: %s\n",
+ IO->SendBuf.fd,
+ strerror(errno));
+
StrBufPrintf(IO->ErrMsg,
"Failed to connect: %s",
strerror(errno));
StrBufPrintf(IO->ErrMsg,
"Failed to connect: %s",
strerror(errno));