1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

relay: add error number and string when socket creation fails

This commit is contained in:
Sebastien Helleu
2013-01-07 21:34:05 +01:00
parent c34ae99b9a
commit 1a646d5dbf
12 changed files with 74 additions and 40 deletions
+4 -2
View File
@@ -25,6 +25,7 @@
#include <string.h>
#include <time.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -378,8 +379,9 @@ relay_server_create_socket (struct t_relay_server *server)
if (server->sock < 0)
{
weechat_printf (NULL,
_("%s%s: cannot create socket"),
weechat_prefix ("error"), RELAY_PLUGIN_NAME);
_("%s%s: cannot create socket: error %d %s"),
weechat_prefix ("error"), RELAY_PLUGIN_NAME,
errno, strerror (errno));
return 0;
}