summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2018-07-22 16:29:35 +0100
committerJakub Zelenka <bukka@php.net>2018-07-22 16:29:35 +0100
commitc85504386d16f943cc79263187710a05cefea265 (patch)
tree4cb56844bd763ddce1a725b6c71f02e2bd82d99a /main
parent2010c02e5c3c70880a53cb0403ce696708f4d590 (diff)
downloadphp-git-c85504386d16f943cc79263187710a05cefea265.tar.gz
Rename none syslog.filter to all and update ini description
Diffstat (limited to 'main')
-rw-r--r--main/main.c6
-rw-r--r--main/php_syslog.c2
-rw-r--r--main/php_syslog.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/main/main.c b/main/main.c
index 3c7eaf6ceb..4fc9cba103 100644
--- a/main/main.c
+++ b/main/main.c
@@ -334,10 +334,10 @@ static PHP_INI_MH(OnChangeMemoryLimit)
*/
static PHP_INI_MH(OnSetLogFilter)
{
- const char *filter = ZSTR_VAL(new_value);
+ const char *filter = ZSTR_VAL(new_value);
- if (!strcmp(filter, "none")) {
- PG(syslog_filter) = PHP_SYSLOG_FILTER_NONE;
+ if (!strcmp(filter, "all")) {
+ PG(syslog_filter) = PHP_SYSLOG_FILTER_ALL;
return SUCCESS;
}
if (!strcmp(filter, "no-ctrl")) {
diff --git a/main/php_syslog.c b/main/php_syslog.c
index 3bb9ee86dd..fd31a12d8c 100644
--- a/main/php_syslog.c
+++ b/main/php_syslog.c
@@ -94,7 +94,7 @@ PHPAPI void php_syslog(int priority, const char *format, ...) /* {{{ */
else if (c == '\n') {
syslog(priority, "%.*s", (int)sbuf.len, sbuf.c);
smart_string_reset(&sbuf);
- } else if ((c < 0x20) && (PG(syslog_filter) == PHP_SYSLOG_FILTER_NONE))
+ } else if ((c < 0x20) && (PG(syslog_filter) == PHP_SYSLOG_FILTER_ALL))
smart_string_appendc(&sbuf, c);
else {
const char xdigits[] = "0123456789abcdef";
diff --git a/main/php_syslog.h b/main/php_syslog.h
index d8e45acfc9..6afb094658 100644
--- a/main/php_syslog.h
+++ b/main/php_syslog.h
@@ -33,7 +33,7 @@
#endif
/* Syslog filters */
-#define PHP_SYSLOG_FILTER_NONE 0
+#define PHP_SYSLOG_FILTER_ALL 0
#define PHP_SYSLOG_FILTER_NO_CTRL 1
#define PHP_SYSLOG_FILTER_ASCII 2