|
@@ -475,6 +475,7 @@ static int pv_unset(struct sip_msg* msg, char* pvid, char *foo);
|
|
static int is_int(struct sip_msg* msg, char* pvar, char* s2);
|
|
static int is_int(struct sip_msg* msg, char* pvar, char* s2);
|
|
static int pv_typeof(sip_msg_t *msg, char *pv, char *t);
|
|
static int pv_typeof(sip_msg_t *msg, char *pv, char *t);
|
|
static int pv_not_empty(sip_msg_t *msg, char *pv, char *s2);
|
|
static int pv_not_empty(sip_msg_t *msg, char *pv, char *s2);
|
|
|
|
+static int w_xavp_params_explode(sip_msg_t *msg, char *pparams, char *pxname);
|
|
static int pv_init_rpc(void);
|
|
static int pv_init_rpc(void);
|
|
|
|
|
|
static cmd_export_t cmds[]={
|
|
static cmd_export_t cmds[]={
|
|
@@ -494,6 +495,9 @@ static cmd_export_t cmds[]={
|
|
{"not_empty", (cmd_function)pv_not_empty, 1, fixup_pvar_null,
|
|
{"not_empty", (cmd_function)pv_not_empty, 1, fixup_pvar_null,
|
|
fixup_free_pvar_null,
|
|
fixup_free_pvar_null,
|
|
ANY_ROUTE},
|
|
ANY_ROUTE},
|
|
|
|
+ {"xavp_params_explode", (cmd_function)w_xavp_params_explode,
|
|
|
|
+ 2, fixup_spve_spve, fixup_free_spve_spve,
|
|
|
|
+ ANY_ROUTE},
|
|
|
|
|
|
{0,0,0,0,0,0}
|
|
{0,0,0,0,0,0}
|
|
};
|
|
};
|
|
@@ -663,6 +667,29 @@ static int is_int(struct sip_msg* msg, char* pvar, char* s2)
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+static int w_xavp_params_explode(sip_msg_t *msg, char *pparams, char *pxname)
|
|
|
|
+{
|
|
|
|
+ str sparams;
|
|
|
|
+ str sxname;
|
|
|
|
+
|
|
|
|
+ if(fixup_get_svalue(msg, (gparam_t*)pparams, &sparams)!=0) {
|
|
|
|
+ LM_ERR("cannot get the params\n");
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+ if(fixup_get_svalue(msg, (gparam_t*)pxname, &sxname)!=0) {
|
|
|
|
+ LM_ERR("cannot get the xavp name\n");
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(xavp_params_explode(&sparams, &sxname)<0)
|
|
|
|
+ return -1;
|
|
|
|
+
|
|
|
|
+ return 1;
|
|
|
|
+}
|
|
|
|
+
|
|
static const char* rpc_shv_set_doc[2] = {
|
|
static const char* rpc_shv_set_doc[2] = {
|
|
"Set a shared variable (args: name type value)",
|
|
"Set a shared variable (args: name type value)",
|
|
0
|
|
0
|