[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-mdb] branch master updated: fix checking of syscall rvals
From: |
gnunet |
Subject: |
[taler-taler-mdb] branch master updated: fix checking of syscall rvals |
Date: |
Fri, 27 Mar 2020 13:28:04 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository taler-mdb.
The following commit(s) were added to refs/heads/master by this push:
new 7fbf2a3 fix checking of syscall rvals
7fbf2a3 is described below
commit 7fbf2a31d95a864b707207aae87e1eb1d6910197
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Mar 27 13:28:00 2020 +0100
fix checking of syscall rvals
---
src/main.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/main.c b/src/main.c
index 48a1a49..1718ca2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1080,7 +1080,7 @@ shutdown_task (void *cls)
}
if (0 < cancel_button.cancelbuttonfd)
{
- close (cancel_button.cancelbuttonfd);
+ GNUNET_break (0 == close (cancel_button.cancelbuttonfd));
cancel_button.cancelbuttonfd = open ("/sys/class/gpio/unexport",
O_WRONLY);
if (0 > cancel_button.cancelbuttonfd)
@@ -1088,10 +1088,19 @@ shutdown_task (void *cls)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Unable to open /gpio/unexport for cancel button\n");
}
- (void) ! write (cancel_button.cancelbuttonfd,
- "23",
- 2);
- close (cancel_button.cancelbuttonfd);
+ else
+ {
+ if (2 != write (cancel_button.cancelbuttonfd,
+ "23",
+ 2))
+ {
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "write",
+ "/sys/class/gpio/unexport");
+
+ }
+ GNUNET_break (0 == close (cancel_button.cancelbuttonfd));
+ }
}
/* free the allocated productes read from config file */
if (NULL != products)
@@ -1845,7 +1854,9 @@ cancel_button_pressed (void *cls)
return;
}
- lseek (cancel_button.cancelbuttonfd, 0, SEEK_SET);
+ GNUNET_break (0 == lseek (cancel_button.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 */
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-taler-mdb] branch master updated: fix checking of syscall rvals,
gnunet <=