protocol: drop leading \0 from socket path

The socket path is currently defined to be:

 #define PLY_BOOT_PROTOCOL_SOCKET_PATH "\0/ply-boot-protocol"

The \0 is because it's an abstract socket, and abstract sockets
have a leading NUL.  The code always ignores the NUL though and
adds it back later, so it's not needed.

This commit just drops it.
This commit is contained in:
Ray Strode 2010-10-06 17:57:34 -04:00
parent 9de731ed29
commit f0da04ca88
3 changed files with 3 additions and 3 deletions

View file

@ -180,7 +180,7 @@ 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 + 1,
ply_connect_to_unix_socket (PLY_BOOT_PROTOCOL_SOCKET_PATH,
PLY_UNIX_SOCKET_TYPE_ABSTRACT);
if (client->socket_fd < 0)

View file

@ -22,7 +22,7 @@
#ifndef PLY_BOOT_PROTOCOL_H
#define PLY_BOOT_PROTOCOL_H
#define PLY_BOOT_PROTOCOL_SOCKET_PATH "\0/ply-boot-protocol"
#define PLY_BOOT_PROTOCOL_SOCKET_PATH "/ply-boot-protocol"
#define PLY_BOOT_PROTOCOL_REQUEST_TYPE_PING "P"
#define PLY_BOOT_PROTOCOL_REQUEST_TYPE_UPDATE "U"
#define PLY_BOOT_PROTOCOL_REQUEST_TYPE_SYSTEM_INITIALIZED "S"

View file

@ -179,7 +179,7 @@ ply_boot_server_listen (ply_boot_server_t *server)
assert (server != NULL);
server->socket_fd =
ply_listen_to_unix_socket (PLY_BOOT_PROTOCOL_SOCKET_PATH + 1,
ply_listen_to_unix_socket (PLY_BOOT_PROTOCOL_SOCKET_PATH,
PLY_UNIX_SOCKET_TYPE_ABSTRACT);
if (server->socket_fd < 0)