diff options
author | Martin Willi <martin@strongswan.org> | 2007-04-12 08:52:36 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2007-04-12 08:52:36 +0000 |
commit | db97fd8298b95d266c4c9446a4924b7b12d35e09 (patch) | |
tree | 7b403580ebc333083a98ae64502566e7d10007a9 /src/charon/control/stroke_interface.c | |
parent | 1dad08b0356b0c9abb20640d043f32e845ab7030 (diff) | |
download | strongswan-db97fd8298b95d266c4c9446a4924b7b12d35e09.tar.bz2 strongswan-db97fd8298b95d266c4c9446a4924b7b12d35e09.tar.xz |
not using %m printf handler, as late errno interpration over bus may be problematic
Diffstat (limited to 'src/charon/control/stroke_interface.c')
-rwxr-xr-x | src/charon/control/stroke_interface.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/charon/control/stroke_interface.c b/src/charon/control/stroke_interface.c index bce68e0c2..55738a5e5 100755 --- a/src/charon/control/stroke_interface.c +++ b/src/charon/control/stroke_interface.c @@ -1426,7 +1426,7 @@ static void stroke_process(private_stroke_interface_t *this, int strokefd) bytes_read = recv(strokefd, msg, msg_length, 0); if (bytes_read != msg_length) { - DBG1(DBG_CFG, "reading stroke message failed: %m"); + DBG1(DBG_CFG, "reading stroke message failed: %s", strerror(errno)); close(strokefd); return; } @@ -1434,7 +1434,7 @@ static void stroke_process(private_stroke_interface_t *this, int strokefd) out = fdopen(dup(strokefd), "w"); if (out == NULL) { - DBG1(DBG_CFG, "opening stroke output channel failed: %m"); + DBG1(DBG_CFG, "opening stroke output channel failed: %s", strerror(errno)); close(strokefd); free(msg); return; @@ -1520,7 +1520,7 @@ static void stroke_receive(private_stroke_interface_t *this) if (strokefd < 0) { - DBG1(DBG_CFG, "accepting stroke connection failed: %m"); + DBG1(DBG_CFG, "accepting stroke connection failed: %s", strerror(errno)); continue; } stroke_process(this, strokefd); @@ -1571,7 +1571,7 @@ stroke_t *stroke_create(local_backend_t *backend) old = umask(~S_IRWXU); if (bind(this->socket, (struct sockaddr *)&socket_addr, sizeof(socket_addr)) < 0) { - DBG1(DBG_CFG, "could not bind stroke socket: %m"); + DBG1(DBG_CFG, "could not bind stroke socket: %s", strerror(errno)); close(this->socket); free(this); return NULL; @@ -1580,7 +1580,7 @@ stroke_t *stroke_create(local_backend_t *backend) if (listen(this->socket, 0) < 0) { - DBG1(DBG_CFG, "could not listen on stroke socket: %m"); + DBG1(DBG_CFG, "could not listen on stroke socket: %s", strerror(errno)); close(this->socket); unlink(socket_addr.sun_path); free(this); |