From 70f7a4f76907b1fe463a33e6d005fb6c80df7ad7 Mon Sep 17 00:00:00 2001 From: fence Date: Wed, 14 Aug 2024 20:20:40 +0200 Subject: [PATCH] lib: fix gnsrecord json serialization --- src/lib/gnsrecord/json_gnsrecord.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/gnsrecord/json_gnsrecord.c b/src/lib/gnsrecord/json_gnsrecord.c index 9a08e0157..f83c6e17b 100644 --- a/src/lib/gnsrecord/json_gnsrecord.c +++ b/src/lib/gnsrecord/json_gnsrecord.c @@ -99,7 +99,7 @@ parse_record (json_t *data, struct GNUNET_GNSRECORD_Data *rd) unpack_state = json_unpack_ex (data, &err, 0, - "{s:s, s:s, s:I, s:b, s:b, s:b, s:b}", + "{s:s, s:s, s:I, s:b, s:b, s:b, s:b, s:b}", GNUNET_JSON_GNSRECORD_VALUE, &value, GNUNET_JSON_GNSRECORD_TYPE, @@ -124,7 +124,7 @@ parse_record (json_t *data, struct GNUNET_GNSRECORD_Data *rd) unpack_state = json_unpack_ex (data, &err, 0, - "{s:s, s:s, s:I, s:b, s:b, s:b, s:b}", + "{s:s, s:s, s:I, s:b, s:b, s:b, s:b, s:b}", GNUNET_JSON_GNSRECORD_VALUE, &value, GNUNET_JSON_GNSRECORD_TYPE, @@ -349,7 +349,7 @@ GNUNET_GNSRECORD_JSON_from_gnsrecord (const char*rname, "Packing %s %s %" PRIu64 " %d\n", value_str, record_type_str, rd[i].expiration_time, rd[i].flags); record = json_pack ( - "{s:s,s:s,s:I,s:b,s:b,s:b,s:b, s:b}", + "{s:s, s:s, s:I, s:b, s:b, s:b, s:b, s:b}", GNUNET_JSON_GNSRECORD_VALUE, value_str, GNUNET_JSON_GNSRECORD_TYPE, record_type_str, (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION) @@ -364,7 +364,7 @@ GNUNET_GNSRECORD_JSON_from_gnsrecord (const char*rname, rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION, GNUNET_JSON_GNSRECORD_FLAG_SUPPLEMENTAL, rd[i].flags & GNUNET_GNSRECORD_RF_SUPPLEMENTAL, - GNUNET_JSON_GNSRECORD_FLAG_SUPPLEMENTAL, + GNUNET_JSON_GNSRECORD_FLAG_SHADOW, rd[i].flags & GNUNET_GNSRECORD_RF_SHADOW); GNUNET_free (value_str); if (NULL == record) -- 2.39.3 (Apple Git-145)