From 20074c55746f4f87c38470b5da5105eef77f6cd3 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 23 Nov 2016 10:44:34 +0100 Subject: tests,dbus: check if we're asked to use an abstract socket --- plugins/tests/test-port-context.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/tests/test-port-context.c') diff --git a/plugins/tests/test-port-context.c b/plugins/tests/test-port-context.c index 8e957857..e96cff7b 100644 --- a/plugins/tests/test-port-context.c +++ b/plugins/tests/test-port-context.c @@ -278,7 +278,9 @@ create_socket_service (TestPortContext *self) address = (g_unix_socket_address_new_with_type ( self->name, -1, - G_UNIX_SOCKET_ADDRESS_ABSTRACT)); + (g_str_has_prefix (self->name, "abstract:") ? + G_UNIX_SOCKET_ADDRESS_ABSTRACT : + G_UNIX_SOCKET_ADDRESS_PATH))); if (!g_socket_bind (socket, address, TRUE, &error)) g_error ("Cannot bind socket: %s", error->message); g_object_unref (address); -- cgit v1.2.3-70-g09d2