[asterisk-commits] gtjoseph: trunk r430067 - in /trunk: ./ res/res_pjsip/pjsip_options.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 23 17:19:33 CST 2014
Author: gtjoseph
Date: Tue Dec 23 17:19:30 2014
New Revision: 430067
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=430067
Log:
pjsip_options: Fix continued qualifies after endpoint/aor deletion
If you remove an endpoint/aor from pjsip.conf then do a core reload,
qualifies will continue even though the object are gone. This happens
because nothing clears out the qualify tasks.
This patch unschedules all existing qualify tasks before scheduling
new ones on reload.
Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/4290/
........
Merged revisions 430064 from http://svn.asterisk.org/svn/asterisk/branches/13
Modified:
trunk/ (props changed)
trunk/res/res_pjsip/pjsip_options.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.
Modified: trunk/res/res_pjsip/pjsip_options.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip/pjsip_options.c?view=diff&rev=430067&r1=430066&r2=430067
==============================================================================
--- trunk/res/res_pjsip/pjsip_options.c (original)
+++ trunk/res/res_pjsip/pjsip_options.c Tue Dec 23 17:19:30 2014
@@ -1006,9 +1006,24 @@
return 0;
}
+/*!
+ * \internal
+ * \brief Unschedule all existing contacts
+ */
+static int unschedule_all_cb(void *obj, void *arg, int flags)
+{
+ struct sched_data *data = obj;
+
+ AST_SCHED_DEL_UNREF(sched, data->id, ao2_ref(data, -1));
+
+ return CMP_MATCH;
+}
+
static void qualify_and_schedule_all(void)
{
struct ao2_container *endpoints = ast_sip_get_endpoints();
+
+ ao2_callback(sched_qualifies, OBJ_NODATA | OBJ_MULTIPLE | OBJ_UNLINK, unschedule_all_cb, NULL);
if (!endpoints) {
return;
More information about the asterisk-commits
mailing list