core/dbus: debug log unix file descriptor when accpeting private dbus connection

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller
2014-09-30 11:38:39 +02:00
parent 31daa2cfbd
commit 0218f055b0

View File

@@ -145,6 +145,7 @@ private_server_new_connection (DBusServer *server,
PrivateServer *s = user_data; PrivateServer *s = user_data;
static guint32 counter = 0; static guint32 counter = 0;
char *sender; char *sender;
int fd;
if (!dbus_connection_add_filter (conn, private_server_message_filter, s, NULL)) { if (!dbus_connection_add_filter (conn, private_server_message_filter, s, NULL)) {
dbus_connection_close (conn); dbus_connection_close (conn);
@@ -157,7 +158,8 @@ private_server_new_connection (DBusServer *server,
sender = g_strdup_printf ("x:y:%d", counter++); sender = g_strdup_printf ("x:y:%d", counter++);
g_hash_table_insert (s->connections, dbus_connection_ref (conn), sender); g_hash_table_insert (s->connections, dbus_connection_ref (conn), sender);
nm_log_dbg (LOGD_CORE, "(%s) accepted connection %p on private socket.", s->tag, conn); nm_log_dbg (LOGD_CORE, "(%s) accepted connection %p on private socket (fd %"G_GINT64_FORMAT").",
s->tag, conn, dbus_connection_get_unix_fd (conn, &fd) ? fd : G_MININT64);
/* Emit this for the manager */ /* Emit this for the manager */
g_signal_emit (s->manager, g_signal_emit (s->manager,