From d72015c7962af72903326a01fb114f8f2d37eebc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 13 Sep 2019 07:05:25 +0200 Subject: Merging upstream version 1.17.1. Signed-off-by: Daniel Baumann --- web/api/formatters/rrd2json.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'web/api/formatters/rrd2json.c') diff --git a/web/api/formatters/rrd2json.c b/web/api/formatters/rrd2json.c index 5cdcc80ff..17b1a301b 100644 --- a/web/api/formatters/rrd2json.c +++ b/web/api/formatters/rrd2json.c @@ -72,7 +72,7 @@ int rrdset2value_api_v1( RRDR *r = rrd2rrdr(st, points, after, before, group_method, group_time, options, dimensions); if(!r) { if(value_is_null) *value_is_null = 1; - return 500; + return HTTP_RESP_INTERNAL_SERVER_ERROR; } if(rrdr_rows(r) == 0) { @@ -82,7 +82,7 @@ int rrdset2value_api_v1( if(db_before) *db_before = 0; if(value_is_null) *value_is_null = 1; - return 400; + return HTTP_RESP_BAD_REQUEST; } if(wb) { @@ -99,7 +99,7 @@ int rrdset2value_api_v1( *n = rrdr2value(r, i, options, value_is_null); rrdr_free(r); - return 200; + return HTTP_RESP_OK; } int rrdset2anything_api_v1( @@ -120,7 +120,7 @@ int rrdset2anything_api_v1( RRDR *r = rrd2rrdr(st, points, after, before, group_method, group_time, options, dimensions?buffer_tostring(dimensions):NULL); if(!r) { buffer_strcat(wb, "Cannot generate output with these parameters on this chart."); - return 500; + return HTTP_RESP_INTERNAL_SERVER_ERROR; } if(r->result_options & RRDR_RESULT_OPTION_RELATIVE) @@ -294,5 +294,5 @@ int rrdset2anything_api_v1( } rrdr_free(r); - return 200; + return HTTP_RESP_OK; } -- cgit v1.2.3