Beispiel #1
0
/* unsafe tcpconn_rm version (nolocks) */
void _tcpconn_rm(struct tcp_connection* c)
{
	tcpconn_listrm(tcpconn_addr_hash[c->addr_hash], c, next, prev);
	tcpconn_listrm(tcpconn_id_hash[c->id_hash], c, id_next, id_prev);
	lock_destroy(&c->write_lock);
#ifdef USE_TLS
	if (c->type==PROTO_TLS) tls_tcpconn_clean(c);
#endif
	shm_free(c);
}
Beispiel #2
0
void tcpconn_rm(struct tcp_connection* c)
{
	TCPCONN_LOCK;
	tcpconn_listrm(tcpconn_addr_hash[c->addr_hash], c, next, prev);
	tcpconn_listrm(tcpconn_id_hash[c->id_hash], c, id_next, id_prev);
	TCPCONN_UNLOCK;
	lock_destroy(&c->write_lock);
#ifdef USE_TLS
	if ((c->type==PROTO_TLS)&&(c->extra_data)) tls_tcpconn_clean(c);
#endif
	shm_free(c);
}
Beispiel #3
0
/*! \brief unsafe tcpconn_rm version (nolocks) */
void _tcpconn_rm(struct tcp_connection* c)
{
	int r;
	tcpconn_listrm(tcpconn_id_hash[c->id_hash], c, id_next, id_prev);
	/* remove all the aliases */
	for (r=0; r<c->aliases; r++)
		tcpconn_listrm(tcpconn_aliases_hash[c->con_aliases[r].hash], 
						&c->con_aliases[r], next, prev);
	lock_destroy(&c->write_lock);
#ifdef USE_TLS
	if (c->type==PROTO_TLS) tls_tcpconn_clean(c);
#endif
	shm_free(c);
}