From 33a28efef74d1db0c08a8e9e3facf3656b4b29e1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 31 Jul 2021 21:48:36 +0200 Subject: -more json_pack fixes --- src/exchangedb/Makefile.am | 5 +++-- src/exchangedb/test_exchangedb.c | 17 ++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'src/exchangedb') diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am index 26f5a3cbc..5114fb9cb 100644 --- a/src/exchangedb/Makefile.am +++ b/src/exchangedb/Makefile.am @@ -83,9 +83,10 @@ test_exchangedb_postgres_SOURCES = \ test_exchangedb_postgres_LDADD = \ libtalerexchangedb.la \ $(top_builddir)/src/json/libtalerjson.la \ - $(top_srcdir)/src/util/libtalerutil.la \ - $(top_srcdir)/src/pq/libtalerpq.la \ + $(top_builddir)/src/util/libtalerutil.la \ + $(top_builddir)/src/pq/libtalerpq.la \ -ljansson \ + -lgnunetjson \ -lgnunetutil \ $(XLIB) diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index 462134275..fd11de2eb 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -1348,10 +1348,11 @@ test_wire_out (struct TALER_EXCHANGEDB_Session *session, { json_t *wire_out_account; - wire_out_account = json_pack ("{s:s,s:s}", - "payto_uri", - "payto://x-taler-bank/localhost:8080/1", - "salt", "this-is-my-salt"); + wire_out_account = GNUNET_JSON_PACK ( + GNUNET_JSON_pack_string ("payto_uri", + "payto://x-taler-bank/localhost:8080/1"), + GNUNET_JSON_pack_string ("salt", + "this-is-my-salt")); if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != plugin->store_wire_transfer_out (plugin->cls, session, @@ -1567,9 +1568,11 @@ run (void *cls) rh = NULL; session = NULL; deposit.coin.denom_sig.rsa_signature = NULL; - wire = json_pack ("{s:s, s:s}", - "payto_uri", "payto://sepa/DE67830654080004822650", - "salt", "this-is-a-salt-value"); + wire = GNUNET_JSON_PACK ( + GNUNET_JSON_pack_string ("payto_uri", + "payto://sepa/DE67830654080004822650"), + GNUNET_JSON_pack_string ("salt", + "this-is-a-salt-value")); ZR_BLK (&cbc); ZR_BLK (&cbc2); if (NULL == -- cgit v1.2.3