Esempio n. 1
0
inline static int w_t_on_negative( struct sip_msg* msg, char *go_to, char *foo )
{
	struct cell *t;

	if (rmode==MODE_REQUEST || rmode==MODE_ONFAILURE) {
		t_on_negative( (unsigned int )(long) go_to );
		return 1;
	}
	if (rmode==MODE_ONREPLY ) {
		/* transaction state is established */
		t=get_t();
		if (!t || t==T_UNDEFINED) {
			LOG(L_CRIT, "BUG: w_t_on_negative entered without t\n");
			return -1;
		}
		t->on_negative=(unsigned int)(long)go_to;
		return 1;
	}
	LOG(L_CRIT, "BUG: w_t_on_negative entered in unsupported mode\n");
	return -1;
}
Esempio n. 2
0
File: tm.c Progetto: Danfx/opensips
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;
}
Esempio n. 3
0
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
    */

	if (foo->first_line.type==SIP_REQUEST){
		/* make sure the new message will not inherit previous
	   		message's t_on_negative value
		*/
		t_on_negative( 0 );
		t_on_reply(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;
}
Esempio n. 4
0
inline static int w_t_on_negative( struct sip_msg* msg, char *go_to, char *foo)
{
	t_on_negative( (unsigned int )(long) go_to );
	return 1;
}