[asterisk-commits] file: trunk r392864 - /trunk/res/res_sip/sip_options.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 25 14:10:16 CDT 2013


Author: file
Date: Tue Jun 25 14:10:14 2013
New Revision: 392864

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392864
Log:
Move where the sorcery observer is added for qualify to guarantee the sched_qualifies container exists.

Modified:
    trunk/res/res_sip/sip_options.c

Modified: trunk/res/res_sip/sip_options.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_sip/sip_options.c?view=diff&rev=392864&r1=392863&r2=392864
==============================================================================
--- trunk/res/res_sip/sip_options.c (original)
+++ trunk/res/res_sip/sip_options.c Tue Jun 25 14:10:14 2013
@@ -688,11 +688,6 @@
 	ast_sorcery_object_field_register(sorcery, CONTACT_STATUS, "rtt", "0", OPT_UINT_T,
 					  1, FLDSET(struct ast_sip_contact_status, rtt));
 
-	if (ast_sorcery_observer_add(sorcery, "contact", &contact_observer)) {
-		ast_log(LOG_WARNING, "Unable to add contact observer\n");
-		return -1;
-	}
-
 	return 0;
 }
 
@@ -777,6 +772,11 @@
 		return -1;
 	}
 
+	if (ast_sorcery_observer_add(ast_sip_get_sorcery(), "contact", &contact_observer)) {
+		ast_log(LOG_WARNING, "Unable to add contact observer\n");
+		return -1;
+	}
+
 	qualify_and_schedule_permanent();
 	ast_cli_register_multiple(cli_options, ARRAY_LEN(cli_options));
 




More information about the asterisk-commits mailing list