Module: kamailio
Branch: master
Commit: 56f86535e0ae3fcf8fa2d0b565c7ab61351678d0
URL:
https://github.com/kamailio/kamailio/commit/56f86535e0ae3fcf8fa2d0b565c7ab6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-09-03T20:03:05+02:00
phonenum: proper access to the str type param resid
---
Modified: src/modules/phonenum/phonenum_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/56f86535e0ae3fcf8fa2d0b565c7ab6…
Patch:
https://github.com/kamailio/kamailio/commit/56f86535e0ae3fcf8fa2d0b565c7ab6…
---
diff --git a/src/modules/phonenum/phonenum_mod.c b/src/modules/phonenum/phonenum_mod.c
index 6c9e0b1d1b..ea49e73a86 100644
--- a/src/modules/phonenum/phonenum_mod.c
+++ b/src/modules/phonenum/phonenum_mod.c
@@ -112,8 +112,7 @@ static int phonenum_resid_param(modparam_t type, void* val)
{
str rname;
- rname.s = (char*)val;
- rname.len = strlen(rname.s);
+ rname = *((str*)val);
if(sr_phonenum_add_resid(&rname) < 0) {
LM_ERR("failed to register result container with id: %.*s\n",
rname.len, rname.s);