浏览代码

phonenum: proper access to the str type param resid

Daniel-Constantin Mierla 6 年之前
父节点
当前提交
56f86535e0
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/modules/phonenum/phonenum_mod.c

+ 1 - 2
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);