summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-07-09 22:37:58 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-07-09 22:37:58 +0100
commit2b15e7be74ba61fc1f14a92fda98b654ff8daa2c (patch)
tree3d99140aae5d8fe10b7017f3f139898fbca5fa56
parent05d3d94613168187cbf7d54ac6de345bb75910dd (diff)
Rename selret to pselret since it's now the return code for pselect().
-rw-r--r--TODO2
-rw-r--r--blabouncer.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/TODO b/TODO
index f0b21b6..e57cbf0 100644
--- a/TODO
+++ b/TODO
@@ -3,5 +3,3 @@ Make some unnecessary configuration options optional (e.g. replaytime if replaym
Fuzzing.
If openssl_error_string() doesn't get a string just after SSL_accept() then the debug log entry will fail to contain a trailing new line - maybe make log function ensure last character is new line?
-
-Rename selret to pselret.
diff --git a/blabouncer.c b/blabouncer.c
index 3a5924f..143b366 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -487,8 +487,8 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) {
// Check to see if any fd in the fd_set is waiting or a signal happened - blocks here until one one of those things happens
// (pselect() to do signal handling in addition to fd monitoring)
struct timespec timeout = {SELECTTIMEOUT, 0}; // pselect() should timeout after SELECTTIMEOUT seconds
- int selret = pselect(fdmax + 1, &rfds, NULL, NULL, &timeout, &oldset); // network socket + 1, rfds, no writes, no exceptions/errors, no timeout, original sigmask
- if (selret < 0) { // Error or signal interrupt
+ int pselret = pselect(fdmax + 1, &rfds, NULL, NULL, &timeout, &oldset); // network socket + 1, rfds, no writes, no exceptions/errors, no timeout, original sigmask
+ if (pselret < 0) { // Error or signal interrupt
if (errno == EINTR) {
// Signal caught, do signal handling
debugprint(DEBUG_CRIT, "signal '%d' happened, exiting!\n", signum);
@@ -530,7 +530,7 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) {
}
// pselect() timed out, let's see if a server timeout might be happening, if not, just continue to the top of the loop again
- if (selret == 0) {
+ if (pselret == 0) {
debugprint(DEBUG_CRIT, "pselect() timed out.\n", errno);
// SERVERTIMEOUT seconds have expired...