summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2019-11-08 10:35:55 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-11-12 21:37:11 +0100
commit280df58917f6f3200253c922682b397c4f2b0d44 (patch)
tree30f4fb18a42cbe96aed2ce9cf534c0970bc535ce
parent6066b3260326e259bba3a2463d1f50aba16d0906 (diff)
#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.
-rw-r--r--sources/ogAdmServer.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}