Added lots of asserts, and split out the ip address from the connection object.

Still a lot of work remains and a massive network connection cleanup is needed.
This commit is contained in:
Jan Vidar Krey
2009-09-28 23:15:15 +02:00
parent a53c219f05
commit 69f6d811bf
11 changed files with 54 additions and 32 deletions

View File

@@ -187,6 +187,14 @@ void net_event(struct net_connection* con, int event, void *arg)
struct hub_user* user = (struct hub_user*) arg;
int flag_close = 0;
if (event == NET_EVENT_DESTROYED)
{
printf("NET_EVENT_DESTROYED\n");
hub_free(user->connection);
user->connection = 0;
return;
}
#ifdef DEBUG_SENDQ
LOG_TRACE("net_event() : fd=%d, ev=%d, arg=%p", fd, (int) event, arg);
#endif