summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2010-10-06 18:03:25 -0400
committerRay Strode <rstrode@redhat.com>2010-10-06 18:03:25 -0400
commit3ec007a4820e53aed6713620173bd997957754ec (patch)
tree3b1e7b2935c975ff2f029dcb2b8fb8bca1beea31 /src/client
parentf0da04ca88975f0c0a06d6a0f6568b255c5e1cb3 (diff)
protocol: change socket path
Before we were using /ply-boot-protocol\0\0\0\0...\0 for our address which really uglifies /proc/net/unix and doesn't match what a lot of other programs do. This commit changes the address to just /org/freedesktop/plymouthd which is much nicer.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/ply-boot-client.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/client/ply-boot-client.c b/src/client/ply-boot-client.c
index 5871a988..74979c9a 100644
--- a/src/client/ply-boot-client.c
+++ b/src/client/ply-boot-client.c
@@ -180,11 +180,20 @@ ply_boot_client_connect (ply_boot_client_t *client,
assert (client->disconnect_handler_user_data == NULL);
client->socket_fd =
- ply_connect_to_unix_socket (PLY_BOOT_PROTOCOL_SOCKET_PATH,
- PLY_UNIX_SOCKET_TYPE_ABSTRACT);
+ ply_connect_to_unix_socket (PLY_BOOT_PROTOCOL_TRIMMED_ABSTRACT_SOCKET_PATH,
+ PLY_UNIX_SOCKET_TYPE_TRIMMED_ABSTRACT);
if (client->socket_fd < 0)
- return false;
+ {
+ ply_trace ("could not connect to " PLY_BOOT_PROTOCOL_TRIMMED_ABSTRACT_SOCKET_PATH ": %m");
+ ply_trace ("trying old fallback path " PLY_BOOT_PROTOCOL_OLD_ABSTRACT_SOCKET_PATH);
+
+ client->socket_fd =
+ ply_connect_to_unix_socket (PLY_BOOT_PROTOCOL_OLD_ABSTRACT_SOCKET_PATH,
+ PLY_UNIX_SOCKET_TYPE_ABSTRACT);
+ ply_trace ("could not connect to " PLY_BOOT_PROTOCOL_OLD_ABSTRACT_SOCKET_PATH ": %m");
+ return false;
+ }
client->disconnect_handler = disconnect_handler;
client->disconnect_handler_user_data = user_data;