]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
bus: Document arguments of bus_activation_activate_service
authorSimon McVittie <smcv@collabora.com>
Wed, 18 Apr 2018 10:49:07 +0000 (11:49 +0100)
committerSimon McVittie <smcv@collabora.com>
Thu, 21 Jun 2018 16:42:15 +0000 (17:42 +0100)
It isn't completely obvious that connection is allowed to be NULL here.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105656

bus/activation.c

index 2a427d9c950dae825397d553810315ffe86f238e..6205885179969485af7b92c0c52e18003436dda3 100644 (file)
@@ -1770,6 +1770,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,
@@ -1795,6 +1810,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);