aboutsummaryrefslogtreecommitdiffstats
path: root/src/memcached.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-02 16:43:01 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-02 16:43:01 +0300
commit3d6020ef1ed601e1f2db2a90f7b64d1a634db171 (patch)
treeaeb199db662a4a0ceece072dab997b037181704e /src/memcached.c
parent03490c09f41a52e59d5375c6b83872b725c96943 (diff)
downloadrspamd-3d6020ef1ed601e1f2db2a90f7b64d1a634db171.tar.gz
rspamd-3d6020ef1ed601e1f2db2a90f7b64d1a634db171.zip
* Remove %m from logging it seems to be unsupported by FreeBSD printf version
Diffstat (limited to 'src/memcached.c')
-rw-r--r--src/memcached.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/memcached.c b/src/memcached.c
index d2636f5e6..2d369c87c 100644
--- a/src/memcached.c
+++ b/src/memcached.c
@@ -130,7 +130,7 @@ write_handler (int fd, short what, memcached_ctx_t *ctx)
iov[3].iov_base = CRLF;
iov[3].iov_len = sizeof (CRLF) - 1;
if (writev (ctx->sock, iov, 4) == -1) {
- memc_log (ctx, __LINE__, "memc_write: writev failed: %m");
+ memc_log (ctx, __LINE__, "memc_write: writev failed: %s", strerror (errno));
}
}
else {
@@ -222,12 +222,12 @@ read_handler (int fd, short what, memcached_ctx_t *ctx)
iov[1].iov_base = read_buf;
iov[1].iov_len = r;
if (writev (ctx->sock, iov, 2) == -1) {
- memc_log (ctx, __LINE__, "memc_write: writev failed: %m");
+ memc_log (ctx, __LINE__, "memc_write: writev failed: %s", strerror (errno));
}
}
else {
if (write (ctx->sock, read_buf, r) == -1) {
- memc_log (ctx, __LINE__, "memc_write: write failed: %m");
+ memc_log (ctx, __LINE__, "memc_write: write failed: %s", strerror (errno));
}
}
event_del (&ctx->mem_ev);
@@ -311,7 +311,7 @@ read_handler (int fd, short what, memcached_ctx_t *ctx)
ctx->param->bufpos += r;
}
else {
- memc_log (ctx, __LINE__, "memc_read: read(v) failed: %d, %m", r);
+ memc_log (ctx, __LINE__, "memc_read: read(v) failed: %d, %s", r, strerror (errno));
event_del (&ctx->mem_ev);
ctx->callback (ctx, SERVER_ERROR, ctx->callback_data);
return;
@@ -356,12 +356,12 @@ delete_handler (int fd, short what, memcached_ctx_t *ctx)
iov[1].iov_len = r;
ctx->param->bufpos = writev (ctx->sock, iov, 2);
if (ctx->param->bufpos == -1) {
- memc_log (ctx, __LINE__, "memc_write: writev failed: %m");
+ memc_log (ctx, __LINE__, "memc_write: writev failed: %s", strerror (errno));
}
}
else {
if (write (ctx->sock, read_buf, r) == -1) {
- memc_log (ctx, __LINE__, "memc_write: write failed: %m");
+ memc_log (ctx, __LINE__, "memc_write: write failed: %s", strerror (errno));
}
}
event_del (&ctx->mem_ev);
@@ -475,7 +475,7 @@ memc_make_udp_sock (memcached_ctx_t *ctx)
ctx->sock = socket (PF_INET, SOCK_DGRAM, 0);
if (ctx->sock == -1) {
- memc_log (ctx, __LINE__, "memc_make_udp_sock: socket() failed: %m");
+ memc_log (ctx, __LINE__, "memc_make_udp_sock: socket() failed: %s", strerror (errno));
return -1;
}
@@ -510,7 +510,7 @@ memc_make_tcp_sock (memcached_ctx_t *ctx)
ctx->sock = socket (PF_INET, SOCK_STREAM, 0);
if (ctx->sock == -1) {
- memc_log (ctx, __LINE__, "memc_make_tcp_sock: socket() failed: %m");
+ memc_log (ctx, __LINE__, "memc_make_tcp_sock: socket() failed: %s", strerror (errno));
return -1;
}
@@ -522,7 +522,7 @@ memc_make_tcp_sock (memcached_ctx_t *ctx)
if (errno != EINPROGRESS) {
close (ctx->sock);
ctx->sock = -1;
- memc_log (ctx, __LINE__, "memc_make_tcp_sock: connect() failed: %m");
+ memc_log (ctx, __LINE__, "memc_make_tcp_sock: connect() failed: %s", strerror (errno));
return -1;
}
}