diff options
Diffstat (limited to 'bus/dispatch.c')
-rw-r--r-- | bus/dispatch.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/bus/dispatch.c b/bus/dispatch.c index 7a96f9dc..4feae056 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -27,6 +27,7 @@ #include "dispatch.h" #include "connection.h" #include "driver.h" +#include "driver-afbus.h" #include "services.h" #include "activation.h" #include "utils.h" @@ -129,6 +130,18 @@ bus_dispatch_matches (BusTransaction *transaction, BUS_SET_OOM (error); return FALSE; } + + /* If using AF_BUS and the message came to the daemon, the client sending + * the message doesn't yet know the address for this service, so notify + * it of the address associated with the service. */ + if (!bus_driver_afbus_emit_forwarded (transaction, + sender, + addressed_recipient, + dbus_message_get_destination (message))) + { + _dbus_verbose ("bus_driver_afbus_emit_forwarded() failed\n"); + return FALSE; + } } /* Now dispatch to others who look interested in this message */ @@ -180,6 +193,7 @@ bus_dispatch (DBusConnection *connection, BusContext *context; DBusHandlerResult result; DBusConnection *addressed_recipient; + DBusConnection *proxy_connection; result = DBUS_HANDLER_RESULT_HANDLED; @@ -241,6 +255,15 @@ bus_dispatch (DBusConnection *connection, } } + /* Directly send the message to the proxy without analysing it */ + proxy_connection = bus_connection_get_proxy_connection (connection); + if (proxy_connection) + { + if (!dbus_connection_send (proxy_connection, message, NULL)) + BUS_SET_OOM (&error); + goto out; + } + /* Create our transaction */ transaction = bus_transaction_new (context); if (transaction == NULL) |