aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/tests/test-port-context.c4
1 files changed, 3 insertions, 1 deletions
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);