From 3f88fe47011874024448b55e8cfac2dc50507d17 Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Sun, 15 Jan 2023 04:49:03 +0200 Subject: [PATCH] send NameOwnerChanged for unique name assignment too --- server.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server.c b/server.c index dcea5c5..8346738 100644 --- a/server.c +++ b/server.c @@ -416,6 +416,15 @@ int handle_hello(bus_t *s, int i, wire_message_t *msg, wire_context_t *ctx, wire TRYPTR(wire_set_string(reply_ctx, s->names[unique_name_index].name)); } _reply_end() + _signal_begin("sss", "NameOwnerChanged") { + /* Name with a new owner */ + TRYPTR(wire_set_string(&signal_reply_ctx, s->names[unique_name_index].name)); + /* Old owner or empty string if none */ + TRYPTR(wire_set_string(&signal_reply_ctx, "")); + /* New owner or empty string if none */ + TRYPTR(wire_set_string(&signal_reply_ctx, "")); + } _signal_end(); + printf("assigned unique name '%s' to connection %d\n", s->names[unique_name_index].name, i); return 0; }