From: Simon McVittie Date: Thu, 14 Jul 2011 17:43:04 +0000 (+0100) Subject: test-service, test-shell-service: check what RequestName returned X-Git-Tag: dbus-1.5.8~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=565ae9dea907d2f8677f556bd29a0c3a52f9decc;p=thirdparty%2Fdbus.git test-service, test-shell-service: check what RequestName returned Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231 Reviewed-by: Will Thompson --- diff --git a/test/test-service.c b/test/test-service.c index 6627ea75c..7181fa38c 100644 --- a/test/test-service.c +++ b/test/test-service.c @@ -477,7 +477,14 @@ main (int argc, dbus_error_free (&error); exit (1); } - + + if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) + { + fprintf (stderr, "Unable to acquire service: code %d\n", result); + _dbus_verbose ("*** Failed to acquire service: %d\n", result); + exit (1); + } + _dbus_verbose ("*** Test service entering main loop\n"); _dbus_loop_run (loop); diff --git a/test/test-shell-service.c b/test/test-shell-service.c index 57c161235..32a883296 100644 --- a/test/test-shell-service.c +++ b/test/test-shell-service.c @@ -176,6 +176,13 @@ main (int argc, exit (1); } + if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) + { + fprintf (stderr, "Unable to acquire service: code %d\n", result); + _dbus_verbose ("*** Failed to acquire service: %d\n", result); + exit (1); + } + _dbus_verbose ("*** Test service entering main loop\n"); _dbus_loop_run (loop);