Skip to content

Commit

Permalink
MONITOR: Link DbusConnection and sbus_connection
Browse files Browse the repository at this point in the history
Although related, the DbusConnection and its associated sbus_connection
had no link in the logs. We had this:

```
[sbus_server_new_connection] (0x0200): Adding connection 0x11fe700.
...
[sbus_server_bus_hello] (0x4000): Assigning unique name :1.3 to connection 0x11e4a90
```

Now we have:
```
[sbus_server_new_connection] (0x0200): New dbus connection 0x11fe700.
...
[sbus_server_new_connection] (0x0200): Adding sbus connection 0x11e4a90.
...
[sbus_server_bus_hello] (0x4000): Assigning unique name :1.3 to connection 0x11e4a90
```

Which allows to establish the relationship between them: the new
sbus connection is associated to the preceding dbus connection. Both
messages are logged by the same function.

Reviewed-by: Alexey Tikhonov <[email protected]>
Reviewed-by: Pavel Březina <[email protected]>
  • Loading branch information
aplopez authored and alexey-tikhonov committed Oct 9, 2024
1 parent 8be2172 commit 1c91ea0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sbus/server/sbus_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ sbus_server_new_connection(DBusServer *dbus_server,

sbus_server = talloc_get_type(data, struct sbus_server);

DEBUG(SSSDBG_FUNC_DATA, "Adding connection %p.\n", dbus_conn);
DEBUG(SSSDBG_FUNC_DATA, "New dbus connection %p.\n", dbus_conn);

/* First, add a message filter that will take care of routing messages
* between connections. */
Expand All @@ -429,6 +429,7 @@ sbus_server_new_connection(DBusServer *dbus_server,
dbus_connection_close(dbus_conn);
return;
}
DEBUG(SSSDBG_FUNC_DATA, "Adding sbus connection %p.\n", sbus_conn);

dbret = dbus_connection_set_data(dbus_conn, sbus_server->data_slot,
sbus_conn, NULL);
Expand Down

0 comments on commit 1c91ea0

Please sign in to comment.