summaryrefslogtreecommitdiffstats
path: root/bus/dispatch.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-04-09 20:31:21 +0000
committerHavoc Pennington <hp@redhat.com>2003-04-09 20:31:21 +0000
commit1708094c0e00ab433bb0a51981f8b77d24aee256 (patch)
treee30c5ca0f6011bb3f1a083b8a9b49ee778da0cbd /bus/dispatch.c
parent0e1945b3889f8be8e31e39ad2b982c8a192be41d (diff)
2003-04-09 Havoc Pennington <hp@redhat.com>
* dbus/dbus-bus.c (dbus_bus_register): fix up error handling and a memory leak * bus/dispatch.c (check_service_activated): fix bug in test * dbus/dbus-mainloop.c (check_timeout): fix this up * dbus/dbus-internals.c (_dbus_verbose_real): include PID in verbose output so we can sort out output from different processes, e.g. in the activation case.
Diffstat (limited to 'bus/dispatch.c')
-rw-r--r--bus/dispatch.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/bus/dispatch.c b/bus/dispatch.c
index 4761a4bd..0b9f9731 100644
--- a/bus/dispatch.c
+++ b/bus/dispatch.c
@@ -1111,9 +1111,10 @@ check_service_activated (BusContext *context,
goto recheck_service_created;
}
- else if (require_base_service)
+ else if (require_base_service && !already_saw_base_created)
{
- _dbus_warn ("Did not get a ServiceCreated for a base service\n");
+ _dbus_warn ("Did not get a ServiceCreated for a base service, it was for %s instead\n",
+ service_name);
goto out;
}
@@ -1228,7 +1229,7 @@ check_service_deactivated (BusContext *context,
/* Now we are expecting ServiceDeleted messages for the base
* service and the activated_name. The base service
- * notification is required to come second.
+ * notification is required to come last.
*/
csdd.expected_service_name = activated_name;
csdd.failed = FALSE;
@@ -1251,6 +1252,8 @@ check_service_deactivated (BusContext *context,
_dbus_warn ("Messages were left over after verifying results of service exiting\n");
goto out;
}
+
+ retval = TRUE;
out:
if (message)
@@ -1351,6 +1354,13 @@ check_existent_service_activation (BusContext *context,
{
; /* good, this is expected also */
}
+ else if (dbus_message_name_is (message,
+ DBUS_ERROR_SPAWN_CHILD_EXITED))
+ {
+ ; /* good, this is expected also (child will exit if for example we don't
+ * have memory to register it)
+ */
+ }
else
{
_dbus_warn ("Did not expect error %s\n",
@@ -1401,7 +1411,7 @@ check_existent_service_activation (BusContext *context,
/* and process everything again */
bus_test_run_everything (context);
-
+
if (!check_service_deactivated (context, connection,
EXISTENT_SERVICE_NAME, base_service))
goto out;