diff options
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; |
