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: ...@@ -46,6 +46,7 @@ Requirements:
* wayland (>= 1.15, to support absolute paths in WAYLAND_DISPLAY) * wayland (>= 1.15, to support absolute paths in WAYLAND_DISPLAY)
* wayland-protocols (>= 1.12, for the xdg-shell protocol, and others) * wayland-protocols (>= 1.12, for the xdg-shell protocol, and others)
* libffi * libffi
* libgbm (from a recent version of mesa)
* scdoc (optional, to generate a man page) * scdoc (optional, to generate a man page)
* ssh (runtime, OpenSSH >= 6.7, for Unix domain socket forwarding) * ssh (runtime, OpenSSH >= 6.7, for Unix domain socket forwarding)
......
...@@ -106,13 +106,14 @@ int setup_nb_socket(const char *socket_path, int nmaxclients) ...@@ -106,13 +106,14 @@ int setup_nb_socket(const char *socket_path, int nmaxclients)
return -1; return -1;
} }
if (bind(sock, (struct sockaddr *)&saddr, sizeof(saddr)) == -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); close(sock);
return -1; return -1;
} }
if (listen(sock, nmaxclients) == -1) { if (listen(sock, nmaxclients) == -1) {
wp_log(WP_ERROR, "Error listening to socket: %s", wp_log(WP_ERROR, "Error listening to socket at %s: %s",
strerror(errno)); socket_path, strerror(errno));
close(sock); close(sock);
unlink(socket_path); unlink(socket_path);
return -1; 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