rem: if ( t_msg->first_line.u.request.method_value==METHOD_INVITE
add: if (t_msg->REQ_METHOD==METHOD_INVITE
context: int t_lookup_request( struct sip_msg* p_msg , int leave_new_locked ){	struct cell         *p_cell;	struct cell         *tmp_cell;	unsigned int       isACK;	struct sip_msg  *t_msg;	/* parse all*/	if (check_transaction_quadruple(p_msg)==0)	{		LOG(L_ERR, "ERROR: TM module: t_lookup_request: too few headers\n");		T=0;		/* stop processing */		return 0;	}	/* start searching into the table */	p_msg->hash_index=hash( p_msg->callid->body , get_cseq(p_msg)->number ) ;	isACK = p_msg->REQ_METHOD==METHOD_ACK;	DBG("t_lookup_request: start searching: hash=%d, isACK=%d\n",		p_msg->hash_index,isACK);	/* lock the hole entry*/	lock(&(hash_table->entrys[p_msg->hash_index].mutex));	/* all the transactions from the entry are compared */	p_cell   = hash_table->entrys[p_msg->hash_index].first_cell;	tmp_cell = 0;	while( p_cell )	{		t_msg = p_cell->uas.request;		/* is it the wanted transaction ? */		if ( !isACK )		{ /* is not an ACK request */			/* first only the length are checked */			if ( /*callied*/EQ_LEN(callid) && /*cseq*/EQ_LEN(cseq)			&& /*req URI*/EQ_REQ_URI_LEN && /*VIA*/EQ_VIA_LEN(via1)			&& /*from*/EQ_LEN(from) && /*to*/EQ_LEN(to)  )				/* so far the lengths are the same				-> let's check the contents */				if ( /*callid*/EQ_STR(callid) && /*cseq*/EQ_STR(cseq)				&& /*req URI*/EQ_REQ_URI_STR && /*VIA*/EQ_VIA_STR(via1)				&& /*from*/EQ_STR(from) && /*to*/EQ_STR(to) )					{ /* WE FOUND THE GOLDEN EGG !!!! */						goto found;					}		}		else		{ /* it's a ACK request*/			/* first only the length are checked */			if ( t_msg->first_line.u.request.method_value==METHOD_INVITE			/* && (fprintf(stderr,"------Method name OK->testing callid len...\n")) */			&& /*callid length*/ EQ_LEN(callid)			/* && (fprintf(stderr,"------CallID OK -> testing cseq nr len\n")) */			&& get_cseq(t_msg)->number.len==get_cseq(p_msg)->number.len			/* && (fprintf(stderr,"------Cseq nr OK -> testing from len\n")) */			&& /*from length*/ EQ_LEN(from)			/* && (fprintf(stderr,"------from OK -> testing To uri len\n")) */			&& /*to uri*/get_to(t_msg)->uri.len==get_to(p_msg)->uri.len			/* && (fprintf(stderr,"------To uri OK -> testing To tag len\n")) */			&& /*to tag*/p_cell->uas.tag->len==get_to(p_msg)->tag_value.len			/* && (fprintf(stderr,"------To tag OK -> testing uri len\n")) */			&& /*req URI*/(p_cell->uas.status==200 || EQ_REQ_URI_LEN )			/* && (fprintf(stderr,"------uri OK -> testing via len\n")) */			&& /*VIA*/(p_cell->uas.status==200 || EQ_VIA_LEN(via1)) )				/* so far the lengths are the same				-> let's check the contents */				if ( /* fprintf(stderr,"------callid |%.*s| |%.*s|\n",					p_msg->callid->body.len,p_msg->callid->body.s,					t_msg->callid->body.len,t_msg->callid->body.s)				&& */ /*callid*/!memcmp( t_msg->callid->body.s,					p_msg->callid->body.s,p_msg->callid->body.len)				/* && fprintf(stderr,"------cseq |%.*s| |%.*s|\n",					get_cseq(p_msg)->number.len,get_cseq(p_msg)->number.s,					get_cseq(t_msg)->number.len,get_cseq(t_msg)->number.s) */				&& /*cseq nr*/!memcmp(get_cseq(t_msg)->number.s,					get_cseq(p_msg)->number.s,get_cseq(p_msg)->number.len)				/* &&  fprintf(stderr,"------from |%.*s| |%.*s|\n",					p_msg->from->body.len, translate_pointer(p_msg->orig,						p_msg->buf,p_msg->from->body.s),					t_msg->from->body.len,t_msg->from->body.s) */				&& /*from*/EQ_STR(from)				/* && fprintf(stderr,"------to uri |%.*s| |%.*s|\n",					get_to(p_msg)->uri.len,get_to(p_msg)->uri.s,					get_to(t_msg)->uri.len,get_to(t_msg)->uri.s) */				&& /*to uri*/!memcmp(get_to(t_msg)->uri.s,					get_to(p_msg)->uri.s,get_to(t_msg)->uri.len)				/* && fprintf(stderr,"------to tag |%.*s| |%.*s|\n",                    get_to(p_msg)->tag_value.len,get_to(p_msg)->tag_value.s,                    p_cell->uas.tag->len, p_cell->uas.tag->s) */				&& /*to tag*/!memcmp(p_cell->uas.tag->s,					get_to(p_msg)->tag_value.s,p_cell->uas.tag->len)				/* && fprintf(stderr,"------URI %d |%.*s| |%.*s|\n",					p_cell->uas.status,p_msg->first_line.u.request.uri.len,					translate_pointer(p_msg->orig, p_msg->buf,						p_msg->first_line.u.request.uri.s),					t_msg->first_line.u.request.uri.len,					t_msg->first_line.u.request.uri.s) */				&& /*req URI*/(p_cell->uas.status==200 || EQ_REQ_URI_STR)				/* && fprintf(stderr,"------VIA %d |%.*s| |%.*s|\n",					p_cell->uas.status, 					(p_msg->via1->bsize-(p_msg->via1->name.s-						(p_msg->via1->hdr.s+p_msg->via1->hdr.len))),					translate_pointer(p_msg->orig,p_msg->buf,						p_msg->via1->name.s),                    (t_msg->via1->bsize-(t_msg->via1->name.s-						(t_msg->via1->hdr.s+t_msg->via1->hdr.len))),					t_msg->via1->name.s) */				&& /*VAI*/(p_cell->uas.status==200 ||EQ_VIA_STR(via1)) )					{ /* WE FOUND THE GOLDEN EGG !!!! */						goto found;					}		}		/* next transaction */		tmp_cell = p_cell;		p_cell = p_cell->next_cell;	} /* synonym loop */	/* no transaction found */	T = 0;	if (!leave_new_locked)		unlock(&(hash_table->entrys[p_msg->hash_index].mutex));	DBG("DEBUG: t_lookup_request: no transaction found\n");	/* DON'T FORGET TO REMOVE IT!!!!! bogdan */	//if (isACK) assert(0);	return -1;found:	T=p_cell;	T_REF( T );	DBG("DEBUG: t_lookup_request: transaction found (T=%p , ref=%x)\n",		T,T->ref_bitmap);	unlock(&(hash_table->entrys[p_msg->hash_index].mutex));	return 1;}