summaryrefslogtreecommitdiff
path: root/src/bus-proxyd
diff options
context:
space:
mode:
Diffstat (limited to 'src/bus-proxyd')
-rw-r--r--src/bus-proxyd/proxy.c4
-rw-r--r--src/bus-proxyd/synthesize.c19
2 files changed, 9 insertions, 14 deletions
diff --git a/src/bus-proxyd/proxy.c b/src/bus-proxyd/proxy.c
index b3ec048d03..df361ac400 100644
--- a/src/bus-proxyd/proxy.c
+++ b/src/bus-proxyd/proxy.c
@@ -653,6 +653,10 @@ static int process_hello(Proxy *p, sd_bus_message *m) {
if (r < 0)
return log_error_errno(r, "Failed to append sender to NameAcquired message: %m");
+ r = sd_bus_message_set_destination(n, p->destination_bus->unique_name);
+ if (r < 0)
+ return log_error_errno(r, "Failed to set destination for NameAcquired message: %m");
+
r = bus_seal_synthetic_message(p->local_bus, n);
if (r < 0)
return log_error_errno(r, "Failed to seal NameAcquired message: %m");
diff --git a/src/bus-proxyd/synthesize.c b/src/bus-proxyd/synthesize.c
index 3ecedfd575..15d99103f6 100644
--- a/src/bus-proxyd/synthesize.c
+++ b/src/bus-proxyd/synthesize.c
@@ -214,22 +214,13 @@ int synthesize_name_acquired(Proxy *p, sd_bus *a, sd_bus *b, sd_bus_message *m)
if (r < 0)
return r;
- r = bus_seal_synthetic_message(b, n);
+ r = sd_bus_message_set_destination(n, a->unique_name);
if (r < 0)
return r;
- /*
- * Make sure to only forward NameLost/NameAcquired messages if they
- * match an installed MATCH rule of the local client. We really must
- * not send messages the client doesn't expect.
- */
-
- r = bus_match_run(b, &b->match_callbacks, n);
- if (r >= 0 && p->message_matched)
- r = sd_bus_send(b, n, NULL);
-
- p->message_matched = false;
- p->synthetic_matched = false;
+ r = bus_seal_synthetic_message(b, n);
+ if (r < 0)
+ return r;
- return r;
+ return sd_bus_send(b, n, NULL);
}