static int w_prefix2domain_1(struct sip_msg* msg, char* mode, char* str2) { if(mode!=NULL && *mode=='1') return prefix2domain(msg, 1); else if(mode!=NULL && *mode=='2') return prefix2domain(msg, 2); else return prefix2domain(msg, 0); }
static int w_prefix2domain_1(struct sip_msg* msg, char* mode, char* str2) { int m; if(fixup_get_ivalue(msg, (gparam_p)mode, &m)!=0) { LM_ERR("no mode value\n"); return -1; } if(m!=1 && m!=2) m = 0; return prefix2domain(msg, m, 0); }
static int w_prefix2domain_2(struct sip_msg* msg, char* mode, char* sdm) { int m, s; if(fixup_get_ivalue(msg, (gparam_p)mode, &m)!=0) { LM_ERR("no mode value\n"); return -1; } if(m!=1 && m!=2) m = 0; if(fixup_get_ivalue(msg, (gparam_p)sdm, &s)!=0) { LM_ERR("no multi-domain mode value\n"); return -1; } if(s!=1 && s!=2) s = 0; return prefix2domain(msg, m, s); }
static int w_prefix2domain(struct sip_msg* msg, char* str1, char* str2) { return prefix2domain(msg, 0, 0); }