Crash fix.

This commit is contained in:
Jan Vidar Krey
2009-11-21 11:47:26 +01:00
parent e994f23ea0
commit 53536f191d
6 changed files with 31 additions and 69 deletions

View File

@@ -27,16 +27,6 @@ static void probe_net_event(struct net_connection* con, int events, void *arg)
{
struct hub_probe* probe = (struct hub_probe*) con->ptr;
if (events == NET_EVENT_DESTROYED)
{
if (probe)
{
probe->connection = 0;
}
hub_free(con);
return;
}
if (events == NET_EVENT_SOCKERROR || events == NET_EVENT_CLOSED || events == NET_EVENT_TIMEOUT)
{
probe_destroy(probe);
@@ -123,10 +113,7 @@ void probe_destroy(struct hub_probe* probe)
{
if (probe->connection)
{
if (net_con_close(probe->connection))
{
hub_free(probe->connection);
}
net_con_close(probe->connection);
probe->connection = 0;
}
hub_free(probe);