commit f65ff1dcc78817568ccec591e43f2c436abb2347
parent dca6cd094d195666aaed42b558d56f15f4f8c9af
Author: Boss Marco <bossm8@students.bfh.ch>
Date: Thu, 2 Jan 2020 20:18:32 +0100
comments added
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -1537,6 +1537,7 @@ launch_payment (struct Product *product)
GNUNET_free (pa);
return NULL;
}
+ /* Start to read the button on the VM to cancel this payment */
if (0 < cancelButton.cancelbuttonfd)
start_read_cancel_button ();
return pa;
@@ -1759,6 +1760,9 @@ cancel_button_pressed (void *cls)
read (cancelButton.cancelbuttonfd, &value, 1);
lseek (cancelButton.cancelbuttonfd, 0, SEEK_SET);
+ /* This point should only be reached when a order is pending, because
+ * the scheduler read file gets added in the function "launch_payment".
+ * But anyway safe check, else do nothing */
if (NULL != payment_activity)
{
if ('1' == value)