1106
1106
if (!pending_activation)
1109
bus_context_log (activation->context,
1110
DBUS_SYSTEM_LOG_INFO, "Successfully activated service '%s'",
1109
1113
link = _dbus_list_get_first_link (&pending_activation->entries);
1110
1114
while (link != NULL)
1401
1405
if (activation_failed)
1407
bus_context_log (pending_activation->activation->context,
1408
DBUS_SYSTEM_LOG_INFO, "Activated service '%s' failed: %s",
1409
pending_activation->service_name,
1403
1412
/* Destroy all pending activations with the same exec */
1404
1413
_dbus_hash_iter_init (pending_activation->activation->pending_activations,
1462
1471
dbus_set_error (&error, DBUS_ERROR_TIMED_OUT,
1463
1472
"Activation of %s timed out",
1464
1473
pending_activation->service_name);
1474
bus_context_log (pending_activation->activation->context,
1475
DBUS_SYSTEM_LOG_INFO,
1476
"Failed to activate service '%s': timed out",
1477
pending_activation->service_name);
1466
1479
pending_activation_failed (pending_activation, &error);
1674
1687
const char *service_name,
1675
1688
DBusError *error)
1690
DBusError tmp_error;
1677
1691
BusActivationEntry *entry;
1678
1692
BusPendingActivation *pending_activation;
1679
1693
BusPendingActivationEntry *pending_activation_entry;
1962
1976
service = bus_registry_lookup (registry, &service_string);
1964
1978
if (service != NULL)
1965
/* Wonderful, systemd is connected, let's just send the msg */
1966
retval = bus_dispatch_matches (activation_transaction, NULL, bus_service_get_primary_owners_connection (service),
1980
bus_context_log (activation->context,
1981
DBUS_SYSTEM_LOG_INFO, "Activating via systemd: service name='%s' unit='%s'",
1983
entry->systemd_service);
1984
/* Wonderful, systemd is connected, let's just send the msg */
1985
retval = bus_dispatch_matches (activation_transaction, NULL, bus_service_get_primary_owners_connection (service),
1969
/* systemd is not around, let's "activate" it. */
1970
retval = bus_activation_activate_service (activation, connection, activation_transaction, TRUE,
1971
message, "org.freedesktop.systemd1", error);
1990
bus_context_log (activation->context,
1991
DBUS_SYSTEM_LOG_INFO, "Activating systemd to hand-off: service name='%s' unit='%s'",
1993
entry->systemd_service);
1994
/* systemd is not around, let's "activate" it. */
1995
retval = bus_activation_activate_service (activation, connection, activation_transaction, TRUE,
1996
message, "org.freedesktop.systemd1", error);
1973
1999
dbus_message_unref (message);
2003
bus_context_log (activation->context,
2004
DBUS_SYSTEM_LOG_INFO, "Failed to activate via systemd: service name='%s' unit='%s'",
2006
entry->systemd_service);
1977
2007
_DBUS_ASSERT_ERROR_IS_SET (error);
1978
2008
_dbus_verbose ("failed to send activation message: %s\n", error->name);
1979
2009
bus_transaction_cancel_and_free (activation_transaction);
2071
2101
_dbus_verbose ("Spawning %s ...\n", argv[0]);
2102
if (servicehelper != NULL)
2103
bus_context_log (activation->context,
2104
DBUS_SYSTEM_LOG_INFO, "Activating service name='%s' (using servicehelper)",
2107
bus_context_log (activation->context,
2108
DBUS_SYSTEM_LOG_INFO, "Activating service name='%s'",
2111
dbus_error_init (&tmp_error);
2072
2113
if (!_dbus_spawn_async_with_babysitter (&pending_activation->babysitter, argv,
2074
2115
NULL, activation,
2077
2118
_dbus_verbose ("Failed to spawn child\n");
2078
_DBUS_ASSERT_ERROR_IS_SET (error);
2119
bus_context_log (activation->context,
2120
DBUS_SYSTEM_LOG_INFO, "Failed to activate service %s: %s",
2123
_DBUS_ASSERT_ERROR_IS_SET (&tmp_error);
2124
dbus_move_error (&tmp_error, error);
2079
2125
dbus_free_string_array (argv);
2080
2126
dbus_free_string_array (envp);
2166
2212
DBUS_TYPE_INVALID))
2167
2213
dbus_set_error(&error, code, str);
2171
2218
DBusHashIter iter;
2220
bus_context_log (activation->context,
2221
DBUS_SYSTEM_LOG_INFO, "Activation via systemd failed for unit '%s': %s",
2173
2225
_dbus_hash_iter_init (activation->pending_activations,