diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2016-11-23 10:44:34 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2016-11-23 11:02:18 +0100 |
commit | 20074c55746f4f87c38470b5da5105eef77f6cd3 (patch) | |
tree | d0c7b45e2514b4a4d6736c8785cc54032baa4e6f | |
parent | c1e62794aef2e26553bf6c90aace5e18c97851d1 (diff) | |
download | ModemManager-20074c55746f4f87c38470b5da5105eef77f6cd3.tar.gz |
tests,dbus: check if we're asked to use an abstract socket
-rw-r--r-- | plugins/tests/test-port-context.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/tests/test-port-context.c b/plugins/tests/test-port-context.c index 8e9578578..e96cff7bb 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); |