diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-07-30 00:44:38 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-07-30 00:44:38 +0200 |
commit | f0db6d55d72d7985e5a8b1e5c4a874a415a1234f (patch) | |
tree | 0968563b6753b50d0500e70ad6292f70396f0726 /src/pq/pq_result_helper.c | |
parent | dd20aa14ea8d2a4fc4893a747156b84a7bd5ae63 (diff) | |
download | exchange-f0db6d55d72d7985e5a8b1e5c4a874a415a1234f.tar.xz |
[pq] use GNUNET_PQ_get_oid_by_name consistently
Diffstat (limited to 'src/pq/pq_result_helper.c')
-rw-r--r-- | src/pq/pq_result_helper.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c index 52e42562d..ed8100a10 100644 --- a/src/pq/pq_result_helper.c +++ b/src/pq/pq_result_helper.c @@ -1385,7 +1385,7 @@ array_cleanup (void *cls, struct GNUNET_PQ_ResultSpec TALER_PQ_result_spec_array_blinded_denom_sig ( - const struct GNUNET_PQ_Context *db, + struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct TALER_BlindedDenominationSignature **denom_sigs) @@ -1394,8 +1394,10 @@ TALER_PQ_result_spec_array_blinded_denom_sig ( info->num = num; info->typ = TALER_PQ_array_of_blinded_denom_sig; - info->oid = GNUNET_PQ_get_oid (db, - GNUNET_PQ_DATATYPE_BYTEA); + GNUNET_assert (GNUNET_OK == + GNUNET_PQ_get_oid_by_name (db, + "bytea", + &info->oid)); struct GNUNET_PQ_ResultSpec res = { .conv = extract_array_generic, @@ -1410,7 +1412,7 @@ TALER_PQ_result_spec_array_blinded_denom_sig ( struct GNUNET_PQ_ResultSpec TALER_PQ_result_spec_array_blinded_coin_hash ( - const struct GNUNET_PQ_Context *db, + struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct TALER_BlindedCoinHashP **h_coin_evs) @@ -1419,8 +1421,10 @@ TALER_PQ_result_spec_array_blinded_coin_hash ( info->num = num; info->typ = TALER_PQ_array_of_blinded_coin_hash; - info->oid = GNUNET_PQ_get_oid (db, - GNUNET_PQ_DATATYPE_BYTEA); + GNUNET_assert (GNUNET_OK == + GNUNET_PQ_get_oid_by_name (db, + "bytea", + &info->oid)); struct GNUNET_PQ_ResultSpec res = { .conv = extract_array_generic, @@ -1435,7 +1439,7 @@ TALER_PQ_result_spec_array_blinded_coin_hash ( struct GNUNET_PQ_ResultSpec TALER_PQ_result_spec_array_denom_hash ( - const struct GNUNET_PQ_Context *db, + struct GNUNET_PQ_Context *db, const char *name, size_t *num, struct TALER_DenominationHashP **denom_hs) @@ -1444,8 +1448,10 @@ TALER_PQ_result_spec_array_denom_hash ( info->num = num; info->typ = TALER_PQ_array_of_denom_hash; - info->oid = GNUNET_PQ_get_oid (db, - GNUNET_PQ_DATATYPE_BYTEA); + GNUNET_assert (GNUNET_OK == + GNUNET_PQ_get_oid_by_name (db, + "bytea", + &info->oid)); struct GNUNET_PQ_ResultSpec res = { .conv = extract_array_generic, @@ -1466,16 +1472,15 @@ TALER_PQ_result_spec_array_amount ( size_t *num, struct TALER_Amount **amounts) { - if (TALER_PQ_CompositeOIDs[0] == 0) - GNUNET_assert (GNUNET_OK == - TALER_PQ_load_oids_for_composite_types (db)); - struct ArrayResultCls *info = GNUNET_new (struct ArrayResultCls); info->num = num; info->typ = TALER_PQ_array_of_amount; - info->oid = TALER_PQ_CompositeOIDs[TALER_PQ_CompositeAmount]; info->db = db; + GNUNET_assert (GNUNET_OK == + GNUNET_PQ_get_oid_by_name (db, + "taler_amount", + &info->oid)); { size_t clen = GNUNET_MIN (TALER_CURRENCY_LEN - 1, |