rem: for (p_cell = hash_table->entrys[hash_index].first_cell; p_cell;
add: for (p_cell = get_tm_table()->entrys[hash_index].first_cell; p_cell;
context: int t_reply_matching( struct sip_msg *p_msg , int *p_branch ){	struct cell*  p_cell;	int hash_index   = 0;	int entry_label  = 0;	int branch_id    = 0;	char  *hashi, *branchi, *p, *n;	int hashl, branchl;	int scan_space;	str cseq_method;	str req_method;	char *loopi;	int loopl;	char *syni;	int synl;		short is_cancel;	/* make compiler warnnings happy */	loopi=0;	loopl=0;	syni=0;	synl=0;	/* split the branch into pieces: loop_detection_check(ignored),	 hash_table_id, synonym_id, branch_id */	if (!(p_msg->via1 && p_msg->via1->branch && p_msg->via1->branch->value.s))		goto nomatch2;	p=p_msg->via1->branch->value.s;	scan_space=p_msg->via1->branch->value.len;	/* hash_id */	n=eat_token2_end( p, p+scan_space, BRANCH_SEPARATOR);	hashl=n-p;	scan_space-=hashl;	if (!hashl || scan_space<2 || *n!=BRANCH_SEPARATOR) goto nomatch2;	hashi=p;	p=n+1;scan_space--;	if (!syn_branch) {		/* md5 value */		n=eat_token2_end( p, p+scan_space, BRANCH_SEPARATOR );		loopl = n-p;		scan_space-= loopl;		if (n==p || scan_space<2 || *n!=BRANCH_SEPARATOR) 			goto nomatch2;		loopi=p;		p=n+1; scan_space--;	} else {		/* synonym id */		n=eat_token2_end( p, p+scan_space, BRANCH_SEPARATOR);		synl=n-p;		scan_space-=synl;		if (!synl || scan_space<2 || *n!=BRANCH_SEPARATOR) 			goto nomatch2;		syni=p;		p=n+1;scan_space--;	}	/* branch id  -  should exceed the scan_space */	n=eat_token_end( p, p+scan_space );	branchl=n-p;	if (!branchl ) goto nomatch2;	branchi=p;	/* sanity check */	if ((hash_index=reverse_hex2int(hashi, hashl))<0		||hash_index>=TABLE_ENTRIES		|| (branch_id=reverse_hex2int(branchi, branchl))<0		||branch_id>=MAX_BRANCHES		|| (syn_branch ? (entry_label=reverse_hex2int(syni, synl))<0 			: loopl!=MD5_LEN )	) {		DBG("DEBUG: t_reply_matching: poor reply lables %d label %d "			"branch %d\n",hash_index, entry_label, branch_id );		goto nomatch2;	}	DBG("DEBUG: t_reply_matching: hash %d label %d branch %d\n",		hash_index, entry_label, branch_id );	/* search the hash table list at entry 'hash_index'; lock the	   entry first 	*/	cseq_method=get_cseq(p_msg)->method;	is_cancel=cseq_method.len==CANCEL_LEN 		&& memcmp(cseq_method.s, CANCEL, CANCEL_LEN)==0;	LOCK_HASH(hash_index);	for (p_cell = hash_table->entrys[hash_index].first_cell; p_cell; 		p_cell=p_cell->next_cell) {		/* first look if branch matches */		if (syn_branch) {			if (p_cell->label != entry_label) 				continue;		} else {			if ( memcmp(p_cell->md5, loopi,MD5_LEN)!=0)					continue;		}		/* sanity check ... too high branch ? */		if ( branch_id>=p_cell->nr_of_outgoings )			continue;		/* does method match ? (remember -- CANCELs have the same branch		   as cancelled transactions) */		req_method=p_cell->method;		if ( /* method match */			! ((cseq_method.len==req_method.len 			&& memcmp( cseq_method.s, req_method.s, cseq_method.len )==0)			/* or it is a local cancel */			|| (is_cancel && p_cell->is_invite 				/* commented out -- should_cancel_branch set it to				   BUSY_BUFFER to avoid collisions with repliesl;				   thus, we test here by bbuffer size				*/				/* && p_cell->uac[branch_id].local_cancel.buffer ))) */				&& p_cell->uac[branch_id].local_cancel.buffer_len ))) 			continue;		/* we passed all disqualifying factors .... the transaction has been		   matched !		*/		T=p_cell;		*p_branch = branch_id;		REF_UNSAFE( T );		UNLOCK_HASH(hash_index);		DBG("DEBUG: t_reply_matching: reply matched (T=%p)!\n",T);		return 1;	} /* for cycle */	/* nothing found */	UNLOCK_HASH(hash_index);	DBG("DEBUG: t_reply_matching: no matching transaction exists\n");nomatch2:	DBG("DEBUG: t_reply_matching: failure to match a transaction\n");	*p_branch = -1;	T = 0;	return -1;}