PJSIP: Fix assert on initial mass qualify
authorKinsey Moore <kmoore@digium.com>
Wed, 10 Dec 2014 13:16:19 +0000 (13:16 +0000)
committerKinsey Moore <kmoore@digium.com>
Wed, 10 Dec 2014 13:16:19 +0000 (13:16 +0000)
This fixes the MWI test regressions caused by r429127 and ensures that
contacts have non-zero qualify_frequency before attempting scheduling.
........

Merged revisions 429245 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 429246 from http://svn.asterisk.org/svn/asterisk/branches/13

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

res/res_pjsip/pjsip_options.c

index ac8302f..f64c83f 100644 (file)
@@ -960,7 +960,9 @@ static int qualify_and_schedule_cb(void *obj, void *arg, int flags)
        initial_interval = contact->qualify_frequency * 1000;
        initial_interval = (int)(initial_interval * ast_random_double());
 
-       schedule_qualify(contact, initial_interval);
+       if (contact->qualify_frequency) {
+               schedule_qualify(contact, initial_interval);
+       }
 
        return 0;
 }