diff options
author | George Joseph <george.joseph@fairview5.com> | 2014-12-17 23:06:01 +0000 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2014-12-17 23:06:01 +0000 |
commit | c4360796f73c523a305b4b7b81cc48e624c8aaa2 (patch) | |
tree | 345be2e463d828dc1fd89f7597ea63a7f9d73d54 | |
parent | 8b6ecc449c780eccc630ed8f3e3ca090f5a57b64 (diff) |
res_pjsip_config_wizard: Change FILEUNCHANGED config_load2 flag determination
The module now applies the FILEUNCHANGED flag when both reloaded is
specified AND there's no last_config for the object type.
Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/4276/
........
Merged revisions 429699 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | res/res_pjsip_config_wizard.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_pjsip_config_wizard.c b/res/res_pjsip_config_wizard.c index e5573aaa7..86187ee3f 100644 --- a/res/res_pjsip_config_wizard.c +++ b/res/res_pjsip_config_wizard.c @@ -801,7 +801,7 @@ static void object_type_loaded_observer(const char *name, struct ast_category *category = NULL; struct object_type_wizard *otw = NULL; char *filename = "pjsip_wizard.conf"; - struct ast_flags flags = { CONFIG_FLAG_NOCACHE }; + struct ast_flags flags = { 0 }; struct ast_config *cfg; if (!strstr("auth aor endpoint identify registration phoneprov", object_type)) { @@ -815,8 +815,8 @@ static void object_type_loaded_observer(const char *name, return; } - if (reloaded) { - flags.flags |= CONFIG_FLAG_FILEUNCHANGED; + if (reloaded && otw->last_config) { + flags.flags = CONFIG_FLAG_FILEUNCHANGED; } cfg = ast_config_load2(filename, object_type, flags); |