From 280df58917f6f3200253c922682b397c4f2b0d44 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Fri, 8 Nov 2019 10:35:55 +0100 Subject: #915 Fix og_json_parse_clients flags for empty arrays This patch prevents the flag OG_REST_PARAM_ADDR to be activated when the array is empty. --- sources/ogAdmServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sources') diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index 552ef2b..d626630 100644 --- a/sources/ogAdmServer.cpp +++ b/sources/ogAdmServer.cpp @@ -3337,9 +3337,9 @@ static int og_json_parse_clients(json_t *element, struct og_msg_params *params) params->ips_array[params->ips_array_len++] = json_string_value(k); - } - params->flags |= OG_REST_PARAM_ADDR; + params->flags |= OG_REST_PARAM_ADDR; + } return 0; } -- cgit v1.2.3-18-g5258