rem: t_on_negative(0);
add: on_failure = t->on_negative; t->on_negative=0;
context: static inline int run_failure_handlers(struct cell *t, struct sip_msg *rpl,																	int code){	static struct sip_msg fake_req;	struct sip_msg *shmem_msg = t->uas.request;	/* failure_route for a local UAC? */	if (!shmem_msg) {		LOG(L_WARN, "Warning: run_failure_handlers: no UAC support\n");		return 0;	}	/* don't start faking anything if we don't have to */	if ( !has_tran_tmcbs( t, TMCB_ON_FAILURE) && !t->on_negative ) {		return 1;	}	/* on_negative_reply faked msg now copied from shmem msg (as opposed	 * to zero-ing) -- more "read-only" actions (exec in particular) will	 * work from reply_route as they will see msg->from, etc.; caution,	 * rw actions may append some pkg stuff to msg, which will possibly be	 * never released (shmem is released in a single block) */	memcpy( &fake_req, shmem_msg, sizeof(struct sip_msg));	/* if we set msg_id to something different from current's message	 * id, the first t_fork will properly clean new branch URIs */	fake_req.id=shmem_msg->id-1;	/* new_uri can change -- make a private copy */	if (shmem_msg->new_uri.s!=0 && shmem_msg->new_uri.len!=0) {		fake_req.new_uri.s=pkg_malloc(shmem_msg->new_uri.len+1);		if (!fake_req.new_uri.s) {			LOG(L_ERR, "ERROR: run_failure_handlers: no uri/pkg mem\n");			return 0;		}		fake_req.new_uri.len=shmem_msg->new_uri.len;		memcpy( fake_req.new_uri.s, shmem_msg->new_uri.s, 			fake_req.new_uri.len);		fake_req.new_uri.s[fake_req.new_uri.len]=0;	}	/* create a duplicated lump list to which actions can add	 * new pkg items  */	if (shmem_msg->add_rm) {		fake_req.add_rm=dup_lump_list(shmem_msg->add_rm);		if (!fake_req.add_rm) { /* non_emty->empty ... failure */			LOG(L_ERR, "ERROR: run_failure_handlers: lump dup failed\n");			if (fake_req.new_uri.s) pkg_free(fake_req.new_uri.s);			return 0;		}	}	/* same for the body lumps */	if (shmem_msg->body_lumps) {		fake_req.body_lumps=dup_lump_list(shmem_msg->body_lumps);		if (!fake_req.body_lumps) { /* non_empty->empty ... failure */			LOG(L_ERR, "ERROR: on_negative_handlers: lump dup failed\n");			free_duped_lump_list(fake_req.add_rm);			if (fake_req.new_uri.s) pkg_free(fake_req.new_uri.s);			return 0;		}	}	/* fake also the env. conforming to the fake msg */	faked_env( t, &fake_req);	/* DONE with faking ;-) -> run the failure handlers */	if ( has_tran_tmcbs( t, TMCB_ON_FAILURE) ) {		run_trans_callbacks( TMCB_ON_FAILURE, t, &fake_req, rpl, code);	}	if (t->on_negative) {		/* avoid recursion -- if failure_route forwards, and does not 		 * set next failure route, failure_route will not be rentered		 * on failure */		t_on_negative(0);		/* run a reply_route action if some was marked */		if (run_actions(failure_rlist[t->on_negative], &fake_req)<0)			LOG(L_ERR, "ERROR: run_failure_handlers: Error in do_action\n");	}	/* restore original environment and free the fake msg */	faked_env( t, 0);	free_duped_lump_list(fake_req.add_rm);	free_duped_lump_list(fake_req.body_lumps);	fake_req.add_rm = fake_req.body_lumps = 0;	if (fake_req.new_uri.s) {		pkg_free(fake_req.new_uri.s);		fake_req.new_uri.s = 0;	}	del_nonshm_lump_rpl( &(fake_req.reply_lump) );	/* if failure handler changed flag, update transaction context */	shmem_msg->flags = fake_req.flags;	return 1;}