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;
}
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;
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;
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;
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);
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);
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);
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);
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);
}
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;
}
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);
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;
}
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
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) {
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 */
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);
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);
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) {
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;
}
/* 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)) {
(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);
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);
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)) {
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)) {
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))
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;
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;
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;
}
}
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;
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 =
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);
&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;
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;
}
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;
}
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);
}
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);
}
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;
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,
}
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);
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;
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;
}
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);
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);
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;
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;
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);
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);
}
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 {
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);
};
struct hash_table {
- pool_t table_pool, node_pool;
+ pool_t node_pool;
int frozen;
unsigned int initial_size, nodes_count, removed_count;
}
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);
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;
}
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)
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;
table->frozen--;
- p_free(table->table_pool, old_nodes);
+ i_free(old_nodes);
return TRUE;
}
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);
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);
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);
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;
}
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);
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);
}
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;
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,
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) {
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 {
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);
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);
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);
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;
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);
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;
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;
}
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);
}
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);
}
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);
}
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);
}