summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/test-bus-chat.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-03-22 03:36:58 +0100
committerLennart Poettering <lennart@poettering.net>2013-03-22 03:37:10 +0100
commit2571ead1a6d2747f85ecbc980285a22421e76e21 (patch)
tree8ad509c7e60f634da1f549583e0446be36d01c26 /src/libsystemd-bus/test-bus-chat.c
parent20902f3ec8b9d3f8949b15dbd961d3eeb37e9b7b (diff)
bus: implicitly collect ucred/label information
Diffstat (limited to 'src/libsystemd-bus/test-bus-chat.c')
-rw-r--r--src/libsystemd-bus/test-bus-chat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd-bus/test-bus-chat.c b/src/libsystemd-bus/test-bus-chat.c
index 24a194327e..23b00c7201 100644
--- a/src/libsystemd-bus/test-bus-chat.c
+++ b/src/libsystemd-bus/test-bus-chat.c
@@ -83,6 +83,7 @@ static int server(sd_bus *bus) {
while (!client1_gone || !client2_gone) {
_cleanup_bus_message_unref_ sd_bus_message *m = NULL, *reply = NULL;
+ pid_t pid = 0;
r = sd_bus_process(bus, &m);
if (r < 0) {
@@ -103,7 +104,8 @@ static int server(sd_bus *bus) {
if (!m)
continue;
- log_info("Got message! %s", strna(sd_bus_message_get_member(m)));
+ sd_bus_message_get_pid(m, &pid);
+ log_info("Got message! member=%s pid=%lu label=%s", strna(sd_bus_message_get_member(m)), (unsigned long) pid, strna(sd_bus_message_get_label(m)));
/* bus_message_dump(m); */
/* sd_bus_message_rewind(m, true); */