summaryrefslogtreecommitdiff
path: root/lib/buffer.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-09-12 22:00:04 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-09-12 22:00:04 +0200
commit029270d5f42b5083cda03799d31f2c11350a7e46 (patch)
treeab98bf44cfc7611ad7cc699396674554f150db43 /lib/buffer.c
parent7aab2afbad2f25c128e9e608766b407f6bd34c89 (diff)
parente991eff5b5773e8a85c3f4c4f92c09fe30cf680b (diff)
Merge branch 'warnings'
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/buffer.c')
-rw-r--r--lib/buffer.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/buffer.c b/lib/buffer.c
index 1799c6b94f..0bf75e4c38 100644
--- a/lib/buffer.c
+++ b/lib/buffer.c
@@ -365,8 +365,9 @@ buffer_status_t buffer_flush_window(struct buffer *b, int fd, int width,
iov_size =
((iov_index > IOV_MAX) ? IOV_MAX : iov_index);
if ((nbytes = writev(fd, c_iov, iov_size)) < 0) {
- zlog_warn("%s: writev to fd %d failed: %s",
- __func__, fd, safe_strerror(errno));
+ flog_err(LIB_ERR_SOCKET,
+ "%s: writev to fd %d failed: %s",
+ __func__, fd, safe_strerror(errno));
break;
}
@@ -377,8 +378,8 @@ buffer_status_t buffer_flush_window(struct buffer *b, int fd, int width,
}
#else /* IOV_MAX */
if ((nbytes = writev(fd, iov, iov_index)) < 0)
- zlog_warn("%s: writev to fd %d failed: %s", __func__, fd,
- safe_strerror(errno));
+ flog_err(LIB_ERR_SOCKET, "%s: writev to fd %d failed: %s",
+ __func__, fd, safe_strerror(errno));
#endif /* IOV_MAX */
/* Free printed buffer data. */
@@ -438,8 +439,8 @@ in one shot. */
if (ERRNO_IO_RETRY(errno))
/* Calling code should try again later. */
return BUFFER_PENDING;
- zlog_warn("%s: write error on fd %d: %s", __func__, fd,
- safe_strerror(errno));
+ flog_err(LIB_ERR_SOCKET, "%s: write error on fd %d: %s",
+ __func__, fd, safe_strerror(errno));
return BUFFER_ERROR;
}
@@ -493,8 +494,8 @@ buffer_status_t buffer_write(struct buffer *b, int fd, const void *p,
if (ERRNO_IO_RETRY(errno))
nbytes = 0;
else {
- zlog_warn("%s: write error on fd %d: %s", __func__, fd,
- safe_strerror(errno));
+ flog_err(LIB_ERR_SOCKET, "%s: write error on fd %d: %s",
+ __func__, fd, safe_strerror(errno));
return BUFFER_ERROR;
}
}