aboutsummaryrefslogtreecommitdiff
path: root/src/authorization/anastasis-helper-authorization-iban.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/authorization/anastasis-helper-authorization-iban.c')
-rw-r--r--src/authorization/anastasis-helper-authorization-iban.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/authorization/anastasis-helper-authorization-iban.c b/src/authorization/anastasis-helper-authorization-iban.c
index b66d181..946b008 100644
--- a/src/authorization/anastasis-helper-authorization-iban.c
+++ b/src/authorization/anastasis-helper-authorization-iban.c
@@ -22,7 +22,6 @@
22 * - blocked on #6992 22 * - blocked on #6992
23 * - needs XXX_bank_service to access new facade once #6992 is implemented 23 * - needs XXX_bank_service to access new facade once #6992 is implemented
24 * - needs to load authentication information 24 * - needs to load authentication information
25 * - needs to load 'last known' transaction from DB
26 * - needs to add DB triggers to notify main service of inbound activity 25 * - needs to add DB triggers to notify main service of inbound activity
27 */ 26 */
28#include "platform.h" 27#include "platform.h"
@@ -46,6 +45,11 @@
46static struct BANK_AccountInfo *auth; 45static struct BANK_AccountInfo *auth;
47 46
48/** 47/**
48 * Bank account payto://-URI this process is monitoring.
49 */
50static struct credit_account_uri;
51
52/**
49 * Active request for history. 53 * Active request for history.
50 */ 54 */
51static struct BANK_CreditHistoryHandle *hh; 55static struct BANK_CreditHistoryHandle *hh;
@@ -282,7 +286,20 @@ run (void *cls,
282 return; 286 return;
283 } 287 }
284 // FIXME: initialize 'auth' from cfg! 288 // FIXME: initialize 'auth' from cfg!
289 {
290 enum GNUNET_DB_QueryStatus qs;
285 291
292 qs = db_plugin->get_last_auth_iban_payment_row (db_plugin->cls,
293 credit_account_uri,
294 &latest_row_off);
295 if (qs < 0)
296 {
297 GNUNET_break (0);
298 ANASTASIS_DB_plugin_unload (db_plugin);
299 db_plugin = NULL;
300 return;
301 }
302 }
286 GNUNET_SCHEDULER_add_shutdown (&shutdown_task, 303 GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
287 cls); 304 cls);
288 ctx = GNUNET_CURL_init (&GNUNET_CURL_gnunet_scheduler_reschedule, 305 ctx = GNUNET_CURL_init (&GNUNET_CURL_gnunet_scheduler_reschedule,