瀏覽代碼

core: fixed pv_get_spec_name()

- check for PV_NAME_PVAR was wrongly used with PV_NAME_INTSTR
- reported and credits to Christian Koch
Daniel-Constantin Mierla 16 年之前
父節點
當前提交
a93f14f36e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pvapi.c

+ 1 - 1
pvapi.c

@@ -800,7 +800,7 @@ int pv_get_spec_name(struct sip_msg* msg, pv_param_p ip, pv_value_t *name)
 			name->flags = PV_VAL_INT|PV_TYPE_INT;
 			name->flags = PV_VAL_INT|PV_TYPE_INT;
 		}
 		}
 		return 0;
 		return 0;
-	} else if(ip->pvn.type==PV_NAME_INTSTR) {
+	} else if(ip->pvn.type==PV_NAME_PVAR) {
 		/* pvar */
 		/* pvar */
 		if(pv_get_spec_value(msg, (pv_spec_p)(ip->pvn.u.dname), name)!=0)
 		if(pv_get_spec_value(msg, (pv_spec_p)(ip->pvn.u.dname), name)!=0)
 		{
 		{