Summary:ASTERISK-17176: [patch] WARNING message for each IAX peer with a qualifyfreqnotok setting
Reporter:John Covert (jcovert)Labels:
Date Opened:2010-12-28 17:38:17.000-0600Date Closed:2012-02-20 12:39:19.000-0600
Versions:Frequency of
Environment:Attachments:( 0) chan_iax2.c.qualifyfreqnotok.patch
Description:Spurious warnings appear as follows:

[Dec 28 17:03:21] WARNING[17379]: chan_iax2.c:12470 build_peer: Set peer->pokefreqnotok to 200

The existing code, below, correctly produces a warning if sscanf is unable to convert the qualifyfreqnotok value to a number of milliseconds.  However, whenever there is NO ERROR, the code produces a warning.  There is no similar warning on other parameter assignments.  This one is confusing, spurious, and should be removed or at least changed to a DEBUG.

... if (!strcasecmp(v->name, "qualifyfreqnotok")) {
       if (sscanf(v->value, "%30d", &peer->pokefreqnotok) != 1) {
           ast_log(LOG_WARNING, "Qualification testing frequency of peer '%s' when NOT OK should be a number of milliseconds at line %d \
of iax.conf\n", peer->name, v->lineno);
       } else ast_log(LOG_WARNING, "Set peer->pokefreqnotok to %d\n", peer->pokefreqnotok);

A patch is provided which simply removes the message.


I realize that there are much more serious problems with chan_iax.c, but "mind the pennies and the pounds will look after themselves."
Comments:By: John Covert (jcovert) 2010-12-28 17:42:49.000-0600

chan_iax2.c.qualifyfreqnotok.patch is the correct patch.

The other patch is for issue ASTERISK-17175

By: John Covert (jcovert) 2011-02-16 19:49:21.000-0600

What is still needed to get this committed?

By: John Covert (jcovert) 2011-04-06 17:36:28


By: Sean Bright (seanbright) 2012-02-20 12:41:10.604-0600

Fixed in r355997 (1.8), r355998 (10), 355999 (trunk).  Thanks for your report!