From 7a9abe96a5fa44e06c0e9fd9dc2097d643495063 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Mon, 12 Oct 2015 19:48:24 +0200 Subject: [PATCH] Fix json structures; need to use the LKEY & lHashfunc --- libcitadel/lib/json.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcitadel/lib/json.c b/libcitadel/lib/json.c index db10cad1c..63fcbdcb9 100644 --- a/libcitadel/lib/json.c +++ b/libcitadel/lib/json.c @@ -80,7 +80,7 @@ JsonValue *NewJsonArray(const char *Key, long keylen) Ret->Type = JSON_ARRAY; if (Key != NULL) Ret->Name = NewStrBufPlain(Key, keylen); - Ret->SubValues = NewHash(1, Flathash); + Ret->SubValues = NewHash(1, lFlathash); return Ret; } @@ -177,7 +177,7 @@ void JsonArrayAppend(JsonValue *Array, JsonValue *Val) return; /* todo assert! */ n = GetCount(Array->SubValues); - Put(Array->SubValues, (const char*) &n, sizeof(n), Val, DeleteJSONValue); + Put(Array->SubValues, LKEY(n), Val, DeleteJSONValue); } void JsonObjectAppend(JsonValue *Array, JsonValue *Val) -- 2.30.2