|
@@ -674,7 +674,8 @@ static char pv_str_empty_buf[2];
|
|
static char pv_str_null_buf[8];
|
|
static char pv_str_null_buf[8];
|
|
|
|
|
|
static str pv_str_empty = { "", 0 };
|
|
static str pv_str_empty = { "", 0 };
|
|
-static str pv_str_null = { "<null>", 6 };
|
|
|
|
|
|
+#define PV_STR_NULL_VAL "<null>"
|
|
|
|
+static str pv_str_null = { PV_STR_NULL_VAL, sizeof(PV_STR_NULL_VAL)-1 };
|
|
int pv_get_null(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
|
|
int pv_get_null(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
|
|
{
|
|
{
|
|
if(res==NULL)
|
|
if(res==NULL)
|
|
@@ -686,6 +687,14 @@ int pv_get_null(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+str *pv_get_null_str(void)
|
|
|
|
+{
|
|
|
|
+ return &pv_str_null;
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
@@ -2003,7 +2012,7 @@ int pv_init_api(void)
|
|
pv_str_empty_buf[0] = '\0';
|
|
pv_str_empty_buf[0] = '\0';
|
|
pv_str_empty_buf[1] = '\0';
|
|
pv_str_empty_buf[1] = '\0';
|
|
pv_str_empty.s = pv_str_empty_buf;
|
|
pv_str_empty.s = pv_str_empty_buf;
|
|
- strcpy(pv_str_null_buf, "<null>");
|
|
|
|
|
|
+ strcpy(pv_str_null_buf, PV_STR_NULL_VAL);
|
|
pv_str_null.s = pv_str_null_buf;
|
|
pv_str_null.s = pv_str_null_buf;
|
|
|
|
|
|
if(register_pvars_mod("core", _core_pvs)<0)
|
|
if(register_pvars_mod("core", _core_pvs)<0)
|