Module: sip-router
Branch: master
Commit: 9d5ef9925da0257a46afa7e8d8dfa1ce8920364a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9d5ef99…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Mon Sep 17 11:42:01 2012 +0300
cfg.y : improved printing of error messages to stderr
The -E was ignored during the yyparse() stage, if log_stderr=no parameter in the cfg was
set (default config)
This caused problems debugging certain lodmodule errors.
---
cfg.y | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/cfg.y b/cfg.y
index 37859aa..8fdfcb5 100644
--- a/cfg.y
+++ b/cfg.y
@@ -853,7 +853,9 @@ assign_stm:
| FORK EQUAL error { yyerror("boolean value expected"); }
| FORK_DELAY EQUAL NUMBER { set_fork_delay($3); }
| FORK_DELAY EQUAL error { yyerror("number expected"); }
- | LOGSTDERROR EQUAL NUMBER { if (!config_check) log_stderr=$3; }
+ | LOGSTDERROR EQUAL NUMBER { if (!config_check) /* if set from cmd line, don't
overwrite from yyparse()*/
+ if(log_stderr == 0) log_stderr=$3;
+ }
| LOGSTDERROR EQUAL error { yyerror("boolean value expected"); }
| LOGFACILITY EQUAL ID {
if ( (i_tmp=str2facility($3))==-1)