rem: p->flags &= !PEER_CONN_IN_PROG;
add: p->flags &= PEER_TO_DESTROY;
context: inline void reset_peer( struct peer *p){	/* if it's in a timer list -> remove it */	if (p->tl.timer_list)		rmv_from_timer_list( &(p->tl) );	/* reset the socket */	p->sock = -1;	/* reset the PEER_CONN_IN_PROG flag */	p->flags &= !PEER_CONN_IN_PROG;	/* put the peer in timer list for reconnection  */	if (!p->flags&PEER_TO_DESTROY)		add_to_timer_list( &(p->tl), reconn_timer, get_ticks()+RECONN_TIMEOUT);	/* remove the peer from activ peer list */	list_del_safe(  &p->lh , &activ_peers );	/* reset the buffer for  reading messages */	p->first_4bytes = 0;	p->buf_len = 0;	if (p->buf)		shm_free(p->buf);	p->buf = 0;	/* reset the supported application ids */	if (p->supp_acct_app_ids)		shm_free( p->supp_acct_app_ids );	p->supp_acct_app_ids = 0;	if (p->supp_auth_app_ids)		shm_free( p->supp_auth_app_ids );	p->supp_auth_app_ids = 0;	/* free the origin realm */	if (p->aaa_realm.s)		shm_free( p->aaa_realm.s );	p->aaa_realm.s = 0;}