Make sure the autotests work.
This commit is contained in:
parent
c3ad006d07
commit
1599f63134
|
@ -50,6 +50,7 @@ static void inf_create_user()
|
|||
static void inf_destroy_user()
|
||||
{
|
||||
if (!inf_user) return;
|
||||
hub_free(inf_user->connection);
|
||||
hub_free(inf_user);
|
||||
inf_user = 0;
|
||||
}
|
||||
|
|
|
@ -93,9 +93,12 @@ int uman_init(struct hub_info* hub)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (net_backend_get_timeout_queue())
|
||||
{
|
||||
users->timeout = hub_malloc_zero(sizeof(struct timeout_evt));
|
||||
timeout_evt_initialize(users->timeout, timer_statistics, hub);
|
||||
timeout_queue_insert(net_backend_get_timeout_queue(), users->timeout, TIMEOUT_STATS);
|
||||
}
|
||||
|
||||
hub->users = users;
|
||||
return 0;
|
||||
|
@ -107,8 +110,11 @@ int uman_shutdown(struct hub_info* hub)
|
|||
if (!hub || !hub->users)
|
||||
return -1;
|
||||
|
||||
if (net_backend_get_timeout_queue())
|
||||
{
|
||||
timeout_queue_remove(net_backend_get_timeout_queue(), hub->users->timeout);
|
||||
hub_free(hub->users->timeout);
|
||||
}
|
||||
|
||||
if (hub->users->list)
|
||||
{
|
||||
|
|
|
@ -99,6 +99,7 @@ void net_backend_shutdown()
|
|||
net_cleanup_shutdown(g_backend->cleaner);
|
||||
hub_free(g_backend->conns);
|
||||
hub_free(g_backend);
|
||||
g_backend = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -135,6 +136,9 @@ int net_backend_process()
|
|||
|
||||
struct timeout_queue* net_backend_get_timeout_queue()
|
||||
{
|
||||
if (!g_backend)
|
||||
return 0;
|
||||
|
||||
return &g_backend->timeout_queue;
|
||||
}
|
||||
|
||||
|
|
|
@ -86,6 +86,7 @@ void net_backend_shutdown()
|
|||
hub_free(g_backend->conns);
|
||||
hub_free(g_backend->changes);
|
||||
hub_free(g_backend);
|
||||
g_backend = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -124,6 +125,9 @@ int net_backend_process()
|
|||
|
||||
struct timeout_queue* net_backend_get_timeout_queue()
|
||||
{
|
||||
if (!g_backend)
|
||||
return 0;
|
||||
|
||||
return &g_backend->timeout_queue;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ void net_backend_shutdown()
|
|||
net_cleanup_shutdown(g_backend->cleaner);
|
||||
hub_free(g_backend->conns);
|
||||
hub_free(g_backend);
|
||||
g_backend = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -149,6 +150,9 @@ int net_backend_process()
|
|||
|
||||
struct timeout_queue* net_backend_get_timeout_queue()
|
||||
{
|
||||
if (!g_backend)
|
||||
return 0;
|
||||
|
||||
return &g_backend->timeout_queue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue