rem: if (T) {
add: if (T!=T_UNDEFINED && T!=T_NULL) {
context: static int t_relay_to( struct sip_msg  *p_msg , char *str_ip , char *str_port){	struct proxy_l *proxy;	enum addifnew_status status;	int ret=0;	status = t_addifnew( p_msg );	switch( status ) {		case AIN_ERROR:		/*  fatal error (e.g, parsing) occured */			ret = 0;			break;		case AIN_RETR:		/* it's a retransmission */			ret=t_retransmit_reply( p_msg );			/* look at ret for better debugging output ... */			if (ret>0) DBG("DEBUG: reply retransmitted (status %d)\n", ret);			else if (ret==-1) DBG("DEBUG: no reply to retransmit; "				"probably a non-INVITE transaction which was not replied\n");			else LOG(L_ERR, "ERROR: reply retranmission failed\n");			/* eventually, do not worry and proceed whatever happened to you...*/			ret = 1;			break;		case AIN_NEW:		/* it's a new request */			if (!t_forward_nonack(p_msg,(unsigned int)str_ip,			(unsigned int) str_port ))			{				DBG( "SER:ERROR: t_forward \n");				ret = 0;			} else { /* let upstream know, I forwarded downstream */				if ( p_msg->REQ_METHOD==METHOD_CANCEL)				{					DBG( "SER: new CANCEL\n");					if ( !t_send_reply( p_msg , 200, "glad to cancel", 0) )						DBG( "SER:ERROR: t_send_reply\n");				} else if (p_msg->REQ_METHOD==METHOD_INVITE)				{					DBG( "SER: new INVITE\n");					if (!t_send_reply( p_msg , 100 ,					"trying -- your call is important to us",0))						DBG("SER: ERROR: t_send_reply (100)\n");				} else {					DBG( "SER: new transaction\n");				}				ret = 1;			}			break;		case AIN_NEWACK:	/* it's an ACK for which no transaction exists */			DBG( "SER: forwarding ACK  statelessly \n");			proxy = mk_proxy_from_ip( (unsigned int)str_ip,				ntohs((unsigned int)str_port) );			forward_request( p_msg , proxy ) ;			free_proxy(proxy);			free(proxy);			ret=1;			break;		case AIN_OLDACK:	/* it's an ACK for an existing transaction */			DBG( "SER: ACK received -> t_release\n");			if ( !t_release_transaction( p_msg ) )			{				DBG( "SER: WARNING: bad t_release\n");			}			/* t_forward decides whether to forward (2xx) 			   or not (anything else) */			if ( !t_forward_ack( p_msg , (unsigned int) str_ip ,			(unsigned int) str_port ) )				DBG( "SER: WARNING: bad ACK forward\n");			ret = 1;			break;		case AIN_RTRACK:	/* ACK retransmission */			DBG( "SER: ACK retransmission\n");			ret = 1;			break;		default:			LOG(L_CRIT, "ERROR: unexpected addifnew return value: %d\n", ret);			abort();	};	if (T) {		T_UNREF( T );	}	return ret;}