summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip/pjsip_configuration.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 1518bcee9..60b82eedc 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -646,15 +646,15 @@ static int dtls_handler(const struct aco_option *opt,
{
struct ast_sip_endpoint *endpoint = obj;
char *name = ast_strdupa(var->name);
- char *front, *buf = name;
+ char *front, *back, *buf = name;
/* strip out underscores in the name */
- front = strtok(buf, "_");
+ front = strtok_r(buf, "_", &back);
while (front) {
int size = strlen(front);
ast_copy_string(buf, front, size + 1);
buf += size;
- front = strtok(NULL, "_");
+ front = strtok_r(NULL, "_", &back);
}
return ast_rtp_dtls_cfg_parse(&endpoint->media.rtp.dtls_cfg, name, var->value);