[SR-Dev] git:master: port from kamailio, r3528

Henning Westerholt henning.westerholt at 1und1.de
Fri Apr 3 10:49:08 CEST 2009


Module: sip-router
Branch: master
Commit: bff528cc94cd5c2f5da8b56d04be12e7ca5bea6d
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bff528cc94cd5c2f5da8b56d04be12e7ca5bea6d

Author: Henning Westerholt <henning.westerholt at 1und1.de>
Committer: Henning Westerholt <henning.westerholt at 1und1.de>
Date:   Fri Apr  3 10:46:17 2009 +0200

port from kamailio, r3528
- make error messages generated for cfg warnings and errors more userfriendly

---

 cfg.y |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/cfg.y b/cfg.y
index f2383a2..5cd56ce 100644
--- a/cfg.y
+++ b/cfg.y
@@ -2766,13 +2766,13 @@ static void warn_at(struct cfg_pos* p, char* format, ...)
 	vsnprintf(s, sizeof(s), format, ap);
 	va_end(ap);
 	if (p->e_line!=p->s_line)
-		LOG(L_WARN, "cfg. warning: (%d,%d-%d,%d): %s\n",
+		LOG(L_WARN, "warning in config file, from line %d, column %d to line %d, column %d: %s\n",
 					p->s_line, p->s_col, p->e_line, p->e_col, s);
 	else if (p->s_col!=p->e_col)
-		LOG(L_WARN, "cfg. warning: (%d,%d-%d): %s\n",
+		LOG(L_WARN, "warning in config file, line %d, column %d-%d: %s\n",
 					p->s_line, p->s_col, p->e_col, s);
 	else
-		LOG(L_WARN, "cfg. warning: (%d,%d): %s\n",
+		LOG(L_WARN, "warning in config file, line %d, column %d: %s\n",
 				p->s_line, p->s_col, s);
 	cfg_warnings++;
 }
@@ -2788,13 +2788,13 @@ static void yyerror_at(struct cfg_pos* p, char* format, ...)
 	vsnprintf(s, sizeof(s), format, ap);
 	va_end(ap);
 	if (p->e_line!=p->s_line)
-		LOG(L_CRIT, "*** PARSE ERROR *** (%d,%d-%d,%d): %s\n", 
+		LOG(L_CRIT, "parse error in config file, from line %d, column %d to line %d, column %d): %s\n",
 					p->s_line, p->s_col, p->e_line, p->e_col, s);
 	else if (p->s_col!=p->e_col)
-		LOG(L_CRIT, "*** PARSE ERROR *** (%d,%d-%d): %s\n", 
+		LOG(L_CRIT, "parse error in config file, line %d, column %d-%d: %s\n",
 					p->s_line, p->s_col, p->e_col, s);
 	else
-		LOG(L_CRIT, "*** PARSE ERROR *** (%d,%d): %s\n", 
+		LOG(L_CRIT, "parse error in config file, line %d, column %d: %s\n",
 					p->s_line, p->s_col, s);
 	cfg_errors++;
 }




More information about the sr-dev mailing list