/* * init_servers() * * Initializes the server heap and server/sid DTree structures. * * Inputs: * - nothing * * Outputs: * - nothing * * Side Effects: * - if the heap or dtrees fail to initialize, the program * will abort. */ void init_servers(void) { serv_heap = sharedheap_get(sizeof(server_t)); tld_heap = sharedheap_get(sizeof(tld_t)); if (serv_heap == NULL || tld_heap == NULL) { slog(LG_INFO, "init_servers(): block allocator failure."); exit(EXIT_FAILURE); } servlist = mowgli_patricia_create(irccasecanon); sidlist = mowgli_patricia_create(noopcanon); }
void pcommand_init(void) { pcommand_heap = sharedheap_get(sizeof(pcommand_t)); if (!pcommand_heap) { slog(LG_INFO, "pcommand_init(): block allocator failed."); exit(EXIT_FAILURE); } pcommands = mowgli_patricia_create(noopcanon); }
/* * init_users() * * Initializes the users heap and DTree. * * Inputs: * - none * * Outputs: * - none * * Side Effects: * - the users heap and DTree are initialized. */ void init_users(void) { user_heap = sharedheap_get(sizeof(user_t)); if (user_heap == NULL) { slog(LG_DEBUG, "init_users(): block allocator failure."); exit(EXIT_FAILURE); } userlist = mowgli_patricia_create(irccasecanon); uidlist = mowgli_patricia_create(noopcanon); }