]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
[PATCH 3/5] Logs also ipulog_strerror() and strerror() within ULOG plugin
author/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net>
Sat, 12 Jan 2008 14:49:03 +0000 (14:49 +0000)
committer/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net>
Sat, 12 Jan 2008 14:49:03 +0000 (14:49 +0000)
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 <peter@endian.com>
input/packet/ulogd_inppkt_ULOG.c

index 853bf2cb26cf2cadd566f97c69992c2d82f3e9a1..3a947008147c7e6966e1b7f09af06e3c03639a34 100644 (file)
@@ -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,