diff options
author | Rocco Rutte <pdmef@gmx.net> | 2006-08-05 00:48:16 +0000 |
---|---|---|
committer | Rocco Rutte <pdmef@gmx.net> | 2006-08-05 00:48:16 +0000 |
commit | fc0c26d0eccc8b3d717769f7b59ecf8dbba1cc48 (patch) | |
tree | 688610f1b0b2ea984c3f2fbd95053df2f8bde74f /mutt_socket.c | |
parent | bf981691e82b2c34b84625702dc263060bf72390 (diff) |
Include FD in socket logging.
Diffstat (limited to 'mutt_socket.c')
-rw-r--r-- | mutt_socket.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mutt_socket.c b/mutt_socket.c index baca4457..574ab955 100644 --- a/mutt_socket.c +++ b/mutt_socket.c @@ -56,10 +56,17 @@ static CONNECTION* socket_new_conn (void); /* Wrappers */ int mutt_socket_open (CONNECTION* conn) { + int rc; + if (socket_preconnect ()) return -1; - return conn->conn_open (conn); + rc = conn->conn_open (conn); + + dprint (2, (debugfile, "Connected to %s:%d on fd=%d\n", + NONULL (conn->account.host), conn->account.port, conn->fd)); + + return rc; } int mutt_socket_close (CONNECTION* conn) @@ -104,7 +111,7 @@ int mutt_socket_write_d (CONNECTION *conn, const char *buf, int len, int dbg) { int rc; - dprint (dbg, (debugfile,"> %s", buf)); + dprint (dbg, (debugfile,"%d> %s", conn->fd, buf)); if (conn->fd < 0) { @@ -200,7 +207,7 @@ int mutt_socket_readln_d (char* buf, size_t buflen, CONNECTION* conn, int dbg) else buf[i] = '\0'; - dprint (dbg, (debugfile, "< %s\n", buf)); + dprint (dbg, (debugfile, "%d< %s\n", conn->fd, buf)); /* number of bytes read, not strlen */ return i + 1; |