diff options
| author | Giovanni Dante Grazioli | 2020-07-21 15:51:02 +0200 |
|---|---|---|
| committer | Giovanni Dante Grazioli | 2020-07-21 15:51:02 +0200 |
| commit | 5a655dda1c3b666adf552fd50f5ebf5f4cbd3ce7 (patch) | |
| tree | 8347fa391491bdcfa396c2393d532e133b2a8904 /src/sp_utils.c | |
| parent | 0ef6522c8892dacafb95c5dcc8889ed82c00a790 (diff) | |
Fixed issue on impossible bailout.
Diffstat (limited to 'src/sp_utils.c')
| -rw-r--r-- | src/sp_utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c index b9078b4..146fe77 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c | |||
| @@ -51,6 +51,7 @@ void sp_log_msg(char const* restrict feature, int type, | |||
| 51 | 51 | ||
| 52 | const char* client_ip = get_ipaddr(); | 52 | const char* client_ip = get_ipaddr(); |
| 53 | const char* logtype = NULL; | 53 | const char* logtype = NULL; |
| 54 | int bailout = type == SP_LOG_DROP; | ||
| 54 | switch(type) { | 55 | switch(type) { |
| 55 | case SP_LOG_SIMULATION: | 56 | case SP_LOG_SIMULATION: |
| 56 | logtype = "simulation"; | 57 | logtype = "simulation"; |
| @@ -74,7 +75,7 @@ void sp_log_msg(char const* restrict feature, int type, | |||
| 74 | syslog(syslog_level, "[snuffleupagus][%s][%s][%s] %s in %s on line %d", | 75 | syslog(syslog_level, "[snuffleupagus][%s][%s][%s] %s in %s on line %d", |
| 75 | client_ip, feature, logtype, msg, error_filename, error_lineno); | 76 | client_ip, feature, logtype, msg, error_filename, error_lineno); |
| 76 | closelog(); | 77 | closelog(); |
| 77 | if (type == SP_LOG_DROP) { | 78 | if (bailout) { |
| 78 | zend_bailout(); | 79 | zend_bailout(); |
| 79 | } | 80 | } |
| 80 | break; | 81 | break; |
