From: Wilfried Goesgens Date: Mon, 12 Oct 2015 17:48:24 +0000 (+0200) Subject: Fix json structures; need to use the LKEY & lHashfunc X-Git-Tag: Release_902~151 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=7a9abe96a5fa44e06c0e9fd9dc2097d643495063 Fix json structures; need to use the LKEY & lHashfunc --- 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)