[rrd-developers] [PATCH] rrdcached: don't send additional return info when returning errors

kevin brintnall kbrint at rufus.net
Fri Oct 10 20:31:14 CEST 2008


this ensures that the response is protocol-compliant even if additional
info has been added to the write buffer during processing.
---
 src/rrd_daemon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c
index 36d418b..5e774cb 100644
--- a/src/rrd_daemon.c
+++ b/src/rrd_daemon.c
@@ -487,7 +487,7 @@ static int send_response (listen_socket_t *sock, response_code rc,
     return -1;
   }
 
-  if (sock->wbuf != NULL)
+  if (sock->wbuf != NULL && rc == RESP_OK)
   {
     wrote = 0;
     while (wrote < sock->wbuf_len)
-- 
1.6.0.2



More information about the rrd-developers mailing list