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.
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)
#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"
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)