rem: atomic_set( &tr->ref_cnt, 2);
add: atomic_inc( &tr->ref_cnt );
context: int send_req_to_peer(struct trans *tr , struct peer *p){	unsigned int ete;	str *foo;	str s;	lock_get( p->mutex );	if ( p->state!=PEER_CONN && p->state!=PEER_WAIT_DWA) {		LOG(L_INFO,"ERROR:send_req_to_peer: peer is not connected\n");		lock_release( p->mutex);		return -1;	}	/* peer available for sending */	DBG("peer \"%.*s\" available for sending\n",p->aaa_identity.len,			p->aaa_identity.s);	/* get a new end-to-end ID for computing the hash code */	if (tr->in_peer) {		/* this is forwarding*/		ete = ((unsigned int*)tr->req->s)[4];	}else {		/* sending local req */		ete = p->endtoendID++;		((unsigned int*)tr->req->s)[4] = ete;	}	s.s = (char*)&ete;	s.len = END_TO_END_IDENTIFIER_SIZE;	tr->linker.hash_code = hash( &s , p->trans_table->hash_size );	/* insert into trans hash table */	add_cell_to_htable( p->trans_table, &(tr->linker) );	/* the hash label is used as hop-by-hop ID */	((unsigned int*)tr->req->s)[3] = tr->linker.label;	/* things that I want to remember or not */	foo = tr->req;	tr->out_peer = p;	tr->req = 0;	/* transaction will be ref from to places - from timer list and	 * from hash tabel*/	atomic_set( &tr->ref_cnt, 2);	/* start the timeout timer */	add_to_timer_list( &(tr->timeout) , tr_timeout_timer ,		get_ticks()+TR_TIMEOUT_TIMEOUT );	/* send it- I'm not intereseted in the return code -if it's error, the	 * peer will be automaticly closed by safe_write and this transaction will	 * give timeout */	safe_write( p, foo->s, foo->len);	lock_release( p->mutex);	return 1;}