From: Timo Sirainen Date: Sun, 19 Aug 2012 04:20:13 +0000 (+0300) Subject: hash_table_create(): Removed table_pool parameter. X-Git-Tag: 2.2.alpha1~311 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7536dca18968a279b69c685eedda205bee228fd4;p=thirdparty%2Fdovecot%2Fcore.git hash_table_create(): Removed table_pool parameter. Every single caller was using default_pool there, so there's no point in having it. --- diff --git a/src/anvil/connect-limit.c b/src/anvil/connect-limit.c index f72ce45f15..bd4f08ff16 100644 --- a/src/anvil/connect-limit.c +++ b/src/anvil/connect-limit.c @@ -46,10 +46,10 @@ struct connect_limit *connect_limit_init(void) 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; } diff --git a/src/anvil/penalty.c b/src/anvil/penalty.c index a3eb676a7f..2742193a16 100644 --- a/src/anvil/penalty.c +++ b/src/anvil/penalty.c @@ -51,7 +51,7 @@ struct penalty *penalty_init(void) 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; diff --git a/src/auth/auth-cache.c b/src/auth/auth-cache.c index 616033fa89..cf80feda68 100644 --- a/src/auth/auth-cache.c +++ b/src/auth/auth-cache.c @@ -221,7 +221,7 @@ struct auth_cache *auth_cache_new(size_t max_size, unsigned int ttl_secs, 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; diff --git a/src/auth/auth-request-handler.c b/src/auth/auth-request-handler.c index f5c207b7f4..77a9fd81c8 100644 --- a/src/auth/auth-request-handler.c +++ b/src/auth/auth-request-handler.c @@ -52,7 +52,7 @@ auth_request_handler_create(auth_request_callback_t *callback, void *context, 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; diff --git a/src/auth/db-checkpassword.c b/src/auth/db-checkpassword.c index 4f3a3ce1c6..da83fb0e3f 100644 --- a/src/auth/db-checkpassword.c +++ b/src/auth/db-checkpassword.c @@ -545,7 +545,7 @@ db_checkpassword_init(const char *checkpassword_path, 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); diff --git a/src/auth/db-ldap.c b/src/auth/db-ldap.c index c893d46464..52cc8386b5 100644 --- a/src/auth/db-ldap.c +++ b/src/auth/db-ldap.c @@ -1196,7 +1196,7 @@ db_ldap_result_iterate_init(struct ldap_connection *conn, LDAPMessage *entry, 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); diff --git a/src/auth/db-passwd-file.c b/src/auth/db-passwd-file.c index 697f7254f2..a46c49582d 100644 --- a/src/auth/db-passwd-file.c +++ b/src/auth/db-passwd-file.c @@ -194,7 +194,7 @@ static bool passwd_file_open(struct passwd_file *pw, bool startup) 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_passwd_file_init(const char *path, bool userdb, bool debug) 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); diff --git a/src/auth/mech-otp-skey-common.c b/src/auth/mech-otp-skey-common.c index 998c2d7338..10be9d7818 100644 --- a/src/auth/mech-otp-skey-common.c +++ b/src/auth/mech-otp-skey-common.c @@ -20,8 +20,7 @@ void otp_lock_init(void) 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); } diff --git a/src/config/config-request.c b/src/config/config-request.c index a2ea253b69..0d21d37132 100644 --- a/src/config/config-request.c +++ b/src/config/config-request.c @@ -361,8 +361,8 @@ config_export_init(const char *module, enum config_dump_scope scope, 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; } diff --git a/src/director/director-test.c b/src/director/director-test.c index 20f9668cb4..326e2bba16 100644 --- a/src/director/director-test.c +++ b/src/director/director-test.c @@ -532,9 +532,9 @@ director_connection_disconnect_timeout(void *context ATTR_UNUSED) 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); diff --git a/src/director/user-directory.c b/src/director/user-directory.c index 525de2a158..ed82051244 100644 --- a/src/director/user-directory.c +++ b/src/director/user-directory.c @@ -225,8 +225,7 @@ user_directory_init(unsigned int timeout_secs, const char *username_hash_fmt) 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; } diff --git a/src/doveadm/doveadm-director.c b/src/doveadm/doveadm-director.c index d24702233e..50873b9f1d 100644 --- a/src/doveadm/doveadm-director.c +++ b/src/doveadm/doveadm-director.c @@ -295,7 +295,7 @@ static void cmd_director_map(int argc, char *argv[]) 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 diff --git a/src/doveadm/doveadm-kick.c b/src/doveadm/doveadm-kick.c index 41650213e8..92ad35bf75 100644 --- a/src/doveadm/doveadm-kick.c +++ b/src/doveadm/doveadm-kick.c @@ -179,7 +179,7 @@ static void cmd_kick(int argc, char *argv[]) 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) { diff --git a/src/doveadm/doveadm-log.c b/src/doveadm/doveadm-log.c index 225f603771..e36ff34988 100644 --- a/src/doveadm/doveadm-log.c +++ b/src/doveadm/doveadm-log.c @@ -222,7 +222,7 @@ static void cmd_log_find(int argc, char *argv[]) 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 */ diff --git a/src/doveadm/doveadm-mail-server.c b/src/doveadm/doveadm-mail-server.c index 74b1ff0576..07e051ec51 100644 --- a/src/doveadm/doveadm-mail-server.c +++ b/src/doveadm/doveadm-mail-server.c @@ -38,8 +38,7 @@ doveadm_server_get(struct doveadm_mail_cmd_context *ctx, const char *name) 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); diff --git a/src/doveadm/doveadm-stats.c b/src/doveadm/doveadm-stats.c index 976b6c8952..8766963029 100644 --- a/src/doveadm/doveadm-stats.c +++ b/src/doveadm/doveadm-stats.c @@ -478,7 +478,7 @@ static void stats_top(const char *path, const char *sort_type) 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); diff --git a/src/doveadm/doveadm-who.c b/src/doveadm/doveadm-who.c index eb08495ca0..36a44f9ae2 100644 --- a/src/doveadm/doveadm-who.c +++ b/src/doveadm/doveadm-who.c @@ -274,7 +274,7 @@ static void cmd_who(int argc, char *argv[]) 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) { diff --git a/src/doveadm/dsync/dsync-brain.c b/src/doveadm/dsync/dsync-brain.c index 9a86dda985..e30b3345cc 100644 --- a/src/doveadm/dsync/dsync-brain.c +++ b/src/doveadm/dsync/dsync-brain.c @@ -48,8 +48,7 @@ dsync_brain_common_init(struct mail_user *user, struct dsync_slave *slave) 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; } diff --git a/src/doveadm/dsync/dsync-mailbox-export.c b/src/doveadm/dsync/dsync-mailbox-export.c index 34ad91cac8..a1ddaf7c75 100644 --- a/src/doveadm/dsync/dsync-mailbox-export.c +++ b/src/doveadm/dsync/dsync-mailbox-export.c @@ -392,7 +392,7 @@ dsync_mailbox_export_log_scan(struct dsync_mailbox_exporter *exporter, /* 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 @@ dsync_mailbox_export_init(struct mailbox *box, (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); diff --git a/src/doveadm/dsync/dsync-mailbox-import.c b/src/doveadm/dsync/dsync-mailbox-import.c index 3650031201..9fbcee0f3b 100644 --- a/src/doveadm/dsync/dsync-mailbox-import.c +++ b/src/doveadm/dsync/dsync-mailbox-import.c @@ -135,10 +135,10 @@ dsync_mailbox_import_init(struct mailbox *box, 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); diff --git a/src/doveadm/dsync/dsync-mailbox-tree.c b/src/doveadm/dsync/dsync-mailbox-tree.c index d402bf5e19..d6a06bfab3 100644 --- a/src/doveadm/dsync/dsync-mailbox-tree.c +++ b/src/doveadm/dsync/dsync-mailbox-tree.c @@ -211,7 +211,7 @@ void dsync_mailbox_tree_build_name128_hash(struct dsync_mailbox_tree *tree) 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 @@ dsync_mailbox_tree_build_name128_remotesep_hash(struct dsync_mailbox_tree *tree) 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 @@ int dsync_mailbox_tree_build_guid_hash(struct dsync_mailbox_tree *tree) 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)) diff --git a/src/doveadm/dsync/dsync-transaction-log-scan.c b/src/doveadm/dsync/dsync-transaction-log-scan.c index 2b2fbe8cc6..52a75d9de6 100644 --- a/src/doveadm/dsync/dsync-transaction-log-scan.c +++ b/src/doveadm/dsync/dsync-transaction-log-scan.c @@ -343,8 +343,7 @@ int dsync_transaction_log_scan_init(struct mail_index_view *view, 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; diff --git a/src/indexer/indexer-queue.c b/src/indexer/indexer-queue.c index 5f3c930eff..f21c6f4b13 100644 --- a/src/indexer/indexer-queue.c +++ b/src/indexer/indexer-queue.c @@ -36,7 +36,7 @@ indexer_queue_init(indexer_status_callback_t *callback) 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; diff --git a/src/lib-auth/auth-server-connection.c b/src/lib-auth/auth-server-connection.c index bf600de2fc..34c36cb481 100644 --- a/src/lib-auth/auth-server-connection.c +++ b/src/lib-auth/auth-server-connection.c @@ -303,7 +303,7 @@ auth_server_connection_init(struct auth_client *client) 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; } diff --git a/src/lib-dict/dict-file.c b/src/lib-dict/dict-file.c index 52b055ce04..a75bbb99bf 100644 --- a/src/lib-dict/dict-file.c +++ b/src/lib-dict/dict-file.c @@ -77,7 +77,7 @@ static struct dict *file_dict_init(struct dict *driver, const char *uri, } 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; diff --git a/src/lib-index/mail-cache.c b/src/lib-index/mail-cache.c index 9b337d264f..8bccc46154 100644 --- a/src/lib-index/mail-cache.c +++ b/src/lib-index/mail-cache.c @@ -411,7 +411,7 @@ static struct mail_cache *mail_cache_alloc(struct mail_index *index) 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 = diff --git a/src/lib-index/mail-index.c b/src/lib-index/mail-index.c index 223fb6b327..f64daa0744 100644 --- a/src/lib-index/mail-index.c +++ b/src/lib-index/mail-index.c @@ -53,7 +53,7 @@ struct mail_index *mail_index_alloc(const char *dir, const char *prefix) 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); diff --git a/src/lib-lda/duplicate.c b/src/lib-lda/duplicate.c index 3ea487dc55..73d23d7647 100644 --- a/src/lib-lda/duplicate.c +++ b/src/lib-lda/duplicate.c @@ -214,7 +214,7 @@ static struct duplicate_file *duplicate_file_new(struct duplicate_context *ctx) &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; diff --git a/src/lib-master/master-auth.c b/src/lib-master/master-auth.c index c57abca4a5..694134837d 100644 --- a/src/lib-master/master-auth.c +++ b/src/lib-master/master-auth.c @@ -51,8 +51,7 @@ master_auth_init(struct master_service *service, const char *path) 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; } diff --git a/src/lib-master/master-login-auth.c b/src/lib-master/master-login-auth.c index 73ee2c9cfa..31a20a4af5 100644 --- a/src/lib-master/master-login-auth.c +++ b/src/lib-master/master-login-auth.c @@ -71,7 +71,7 @@ struct master_login_auth *master_login_auth_init(const char *auth_socket_path) 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; } diff --git a/src/lib-master/master-service-settings-cache.c b/src/lib-master/master-service-settings-cache.c index 5e1411b718..0797ba81ba 100644 --- a/src/lib-master/master-service-settings-cache.c +++ b/src/lib-master/master-service-settings-cache.c @@ -233,7 +233,7 @@ cache_add(struct master_service_settings_cache *cache, 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 @@ cache_add(struct master_service_settings_cache *cache, 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); } diff --git a/src/lib-settings/settings-parser.c b/src/lib-settings/settings-parser.c index 70b9689914..59f3077d45 100644 --- a/src/lib-settings/settings-parser.c +++ b/src/lib-settings/settings-parser.c @@ -206,7 +206,7 @@ settings_parser_init_list(pool_t set_pool, 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 @@ settings_parser_dup(const struct setting_parser_context *old_ctx, 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 @@ settings_parser_dup(const struct setting_parser_context *old_ctx, } 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); diff --git a/src/lib-sql/sql-db-cache.c b/src/lib-sql/sql-db-cache.c index aa9377fa78..dd89046c82 100644 --- a/src/lib-sql/sql-db-cache.c +++ b/src/lib-sql/sql-db-cache.c @@ -128,7 +128,7 @@ struct sql_db_cache *sql_db_cache_init(unsigned int max_unused_connections) 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; diff --git a/src/lib-storage/index/dbox-multi/mdbox-purge.c b/src/lib-storage/index/dbox-multi/mdbox-purge.c index b94674ea29..884d271cab 100644 --- a/src/lib-storage/index/dbox-multi/mdbox-purge.c +++ b/src/lib-storage/index/dbox-multi/mdbox-purge.c @@ -475,7 +475,7 @@ mdbox_purge_alloc(struct mdbox_storage *storage) 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; } diff --git a/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c b/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c index cc8cc80793..ead3d9adfe 100644 --- a/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c +++ b/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c @@ -69,7 +69,7 @@ mdbox_storage_rebuild_init(struct mdbox_storage *storage, 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); diff --git a/src/lib-storage/index/index-thread-finish.c b/src/lib-storage/index/index-thread-finish.c index e1802ae11d..0e905aa4b8 100644 --- a/src/lib-storage/index/index-thread-finish.c +++ b/src/lib-storage/index/index-thread-finish.c @@ -223,7 +223,7 @@ static void gather_base_subjects(struct thread_finish_context *ctx) 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); diff --git a/src/lib-storage/index/maildir/maildir-keywords.c b/src/lib-storage/index/maildir/maildir-keywords.c index c0cc8f0d7d..21e4e27cde 100644 --- a/src/lib-storage/index/maildir/maildir-keywords.c +++ b/src/lib-storage/index/maildir/maildir-keywords.c @@ -74,8 +74,8 @@ maildir_keywords_init_readonly(struct mailbox *box) 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; diff --git a/src/lib-storage/index/maildir/maildir-uidlist.c b/src/lib-storage/index/maildir/maildir-uidlist.c index 28dfe2a86a..69f8ddf311 100644 --- a/src/lib-storage/index/maildir/maildir-uidlist.c +++ b/src/lib-storage/index/maildir/maildir-uidlist.c @@ -271,7 +271,7 @@ struct maildir_uidlist *maildir_uidlist_init(struct maildir_mailbox *mbox) 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 @@ int maildir_uidlist_sync_init(struct maildir_uidlist *uidlist, 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); diff --git a/src/lib-storage/list/mailbox-list-index.c b/src/lib-storage/list/mailbox-list-index.c index 00e2b1e61f..bbebdc1de6 100644 --- a/src/lib-storage/list/mailbox-list-index.c +++ b/src/lib-storage/list/mailbox-list-index.c @@ -440,11 +440,9 @@ static void mailbox_list_index_created(struct mailbox_list *list) 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); } diff --git a/src/lib-storage/mailbox-guid-cache.c b/src/lib-storage/mailbox-guid-cache.c index 9992fd61df..b2f1ddf27f 100644 --- a/src/lib-storage/mailbox-guid-cache.c +++ b/src/lib-storage/mailbox-guid-cache.c @@ -45,8 +45,7 @@ void mailbox_guid_cache_refresh(struct mailbox_list *list) 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 { diff --git a/src/lib/child-wait.c b/src/lib/child-wait.c index 9d4cb09031..65d4d1f8d3 100644 --- a/src/lib/child-wait.c +++ b/src/lib/child-wait.c @@ -88,8 +88,7 @@ sigchld_handler(const siginfo_t *si ATTR_UNUSED, void *context ATTR_UNUSED) 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); diff --git a/src/lib/hash.c b/src/lib/hash.c index 124f103fc0..f34a2b0dab 100644 --- a/src/lib/hash.c +++ b/src/lib/hash.c @@ -17,7 +17,7 @@ struct hash_node { }; 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 @@ static unsigned int direct_hash(const void *p) } 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 @@ hash_table_create(pool_t table_pool, pool_t node_pool, unsigned int initial_size 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 @@ void hash_table_destroy(struct hash_table **_table) 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 @@ static bool hash_table_resize(struct hash_table *table, bool grow) 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 @@ static bool hash_table_resize(struct hash_table *table, bool grow) table->frozen--; - p_free(table->table_pool, old_nodes); + i_free(old_nodes); return TRUE; } diff --git a/src/lib/hash.h b/src/lib/hash.h index 359c5f1338..5640d7340e 100644 --- a/src/lib/hash.h +++ b/src/lib/hash.h @@ -13,7 +13,7 @@ typedef int hash_cmp_callback_t(const void *p1, const void *p2); 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); diff --git a/src/log/log-connection.c b/src/log/log-connection.c index 5711788b32..21814ee668 100644 --- a/src/log/log-connection.c +++ b/src/log/log-connection.c @@ -317,8 +317,7 @@ void log_connection_create(struct log_error_buffer *errorbuf, 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); diff --git a/src/login-common/login-proxy-state.c b/src/login-common/login-proxy-state.c index d42068b9b7..408ff1bbeb 100644 --- a/src/login-common/login-proxy-state.c +++ b/src/login-common/login-proxy-state.c @@ -48,7 +48,7 @@ struct login_proxy_state *login_proxy_state_init(const char *notify_path) 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); diff --git a/src/login-common/ssl-proxy-gnutls.c b/src/login-common/ssl-proxy-gnutls.c index 4bca155967..9e31c79e59 100644 --- a/src/login-common/ssl-proxy-gnutls.c +++ b/src/login-common/ssl-proxy-gnutls.c @@ -519,8 +519,7 @@ void ssl_proxy_init(void) 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; } diff --git a/src/login-common/ssl-proxy-openssl.c b/src/login-common/ssl-proxy-openssl.c index 852429841c..b433411307 100644 --- a/src/login-common/ssl-proxy-openssl.c +++ b/src/login-common/ssl-proxy-openssl.c @@ -1292,7 +1292,7 @@ void ssl_proxy_init(void) 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); diff --git a/src/master/service.c b/src/master/service.c index 49b22a4de4..2b4d43c7d5 100644 --- a/src/master/service.c +++ b/src/master/service.c @@ -726,7 +726,7 @@ void services_throttle_time_sensitives(struct service_list *list, 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); } diff --git a/src/plugins/acl/acl-cache.c b/src/plugins/acl/acl-cache.c index 94b0b898dc..dbba6f28ba 100644 --- a/src/plugins/acl/acl-cache.c +++ b/src/plugins/acl/acl-cache.c @@ -47,10 +47,10 @@ struct acl_cache *acl_cache_init(struct acl_backend *backend, 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; diff --git a/src/plugins/expire/doveadm-expire.c b/src/plugins/expire/doveadm-expire.c index c511398ab0..0fb0433c56 100644 --- a/src/plugins/expire/doveadm-expire.c +++ b/src/plugins/expire/doveadm-expire.c @@ -416,9 +416,8 @@ static void doveadm_expire_mail_init(struct doveadm_mail_cmd_context *ctx) 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, diff --git a/src/plugins/fts-lucene/fts-backend-lucene.c b/src/plugins/fts-lucene/fts-backend-lucene.c index f16afccc58..58819c2805 100644 --- a/src/plugins/fts-lucene/fts-backend-lucene.c +++ b/src/plugins/fts-lucene/fts-backend-lucene.c @@ -531,8 +531,7 @@ fts_backend_lucene_lookup_multi(struct fts_backend *_backend, 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) { diff --git a/src/plugins/fts-lucene/lucene-wrapper.cc b/src/plugins/fts-lucene/lucene-wrapper.cc index 74fd9845f8..478b7bca3e 100644 --- a/src/plugins/fts-lucene/lucene-wrapper.cc +++ b/src/plugins/fts-lucene/lucene-wrapper.cc @@ -779,8 +779,7 @@ int lucene_index_rescan(struct lucene_index *index) 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 { diff --git a/src/plugins/fts-solr/fts-backend-solr-old.c b/src/plugins/fts-solr/fts-backend-solr-old.c index 1527ca84e5..92d729fdcb 100644 --- a/src/plugins/fts-solr/fts-backend-solr-old.c +++ b/src/plugins/fts-solr/fts-backend-solr-old.c @@ -738,7 +738,7 @@ solr_search_multi(struct solr_fts_backend *backend, string_t *str, 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); diff --git a/src/plugins/fts-solr/fts-backend-solr.c b/src/plugins/fts-solr/fts-backend-solr.c index f1233ced0f..1253bdc741 100644 --- a/src/plugins/fts-solr/fts-backend-solr.c +++ b/src/plugins/fts-solr/fts-backend-solr.c @@ -814,7 +814,7 @@ solr_search_multi(struct fts_backend *_backend, string_t *str, 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); diff --git a/src/plugins/fts-solr/solr-connection.c b/src/plugins/fts-solr/solr-connection.c index 39c37ca9d7..f33cb46e4f 100644 --- a/src/plugins/fts-solr/solr-connection.c +++ b/src/plugins/fts-solr/solr-connection.c @@ -420,7 +420,7 @@ int solr_connection_select(struct solr_connection *conn, const char *query, 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); diff --git a/src/plugins/fts/fts-expunge-log.c b/src/plugins/fts/fts-expunge-log.c index 6e05a01ff5..a387706949 100644 --- a/src/plugins/fts/fts-expunge-log.c +++ b/src/plugins/fts/fts-expunge-log.c @@ -177,9 +177,7 @@ fts_expunge_log_append_begin(struct fts_expunge_log *log) 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; diff --git a/src/pop3/pop3-commands.c b/src/pop3/pop3-commands.c index 82bccfd3fc..d82591ea86 100644 --- a/src/pop3/pop3-commands.c +++ b/src/pop3/pop3-commands.c @@ -752,8 +752,8 @@ static void client_uidls_save(struct client *client) 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); diff --git a/src/replication/aggregator/replicator-connection.c b/src/replication/aggregator/replicator-connection.c index 70fcd344e6..3378bf692b 100644 --- a/src/replication/aggregator/replicator-connection.c +++ b/src/replication/aggregator/replicator-connection.c @@ -209,8 +209,7 @@ static struct replicator_connection *replicator_connection_create(void) 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; diff --git a/src/replication/replicator/replicator-queue.c b/src/replication/replicator/replicator-queue.c index 9a546311f2..e99b6b8ff5 100644 --- a/src/replication/replicator/replicator-queue.c +++ b/src/replication/replicator/replicator-queue.c @@ -67,9 +67,8 @@ struct replicator_queue *replicator_queue_init(unsigned int full_sync_interval) 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; } diff --git a/src/stats/mail-domain.c b/src/stats/mail-domain.c index c96aba8a38..04f6a4b815 100644 --- a/src/stats/mail-domain.c +++ b/src/stats/mail-domain.c @@ -113,7 +113,7 @@ void mail_domains_free_memory(void) 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); } diff --git a/src/stats/mail-ip.c b/src/stats/mail-ip.c index bbc543f2ad..b01d60ab8b 100644 --- a/src/stats/mail-ip.c +++ b/src/stats/mail-ip.c @@ -109,7 +109,7 @@ void mail_ips_free_memory(void) 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); } diff --git a/src/stats/mail-session.c b/src/stats/mail-session.c index a2105e9540..1355ff3251 100644 --- a/src/stats/mail-session.c +++ b/src/stats/mail-session.c @@ -292,7 +292,7 @@ void mail_sessions_init(void) 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); } diff --git a/src/stats/mail-user.c b/src/stats/mail-user.c index e0bfc72b9b..50f13be8ff 100644 --- a/src/stats/mail-user.c +++ b/src/stats/mail-user.c @@ -131,7 +131,7 @@ void mail_users_free_memory(void) 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); }