aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2013-01-06 20:48:32 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2013-01-06 20:48:32 +0400
commit79224aed0da78f42c90e2f5ccaf84163d08787b2 (patch)
tree5ec406b7296445fdba83ad69a572e932582018f7
parent6081307a32ddcce5b03a03be5c9945364dc3a895 (diff)
downloadrspamd-79224aed0da78f42c90e2f5ccaf84163d08787b2.tar.gz
rspamd-79224aed0da78f42c90e2f5ccaf84163d08787b2.zip
Json ',' fix...
-rw-r--r--src/webui.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/webui.c b/src/webui.c
index 04b9014cf..5e6d037c0 100644
--- a/src/webui.c
+++ b/src/webui.c
@@ -414,9 +414,12 @@ http_handle_maps (struct evhttp_request *req, gpointer arg)
if (cur->next) {
next = cur->next->data;
}
+ else {
+ next = NULL;
+ }
evbuffer_add_printf (evb, "{\"map\":%u,\"description\":\"%s\",\"editable\":%s%s",
map->id, map->description, editable ? "true" : "false",
- (next->protocol == MAP_PROTO_FILE && next->description) ? "}," : "}");
+ (next && next->protocol == MAP_PROTO_FILE && next->description) ? "}," : "}");
}
}
cur = g_list_next (cur);