rem: T=0;
add: set_t(0);
context: struct cell* t_lookupOriginalT(  struct sip_msg* p_msg ){	struct cell     *p_cell;	unsigned int     hash_index;	struct sip_msg  *t_msg;	struct via_param *branch;	/* start searching in the table */	hash_index = p_msg->hash_index;	DBG("DEBUG: t_lookupOriginalT: searching on hash entry %d\n",hash_index );	/* first of all, look if there is RFC3261 magic cookie in branch; if	 * so, we can do very quick matching and skip the old-RFC bizzar	 * comparison of many header fields	 */	if (!p_msg->via1) {		LOG(L_ERR, "ERROR: t_lookup_request: no via\n");		T=0;		return 0;	}	branch=p_msg->via1->branch;	if (branch && branch->value.s && branch->value.len>MCOOKIE_LEN			&& memcmp(branch->value.s,MCOOKIE,MCOOKIE_LEN)==0) {		/* huhuhu! the cookie is there -- let's proceed fast */		LOCK_HASH(hash_index);		p_cell=tid_matching(hash_index, p_msg->via1, 				/* we are seeking the original transaction --				 * skip CANCEL transactions during search				 */				METHOD_CANCEL);		if (p_cell) goto found; else goto notfound;	}	/* no cookies --proceed to old-fashioned pre-3261 t-matching */	LOCK_HASH(hash_index);	/* all the transactions from the entry are compared */	for (p_cell=get_tm_table()->entrys[hash_index].first_cell;		p_cell; p_cell = p_cell->next_cell )	{		t_msg = p_cell->uas.request;		/* we don't cancel CANCELs ;-) */		if (p_cell->uas.request->REQ_METHOD==METHOD_CANCEL)			continue;		/* check lengths now */			if (!EQ_LEN(callid))			continue;		if (get_cseq(t_msg)->number.len!=get_cseq(p_msg)->number.len)			continue;		if (!EQ_LEN(from))			continue;#ifdef CANCEL_TAG		if (!EQ_LEN(to))			continue;#else		/* relaxed matching -- we don't care about to-tags anymore,		 * many broken UACs screw them up and ignoring them does not		 * actually hurt		 */		if (get_to(t_msg)->uri.len!=get_to(p_msg)->uri.len)			continue;#endif		if (!EQ_REQ_URI_LEN)			continue;		if (!EQ_VIA_LEN(via1))			continue;		/* check the content now */		if (!EQ_STR(callid))			continue;		if (memcmp(get_cseq(t_msg)->number.s,			get_cseq(p_msg)->number.s,get_cseq(p_msg)->number.len)!=0)			continue;		if (!EQ_STR(from))			continue;#ifdef CANCEL_TAG		if (!EQ_STR(to))			continue;#else		if (memcmp(get_to(t_msg)->uri.s, get_to(p_msg)->uri.s,					get_to(t_msg)->uri.len)!=0)			continue;#endif		if (!EQ_REQ_URI_STR)			continue;		if (!EQ_VIA_STR(via1))			continue;		/* found */		goto found;	}notfound:	/* no transaction found */	DBG("DEBUG: t_lookupOriginalT: no CANCEL maching found! \n" );	UNLOCK_HASH(hash_index);	DBG("DEBUG: t_lookupOriginalT completed\n");	return 0;found:	DBG("DEBUG: t_lookupOriginalT: canceled transaction"		" found (%p)! \n",p_cell );	REF_UNSAFE( p_cell );	UNLOCK_HASH(hash_index);	DBG("DEBUG: t_lookupOriginalT completed\n");	return p_cell;}