Merge "pjsip_options.c: Allow immediate qualifies for new contacts." into 16

This commit is contained in:
Joshua Colp
2019-05-13 14:14:45 -05:00
committed by Gerrit Code Review

View File

@@ -2100,8 +2100,10 @@ static int sip_options_contact_add_task(void *obj)
ao2_cleanup(contact_status); ao2_cleanup(contact_status);
if (task_data->aor_options->qualify_frequency) { if (task_data->aor_options->qualify_frequency) {
/* If this is the first contact we need to schedule up qualification */ /* There will always be a contact here, and we need to immediately schedule
if (ao2_container_count(task_data->aor_options->contacts) == 1) { * a qualify so that contacts are not waiting for the qualify_frequency
* timer duration before qualifying.
*/
ast_debug(3, "Starting scheduled callback on AOR '%s' for qualifying as there is now a contact on it\n", ast_debug(3, "Starting scheduled callback on AOR '%s' for qualifying as there is now a contact on it\n",
task_data->aor_options->name); task_data->aor_options->name);
/* /*
@@ -2124,7 +2126,6 @@ static int sip_options_contact_add_task(void *obj)
ast_log(LOG_ERROR, "Unable to schedule qualify for contacts of AOR '%s'\n", ast_log(LOG_ERROR, "Unable to schedule qualify for contacts of AOR '%s'\n",
task_data->aor_options->name); task_data->aor_options->name);
} }
}
} else { } else {
/* /*
* If this was the first contact added to a non-qualified AOR then * If this was the first contact added to a non-qualified AOR then