Merged revisions 89246 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 13 Nov 2007 17:41:02 +0000 (17:41 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 13 Nov 2007 17:41:02 +0000 (17:41 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89246 | tilghman | 2007-11-13 11:34:11 -0600 (Tue, 13 Nov 2007) | 2 lines

If we set a value for qualify, we should actually pay attention to it, instead of overriding the value

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89247 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 1ac12a3..ae66b09 100644 (file)
@@ -16826,7 +16826,7 @@ static int sip_poke_peer(struct sip_peer *peer)
                sip_poke_noanswer(peer);        /* Immediately unreachable, network problems */
        else {
                peer->pokeexpire = ast_sched_replace(peer->pokeexpire, sched, 
                sip_poke_noanswer(peer);        /* Immediately unreachable, network problems */
        else {
                peer->pokeexpire = ast_sched_replace(peer->pokeexpire, sched, 
-                       DEFAULT_MAXMS * 2, sip_poke_noanswer, peer);
+                       peer->maxms * 2, sip_poke_noanswer, peer);
        }
 
        return 0;
        }
 
        return 0;
@@ -17769,7 +17769,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
                        if (!strcasecmp(v->value, "no")) {
                                peer->maxms = 0;
                        } else if (!strcasecmp(v->value, "yes")) {
                        if (!strcasecmp(v->value, "no")) {
                                peer->maxms = 0;
                        } else if (!strcasecmp(v->value, "yes")) {
-                               peer->maxms = DEFAULT_MAXMS;
+                               peer->maxms = default_qualify ? default_qualify : DEFAULT_MAXMS;
                        } else if (sscanf(v->value, "%d", &peer->maxms) != 1) {
                                ast_log(LOG_WARNING, "Qualification of peer '%s' should be 'yes', 'no', or a number of milliseconds at line %d of sip.conf\n", peer->name, v->lineno);
                                peer->maxms = 0;
                        } else if (sscanf(v->value, "%d", &peer->maxms) != 1) {
                                ast_log(LOG_WARNING, "Qualification of peer '%s' should be 'yes', 'no', or a number of milliseconds at line %d of sip.conf\n", peer->name, v->lineno);
                                peer->maxms = 0;