aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Hofer <dominik.hofer@bfh.ch>2019-12-30 15:28:15 +0100
committerDominik Hofer <dominik.hofer@bfh.ch>2019-12-30 15:28:15 +0100
commit57c757d1d5ec3604525739b5eb4aa1ce3d560542 (patch)
tree5a08ab39422d9beb0101b6cbf95e94a37594ea1c
parent2cc7b72a47890e42a5d8e2a69716ac6fcf5666cc (diff)
downloadtaler-mdb-57c757d1d5ec3604525739b5eb4aa1ce3d560542.tar.gz
taler-mdb-57c757d1d5ec3604525739b5eb4aa1ce3d560542.tar.bz2
taler-mdb-57c757d1d5ec3604525739b5eb4aa1ce3d560542.zip
sold out resetted when machine open
-rw-r--r--src/main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index dd80fb6..9eadbf4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2268,6 +2268,19 @@ handle_command (const char *hex,
cleanup_payment (payment_activity);
payment_activity = NULL;
}
+ for (unsigned int i = 0; i < products_length; i++)
+ {
+ if ( (sold_out_enabled) &&
+ (0 != strcmp (products[i].description,
+ "empty")) &&
+ (GNUNET_YES == products[i].sold_out) )
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Resetting sold out state of product %s\n",
+ products[i].description);
+ products[i].sold_out = GNUNET_NO;
+ }
+ }
break;
case VMC_READER_ENABLE:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,