aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/irbt_callbacks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/irbt_callbacks.c')
-rw-r--r--src/exchangedb/irbt_callbacks.c117
1 files changed, 27 insertions, 90 deletions
diff --git a/src/exchangedb/irbt_callbacks.c b/src/exchangedb/irbt_callbacks.c
index e0e19ef09..63d64f312 100644
--- a/src/exchangedb/irbt_callbacks.c
+++ b/src/exchangedb/irbt_callbacks.c
@@ -29,12 +29,10 @@
29 * Function called with denominations records to insert into table. 29 * Function called with denominations records to insert into table.
30 * 30 *
31 * @param pg plugin context 31 * @param pg plugin context
32 * @param session database session
33 * @param td record to insert 32 * @param td record to insert
34 */ 33 */
35static enum GNUNET_DB_QueryStatus 34static enum GNUNET_DB_QueryStatus
36irbt_cb_table_denominations (struct PostgresClosure *pg, 35irbt_cb_table_denominations (struct PostgresClosure *pg,
37 struct TALER_EXCHANGEDB_Session *session,
38 const struct TALER_EXCHANGEDB_TableData *td) 36 const struct TALER_EXCHANGEDB_TableData *td)
39{ 37{
40 struct GNUNET_HashCode denom_hash; 38 struct GNUNET_HashCode denom_hash;
@@ -65,12 +63,11 @@ irbt_cb_table_denominations (struct PostgresClosure *pg,
65 GNUNET_PQ_query_param_end 63 GNUNET_PQ_query_param_end
66 }; 64 };
67 65
68 (void) pg;
69 GNUNET_CRYPTO_rsa_public_key_hash ( 66 GNUNET_CRYPTO_rsa_public_key_hash (
70 td->details.denominations.denom_pub.rsa_public_key, 67 td->details.denominations.denom_pub.rsa_public_key,
71 &denom_hash); 68 &denom_hash);
72 69
73 return GNUNET_PQ_eval_prepared_non_select (session->conn, 70 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
74 "insert_into_table_denominations", 71 "insert_into_table_denominations",
75 params); 72 params);
76} 73}
@@ -80,14 +77,12 @@ irbt_cb_table_denominations (struct PostgresClosure *pg,
80 * Function called with denomination_revocations records to insert into table. 77 * Function called with denomination_revocations records to insert into table.
81 * 78 *
82 * @param pg plugin context 79 * @param pg plugin context
83 * @param session database session
84 * @param td record to insert 80 * @param td record to insert
85 */ 81 */
86static enum GNUNET_DB_QueryStatus 82static enum GNUNET_DB_QueryStatus
87irbt_cb_table_denomination_revocations (struct PostgresClosure *pg, 83irbt_cb_table_denomination_revocations (
88 struct TALER_EXCHANGEDB_Session *session, 84 struct PostgresClosure *pg,
89 const struct 85 const struct TALER_EXCHANGEDB_TableData *td)
90 TALER_EXCHANGEDB_TableData *td)
91{ 86{
92 struct GNUNET_PQ_QueryParam params[] = { 87 struct GNUNET_PQ_QueryParam params[] = {
93 GNUNET_PQ_query_param_uint64 (&td->serial), 88 GNUNET_PQ_query_param_uint64 (&td->serial),
@@ -98,8 +93,7 @@ irbt_cb_table_denomination_revocations (struct PostgresClosure *pg,
98 GNUNET_PQ_query_param_end 93 GNUNET_PQ_query_param_end
99 }; 94 };
100 95
101 (void) pg; 96 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
102 return GNUNET_PQ_eval_prepared_non_select (session->conn,
103 "insert_into_table_denomination_revocations", 97 "insert_into_table_denomination_revocations",
104 params); 98 params);
105} 99}
@@ -109,12 +103,10 @@ irbt_cb_table_denomination_revocations (struct PostgresClosure *pg,
109 * Function called with reserves records to insert into table. 103 * Function called with reserves records to insert into table.
110 * 104 *
111 * @param pg plugin context 105 * @param pg plugin context
112 * @param session database session
113 * @param td record to insert 106 * @param td record to insert
114 */ 107 */
115static enum GNUNET_DB_QueryStatus 108static enum GNUNET_DB_QueryStatus
116irbt_cb_table_reserves (struct PostgresClosure *pg, 109irbt_cb_table_reserves (struct PostgresClosure *pg,
117 struct TALER_EXCHANGEDB_Session *session,
118 const struct TALER_EXCHANGEDB_TableData *td) 110 const struct TALER_EXCHANGEDB_TableData *td)
119{ 111{
120 struct GNUNET_PQ_QueryParam params[] = { 112 struct GNUNET_PQ_QueryParam params[] = {
@@ -127,8 +119,7 @@ irbt_cb_table_reserves (struct PostgresClosure *pg,
127 GNUNET_PQ_query_param_end 119 GNUNET_PQ_query_param_end
128 }; 120 };
129 121
130 (void) pg; 122 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
131 return GNUNET_PQ_eval_prepared_non_select (session->conn,
132 "insert_into_table_reserves", 123 "insert_into_table_reserves",
133 params); 124 params);
134} 125}
@@ -138,12 +129,10 @@ irbt_cb_table_reserves (struct PostgresClosure *pg,
138 * Function called with reserves_in records to insert into table. 129 * Function called with reserves_in records to insert into table.
139 * 130 *
140 * @param pg plugin context 131 * @param pg plugin context
141 * @param session database session
142 * @param td record to insert 132 * @param td record to insert
143 */ 133 */
144static enum GNUNET_DB_QueryStatus 134static enum GNUNET_DB_QueryStatus
145irbt_cb_table_reserves_in (struct PostgresClosure *pg, 135irbt_cb_table_reserves_in (struct PostgresClosure *pg,
146 struct TALER_EXCHANGEDB_Session *session,
147 const struct TALER_EXCHANGEDB_TableData *td) 136 const struct TALER_EXCHANGEDB_TableData *td)
148{ 137{
149 struct GNUNET_PQ_QueryParam params[] = { 138 struct GNUNET_PQ_QueryParam params[] = {
@@ -160,8 +149,7 @@ irbt_cb_table_reserves_in (struct PostgresClosure *pg,
160 GNUNET_PQ_query_param_end 149 GNUNET_PQ_query_param_end
161 }; 150 };
162 151
163 (void) pg; 152 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
164 return GNUNET_PQ_eval_prepared_non_select (session->conn,
165 "insert_into_table_reserves_in", 153 "insert_into_table_reserves_in",
166 params); 154 params);
167} 155}
@@ -171,12 +159,10 @@ irbt_cb_table_reserves_in (struct PostgresClosure *pg,
171 * Function called with reserves_close records to insert into table. 159 * Function called with reserves_close records to insert into table.
172 * 160 *
173 * @param pg plugin context 161 * @param pg plugin context
174 * @param session database session
175 * @param td record to insert 162 * @param td record to insert
176 */ 163 */
177static enum GNUNET_DB_QueryStatus 164static enum GNUNET_DB_QueryStatus
178irbt_cb_table_reserves_close (struct PostgresClosure *pg, 165irbt_cb_table_reserves_close (struct PostgresClosure *pg,
179 struct TALER_EXCHANGEDB_Session *session,
180 const struct TALER_EXCHANGEDB_TableData *td) 166 const struct TALER_EXCHANGEDB_TableData *td)
181{ 167{
182 struct GNUNET_PQ_QueryParam params[] = { 168 struct GNUNET_PQ_QueryParam params[] = {
@@ -191,8 +177,7 @@ irbt_cb_table_reserves_close (struct PostgresClosure *pg,
191 GNUNET_PQ_query_param_end 177 GNUNET_PQ_query_param_end
192 }; 178 };
193 179
194 (void) pg; 180 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
195 return GNUNET_PQ_eval_prepared_non_select (session->conn,
196 "insert_into_table_reserves_close", 181 "insert_into_table_reserves_close",
197 params); 182 params);
198} 183}
@@ -202,12 +187,10 @@ irbt_cb_table_reserves_close (struct PostgresClosure *pg,
202 * Function called with reserves_out records to insert into table. 187 * Function called with reserves_out records to insert into table.
203 * 188 *
204 * @param pg plugin context 189 * @param pg plugin context
205 * @param session database session
206 * @param td record to insert 190 * @param td record to insert
207 */ 191 */
208static enum GNUNET_DB_QueryStatus 192static enum GNUNET_DB_QueryStatus
209irbt_cb_table_reserves_out (struct PostgresClosure *pg, 193irbt_cb_table_reserves_out (struct PostgresClosure *pg,
210 struct TALER_EXCHANGEDB_Session *session,
211 const struct TALER_EXCHANGEDB_TableData *td) 194 const struct TALER_EXCHANGEDB_TableData *td)
212{ 195{
213 struct GNUNET_PQ_QueryParam params[] = { 196 struct GNUNET_PQ_QueryParam params[] = {
@@ -226,8 +209,7 @@ irbt_cb_table_reserves_out (struct PostgresClosure *pg,
226 GNUNET_PQ_query_param_end 209 GNUNET_PQ_query_param_end
227 }; 210 };
228 211
229 (void) pg; 212 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
230 return GNUNET_PQ_eval_prepared_non_select (session->conn,
231 "insert_into_table_reserves_out", 213 "insert_into_table_reserves_out",
232 params); 214 params);
233} 215}
@@ -237,12 +219,10 @@ irbt_cb_table_reserves_out (struct PostgresClosure *pg,
237 * Function called with auditors records to insert into table. 219 * Function called with auditors records to insert into table.
238 * 220 *
239 * @param pg plugin context 221 * @param pg plugin context
240 * @param session database session
241 * @param td record to insert 222 * @param td record to insert
242 */ 223 */
243static enum GNUNET_DB_QueryStatus 224static enum GNUNET_DB_QueryStatus
244irbt_cb_table_auditors (struct PostgresClosure *pg, 225irbt_cb_table_auditors (struct PostgresClosure *pg,
245 struct TALER_EXCHANGEDB_Session *session,
246 const struct TALER_EXCHANGEDB_TableData *td) 226 const struct TALER_EXCHANGEDB_TableData *td)
247{ 227{
248 uint8_t is_active = td->details.auditors.is_active ? 1 : 0; 228 uint8_t is_active = td->details.auditors.is_active ? 1 : 0;
@@ -256,8 +236,7 @@ irbt_cb_table_auditors (struct PostgresClosure *pg,
256 GNUNET_PQ_query_param_end 236 GNUNET_PQ_query_param_end
257 }; 237 };
258 238
259 (void) pg; 239 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
260 return GNUNET_PQ_eval_prepared_non_select (session->conn,
261 "insert_into_table_auditors", 240 "insert_into_table_auditors",
262 params); 241 params);
263} 242}
@@ -267,12 +246,10 @@ irbt_cb_table_auditors (struct PostgresClosure *pg,
267 * Function called with auditor_denom_sigs records to insert into table. 246 * Function called with auditor_denom_sigs records to insert into table.
268 * 247 *
269 * @param pg plugin context 248 * @param pg plugin context
270 * @param session database session
271 * @param td record to insert 249 * @param td record to insert
272 */ 250 */
273static enum GNUNET_DB_QueryStatus 251static enum GNUNET_DB_QueryStatus
274irbt_cb_table_auditor_denom_sigs (struct PostgresClosure *pg, 252irbt_cb_table_auditor_denom_sigs (struct PostgresClosure *pg,
275 struct TALER_EXCHANGEDB_Session *session,
276 const struct TALER_EXCHANGEDB_TableData *td) 253 const struct TALER_EXCHANGEDB_TableData *td)
277{ 254{
278 struct GNUNET_PQ_QueryParam params[] = { 255 struct GNUNET_PQ_QueryParam params[] = {
@@ -285,8 +262,7 @@ irbt_cb_table_auditor_denom_sigs (struct PostgresClosure *pg,
285 GNUNET_PQ_query_param_end 262 GNUNET_PQ_query_param_end
286 }; 263 };
287 264
288 (void) pg; 265 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
289 return GNUNET_PQ_eval_prepared_non_select (session->conn,
290 "insert_into_table_auditor_denom_sigs", 266 "insert_into_table_auditor_denom_sigs",
291 params); 267 params);
292} 268}
@@ -296,12 +272,10 @@ irbt_cb_table_auditor_denom_sigs (struct PostgresClosure *pg,
296 * Function called with exchange_sign_keys records to insert into table. 272 * Function called with exchange_sign_keys records to insert into table.
297 * 273 *
298 * @param pg plugin context 274 * @param pg plugin context
299 * @param session database session
300 * @param td record to insert 275 * @param td record to insert
301 */ 276 */
302static enum GNUNET_DB_QueryStatus 277static enum GNUNET_DB_QueryStatus
303irbt_cb_table_exchange_sign_keys (struct PostgresClosure *pg, 278irbt_cb_table_exchange_sign_keys (struct PostgresClosure *pg,
304 struct TALER_EXCHANGEDB_Session *session,
305 const struct TALER_EXCHANGEDB_TableData *td) 279 const struct TALER_EXCHANGEDB_TableData *td)
306{ 280{
307 struct GNUNET_PQ_QueryParam params[] = { 281 struct GNUNET_PQ_QueryParam params[] = {
@@ -319,8 +293,7 @@ irbt_cb_table_exchange_sign_keys (struct PostgresClosure *pg,
319 GNUNET_PQ_query_param_end 293 GNUNET_PQ_query_param_end
320 }; 294 };
321 295
322 (void) pg; 296 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
323 return GNUNET_PQ_eval_prepared_non_select (session->conn,
324 "insert_into_table_exchange_sign_keys", 297 "insert_into_table_exchange_sign_keys",
325 params); 298 params);
326} 299}
@@ -330,12 +303,10 @@ irbt_cb_table_exchange_sign_keys (struct PostgresClosure *pg,
330 * Function called with signkey_revocations records to insert into table. 303 * Function called with signkey_revocations records to insert into table.
331 * 304 *
332 * @param pg plugin context 305 * @param pg plugin context
333 * @param session database session
334 * @param td record to insert 306 * @param td record to insert
335 */ 307 */
336static enum GNUNET_DB_QueryStatus 308static enum GNUNET_DB_QueryStatus
337irbt_cb_table_signkey_revocations (struct PostgresClosure *pg, 309irbt_cb_table_signkey_revocations (struct PostgresClosure *pg,
338 struct TALER_EXCHANGEDB_Session *session,
339 const struct TALER_EXCHANGEDB_TableData *td) 310 const struct TALER_EXCHANGEDB_TableData *td)
340{ 311{
341 struct GNUNET_PQ_QueryParam params[] = { 312 struct GNUNET_PQ_QueryParam params[] = {
@@ -346,8 +317,7 @@ irbt_cb_table_signkey_revocations (struct PostgresClosure *pg,
346 GNUNET_PQ_query_param_end 317 GNUNET_PQ_query_param_end
347 }; 318 };
348 319
349 (void) pg; 320 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
350 return GNUNET_PQ_eval_prepared_non_select (session->conn,
351 "insert_into_table_signkey_revocations", 321 "insert_into_table_signkey_revocations",
352 params); 322 params);
353} 323}
@@ -357,12 +327,10 @@ irbt_cb_table_signkey_revocations (struct PostgresClosure *pg,
357 * Function called with known_coins records to insert into table. 327 * Function called with known_coins records to insert into table.
358 * 328 *
359 * @param pg plugin context 329 * @param pg plugin context
360 * @param session database session
361 * @param td record to insert 330 * @param td record to insert
362 */ 331 */
363static enum GNUNET_DB_QueryStatus 332static enum GNUNET_DB_QueryStatus
364irbt_cb_table_known_coins (struct PostgresClosure *pg, 333irbt_cb_table_known_coins (struct PostgresClosure *pg,
365 struct TALER_EXCHANGEDB_Session *session,
366 const struct TALER_EXCHANGEDB_TableData *td) 334 const struct TALER_EXCHANGEDB_TableData *td)
367{ 335{
368 struct GNUNET_PQ_QueryParam params[] = { 336 struct GNUNET_PQ_QueryParam params[] = {
@@ -375,8 +343,7 @@ irbt_cb_table_known_coins (struct PostgresClosure *pg,
375 GNUNET_PQ_query_param_end 343 GNUNET_PQ_query_param_end
376 }; 344 };
377 345
378 (void) pg; 346 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
379 return GNUNET_PQ_eval_prepared_non_select (session->conn,
380 "insert_into_table_known_coins", 347 "insert_into_table_known_coins",
381 params); 348 params);
382} 349}
@@ -386,12 +353,10 @@ irbt_cb_table_known_coins (struct PostgresClosure *pg,
386 * Function called with refresh_commitments records to insert into table. 353 * Function called with refresh_commitments records to insert into table.
387 * 354 *
388 * @param pg plugin context 355 * @param pg plugin context
389 * @param session database session
390 * @param td record to insert 356 * @param td record to insert
391 */ 357 */
392static enum GNUNET_DB_QueryStatus 358static enum GNUNET_DB_QueryStatus
393irbt_cb_table_refresh_commitments (struct PostgresClosure *pg, 359irbt_cb_table_refresh_commitments (struct PostgresClosure *pg,
394 struct TALER_EXCHANGEDB_Session *session,
395 const struct TALER_EXCHANGEDB_TableData *td) 360 const struct TALER_EXCHANGEDB_TableData *td)
396{ 361{
397 struct GNUNET_PQ_QueryParam params[] = { 362 struct GNUNET_PQ_QueryParam params[] = {
@@ -408,8 +373,7 @@ irbt_cb_table_refresh_commitments (struct PostgresClosure *pg,
408 GNUNET_PQ_query_param_end 373 GNUNET_PQ_query_param_end
409 }; 374 };
410 375
411 (void) pg; 376 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
412 return GNUNET_PQ_eval_prepared_non_select (session->conn,
413 "insert_into_table_refresh_commitments", 377 "insert_into_table_refresh_commitments",
414 params); 378 params);
415} 379}
@@ -419,14 +383,12 @@ irbt_cb_table_refresh_commitments (struct PostgresClosure *pg,
419 * Function called with refresh_revealed_coins records to insert into table. 383 * Function called with refresh_revealed_coins records to insert into table.
420 * 384 *
421 * @param pg plugin context 385 * @param pg plugin context
422 * @param session database session
423 * @param td record to insert 386 * @param td record to insert
424 */ 387 */
425static enum GNUNET_DB_QueryStatus 388static enum GNUNET_DB_QueryStatus
426irbt_cb_table_refresh_revealed_coins (struct PostgresClosure *pg, 389irbt_cb_table_refresh_revealed_coins (
427 struct TALER_EXCHANGEDB_Session *session, 390 struct PostgresClosure *pg,
428 const struct 391 const struct TALER_EXCHANGEDB_TableData *td)
429 TALER_EXCHANGEDB_TableData *td)
430{ 392{
431 struct GNUNET_HashCode h_coin_ev; 393 struct GNUNET_HashCode h_coin_ev;
432 struct GNUNET_PQ_QueryParam params[] = { 394 struct GNUNET_PQ_QueryParam params[] = {
@@ -449,11 +411,10 @@ irbt_cb_table_refresh_revealed_coins (struct PostgresClosure *pg,
449 GNUNET_PQ_query_param_end 411 GNUNET_PQ_query_param_end
450 }; 412 };
451 413
452 (void) pg;
453 GNUNET_CRYPTO_hash (td->details.refresh_revealed_coins.coin_ev, 414 GNUNET_CRYPTO_hash (td->details.refresh_revealed_coins.coin_ev,
454 td->details.refresh_revealed_coins.coin_ev_size, 415 td->details.refresh_revealed_coins.coin_ev_size,
455 &h_coin_ev); 416 &h_coin_ev);
456 return GNUNET_PQ_eval_prepared_non_select (session->conn, 417 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
457 "insert_into_table_refresh_revealed_coins", 418 "insert_into_table_refresh_revealed_coins",
458 params); 419 params);
459} 420}
@@ -463,13 +424,11 @@ irbt_cb_table_refresh_revealed_coins (struct PostgresClosure *pg,
463 * Function called with refresh_transfer_keys records to insert into table. 424 * Function called with refresh_transfer_keys records to insert into table.
464 * 425 *
465 * @param pg plugin context 426 * @param pg plugin context
466 * @param session database session
467 * @param td record to insert 427 * @param td record to insert
468 */ 428 */
469static enum GNUNET_DB_QueryStatus 429static enum GNUNET_DB_QueryStatus
470irbt_cb_table_refresh_transfer_keys ( 430irbt_cb_table_refresh_transfer_keys (
471 struct PostgresClosure *pg, 431 struct PostgresClosure *pg,
472 struct TALER_EXCHANGEDB_Session *session,
473 const struct TALER_EXCHANGEDB_TableData *td) 432 const struct TALER_EXCHANGEDB_TableData *td)
474{ 433{
475 struct GNUNET_PQ_QueryParam params[] = { 434 struct GNUNET_PQ_QueryParam params[] = {
@@ -485,8 +444,7 @@ irbt_cb_table_refresh_transfer_keys (
485 GNUNET_PQ_query_param_end 444 GNUNET_PQ_query_param_end
486 }; 445 };
487 446
488 (void) pg; 447 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
489 return GNUNET_PQ_eval_prepared_non_select (session->conn,
490 "insert_into_table_refresh_transfer_keys", 448 "insert_into_table_refresh_transfer_keys",
491 params); 449 params);
492} 450}
@@ -496,12 +454,10 @@ irbt_cb_table_refresh_transfer_keys (
496 * Function called with deposits records to insert into table. 454 * Function called with deposits records to insert into table.
497 * 455 *
498 * @param pg plugin context 456 * @param pg plugin context
499 * @param session database session
500 * @param td record to insert 457 * @param td record to insert
501 */ 458 */
502static enum GNUNET_DB_QueryStatus 459static enum GNUNET_DB_QueryStatus
503irbt_cb_table_deposits (struct PostgresClosure *pg, 460irbt_cb_table_deposits (struct PostgresClosure *pg,
504 struct TALER_EXCHANGEDB_Session *session,
505 const struct TALER_EXCHANGEDB_TableData *td) 461 const struct TALER_EXCHANGEDB_TableData *td)
506{ 462{
507 uint8_t tiny = td->details.deposits.tiny ? 1 : 0; 463 uint8_t tiny = td->details.deposits.tiny ? 1 : 0;
@@ -527,10 +483,9 @@ irbt_cb_table_deposits (struct PostgresClosure *pg,
527 GNUNET_PQ_query_param_end 483 GNUNET_PQ_query_param_end
528 }; 484 };
529 485
530 (void) pg;
531 TALER_JSON_merchant_wire_signature_hash (td->details.deposits.wire, 486 TALER_JSON_merchant_wire_signature_hash (td->details.deposits.wire,
532 &h_wire); 487 &h_wire);
533 return GNUNET_PQ_eval_prepared_non_select (session->conn, 488 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
534 "insert_into_table_deposits", 489 "insert_into_table_deposits",
535 params); 490 params);
536} 491}
@@ -540,12 +495,10 @@ irbt_cb_table_deposits (struct PostgresClosure *pg,
540 * Function called with refunds records to insert into table. 495 * Function called with refunds records to insert into table.
541 * 496 *
542 * @param pg plugin context 497 * @param pg plugin context
543 * @param session database session
544 * @param td record to insert 498 * @param td record to insert
545 */ 499 */
546static enum GNUNET_DB_QueryStatus 500static enum GNUNET_DB_QueryStatus
547irbt_cb_table_refunds (struct PostgresClosure *pg, 501irbt_cb_table_refunds (struct PostgresClosure *pg,
548 struct TALER_EXCHANGEDB_Session *session,
549 const struct TALER_EXCHANGEDB_TableData *td) 502 const struct TALER_EXCHANGEDB_TableData *td)
550{ 503{
551 struct GNUNET_PQ_QueryParam params[] = { 504 struct GNUNET_PQ_QueryParam params[] = {
@@ -557,8 +510,7 @@ irbt_cb_table_refunds (struct PostgresClosure *pg,
557 GNUNET_PQ_query_param_end 510 GNUNET_PQ_query_param_end
558 }; 511 };
559 512
560 (void) pg; 513 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
561 return GNUNET_PQ_eval_prepared_non_select (session->conn,
562 "insert_into_table_refunds", 514 "insert_into_table_refunds",
563 params); 515 params);
564} 516}
@@ -568,12 +520,10 @@ irbt_cb_table_refunds (struct PostgresClosure *pg,
568 * Function called with wire_out records to insert into table. 520 * Function called with wire_out records to insert into table.
569 * 521 *
570 * @param pg plugin context 522 * @param pg plugin context
571 * @param session database session
572 * @param td record to insert 523 * @param td record to insert
573 */ 524 */
574static enum GNUNET_DB_QueryStatus 525static enum GNUNET_DB_QueryStatus
575irbt_cb_table_wire_out (struct PostgresClosure *pg, 526irbt_cb_table_wire_out (struct PostgresClosure *pg,
576 struct TALER_EXCHANGEDB_Session *session,
577 const struct TALER_EXCHANGEDB_TableData *td) 527 const struct TALER_EXCHANGEDB_TableData *td)
578{ 528{
579 struct GNUNET_PQ_QueryParam params[] = { 529 struct GNUNET_PQ_QueryParam params[] = {
@@ -587,8 +537,7 @@ irbt_cb_table_wire_out (struct PostgresClosure *pg,
587 GNUNET_PQ_query_param_end 537 GNUNET_PQ_query_param_end
588 }; 538 };
589 539
590 (void) pg; 540 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
591 return GNUNET_PQ_eval_prepared_non_select (session->conn,
592 "insert_into_table_wire_out", 541 "insert_into_table_wire_out",
593 params); 542 params);
594} 543}
@@ -598,12 +547,10 @@ irbt_cb_table_wire_out (struct PostgresClosure *pg,
598 * Function called with aggregation_tracking records to insert into table. 547 * Function called with aggregation_tracking records to insert into table.
599 * 548 *
600 * @param pg plugin context 549 * @param pg plugin context
601 * @param session database session
602 * @param td record to insert 550 * @param td record to insert
603 */ 551 */
604static enum GNUNET_DB_QueryStatus 552static enum GNUNET_DB_QueryStatus
605irbt_cb_table_aggregation_tracking (struct PostgresClosure *pg, 553irbt_cb_table_aggregation_tracking (struct PostgresClosure *pg,
606 struct TALER_EXCHANGEDB_Session *session,
607 const struct TALER_EXCHANGEDB_TableData *td) 554 const struct TALER_EXCHANGEDB_TableData *td)
608{ 555{
609 struct GNUNET_PQ_QueryParam params[] = { 556 struct GNUNET_PQ_QueryParam params[] = {
@@ -615,8 +562,7 @@ irbt_cb_table_aggregation_tracking (struct PostgresClosure *pg,
615 GNUNET_PQ_query_param_end 562 GNUNET_PQ_query_param_end
616 }; 563 };
617 564
618 (void) pg; 565 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
619 return GNUNET_PQ_eval_prepared_non_select (session->conn,
620 "insert_into_table_aggregation_tracking", 566 "insert_into_table_aggregation_tracking",
621 params); 567 params);
622} 568}
@@ -626,12 +572,10 @@ irbt_cb_table_aggregation_tracking (struct PostgresClosure *pg,
626 * Function called with wire_fee records to insert into table. 572 * Function called with wire_fee records to insert into table.
627 * 573 *
628 * @param pg plugin context 574 * @param pg plugin context
629 * @param session database session
630 * @param td record to insert 575 * @param td record to insert
631 */ 576 */
632static enum GNUNET_DB_QueryStatus 577static enum GNUNET_DB_QueryStatus
633irbt_cb_table_wire_fee (struct PostgresClosure *pg, 578irbt_cb_table_wire_fee (struct PostgresClosure *pg,
634 struct TALER_EXCHANGEDB_Session *session,
635 const struct TALER_EXCHANGEDB_TableData *td) 579 const struct TALER_EXCHANGEDB_TableData *td)
636{ 580{
637 struct GNUNET_PQ_QueryParam params[] = { 581 struct GNUNET_PQ_QueryParam params[] = {
@@ -645,8 +589,7 @@ irbt_cb_table_wire_fee (struct PostgresClosure *pg,
645 GNUNET_PQ_query_param_end 589 GNUNET_PQ_query_param_end
646 }; 590 };
647 591
648 (void) pg; 592 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
649 return GNUNET_PQ_eval_prepared_non_select (session->conn,
650 "insert_into_table_wire_fee", 593 "insert_into_table_wire_fee",
651 params); 594 params);
652} 595}
@@ -656,12 +599,10 @@ irbt_cb_table_wire_fee (struct PostgresClosure *pg,
656 * Function called with recoup records to insert into table. 599 * Function called with recoup records to insert into table.
657 * 600 *
658 * @param pg plugin context 601 * @param pg plugin context
659 * @param session database session
660 * @param td record to insert 602 * @param td record to insert
661 */ 603 */
662static enum GNUNET_DB_QueryStatus 604static enum GNUNET_DB_QueryStatus
663irbt_cb_table_recoup (struct PostgresClosure *pg, 605irbt_cb_table_recoup (struct PostgresClosure *pg,
664 struct TALER_EXCHANGEDB_Session *session,
665 const struct TALER_EXCHANGEDB_TableData *td) 606 const struct TALER_EXCHANGEDB_TableData *td)
666{ 607{
667 struct GNUNET_PQ_QueryParam params[] = { 608 struct GNUNET_PQ_QueryParam params[] = {
@@ -675,8 +616,7 @@ irbt_cb_table_recoup (struct PostgresClosure *pg,
675 GNUNET_PQ_query_param_end 616 GNUNET_PQ_query_param_end
676 }; 617 };
677 618
678 (void) pg; 619 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
679 return GNUNET_PQ_eval_prepared_non_select (session->conn,
680 "insert_into_table_recoup", 620 "insert_into_table_recoup",
681 params); 621 params);
682} 622}
@@ -686,12 +626,10 @@ irbt_cb_table_recoup (struct PostgresClosure *pg,
686 * Function called with recoup_refresh records to insert into table. 626 * Function called with recoup_refresh records to insert into table.
687 * 627 *
688 * @param pg plugin context 628 * @param pg plugin context
689 * @param session database session
690 * @param td record to insert 629 * @param td record to insert
691 */ 630 */
692static enum GNUNET_DB_QueryStatus 631static enum GNUNET_DB_QueryStatus
693irbt_cb_table_recoup_refresh (struct PostgresClosure *pg, 632irbt_cb_table_recoup_refresh (struct PostgresClosure *pg,
694 struct TALER_EXCHANGEDB_Session *session,
695 const struct TALER_EXCHANGEDB_TableData *td) 633 const struct TALER_EXCHANGEDB_TableData *td)
696{ 634{
697 struct GNUNET_PQ_QueryParam params[] = { 635 struct GNUNET_PQ_QueryParam params[] = {
@@ -706,8 +644,7 @@ irbt_cb_table_recoup_refresh (struct PostgresClosure *pg,
706 GNUNET_PQ_query_param_end 644 GNUNET_PQ_query_param_end
707 }; 645 };
708 646
709 (void) pg; 647 return GNUNET_PQ_eval_prepared_non_select (pg->conn,
710 return GNUNET_PQ_eval_prepared_non_select (session->conn,
711 "insert_into_table_recoup_refresh", 648 "insert_into_table_recoup_refresh",
712 params); 649 params);
713} 650}