diff options
Diffstat (limited to 'res/res_pjsip/pjsip_configuration.c')
-rw-r--r-- | res/res_pjsip/pjsip_configuration.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c index 2a81cfded..371e4318b 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -410,7 +410,7 @@ int ast_sip_auth_vector_init(struct ast_sip_auth_vector *auths, const char *valu return -1; } - while ((val = strsep(&auth_names, ","))) { + while ((val = ast_strip(strsep(&auth_names, ",")))) { if (ast_strlen_zero(val)) { continue; } @@ -477,7 +477,11 @@ static int ident_handler(const struct aco_option *opt, struct ast_variable *var, char *idents = ast_strdupa(var->value); char *val; - while ((val = strsep(&idents, ","))) { + while ((val = ast_strip(strsep(&idents, ",")))) { + if (ast_strlen_zero(val)) { + continue; + } + if (!strcasecmp(val, "username")) { endpoint->ident_method |= AST_SIP_ENDPOINT_IDENTIFY_BY_USERNAME; } else { |