Commit 815008b0 authored by Manuel Stoeckl's avatar Manuel Stoeckl
Browse files

Provide socket path in socket creation error messages

parent 362679d2
......@@ -46,6 +46,7 @@ Requirements:
* wayland (>= 1.15, to support absolute paths in WAYLAND_DISPLAY)
* wayland-protocols (>= 1.12, for the xdg-shell protocol, and others)
* libffi
* libgbm (from a recent version of mesa)
* scdoc (optional, to generate a man page)
* ssh (runtime, OpenSSH >= 6.7, for Unix domain socket forwarding)
......
......@@ -106,13 +106,14 @@ int setup_nb_socket(const char *socket_path, int nmaxclients)
return -1;
}
if (bind(sock, (struct sockaddr *)&saddr, sizeof(saddr)) == -1) {
wp_log(WP_ERROR, "Error binding socket: %s", strerror(errno));
wp_log(WP_ERROR, "Error binding socket at %s: %s", socket_path,
strerror(errno));
close(sock);
return -1;
}
if (listen(sock, nmaxclients) == -1) {
wp_log(WP_ERROR, "Error listening to socket: %s",
strerror(errno));
wp_log(WP_ERROR, "Error listening to socket at %s: %s",
socket_path, strerror(errno));
close(sock);
unlink(socket_path);
return -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment