summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2013-06-25 19:10:14 +0000
committerJoshua Colp <jcolp@digium.com>2013-06-25 19:10:14 +0000
commitea948c69d3fd5058ca7413b2ded9009356029c81 (patch)
treec8bcfca3e12e9cf5e707bf8fe04cbfc4ca05f474 /res
parenta1e219ef51dc37fbf570382d2d3861bd876414b2 (diff)
Move where the sorcery observer is added for qualify to guarantee the sched_qualifies container exists.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r--res/res_sip/sip_options.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/res/res_sip/sip_options.c b/res/res_sip/sip_options.c
index 4f21238b7..ca5f3bf72 100644
--- a/res/res_sip/sip_options.c
+++ b/res/res_sip/sip_options.c
@@ -688,11 +688,6 @@ int ast_sip_initialize_sorcery_qualify(struct ast_sorcery *sorcery)
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 @@ int ast_res_sip_init_options_handling(int reload)
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));