From 8a59c44b682bcba890426325412445c87435ffc4 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Sat, 12 Jan 2008 14:49:03 +0000 Subject: [PATCH 3/5] Logs also ipulog_strerror() and strerror() within ULOG plugin This patch logs also the string representations ipulog:_strerror() and strerror() when an error occurred during receivement of packets within the ULOG plugin Signed-off-by: Peter Warasin --- input/packet/ulogd_inppkt_ULOG.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/input/packet/ulogd_inppkt_ULOG.c b/input/packet/ulogd_inppkt_ULOG.c index 853bf2c..3a94700 100644 --- a/input/packet/ulogd_inppkt_ULOG.c +++ b/input/packet/ulogd_inppkt_ULOG.c @@ -227,8 +227,11 @@ static int ulog_read_cb(int fd, unsigned int what, void *param) if (len <= 0) { /* this is not supposed to happen */ ulogd_log(ULOGD_ERROR, "ipulog_read = %d! " - "ipulog_errno = %d, errno = %d\n", - len, ipulog_errno, errno); + "ipulog_errno = %d (%s), " + "errno = %d (%s)\n", + len, ipulog_errno, + ipulog_strerror(ipulog_errno), + errno, strerror(errno)); break; } while ((upkt = ipulog_get_packet(u->libulog_h, -- cgit v1.2.3