Exemplo n.º 1
0
static int w_mt_match(struct sip_msg* msg, char* ptn, char* pvar,
		char* pmode)
{
	str tname;
	str tomatch;
	int mval;

	if(msg==NULL)
	{
		LM_ERR("received null msg\n");
		return -1;
	}

	if(fixup_get_svalue(msg, (gparam_t*)ptn, &tname)<0)
	{
		LM_ERR("cannot get the tree name\n");
		return -1;
	}
	if(fixup_get_svalue(msg, (gparam_t*)pvar, &tomatch)<0)
	{
		LM_ERR("cannot get the match var\n");
		return -1;
	}
	if(fixup_get_ivalue(msg, (gparam_t*)pmode, &mval)<0)
	{
		LM_ERR("cannot get the mode\n");
		return -1;
	}

	return mt_match(msg, &tname, &tomatch, mval);
}
Exemplo n.º 2
0
static int w_mt_match(struct sip_msg* msg, char* str1, char* str2,
		char* str3)
{
	return mt_match(msg, (gparam_t*)str1, (gparam_t*)str2, (gparam_t*)str3);
}