From 23a1f23b0628a48df6c56fcf94c783536b382eb2 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 14 Nov 2009 10:14:26 +0100 Subject: [PATCH] erlang plugin: Improve handling of communication errors. --- src/erlang.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/erlang.c b/src/erlang.c index 97286140..65d8f9ea 100644 --- a/src/erlang.c +++ b/src/erlang.c @@ -551,22 +551,22 @@ static int handle_dispatch_values (ce_connection_info_t *cinfo, /* {{{ */ if (status != 0) { free (vl.values); - send_error (cinfo->fd, req->from, "Cannot parse argument as value list."); - return (0); + status = send_error (cinfo->fd, req->from, "Cannot parse argument as value list."); + return (status); } status = plugin_dispatch_values (&vl); if (status != 0) { free (vl.values); - send_error (cinfo->fd, req->from, "plugin_dispatch_values failed."); - return (0); + status = send_error (cinfo->fd, req->from, "plugin_dispatch_values failed."); + return (status); } free (vl.values); - send_atom (cinfo->fd, req->from, "success"); + status = send_atom (cinfo->fd, req->from, "success"); - return (0); + return (status); } /* }}} int handle_dispatch_values */ /* Returns non-zero only if the request could not be handled gracefully. */ -- 2.11.0