summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2020-05-12 00:51:41 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2020-05-12 00:51:41 +0200
commit436c3f8ac4a34cf3556046f7844b1b29b9576d8e (patch)
treeff46dbd4ece616f349605a82d461c206c58f7b33 /sysdep
parentf74590d642d6d4613aee6eb311a47a046d8c3061 (diff)
WIP unix socket debug 9
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/io.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index b701ee52..2485e49a 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -1514,13 +1514,13 @@ sk_open_unix(sock *s, char *name)
static void hexdump(const char *data, socklen_t size)
{
- char buf[1024];
+ char buf[1024]="";
for (int i = 0; i < size; i++)
{
sprintf(buf + i*3, "%02x ", data[i]);
}
- log(L_DEBUG, "sk_connect_unix: %s", buf);
+ log(L_TRACE, "sk_connect_unix: %s", buf);
}
int
@@ -1529,12 +1529,12 @@ sk_connect_unix(sock *s, char *name, socklen_t namelen)
struct sockaddr_un sa;
int fd;
- log(L_DEBUG, "sk_connect_unix %d %s", name[0], name + 1);
+ log(L_TRACE, "sk_connect_unix %d %s", name[0], name + 1);
if (namelen > sizeof(sa.sun_path))
return -1;
- log(L_DEBUG, "sk_connect_unix 2");
+ log(L_TRACE, "sk_connect_unix 2");
/* We are sloppy during error (leak fd and not set s->err), but we die anyway */
@@ -1542,12 +1542,12 @@ sk_connect_unix(sock *s, char *name, socklen_t namelen)
if (fd < 0)
return -2;
- log(L_DEBUG, "sk_connect_unix 3");
+ log(L_TRACE, "sk_connect_unix 3");
if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
return -3;
- log(L_DEBUG, "sk_connect_unix 4");
+ log(L_TRACE, "sk_connect_unix 4");
/* Path length checked in test_old_bird() */
memset(&sa, 0, sizeof(sa));
@@ -1558,7 +1558,7 @@ sk_connect_unix(sock *s, char *name, socklen_t namelen)
if (connect(fd, (struct sockaddr *) &sa, sizeof(sa.sun_family) + namelen) < 0)
return -4;
- log(L_DEBUG, "sk_connect_unix 5");
+ log(L_TRACE, "sk_connect_unix 5");
s->fd = fd;
s->type = SK_UNIX;