From 33ccd76e2e0d54fd44a5cbfe354ffd509f004280 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 18 Apr 2018 11:49:07 +0100 Subject: [PATCH 06/39] bus: Document arguments of bus_activation_activate_service It isn't completely obvious that connection is allowed to be NULL here. Signed-off-by: Simon McVittie --- bus/activation.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/bus/activation.c b/bus/activation.c index 519fff18..ee0018c1 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -1789,6 +1789,21 @@ child_setup (void *user_data) } +/* + * Try to activate the given service. + * + * connection is the connection requesting that the service be started, + * or NULL if the activation was caused by the dbus-daemon itself (when + * systemd activation waits for systemd to connect to us, or when calling + * SetEnvironment on systemd). + * + * auto_activation is TRUE if we are carrying out auto-starting (we are + * activating a service automatically in order to deliver a message to it) + * or FALSE if we are starting the service explicitly (as for + * StartServiceByName). + * + * activation_message is the message that caused this activation. + */ dbus_bool_t bus_activation_activate_service (BusActivation *activation, DBusConnection *connection, @@ -1814,6 +1829,10 @@ bus_activation_activate_service (BusActivation *activation, int limit; DBusSpawnFlags flags = DBUS_SPAWN_NONE; + _dbus_assert (activation != NULL); + _dbus_assert (transaction != NULL); + _dbus_assert (activation_message != NULL); + _dbus_assert (service_name != NULL); _DBUS_ASSERT_ERROR_IS_CLEAR (error); limit = bus_context_get_max_pending_activations (activation->context); -- 2.17.0