rem: unlock(&(hash_table->entrys[p_msg->hash_index].mutex));  if (lret==-2) callback_event( TMCB_E2EACK, p_msg );
add: if (lret==-2) { T_REF(t_ack); unlock(&(hash_table->entrys[p_msg->hash_index].mutex)); callback_event( TMCB_E2EACK, t_ack, p_msg ); T_UNREF(t_ack); } else {  unlock(&(hash_table->entrys[p_msg->hash_index].mutex)); }
context: int t_newtran( struct sip_msg* p_msg ){	int ret, lret;	struct cell *new_cell;	/* is T still up-to-date ? */	DBG("DEBUG: t_addifnew: msg id=%d , global msg id=%d ,"		" T on entrance=%p\n",p_msg->id,global_msg_id,T);	if ( !(p_msg->id != global_msg_id || T==T_UNDEFINED 		/* if someone tried to do something previously by mistake with		   a transaction which did not exist yet, try to look-up		   the transacion too */		|| T==T_NULL)) 	{		LOG(L_ERR, "ERROR: t_newtran: alreaddy processing this message"			", T %s found\n", T ? "" : "not" );		return 0;	}	global_msg_id = p_msg->id;	T = T_UNDEFINED;	/* transaction lookup */	/* force parsing all the needed headers*/	if (parse_headers(p_msg, HDR_EOH )==-1)		return 0;	lret = t_lookup_request( p_msg, 1 /* leave locked */ );	/* on error, pass the error in the stack ... */	if (lret==0) return 0;	if (lret<0) {		/* transaction not found, it's a new request;		   establish a new transaction (unless it is an ACK) */		ret=1;		if ( p_msg->REQ_METHOD!=METHOD_ACK ) {			/* add new transaction */			new_cell = build_cell( p_msg ) ;			if  ( !new_cell ){				LOG(L_ERR, "ERROR: t_addifnew: out of mem:\n");				ret = 0;			} else {				insert_into_hash_table_unsafe( hash_table , new_cell );				T=new_cell;				T_REF(T);			}		}		unlock(&(hash_table->entrys[p_msg->hash_index].mutex));		/* it that was a presumable e2e ACK, run a callback */		if (lret==-2) callback_event( TMCB_E2EACK, p_msg );		return ret;	} else {		/* transaction found, it's a retransmission  or ACK */			return -1;	}}