diff options
author | Kinsey Moore <kmoore@digium.com> | 2014-10-01 12:28:05 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2014-10-01 12:28:05 +0000 |
commit | 4d2c7c23f8ccfe61c0b8bdc53802862d4d763fe4 (patch) | |
tree | 09f716224b83a459aef8f20eb76a250b926973c6 /res/res_pjsip_endpoint_identifier_ip.c | |
parent | 122cc050d0f8473e5f662aee35555f1aef062566 (diff) |
PJSIP: Handle defaults properly
This updates the code behind PJSIP configuration options with custom
handlers to deal with the assigned default values properly where it
makes sense and adjusting the default value where it doesn't. Before
applying this patch, there were several cases where the default value
for an option would prevent that config section from loading properly.
Reported by: Thomas Thompson
Review: https://reviewboard.asterisk.org/r/4019/
........
Merged revisions 424263 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424266 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_endpoint_identifier_ip.c')
-rw-r--r-- | res/res_pjsip_endpoint_identifier_ip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c index 607e45402..43f1318a8 100644 --- a/res/res_pjsip_endpoint_identifier_ip.c +++ b/res/res_pjsip_endpoint_identifier_ip.c @@ -160,6 +160,10 @@ static int ip_identify_match_handler(const struct aco_option *opt, struct ast_va char *input_string = ast_strdupa(var->value); char *current_string; + if (ast_strlen_zero(var->value)) { + return 0; + } + while ((current_string = strsep(&input_string, ","))) { struct ast_sockaddr *addrs; int num_addrs = 0, error = 0, i; |