From 3cd3559399fac5ecc701396b1d503224f19062c0 Mon Sep 17 00:00:00 2001 From: Greg Dahlman Date: Mon, 6 Oct 2014 23:32:29 -0700 Subject: [PATCH] use _full write methods in rados plugin to truncate PUT request objects --- plugins/rados/rados.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/rados/rados.c b/plugins/rados/rados.c index 37881bad..b8eb390c 100644 --- a/plugins/rados/rados.c +++ b/plugins/rados/rados.c @@ -147,7 +147,7 @@ static int uwsgi_rados_put(struct wsgi_request *wsgi_req, rados_ioctx_t ctx, cha char *body = uwsgi_request_body_read(wsgi_req, UMIN(remains, 32768) , &body_len); if (!body || body == uwsgi.empty) goto error; if (uwsgi.async < 1) { - if (rados_write(ctx, key, body, body_len, off) < 0) { + if (rados_write_full(ctx, key, body, body_len) < 0) { return -1; } } @@ -169,7 +169,7 @@ static int uwsgi_rados_put(struct wsgi_request *wsgi_req, rados_ioctx_t ctx, cha free(urcb); goto error; } - if (rados_aio_write(ctx, key, comp, body, body_len, off) < 0) { + if (rados_aio_write_full(ctx, key, comp, body, body_len) < 0) { free(urcb); rados_aio_release(comp); goto error;