summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_purses_deposit.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-04-30 13:46:35 +0200
committerChristian Grothoff <christian@grothoff.org>2022-04-30 13:46:35 +0200
commitfb8349a7e3088f1ca0215ecebcfef553098d7ab9 (patch)
tree3e693f90d4e1071b7c79a55536780ab145726979 /src/exchange/taler-exchange-httpd_purses_deposit.c
parent8e4969eb663dbb2242b0137b1138a8e29610de18 (diff)
downloadexchange-fb8349a7e3088f1ca0215ecebcfef553098d7ab9.tar.gz
exchange-fb8349a7e3088f1ca0215ecebcfef553098d7ab9.tar.bz2
exchange-fb8349a7e3088f1ca0215ecebcfef553098d7ab9.zip
-add notifications for purse events
Diffstat (limited to 'src/exchange/taler-exchange-httpd_purses_deposit.c')
-rw-r--r--src/exchange/taler-exchange-httpd_purses_deposit.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_purses_deposit.c b/src/exchange/taler-exchange-httpd_purses_deposit.c
index d29487af5..95c5d52f6 100644
--- a/src/exchange/taler-exchange-httpd_purses_deposit.c
+++ b/src/exchange/taler-exchange-httpd_purses_deposit.c
@@ -26,6 +26,7 @@
#include <jansson.h>
#include <microhttpd.h>
#include <pthread.h>
+#include "taler_dbevents.h"
#include "taler_json_lib.h"
#include "taler_mhd_lib.h"
#include "taler-exchange-httpd_purses_deposit.h"
@@ -276,6 +277,20 @@ deposit_transaction (void *cls,
return GNUNET_DB_STATUS_HARD_ERROR;
}
}
+ {
+ struct TALER_PurseEventP rep = {
+ .header.size = htons (sizeof (rep)),
+ .header.type = htons (TALER_DBEVENT_EXCHANGE_PURSE_DEPOSITED),
+ .purse_pub = *pcc->purse_pub
+ };
+
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Notifying about purse deposit\n");
+ TEH_plugin->event_notify (TEH_plugin->cls,
+ &rep.header,
+ NULL,
+ 0);
+ }
return qs;
}