Fix crashing autotest due to wrong initialization of the usermanager.

This commit is contained in:
Jan Vidar Krey 2014-05-13 20:13:11 +02:00
parent 5e06b46deb
commit 12ce522a6d

View File

@ -14,10 +14,8 @@ static void inf_create_hub()
{ {
net_initialize(); net_initialize();
inf_hub = (struct hub_info*) hub_malloc_zero(sizeof(struct hub_info)); inf_hub = (struct hub_info*) hub_malloc_zero(sizeof(struct hub_info));
inf_hub->users = (struct hub_user_manager*) hub_malloc_zero(sizeof(struct hub_user_manager));
inf_hub->users->list = list_create();
inf_hub->users->sids = sid_pool_create(500);
inf_hub->users = uman_init();
inf_hub->acl = (struct acl_handle*) hub_malloc_zero(sizeof(struct acl_handle)); inf_hub->acl = (struct acl_handle*) hub_malloc_zero(sizeof(struct acl_handle));
inf_hub->config = (struct hub_config*) hub_malloc_zero(sizeof(struct hub_config)); inf_hub->config = (struct hub_config*) hub_malloc_zero(sizeof(struct hub_config));
@ -27,12 +25,9 @@ static void inf_create_hub()
static void inf_destroy_hub() static void inf_destroy_hub()
{ {
/* FIXME */ uman_shutdown(inf_hub->users);
list_destroy(inf_hub->users->list);
sid_pool_destroy(inf_hub->users->sids);
acl_shutdown(inf_hub->acl); acl_shutdown(inf_hub->acl);
free_config(inf_hub->config); free_config(inf_hub->config);
hub_free(inf_hub->users);
hub_free(inf_hub->acl); hub_free(inf_hub->acl);
hub_free(inf_hub->config); hub_free(inf_hub->config);
hub_free(inf_hub); hub_free(inf_hub);