summaryrefslogtreecommitdiff
path: root/test/test-service.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-07-14 18:43:04 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-08-05 12:26:48 +0100
commit565ae9dea907d2f8677f556bd29a0c3a52f9decc (patch)
tree3cf4a698b0458ecc1728f7b68a17c14c13841b2a /test/test-service.c
parent2ccbfb82dcc64cfdb39f52556be8c3402aa9323a (diff)
downloaddbus-565ae9dea907d2f8677f556bd29a0c3a52f9decc.tar.gz
dbus-565ae9dea907d2f8677f556bd29a0c3a52f9decc.tar.bz2
dbus-565ae9dea907d2f8677f556bd29a0c3a52f9decc.zip
test-service, test-shell-service: check what RequestName returned
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Diffstat (limited to 'test/test-service.c')
-rw-r--r--test/test-service.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test-service.c b/test/test-service.c
index 6627ea75..7181fa38 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);