Mercurial > dovecot > core-2.2
changeset 14917:1ce71b5bc94a
hash_table_create(): Removed table_pool parameter.
Every single caller was using default_pool there, so there's no point in
having it.
line wrap: on
line diff
--- a/src/anvil/connect-limit.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/anvil/connect-limit.c Sun Aug 19 07:20:13 2012 +0300 @@ -46,10 +46,10 @@ limit = i_new(struct connect_limit, 1); limit->ident_hash = - hash_table_create(default_pool, default_pool, 0, + hash_table_create(default_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); limit->ident_pid_hash = - hash_table_create(default_pool, default_pool, 0, + hash_table_create(default_pool, 0, ident_pid_hash, ident_pid_cmp); return limit; }
--- a/src/anvil/penalty.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/anvil/penalty.c Sun Aug 19 07:20:13 2012 +0300 @@ -51,7 +51,7 @@ penalty = i_new(struct penalty, 1); penalty->hash = - hash_table_create(default_pool, default_pool, 0, + hash_table_create(default_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); penalty->expire_secs = PENALTY_DEFAULT_EXPIRE_SECS; return penalty;
--- a/src/auth/auth-cache.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/auth/auth-cache.c Sun Aug 19 07:20:13 2012 +0300 @@ -221,7 +221,7 @@ struct auth_cache *cache; cache = i_new(struct auth_cache, 1); - cache->hash = hash_table_create(default_pool, default_pool, 0, str_hash, + cache->hash = hash_table_create(default_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); cache->size_left = max_size; cache->ttl_secs = ttl_secs;
--- a/src/auth/auth-request-handler.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/auth/auth-request-handler.c Sun Aug 19 07:20:13 2012 +0300 @@ -52,7 +52,7 @@ handler = p_new(pool, struct auth_request_handler, 1); handler->refcount = 1; handler->pool = pool; - handler->requests = hash_table_create(default_pool, pool, 0, NULL, NULL); + handler->requests = hash_table_create(pool, 0, NULL, NULL); handler->callback = callback; handler->context = context; handler->master_callback = master_callback;
--- a/src/auth/db-checkpassword.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/auth/db-checkpassword.c Sun Aug 19 07:20:13 2012 +0300 @@ -545,7 +545,7 @@ db = i_new(struct db_checkpassword, 1); db->checkpassword_path = i_strdup(checkpassword_path); db->checkpassword_reply_path = i_strdup(checkpassword_reply_path); - db->clients = hash_table_create(default_pool, default_pool, 0, + db->clients = hash_table_create(default_pool, 0, NULL, NULL); db->child_wait = child_wait_new_with_pid((pid_t)-1, sigchld_handler, db);
--- a/src/auth/db-ldap.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/auth/db-ldap.c Sun Aug 19 07:20:13 2012 +0300 @@ -1196,7 +1196,7 @@ ctx->auth_request = auth_request; ctx->attr_map = attr_map; ctx->ldap_attrs = - hash_table_create(default_pool, pool, 0, strcase_hash, + hash_table_create(pool, 0, strcase_hash, (hash_cmp_callback_t *)strcasecmp); if (auth_request->set->debug) ctx->debug = t_str_new(256);
--- a/src/auth/db-passwd-file.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/auth/db-passwd-file.c Sun Aug 19 07:20:13 2012 +0300 @@ -194,7 +194,7 @@ pw->size = st.st_size; pw->pool = pool_alloconly_create(MEMPOOL_GROWING"passwd_file", 10240); - pw->users = hash_table_create(default_pool, pw->pool, 100, + pw->users = hash_table_create(pw->pool, 100, str_hash, (hash_cmp_callback_t *)strcmp); start_time = time(NULL); @@ -344,8 +344,7 @@ db->path = i_strdup(path); if (db->vars) { - db->files = hash_table_create(default_pool, default_pool, 100, - str_hash, + db->files = hash_table_create(default_pool, 100, str_hash, (hash_cmp_callback_t *)strcmp); } else { db->default_file = passwd_file_new(db, path);
--- a/src/auth/mech-otp-skey-common.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/auth/mech-otp-skey-common.c Sun Aug 19 07:20:13 2012 +0300 @@ -20,8 +20,7 @@ if (otp_lock_table != NULL) return; - otp_lock_table = hash_table_create(system_pool, system_pool, - 128, strcase_hash, + otp_lock_table = hash_table_create(default_pool, 128, strcase_hash, (hash_cmp_callback_t *)strcasecmp); }
--- a/src/config/config-request.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/config/config-request.c Sun Aug 19 07:20:13 2012 +0300 @@ -361,8 +361,8 @@ ctx->scope = scope; ctx->value = t_str_new(256); ctx->prefix = t_str_new(64); - ctx->keys = hash_table_create(default_pool, ctx->pool, 0, - str_hash, (hash_cmp_callback_t *)strcmp); + ctx->keys = hash_table_create(ctx->pool, 0, str_hash, + (hash_cmp_callback_t *)strcmp); return ctx; }
--- a/src/director/director-test.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/director/director-test.c Sun Aug 19 07:20:13 2012 +0300 @@ -532,9 +532,9 @@ static void main_init(const char *admin_path) { - users = hash_table_create(default_pool, default_pool, 0, - str_hash, (hash_cmp_callback_t *)strcmp); - hosts = hash_table_create(default_pool, default_pool, 0, + users = hash_table_create(default_pool, 0, str_hash, + (hash_cmp_callback_t *)strcmp); + hosts = hash_table_create(default_pool, 0, (hash_callback_t *)net_ip_hash, (hash_cmp_callback_t *)net_ip_cmp); i_array_init(&hosts_array, 256);
--- a/src/director/user-directory.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/director/user-directory.c Sun Aug 19 07:20:13 2012 +0300 @@ -225,8 +225,7 @@ I_MAX(dir->user_near_expiring_secs, 1); dir->username_hash_fmt = i_strdup(username_hash_fmt); - dir->hash = hash_table_create(default_pool, default_pool, - 0, NULL, NULL); + dir->hash = hash_table_create(default_pool, 0, NULL, NULL); i_array_init(&dir->iters, 8); return dir; }
--- a/src/doveadm/doveadm-director.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/doveadm/doveadm-director.c Sun Aug 19 07:20:13 2012 +0300 @@ -295,7 +295,7 @@ director_get_host(argv[optind], &ips, &ips_count); pool = pool_alloconly_create("director map users", 1024*128); - users = hash_table_create(default_pool, pool, 0, NULL, NULL); + users = hash_table_create(pool, 0, NULL, NULL); if (ctx->users_path == NULL) userdb_get_user_list(NULL, pool, users); else
--- a/src/doveadm/doveadm-kick.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/doveadm/doveadm-kick.c Sun Aug 19 07:20:13 2012 +0300 @@ -179,7 +179,7 @@ ctx.who.anvil_path = t_strconcat(doveadm_settings->base_dir, "/anvil", NULL); ctx.force_kick = FALSE; ctx.who.pool = pool_alloconly_create("kick pids", 10240); - ctx.pids = hash_table_create(default_pool, ctx.who.pool, 0, NULL, NULL); + ctx.pids = hash_table_create(ctx.who.pool, 0, NULL, NULL); while ((c = getopt(argc, argv, "a:f")) > 0) { switch (c) {
--- a/src/doveadm/doveadm-log.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/doveadm/doveadm-log.c Sun Aug 19 07:20:13 2012 +0300 @@ -222,7 +222,7 @@ memset(&ctx, 0, sizeof(ctx)); ctx.pool = pool_alloconly_create("log file", 1024*32); - ctx.files = hash_table_create(default_pool, ctx.pool, 0, + ctx.files = hash_table_create(ctx.pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); /* first get the paths that we know are used */
--- a/src/doveadm/doveadm-mail-server.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/doveadm/doveadm-mail-server.c Sun Aug 19 07:20:13 2012 +0300 @@ -38,8 +38,7 @@ if (servers == NULL) { server_pool = pool_alloconly_create("doveadm servers", 1024*16); - servers = hash_table_create(default_pool, server_pool, 0, - str_hash, + servers = hash_table_create(server_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); } server = hash_table_lookup(servers, name);
--- a/src/doveadm/doveadm-stats.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/doveadm/doveadm-stats.c Sun Aug 19 07:20:13 2012 +0300 @@ -478,7 +478,7 @@ ctx.cur_pool = pool_alloconly_create("stats top", 1024*16); i_array_init(&ctx.lines, 128); ctx.sessions = - hash_table_create(default_pool, default_pool, 0, + hash_table_create(default_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); net_set_nonblock(ctx.fd, FALSE);
--- a/src/doveadm/doveadm-who.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/doveadm/doveadm-who.c Sun Aug 19 07:20:13 2012 +0300 @@ -274,7 +274,7 @@ memset(&ctx, 0, sizeof(ctx)); ctx.anvil_path = t_strconcat(doveadm_settings->base_dir, "/anvil", NULL); ctx.pool = pool_alloconly_create("who users", 10240); - ctx.users = hash_table_create(default_pool, ctx.pool, 0, + ctx.users = hash_table_create(ctx.pool, 0, who_user_hash, who_user_cmp); while ((c = getopt(argc, argv, "1a:")) > 0) {
--- a/src/doveadm/dsync/dsync-brain.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/doveadm/dsync/dsync-brain.c Sun Aug 19 07:20:13 2012 +0300 @@ -48,8 +48,7 @@ brain->slave = slave; brain->sync_type = DSYNC_BRAIN_SYNC_TYPE_UNKNOWN; brain->remote_mailbox_states = - hash_table_create(default_pool, brain->pool, 0, - guid_128_hash, guid_128_cmp); + hash_table_create(brain->pool, 0, guid_128_hash, guid_128_cmp); p_array_init(&brain->mailbox_states, pool, 64); return brain; }
--- a/src/doveadm/dsync/dsync-mailbox-export.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/doveadm/dsync/dsync-mailbox-export.c Sun Aug 19 07:20:13 2012 +0300 @@ -392,7 +392,7 @@ /* clone the hash table, since we're changing it. */ exporter->changes = - hash_table_create(default_pool, exporter->pool, + hash_table_create(exporter->pool, hash_table_count(log_changes), NULL, NULL); iter = hash_table_iterate_init(log_changes); while (hash_table_iterate(iter, &key, &value)) { @@ -431,7 +431,7 @@ (flags & DSYNC_MAILBOX_EXPORTER_FLAG_MAILS_HAVE_GUIDS) != 0; p_array_init(&exporter->requested_uids, pool, 16); exporter->export_guids = - hash_table_create(default_pool, pool, 0, + hash_table_create(pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); p_array_init(&exporter->expunged_seqs, pool, 16); p_array_init(&exporter->expunged_guids, pool, 16);
--- a/src/doveadm/dsync/dsync-mailbox-import.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/doveadm/dsync/dsync-mailbox-import.c Sun Aug 19 07:20:13 2012 +0300 @@ -135,10 +135,10 @@ importer->remote_highest_modseq = remote_highest_modseq; importer->import_guids = - hash_table_create(default_pool, pool, 0, + hash_table_create(pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); importer->import_uids = - hash_table_create(default_pool, pool, 0, NULL, NULL); + hash_table_create(pool, 0, NULL, NULL); i_array_init(&importer->maybe_expunge_uids, 16); i_array_init(&importer->maybe_saves, 128); i_array_init(&importer->newmails, 128);
--- a/src/doveadm/dsync/dsync-mailbox-tree.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/doveadm/dsync/dsync-mailbox-tree.c Sun Aug 19 07:20:13 2012 +0300 @@ -211,7 +211,7 @@ i_assert(tree->name128_hash == NULL); - tree->name128_hash = hash_table_create(default_pool, tree->pool, 0, + tree->name128_hash = hash_table_create(tree->pool, 0, guid_128_hash, guid_128_cmp); iter = dsync_mailbox_tree_iter_init(tree); while (dsync_mailbox_tree_iter_next(iter, &name, &node)) { @@ -251,7 +251,7 @@ i_assert(tree->name128_remotesep_hash == NULL); tree->name128_remotesep_hash = - hash_table_create(default_pool, tree->pool, 0, + hash_table_create(tree->pool, 0, guid_128_hash, guid_128_cmp); iter = dsync_mailbox_tree_iter_init(tree); while (dsync_mailbox_tree_iter_next(iter, &name, &node)) { @@ -296,7 +296,7 @@ i_assert(tree->guid_hash == NULL); - tree->guid_hash = hash_table_create(default_pool, tree->pool, 0, + tree->guid_hash = hash_table_create(tree->pool, 0, guid_128_hash, guid_128_cmp); iter = dsync_mailbox_tree_iter_init(tree); while (dsync_mailbox_tree_iter_next(iter, &name, &node))
--- a/src/doveadm/dsync/dsync-transaction-log-scan.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/doveadm/dsync/dsync-transaction-log-scan.c Sun Aug 19 07:20:13 2012 +0300 @@ -343,8 +343,7 @@ 10240); ctx = p_new(pool, struct dsync_transaction_log_scan, 1); ctx->pool = pool; - ctx->changes = - hash_table_create(default_pool, pool, 0, NULL, NULL); + ctx->changes = hash_table_create(pool, 0, NULL, NULL); ctx->view = view; ctx->highest_wanted_uid = highest_wanted_uid;
--- a/src/indexer/indexer-queue.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/indexer/indexer-queue.c Sun Aug 19 07:20:13 2012 +0300 @@ -36,7 +36,7 @@ queue = i_new(struct indexer_queue, 1); queue->callback = callback; - queue->requests = hash_table_create(default_pool, default_pool, 0, + queue->requests = hash_table_create(default_pool, 0, indexer_request_hash, indexer_request_cmp); return queue;
--- a/src/lib-auth/auth-server-connection.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-auth/auth-server-connection.c Sun Aug 19 07:20:13 2012 +0300 @@ -303,7 +303,7 @@ conn->client = client; conn->fd = -1; - conn->requests = hash_table_create(default_pool, pool, 100, NULL, NULL); + conn->requests = hash_table_create(pool, 100, NULL, NULL); i_array_init(&conn->available_auth_mechs, 8); return conn; }
--- a/src/lib-dict/dict-file.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-dict/dict-file.c Sun Aug 19 07:20:13 2012 +0300 @@ -77,7 +77,7 @@ } dict->dict = *driver; dict->hash_pool = pool_alloconly_create("file dict", 1024); - dict->hash = hash_table_create(default_pool, dict->hash_pool, 0, + dict->hash = hash_table_create(dict->hash_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); dict->fd = -1; return &dict->dict;
--- a/src/lib-index/mail-cache.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-index/mail-cache.c Sun Aug 19 07:20:13 2012 +0300 @@ -411,7 +411,7 @@ i_strconcat(index->filepath, MAIL_CACHE_FILE_SUFFIX, NULL); cache->field_pool = pool_alloconly_create("Cache fields", 2048); cache->field_name_hash = - hash_table_create(default_pool, cache->field_pool, 0, + hash_table_create(cache->field_pool, 0, strcase_hash, (hash_cmp_callback_t *)strcasecmp); cache->dotlock_settings.use_excl_lock =
--- a/src/lib-index/mail-index.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-index/mail-index.c Sun Aug 19 07:20:13 2012 +0300 @@ -53,7 +53,7 @@ index->keywords_pool = pool_alloconly_create("keywords", 512); i_array_init(&index->keywords, 16); index->keywords_hash = - hash_table_create(default_pool, index->keywords_pool, 0, + hash_table_create(index->keywords_pool, 0, strcase_hash, (hash_cmp_callback_t *)strcasecmp); index->log = mail_transaction_log_alloc(index); mail_index_modseq_init(index);
--- a/src/lib-lda/duplicate.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-lda/duplicate.c Sun Aug 19 07:20:13 2012 +0300 @@ -214,7 +214,7 @@ &file->dotlock); if (file->new_fd == -1) i_error("file_dotlock_create(%s) failed: %m", file->path); - file->hash = hash_table_create(default_pool, pool, 0, + file->hash = hash_table_create(pool, 0, duplicate_hash, duplicate_cmp); (void)duplicate_read(file); return file;
--- a/src/lib-master/master-auth.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-master/master-auth.c Sun Aug 19 07:20:13 2012 +0300 @@ -51,8 +51,7 @@ auth->pool = pool; auth->service = service; auth->path = p_strdup(pool, path); - auth->connections = hash_table_create(default_pool, pool, - 0, NULL, NULL); + auth->connections = hash_table_create(pool, 0, NULL, NULL); return auth; }
--- a/src/lib-master/master-login-auth.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-master/master-login-auth.c Sun Aug 19 07:20:13 2012 +0300 @@ -71,7 +71,7 @@ auth->auth_socket_path = p_strdup(pool, auth_socket_path); auth->refcount = 1; auth->fd = -1; - auth->requests = hash_table_create(default_pool, pool, 0, NULL, NULL); + auth->requests = hash_table_create(pool, 0, NULL, NULL); auth->id_counter = (rand() % 32767) * 131072U; return auth; }
--- a/src/lib-master/master-service-settings-cache.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-master/master-service-settings-cache.c Sun Aug 19 07:20:13 2012 +0300 @@ -233,7 +233,7 @@ if (input->local_name != NULL) { if (cache->local_name_hash == NULL) { cache->local_name_hash = - hash_table_create(default_pool, cache->pool, 0, + hash_table_create(cache->pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); } @@ -243,7 +243,7 @@ if (input->local_ip.family != 0) { if (cache->local_ip_hash == NULL) { cache->local_ip_hash = - hash_table_create(default_pool, cache->pool, 0, + hash_table_create(cache->pool, 0, (hash_callback_t *)net_ip_hash, (hash_cmp_callback_t *)net_ip_cmp); }
--- a/src/lib-settings/settings-parser.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-settings/settings-parser.c Sun Aug 19 07:20:13 2012 +0300 @@ -206,7 +206,7 @@ ctx->set_pool = set_pool; ctx->parser_pool = parser_pool; ctx->flags = flags; - ctx->links = hash_table_create(default_pool, ctx->parser_pool, 0, + ctx->links = hash_table_create(ctx->parser_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); ctx->root_count = count; @@ -1753,8 +1753,7 @@ new_ctx->error = p_strdup(new_ctx->parser_pool, old_ctx->error); new_ctx->prev_info = old_ctx->prev_info; - links = hash_table_create(default_pool, new_ctx->parser_pool, - 0, NULL, NULL); + links = hash_table_create(new_ctx->parser_pool, 0, NULL, NULL); new_ctx->root_count = old_ctx->root_count; new_ctx->roots = p_new(new_ctx->parser_pool, struct setting_link, @@ -1777,7 +1776,7 @@ } new_ctx->links = - hash_table_create(default_pool, new_ctx->parser_pool, 0, + hash_table_create(new_ctx->parser_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); iter = hash_table_iterate_init(old_ctx->links);
--- a/src/lib-sql/sql-db-cache.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-sql/sql-db-cache.c Sun Aug 19 07:20:13 2012 +0300 @@ -128,7 +128,7 @@ struct sql_db_cache *cache; cache = i_new(struct sql_db_cache, 1); - cache->dbs = hash_table_create(default_pool, default_pool, 0, str_hash, + cache->dbs = hash_table_create(default_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); cache->max_unused_connections = max_unused_connections; return cache;
--- a/src/lib-storage/index/dbox-multi/mdbox-purge.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-storage/index/dbox-multi/mdbox-purge.c Sun Aug 19 07:20:13 2012 +0300 @@ -475,7 +475,7 @@ ctx->lowest_primary_file_id = (uint32_t)-1; i_array_init(&ctx->primary_file_ids, 64); i_array_init(&ctx->purge_file_ids, 64); - ctx->altmoves = hash_table_create(default_pool, pool, 0, NULL, NULL); + ctx->altmoves = hash_table_create(pool, 0, NULL, NULL); return ctx; }
--- a/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c Sun Aug 19 07:20:13 2012 +0300 @@ -69,7 +69,7 @@ ctx->storage = storage; ctx->atomic = atomic; ctx->pool = pool_alloconly_create("dbox map rebuild", 1024*256); - ctx->guid_hash = hash_table_create(default_pool, ctx->pool, 0, + ctx->guid_hash = hash_table_create(ctx->pool, 0, guid_128_hash, guid_128_cmp); i_array_init(&ctx->msgs, 512); i_array_init(&ctx->seen_file_ids, 128);
--- a/src/lib-storage/index/index-thread-finish.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-storage/index/index-thread-finish.c Sun Aug 19 07:20:13 2012 +0300 @@ -223,7 +223,7 @@ pool_alloconly_create(MEMPOOL_GROWING"base subjects", nearest_power(count * 20)); gather_ctx.subject_hash = - hash_table_create(default_pool, gather_ctx.subject_pool, + hash_table_create(gather_ctx.subject_pool, count * 2, str_hash, (hash_cmp_callback_t *)strcmp);
--- a/src/lib-storage/index/maildir/maildir-keywords.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-storage/index/maildir/maildir-keywords.c Sun Aug 19 07:20:13 2012 +0300 @@ -74,8 +74,8 @@ mk->path = i_strconcat(dir, "/" MAILDIR_KEYWORDS_NAME, NULL); mk->pool = pool_alloconly_create("maildir keywords", 512); i_array_init(&mk->list, MAILDIR_MAX_KEYWORDS); - mk->hash = hash_table_create(default_pool, mk->pool, 0, - strcase_hash, (hash_cmp_callback_t *)strcasecmp); + mk->hash = hash_table_create(mk->pool, 0, strcase_hash, + (hash_cmp_callback_t *)strcasecmp); mk->dotlock_settings.use_excl_lock = box->storage->set->dotlock_use_excl;
--- a/src/lib-storage/index/maildir/maildir-uidlist.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-storage/index/maildir/maildir-uidlist.c Sun Aug 19 07:20:13 2012 +0300 @@ -271,7 +271,7 @@ uidlist->fd = -1; uidlist->path = i_strconcat(control_dir, "/"MAILDIR_UIDLIST_NAME, NULL); i_array_init(&uidlist->records, 128); - uidlist->files = hash_table_create(default_pool, default_pool, 4096, + uidlist->files = hash_table_create(default_pool, 4096, maildir_filename_base_hash, maildir_filename_base_cmp); uidlist->next_uid = 1; @@ -1650,7 +1650,7 @@ ctx->record_pool = pool_alloconly_create(MEMPOOL_GROWING "maildir_uidlist_sync", 16384); - ctx->files = hash_table_create(default_pool, ctx->record_pool, 4096, + ctx->files = hash_table_create(ctx->record_pool, 4096, maildir_filename_base_hash, maildir_filename_base_cmp);
--- a/src/lib-storage/list/mailbox-list-index.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-storage/list/mailbox-list-index.c Sun Aug 19 07:20:13 2012 +0300 @@ -440,11 +440,9 @@ ilist->mailbox_pool = pool_alloconly_create("mailbox list index", 4096); ilist->mailbox_names = - hash_table_create(default_pool, ilist->mailbox_pool, - 0, NULL, NULL); + hash_table_create(ilist->mailbox_pool, 0, NULL, NULL); ilist->mailbox_hash = - hash_table_create(default_pool, ilist->mailbox_pool, - 0, NULL, NULL); + hash_table_create(ilist->mailbox_pool, 0, NULL, NULL); mailbox_list_index_status_init_list(list); }
--- a/src/lib-storage/mailbox-guid-cache.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib-storage/mailbox-guid-cache.c Sun Aug 19 07:20:13 2012 +0300 @@ -45,8 +45,7 @@ if (list->guid_cache == NULL) { list->guid_cache_pool = pool_alloconly_create("guid cache", 1024*16); - list->guid_cache = hash_table_create(default_pool, - list->guid_cache_pool, 0, + list->guid_cache = hash_table_create(list->guid_cache_pool, 0, guid_128_hash, guid_128_cmp); } else {
--- a/src/lib/child-wait.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib/child-wait.c Sun Aug 19 07:20:13 2012 +0300 @@ -88,8 +88,7 @@ void child_wait_init(void) { - child_pids = hash_table_create(default_pool, default_pool, 0, - NULL, NULL); + child_pids = hash_table_create(default_pool, 0, NULL, NULL); lib_signals_set_handler(SIGCHLD, LIBSIG_FLAGS_SAFE, sigchld_handler, NULL);
--- a/src/lib/hash.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib/hash.c Sun Aug 19 07:20:13 2012 +0300 @@ -17,7 +17,7 @@ }; struct hash_table { - pool_t table_pool, node_pool; + pool_t node_pool; int frozen; unsigned int initial_size, nodes_count, removed_count; @@ -50,13 +50,12 @@ } struct hash_table * -hash_table_create(pool_t table_pool, pool_t node_pool, unsigned int initial_size, +hash_table_create(pool_t node_pool, unsigned int initial_size, hash_callback_t *hash_cb, hash_cmp_callback_t *key_compare_cb) { struct hash_table *table; - table = p_new(table_pool, struct hash_table, 1); - table->table_pool = table_pool; + table = i_new(struct hash_table, 1); table->node_pool = node_pool; table->initial_size = I_MAX(primes_closest(initial_size), HASH_TABLE_MIN_SIZE); @@ -66,7 +65,7 @@ direct_cmp : key_compare_cb; table->size = table->initial_size; - table->nodes = p_new(table_pool, struct hash_node, table->size); + table->nodes = i_new(struct hash_node, table->size); return table; } @@ -112,8 +111,8 @@ destroy_node_list(table, table->free_nodes); } - p_free(table->table_pool, table->nodes); - p_free(table->table_pool, table); + i_free(table->nodes); + i_free(table); } void hash_table_clear(struct hash_table *table, bool free_nodes) @@ -427,7 +426,7 @@ old_nodes = table->nodes; table->size = I_MAX(next_size, HASH_TABLE_MIN_SIZE); - table->nodes = p_new(table->table_pool, struct hash_node, table->size); + table->nodes = i_new(struct hash_node, table->size); table->nodes_count = 0; table->removed_count = 0; @@ -455,7 +454,7 @@ table->frozen--; - p_free(table->table_pool, old_nodes); + i_free(old_nodes); return TRUE; }
--- a/src/lib/hash.h Sat Aug 18 17:05:59 2012 +0300 +++ b/src/lib/hash.h Sun Aug 19 07:20:13 2012 +0300 @@ -13,7 +13,7 @@ for smaller allocations and can also be alloconly pool. The pools must not be free'd before hash_table_destroy() is called. */ struct hash_table * -hash_table_create(pool_t table_pool, pool_t node_pool, unsigned int initial_size, +hash_table_create(pool_t node_pool, unsigned int initial_size, hash_callback_t *hash_cb, hash_cmp_callback_t *key_compare_cb) ATTR_NULL(4, 5); void hash_table_destroy(struct hash_table **table);
--- a/src/log/log-connection.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/log/log-connection.c Sun Aug 19 07:20:13 2012 +0300 @@ -317,8 +317,7 @@ log->listen_fd = listen_fd; log->io = io_add(fd, IO_READ, log_connection_input, log); log->input = i_stream_create_fd(fd, PIPE_BUF, FALSE); - log->clients = hash_table_create(default_pool, default_pool, 0, - NULL, NULL); + log->clients = hash_table_create(default_pool, 0, NULL, NULL); array_idx_set(&logs_by_fd, listen_fd, &log); DLLIST_PREPEND(&log_connections, log);
--- a/src/login-common/login-proxy-state.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/login-common/login-proxy-state.c Sun Aug 19 07:20:13 2012 +0300 @@ -48,7 +48,7 @@ state = i_new(struct login_proxy_state, 1); state->pool = pool_alloconly_create("login proxy state", 1024); - state->hash = hash_table_create(default_pool, state->pool, 0, + state->hash = hash_table_create(state->pool, 0, login_proxy_record_hash, login_proxy_record_cmp); state->notify_path = p_strdup(state->pool, notify_path);
--- a/src/login-common/ssl-proxy-gnutls.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/login-common/ssl-proxy-gnutls.c Sun Aug 19 07:20:13 2012 +0300 @@ -519,8 +519,7 @@ gnutls_certificate_set_dh_params(x509_cred, dh_params); gnutls_certificate_set_rsa_export_params(x509_cred, rsa_params); - ssl_proxies = hash_table_create(system_pool, system_pool, 0, - NULL, NULL); + ssl_proxies = hash_table_create(default_pool, 0, NULL, NULL); ssl_initialized = TRUE; }
--- a/src/login-common/ssl-proxy-openssl.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/login-common/ssl-proxy-openssl.c Sun Aug 19 07:20:13 2012 +0300 @@ -1292,7 +1292,7 @@ extdata_index = SSL_get_ex_new_index(0, dovecot, NULL, NULL, NULL); - ssl_servers = hash_table_create(default_pool, default_pool, 0, + ssl_servers = hash_table_create(default_pool, 0, ssl_server_context_hash, ssl_server_context_cmp); (void)ssl_server_context_init(login_set, ssl_set);
--- a/src/master/service.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/master/service.c Sun Aug 19 07:20:13 2012 +0300 @@ -726,7 +726,7 @@ void service_pids_init(void) { - service_pids = hash_table_create(default_pool, default_pool, 0, + service_pids = hash_table_create(default_pool, 0, pid_hash, pid_hash_cmp); }
--- a/src/plugins/acl/acl-cache.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/plugins/acl/acl-cache.c Sun Aug 19 07:20:13 2012 +0300 @@ -47,10 +47,10 @@ cache->validity_rec_size = validity_rec_size; cache->right_names_pool = pool_alloconly_create("ACL right names", 1024); - cache->objects = hash_table_create(default_pool, default_pool, 0, + cache->objects = hash_table_create(default_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); cache->right_name_idx_map = - hash_table_create(default_pool, cache->right_names_pool, 0, + hash_table_create(cache->right_names_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); i_array_init(&cache->right_idx_name_map, DEFAULT_ACL_RIGHTS_COUNT); return cache;
--- a/src/plugins/expire/doveadm-expire.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/plugins/expire/doveadm-expire.c Sun Aug 19 07:20:13 2012 +0300 @@ -416,9 +416,8 @@ ctx->v.deinit = doveadm_expire_mail_cmd_deinit; ctx->v.get_next_user = doveadm_expire_mail_cmd_get_next_user; - ectx->users = - hash_table_create(default_pool, ctx->pool, 0, - str_hash, (hash_cmp_callback_t *)strcmp); + ectx->users = hash_table_create(ctx->pool, 0, str_hash, + (hash_cmp_callback_t *)strcmp); while (mail_storage_service_all_next(ctx->storage_service, &username) > 0) { username_dup = p_strdup(ctx->pool, username); hash_table_insert(ectx->users, username_dup,
--- a/src/plugins/fts-lucene/fts-backend-lucene.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/plugins/fts-lucene/fts-backend-lucene.c Sun Aug 19 07:20:13 2012 +0300 @@ -531,8 +531,7 @@ T_BEGIN { struct hash_table *guids; - guids = hash_table_create(default_pool, default_pool, 0, - wstr_hash, + guids = hash_table_create(default_pool, 0, wstr_hash, (hash_cmp_callback_t *)wcscmp); ret = mailboxes_get_guids(boxes, guids, result); if (ret == 0) {
--- a/src/plugins/fts-lucene/lucene-wrapper.cc Sat Aug 18 17:05:59 2012 +0300 +++ b/src/plugins/fts-lucene/lucene-wrapper.cc Sun Aug 19 07:20:13 2012 +0300 @@ -779,8 +779,7 @@ memset(&ctx, 0, sizeof(ctx)); ctx.index = index; ctx.pool = pool_alloconly_create("guids", 1024); - ctx.guids = hash_table_create(default_pool, ctx.pool, 0, - guid_128_hash, guid_128_cmp); + ctx.guids = hash_table_create(ctx.pool, 0, guid_128_hash, guid_128_cmp); i_array_init(&ctx.uids, 128); if (ret > 0) try {
--- a/src/plugins/fts-solr/fts-backend-solr-old.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/plugins/fts-solr/fts-backend-solr-old.c Sun Aug 19 07:20:13 2012 +0300 @@ -738,7 +738,7 @@ else str_append(str, "%22%22"); - mailboxes = hash_table_create(default_pool, default_pool, 0, + mailboxes = hash_table_create(default_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); str_append(str, "%2B("); len = str_len(str);
--- a/src/plugins/fts-solr/fts-backend-solr.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/plugins/fts-solr/fts-backend-solr.c Sun Aug 19 07:20:13 2012 +0300 @@ -814,7 +814,7 @@ else str_append(str, "%22%22"); - mailboxes = hash_table_create(default_pool, default_pool, 0, + mailboxes = hash_table_create(default_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); str_append(str, "%2B("); len = str_len(str);
--- a/src/plugins/fts-solr/solr-connection.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/plugins/fts-solr/solr-connection.c Sun Aug 19 07:20:13 2012 +0300 @@ -420,7 +420,7 @@ memset(&solr_lookup_context, 0, sizeof(solr_lookup_context)); solr_lookup_context.result_pool = pool; solr_lookup_context.mailboxes = - hash_table_create(default_pool, default_pool, 0, + hash_table_create(default_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); p_array_init(&solr_lookup_context.results, pool, 32);
--- a/src/plugins/fts/fts-expunge-log.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/plugins/fts/fts-expunge-log.c Sun Aug 19 07:20:13 2012 +0300 @@ -177,9 +177,7 @@ ctx = p_new(pool, struct fts_expunge_log_append_ctx, 1); ctx->log = log; ctx->pool = pool; - ctx->mailboxes = - hash_table_create(default_pool, pool, 0, - guid_128_hash, guid_128_cmp); + ctx->mailboxes = hash_table_create(pool, 0, guid_128_hash, guid_128_cmp); if (fts_expunge_log_reopen_if_needed(log, TRUE) < 0) ctx->failed = TRUE;
--- a/src/pop3/pop3-commands.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/pop3/pop3-commands.c Sun Aug 19 07:20:13 2012 +0300 @@ -752,8 +752,8 @@ uidl_duplicates_rename = strcmp(client->set->pop3_uidl_duplicates, "rename") == 0; - prev_uidls = hash_table_create(default_pool, default_pool, 0, - str_hash, (hash_cmp_callback_t *)strcmp); + prev_uidls = hash_table_create(default_pool, 0, + str_hash, (hash_cmp_callback_t *)strcmp); client->uidl_pool = pool_alloconly_create("message uidls", 1024); client->message_uidls = p_new(client->uidl_pool, const char *, client->messages_count+1);
--- a/src/replication/aggregator/replicator-connection.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/replication/aggregator/replicator-connection.c Sun Aug 19 07:20:13 2012 +0300 @@ -209,8 +209,7 @@ conn = i_new(struct replicator_connection, 1); conn->fd = -1; - conn->requests = hash_table_create(default_pool, default_pool, - 0, NULL, NULL); + conn->requests = hash_table_create(default_pool, 0, NULL, NULL); for (i = REPLICATION_PRIORITY_LOW; i <= REPLICATION_PRIORITY_SYNC; i++) conn->queue[i] = buffer_create_dynamic(default_pool, 1024); return conn;
--- a/src/replication/replicator/replicator-queue.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/replication/replicator/replicator-queue.c Sun Aug 19 07:20:13 2012 +0300 @@ -67,9 +67,8 @@ queue = i_new(struct replicator_queue, 1); queue->full_sync_interval = full_sync_interval; queue->user_queue = priorityq_init(user_priority_cmp, 1024); - queue->user_hash = - hash_table_create(default_pool, default_pool, 1024, - str_hash, (hash_cmp_callback_t *)strcmp); + queue->user_hash = hash_table_create(default_pool, 1024, str_hash, + (hash_cmp_callback_t *)strcmp); i_array_init(&queue->sync_lookups, 32); return queue; }
--- a/src/stats/mail-domain.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/stats/mail-domain.c Sun Aug 19 07:20:13 2012 +0300 @@ -113,7 +113,7 @@ void mail_domains_init(void) { mail_domains_hash = - hash_table_create(default_pool, default_pool, 0, + hash_table_create(default_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); }
--- a/src/stats/mail-ip.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/stats/mail-ip.c Sun Aug 19 07:20:13 2012 +0300 @@ -109,7 +109,7 @@ void mail_ips_init(void) { mail_ips_hash = - hash_table_create(default_pool, default_pool, 0, + hash_table_create(default_pool, 0, (hash_callback_t *)net_ip_hash, (hash_cmp_callback_t *)net_ip_cmp); }
--- a/src/stats/mail-session.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/stats/mail-session.c Sun Aug 19 07:20:13 2012 +0300 @@ -292,7 +292,7 @@ session_guid_warn_hide_until = ioloop_time + SESSION_GUID_WARN_HIDE_SECS; mail_sessions_hash = - hash_table_create(default_pool, default_pool, 0, + hash_table_create(default_pool, 0, guid_128_hash, guid_128_cmp); }
--- a/src/stats/mail-user.c Sat Aug 18 17:05:59 2012 +0300 +++ b/src/stats/mail-user.c Sun Aug 19 07:20:13 2012 +0300 @@ -131,7 +131,7 @@ void mail_users_init(void) { mail_users_hash = - hash_table_create(default_pool, default_pool, 0, + hash_table_create(default_pool, 0, str_hash, (hash_cmp_callback_t *)strcmp); }