summaryrefslogtreecommitdiff
path: root/bus/activation.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2015-02-02 19:45:17 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2015-02-04 17:15:17 +0000
commit9fce7380331d24e8dd5fb9203eb8275ebb49e1d8 (patch)
tree6f655086533c73df8b24166c0e7b39f38b7939f3 /bus/activation.c
parent00af6389be46d65afcce8cdfd060f278aaaa9466 (diff)
downloaddbus-9fce7380331d24e8dd5fb9203eb8275ebb49e1d8.tar.gz
Capture all messages received or sent, and send them to monitors
Unlike eavesdropping, the point of capture is when the message is received, except for messages originating inside the dbus-daemon. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Diffstat (limited to 'bus/activation.c')
-rw-r--r--bus/activation.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/bus/activation.c b/bus/activation.c
index 138d69e1..fb25d68e 100644
--- a/bus/activation.c
+++ b/bus/activation.c
@@ -2004,6 +2004,17 @@ bus_activation_activate_service (BusActivation *activation,
_dbus_string_init_const (&service_string, "org.freedesktop.systemd1");
service = bus_registry_lookup (registry, &service_string);
+ /* Following the general principle of "log early and often",
+ * we capture that we *want* to send the activation message, even if
+ * systemd is not actually there to receive it yet */
+ if (!bus_transaction_capture (activation_transaction,
+ NULL, message))
+ {
+ dbus_message_unref (message);
+ BUS_SET_OOM (error);
+ return FALSE;
+ }
+
if (service != NULL)
{
bus_context_log (activation->context,