From: Sebastian Harl Date: Fri, 11 Apr 2014 07:15:56 +0000 (+0200) Subject: Frontend: Improve debug log when destroying a connection. X-Git-Tag: sysdb-0.1.0~130 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=873f7603c5a213b0db58fa3c29d9e733f31366c8;p=sysdb.git Frontend: Improve debug log when destroying a connection. The file-descriptor associated with the connection might not be open any more and, thus, be -1. Instead of using that in the message, use the connection's object name which includes the file-descriptor as used when accepting the connection. --- diff --git a/src/frontend/connection.c b/src/frontend/connection.c index 1fa4ba9..b98987d 100644 --- a/src/frontend/connection.c +++ b/src/frontend/connection.c @@ -140,8 +140,7 @@ connection_destroy(sdb_object_t *obj) "(%zu byte%s left in buffer)", len, len == 1 ? "" : "s"); } - sdb_log(SDB_LOG_DEBUG, "frontend: Closing connection on fd=%i", - conn->fd); + sdb_log(SDB_LOG_DEBUG, "frontend: Closing connection %s", obj->name); if (conn->fd >= 0) close(conn->fd); conn->fd = -1;