summaryrefslogtreecommitdiffstats
path: root/omfwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'omfwd.c')
-rw-r--r--omfwd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/omfwd.c b/omfwd.c
index b7a7b025..07ff7ac2 100644
--- a/omfwd.c
+++ b/omfwd.c
@@ -232,8 +232,9 @@ static int TCPSendCreateSocket(instanceData *pData, struct addrinfo *addrDest)
TCPSendSetStatus(pData, TCP_SEND_CONNECTING);
return fd;
} else {
+ char errStr[1024];
dbgprintf("create tcp connection failed, reason %s",
- strerror(errno));
+ strerror_r(errno, errStr, sizeof(errStr)));
}
}
@@ -244,7 +245,8 @@ static int TCPSendCreateSocket(instanceData *pData, struct addrinfo *addrDest)
close(fd);
}
else {
- dbgprintf("couldn't create send socket, reason %s", strerror(errno));
+ char errStr[1024];
+ dbgprintf("couldn't create send socket, reason %s", strerror_r(errno, errStr, sizeof(errStr)));
}
r = r->ai_next;
}
@@ -682,8 +684,9 @@ CODESTARTdoAction
break;
} else {
int eno = errno;
+ char errStr[1024];
dbgprintf("sendto() error: %d = %s.\n",
- eno, strerror(eno));
+ eno, strerror_r(eno, errStr, sizeof(errStr)));
}
}
if (lsent == l && !send_to_all)