From 83447a051fbcc88b33fcea6670520687668d3ba1 Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Thu, 8 Apr 2010 19:51:10 +0100 Subject: New functions for error numbers and addresses in messages. Implemented less onerous ways of including descriptions of errors and IP addresses in logging and other messages. Implemented mapping of error numbers to error names, which is generally more meaningful. --- lib/stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/stream.c') diff --git a/lib/stream.c b/lib/stream.c index b4c16977..1fce7103 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -853,7 +853,7 @@ stream_read_try(struct stream *s, int fd, size_t size) /* Error: was it transient (return -2) or fatal (return -1)? */ if (ERRNO_IO_RETRY(errno)) return -2; - zlog_warn("%s: read failed on fd %d: %s", __func__, fd, safe_strerror(errno)); + zlog_warn("%s: read failed on fd %d: %s", __func__, fd, errtoa(errno, 0).str); return -1; } @@ -885,7 +885,7 @@ stream_recvfrom (struct stream *s, int fd, size_t size, int flags, /* Error: was it transient (return -2) or fatal (return -1)? */ if (ERRNO_IO_RETRY(errno)) return -2; - zlog_warn("%s: read failed on fd %d: %s", __func__, fd, safe_strerror(errno)); + zlog_warn("%s: read failed on fd %d: %s", __func__, fd, errtoa(errno, 0).str); return -1; } -- cgit v1.2.3