static int script_init( struct sip_msg *foo, void *bar) { /* we primarily reset all private memory here to make sure * private values left over from previous message will * not be used again */ /* make sure the new message will not inherit previous * message's t_on_negative value */ t_on_negative( 0 ); t_on_reply(0); t_on_branch(0); /* reset the kr status */ set_kr(0); return 1; }
static int script_init( struct sip_msg *foo, void *bar) { /* we primarily reset all private memory here to make sure * private values left over from previous message will * not be used again */ set_t(T_UNDEFINED); reset_cancelled_t(); reset_e2eack_t(); /* reset the kr status */ reset_kr(); /* reset the static holders for T routes */ t_on_negative( 0 ); t_on_reply(0); t_on_branch(0); return 1; }
static int script_init( struct sip_msg *foo, void *bar) { /* we primarily reset all private memory here to make sure * private values left over from previous message will * not be used again */ /* make sure the new message will not inherit previous message's t_on_negative value */ t_on_negative( 0 ); t_on_reply(0); t_on_branch(0); /* reset the kr status */ set_kr(0); /* set request mode so that multiple-mode actions know * how to behave */ rmode=MODE_REQUEST; return 1; }
static int script_init( struct sip_msg *foo, void *bar) { /* we primarily reset all private memory here to make sure * private values left over from previous message will * not be used again */ set_t(T_UNDEFINED); reset_cancelled_t(); reset_e2eack_t(); fr_timeout = timer_id2timeout[FR_TIMER_LIST]; fr_inv_timeout = timer_id2timeout[FR_INV_TIMER_LIST]; /* reset the kill reason status */ reset_kr(); /* reset the static holders for T routes */ t_on_negative( 0 ); t_on_reply(0); t_on_branch(0); return SCB_RUN_ALL; }
inline static int w_t_on_reply( struct sip_msg* msg, char *go_to, char *foo ) { struct cell *t; if (rmode==MODE_REQUEST) { /* it's still in initial request processing stage, transaction * state is not estabslihed yet, store it in private memory ... * it will be copied to transaction state when it is set up */ t_on_reply( (unsigned int )(long) go_to ); return 1; } if (rmode==MODE_ONREPLY || rmode==MODE_ONFAILURE) { /* transaction state is established */ t=get_t(); if (!t || t==T_UNDEFINED) { LOG(L_CRIT, "BUG: w_t_on_reply entered without t\n"); return -1; } t->on_reply=(unsigned int) (long)go_to; return 1; } LOG(L_CRIT, "BUG: w_t_on_reply entered in unsupported mode\n"); return -1; }
inline static int w_t_on_reply( struct sip_msg* msg, char *go_to, char *foo ) { t_on_reply( (unsigned int )(long) go_to ); return 1; }