static int w_create_dialog2(struct sip_msg *req,char *param) { struct dlg_cell *dlg; struct cell *t; str res = {0,0}; int flags; if (fixup_get_svalue(req, (gparam_p)param, &res) !=0) { LM_ERR("no create dialog flags\n"); return -1; } flags = parse_create_dlg_flags(res); /* is the dialog already created? */ if ( (dlg=get_current_dialog())!=NULL ) { /*Clear current flags before setting new ones*/ dlg->flags &= ~(DLG_FLAG_PING_CALLER | DLG_FLAG_PING_CALLEE | DLG_FLAG_BYEONTIMEOUT); dlg->flags |= flags; return 1; } t = d_tmb.t_gett(); if (dlg_create_dialog( (t==T_UNDEFINED)?NULL:t, req,flags)!=0) return -1; return 1; }
int parse_dlg_flags(modparam_t type, void *val) { str input; input.s = val; input.len = strlen(val); create_dialog_flags = parse_create_dlg_flags(input); return 1; }