Bugs item #1856033, was opened at 2007-12-21 12:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1856033&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Matt Reilly (sipphonematt)
Assigned to: Nobody/Anonymous (nobody)
Summary: cfg.y parser warnings should be errors 

Initial Comment:
If openser is compiled w/o tls, tcp or mcast support, then if a config file 
references one of those protocols that are not compiled in, it calls warn() 
which prints out a message with LM_WARN().

However, warn() also increments cfg_errors which causes the parsing process to 
fail and openser exit.

Warnings should not prevent the application from starting so either:

1) The error messages should printed with LM_ERR() instead.
OR
2) warn() should not increment cfg_errors so the openser can continue running.


>From cfg.y:
#if !defined(USE_TLS) || !defined(USE_TCP) \
                ||  !defined(USE_MCAST)
static void warn(char* s)
{
        LM_WARN("warning in config file, line %d, column %d-%d: %s\n", line, 
startcolumn,
                        column, s);
        cfg_errors++;
}
#endif

Should be either:
static void error(char* s)
{
        LM_ERR("error in config file, line %d, column %d-%d: %s\n", line, 
startcolumn,
                        column, s);
        cfg_errors++;
}

OR

static void warn(char* s)
{
        LM_WARN("warning in config file, line %d, column %d-%d: %s\n", line, 
startcolumn,
                        column, s);
}




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1856033&group_id=139143

_______________________________________________
Devel mailing list
[email protected]
http://lists.openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to