summaryrefslogtreecommitdiff
path: root/res/res_pjsip.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2014-04-17 22:50:23 +0000
committerJoshua Colp <jcolp@digium.com>2014-04-17 22:50:23 +0000
commit1a9ff2fffbb8102751b20971a08df1453df60f98 (patch)
tree03c9baafa0a8c25e82cb3fc63dcee0106552a9d9 /res/res_pjsip.c
parentc76608f24b1561ae9faff484381433df06631713 (diff)
res_pjsip: Handle reloading when permanent contacts exist and qualify is configured.
This change fixes a problem where permanent contacts being qualified were not being updated. This was caused by the permanent contacts getting a uuid and not a known identifier, causing an inability to look them up when updating in the qualify code. A bug also existed where the new configuration may not be available immediately when updating qualifies. (closes issue ASTERISK-23514) Reported by: Richard Mudgett Review: https://reviewboard.asterisk.org/r/3448/ ........ Merged revisions 412551 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r--res/res_pjsip.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 0cf162a22..5a3fe2fe8 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -2258,6 +2258,18 @@ static void remove_request_headers(pjsip_endpoint *endpt)
}
}
+/*!
+ * \internal
+ * \brief Reload configuration within a PJSIP thread
+ */
+static int reload_configuration_task(void *obj)
+{
+ ast_res_pjsip_reload_configuration();
+ ast_res_pjsip_init_options_handling(1);
+ ast_sip_initialize_dns();
+ return 0;
+}
+
static int load_module(void)
{
/* The third parameter is just copied from
@@ -2409,11 +2421,11 @@ static int load_module(void)
static int reload_module(void)
{
- if (ast_res_pjsip_reload_configuration()) {
- return AST_MODULE_LOAD_DECLINE;
+ if (ast_sip_push_task(NULL, reload_configuration_task, NULL)) {
+ ast_log(LOG_WARNING, "Failed to reload PJSIP\n");
+ return -1;
}
- ast_res_pjsip_init_options_handling(1);
- ast_sip_initialize_dns();
+
return 0;
}