diff options
author | Kevin Harwell <kharwell@digium.com> | 2013-11-22 22:37:30 +0000 |
---|---|---|
committer | Kevin Harwell <kharwell@digium.com> | 2013-11-22 22:37:30 +0000 |
commit | 76a2b855e14bf7e165e9be7451c0c2fab0ef6622 (patch) | |
tree | 1de9095ff42904a87b973cc8b6eae13d457f2561 /res | |
parent | d9015a5356dfff70ce15ed2ea5726325de71d9e3 (diff) |
res_pjsip: convert configuration settings names to snake case some more
Updated the alembic script for pjsip. Also, the dtls config parsing stuff was
expecting strings with no underscores, so removed the underscores from the
option name before passing it to the parser.
........
Merged revisions 403082 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip/pjsip_configuration.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c index d382fefaf..d8e781a56 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -520,8 +520,19 @@ static int dtls_handler(const struct aco_option *opt, struct ast_variable *var, void *obj) { struct ast_sip_endpoint *endpoint = obj; + char *name = ast_strdupa(var->name); + char *front, *buf = name; - return ast_rtp_dtls_cfg_parse(&endpoint->media.rtp.dtls_cfg, var->name, var->value); + /* strip out underscores in the name */ + front = strtok(buf, "_"); + while (front) { + int size = strlen(front); + ast_copy_string(buf, front, size + 1); + buf += size; + front = strtok(NULL, "_"); + } + + return ast_rtp_dtls_cfg_parse(&endpoint->media.rtp.dtls_cfg, name, var->value); } static int t38udptl_ec_handler(const struct aco_option *opt, |