dovecot: pool_unref() now takes ** pointer.
dovecot at dovecot.org
dovecot at dovecot.org
Sun Sep 16 14:06:23 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/7cad076906eb
changeset: 6428:7cad076906eb
user: Timo Sirainen <tss at iki.fi>
date: Sun Sep 16 14:04:06 2007 +0300
description:
pool_unref() now takes ** pointer.
diffstat:
59 files changed, 89 insertions(+), 93 deletions(-)
src/auth/auth-request-handler.c | 2 +-
src/auth/auth-request.c | 2 +-
src/auth/auth.c | 4 ++--
src/auth/db-ldap.c | 2 +-
src/auth/db-passwd-file.c | 6 ++----
src/auth/db-sql.c | 2 +-
src/auth/mech-gssapi.c | 2 +-
src/auth/mech-rpa.c | 2 +-
src/auth/mech.c | 2 +-
src/auth/otp-skey-common.c | 2 +-
src/deliver/deliver.c | 2 +-
src/deliver/duplicate.c | 2 +-
src/imap/client.c | 4 ++--
src/imap/cmd-append.c | 2 +-
src/imap/cmd-sort.c | 4 ++--
src/imap/cmd-thread.c | 4 ++--
src/imap/imap-thread.c | 4 ++--
src/imap/main.c | 2 +-
src/lib-auth/auth-server-connection.c | 2 +-
src/lib-dict/dict-client.c | 4 ++--
src/lib-dict/dict-db.c | 10 +++++-----
src/lib-dict/dict-sql.c | 4 ++--
src/lib-imap/imap-parser.c | 2 +-
src/lib-index/mail-cache.c | 2 +-
src/lib-index/mail-index-map.c | 2 +-
src/lib-index/mail-index.c | 4 ++--
src/lib-index/mailbox-list-index-sync.c | 2 +-
src/lib-mail/istream-header-filter.c | 2 +-
src/lib-mail/message-parser.c | 2 +-
src/lib-sql/driver-mysql.c | 4 ++--
src/lib-sql/driver-sqlite.c | 2 +-
src/lib-storage/index/dbox/dbox-file.c | 2 +-
src/lib-storage/index/dbox/dbox-sync.c | 2 +-
src/lib-storage/index/index-mail-headers.c | 4 ++--
src/lib-storage/index/index-mail.c | 4 ++--
src/lib-storage/index/index-search.c | 2 +-
src/lib-storage/index/index-storage.c | 2 +-
src/lib-storage/index/maildir/maildir-keywords.c | 2 +-
src/lib-storage/index/maildir/maildir-save.c | 6 +++---
src/lib-storage/index/maildir/maildir-uidlist.c | 6 +++---
src/lib-storage/index/mbox/mbox-sync.c | 4 ++--
src/lib-storage/list/index-mailbox-list.c | 2 +-
src/lib-storage/list/mailbox-list-fs-iter.c | 2 +-
src/lib-storage/list/mailbox-list-fs.c | 2 +-
src/lib-storage/list/mailbox-list-maildir-iter.c | 2 +-
src/lib-storage/list/mailbox-list-maildir.c | 4 ++--
src/lib-storage/mail-storage.c | 4 ++--
src/lib-storage/mailbox-tree.c | 2 +-
src/lib/env-util.c | 6 ++----
src/lib/mempool.h | 2 +-
src/lib/module-dir.c | 2 +-
src/master/master-settings.c | 6 +++---
src/plugins/acl/acl-backend-vfile.c | 4 ++--
src/plugins/acl/acl-cache.c | 2 +-
src/plugins/expire/expire-env.c | 2 +-
src/plugins/fts-squat/squat-uidlist.c | 4 ++--
src/plugins/mail-log/mail-log-plugin.c | 4 ++--
src/plugins/quota/quota.c | 2 +-
src/plugins/trash/trash-plugin.c | 4 ++--
diffs (truncated from 868 to 300 lines):
diff -r c242677f2aa9 -r 7cad076906eb src/auth/auth-request-handler.c
--- a/src/auth/auth-request-handler.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/auth/auth-request-handler.c Sun Sep 16 14:04:06 2007 +0300
@@ -75,7 +75,7 @@ void auth_request_handler_unref(struct a
handler->callback(NULL, handler->context);
hash_destroy(&handler->requests);
- pool_unref(handler->pool);
+ pool_unref(&handler->pool);
}
void auth_request_handler_set(struct auth_request_handler *handler,
diff -r c242677f2aa9 -r 7cad076906eb src/auth/auth-request.c
--- a/src/auth/auth-request.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/auth/auth-request.c Sun Sep 16 14:04:06 2007 +0300
@@ -112,7 +112,7 @@ void auth_request_unref(struct auth_requ
if (request->mech != NULL)
request->mech->auth_free(request);
else
- pool_unref(request->pool);
+ pool_unref(&request->pool);
}
void auth_request_export(struct auth_request *request, string_t *str)
diff -r c242677f2aa9 -r 7cad076906eb src/auth/auth.c
--- a/src/auth/auth.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/auth/auth.c Sun Sep 16 14:04:06 2007 +0300
@@ -298,5 +298,5 @@ void auth_deinit(struct auth **_auth)
auth_request_handler_deinit();
passdb_cache_deinit();
- pool_unref(auth->pool);
-}
+ pool_unref(&auth->pool);
+}
diff -r c242677f2aa9 -r 7cad076906eb src/auth/db-ldap.c
--- a/src/auth/db-ldap.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/auth/db-ldap.c Sun Sep 16 14:04:06 2007 +0300
@@ -1011,7 +1011,7 @@ void db_ldap_unref(struct ldap_connectio
hash_destroy(&conn->pass_attr_map);
if (conn->user_attr_map != NULL)
hash_destroy(&conn->user_attr_map);
- pool_unref(conn->pool);
+ pool_unref(&conn->pool);
}
#ifndef BUILTIN_LDAP
diff -r c242677f2aa9 -r 7cad076906eb src/auth/db-passwd-file.c
--- a/src/auth/db-passwd-file.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/auth/db-passwd-file.c Sun Sep 16 14:04:06 2007 +0300
@@ -218,10 +218,8 @@ static void passwd_file_close(struct pas
if (pw->users != NULL)
hash_destroy(&pw->users);
- if (pw->pool != NULL) {
- pool_unref(pw->pool);
- pw->pool = NULL;
- }
+ if (pw->pool != NULL)
+ pool_unref(&pw->pool);
}
static void passwd_file_free(struct passwd_file *pw)
diff -r c242677f2aa9 -r 7cad076906eb src/auth/db-sql.c
--- a/src/auth/db-sql.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/auth/db-sql.c Sun Sep 16 14:04:06 2007 +0300
@@ -106,7 +106,7 @@ void db_sql_unref(struct sql_connection
return;
sql_deinit(&conn->db);
- pool_unref(conn->pool);
+ pool_unref(&conn->pool);
}
#endif
diff -r c242677f2aa9 -r 7cad076906eb src/auth/mech-gssapi.c
--- a/src/auth/mech-gssapi.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/auth/mech-gssapi.c Sun Sep 16 14:04:06 2007 +0300
@@ -432,7 +432,7 @@ mech_gssapi_auth_free(struct auth_reques
major_status = gss_release_name(&minor_status,
&gssapi_request->authz_name);
}
- pool_unref(request->pool);
+ pool_unref(&request->pool);
}
const struct mech_module mech_gssapi = {
diff -r c242677f2aa9 -r 7cad076906eb src/auth/mech-rpa.c
--- a/src/auth/mech-rpa.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/auth/mech-rpa.c Sun Sep 16 14:04:06 2007 +0300
@@ -580,7 +580,7 @@ mech_rpa_auth_free(struct auth_request *
if (request->pwd_md5 != NULL)
safe_memset(request->pwd_md5, 0, sizeof(request->pwd_md5));
- pool_unref(auth_request->pool);
+ pool_unref(&auth_request->pool);
}
static struct auth_request *mech_rpa_auth_new(void)
diff -r c242677f2aa9 -r 7cad076906eb src/auth/mech.c
--- a/src/auth/mech.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/auth/mech.c Sun Sep 16 14:04:06 2007 +0300
@@ -59,7 +59,7 @@ void mech_generic_auth_initial(struct au
void mech_generic_auth_free(struct auth_request *request)
{
- pool_unref(request->pool);
+ pool_unref(&request->pool);
}
extern const struct mech_module mech_plain;
diff -r c242677f2aa9 -r 7cad076906eb src/auth/otp-skey-common.c
--- a/src/auth/otp-skey-common.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/auth/otp-skey-common.c Sun Sep 16 14:04:06 2007 +0300
@@ -64,5 +64,5 @@ void mech_otp_skey_auth_free(struct auth
{
otp_unlock(auth_request);
- pool_unref(auth_request->pool);
+ pool_unref(&auth_request->pool);
}
diff -r c242677f2aa9 -r 7cad076906eb src/deliver/deliver.c
--- a/src/deliver/deliver.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/deliver/deliver.c Sun Sep 16 14:04:06 2007 +0300
@@ -405,7 +405,7 @@ static const char *address_sanitize(cons
ret = t_strdup(addr->mailbox);
else
ret = t_strdup_printf("%s@%s", addr->mailbox, addr->domain);
- pool_unref(pool);
+ pool_unref(&pool);
return ret;
}
diff -r c242677f2aa9 -r 7cad076906eb src/deliver/duplicate.c
--- a/src/deliver/duplicate.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/deliver/duplicate.c Sun Sep 16 14:04:06 2007 +0300
@@ -184,7 +184,7 @@ static void duplicate_free(struct duplic
file_dotlock_delete(&file->dotlock);
hash_destroy(&file->hash);
- pool_unref(file->pool);
+ pool_unref(&file->pool);
}
int duplicate_check(const void *id, size_t id_size, const char *user)
diff -r c242677f2aa9 -r 7cad076906eb src/imap/client.c
--- a/src/imap/client.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/imap/client.c Sun Sep 16 14:04:06 2007 +0300
@@ -142,8 +142,8 @@ void client_destroy(struct client *clien
i_error("close(client out) failed: %m");
}
- pool_unref(client->keywords.pool);
- pool_unref(client->command_pool);
+ pool_unref(&client->keywords.pool);
+ pool_unref(&client->command_pool);
i_free(client);
/* quit the program */
diff -r c242677f2aa9 -r 7cad076906eb src/imap/cmd-append.c
--- a/src/imap/cmd-append.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/imap/cmd-append.c Sun Sep 16 14:04:06 2007 +0300
@@ -136,7 +136,7 @@ static void cmd_append_finish(struct cmd
if (ctx->box != ctx->cmd->client->mailbox && ctx->box != NULL) {
mailbox_close(&ctx->box);
- pool_unref(ctx->client->keywords.pool);
+ pool_unref(&ctx->client->keywords.pool);
ctx->client->keywords = ctx->old_keywords;
}
}
diff -r c242677f2aa9 -r 7cad076906eb src/imap/cmd-sort.c
--- a/src/imap/cmd-sort.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/imap/cmd-sort.c Sun Sep 16 14:04:06 2007 +0300
@@ -132,7 +132,7 @@ bool cmd_sort(struct client_command_cont
/* error in search arguments */
client_send_tagline(cmd, t_strconcat("NO ", error, NULL));
} else if (imap_sort(cmd, charset, sargs, sorting) == 0) {
- pool_unref(pool);
+ pool_unref(&pool);
return cmd_sync(cmd, MAILBOX_SYNC_FLAG_FAST |
(cmd->uid ? 0 : MAILBOX_SYNC_FLAG_NO_EXPUNGES),
0, "OK Sort completed.");
@@ -141,6 +141,6 @@ bool cmd_sort(struct client_command_cont
mailbox_get_storage(client->mailbox));
}
- pool_unref(pool);
+ pool_unref(&pool);
return TRUE;
}
diff -r c242677f2aa9 -r 7cad076906eb src/imap/cmd-thread.c
--- a/src/imap/cmd-thread.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/imap/cmd-thread.c Sun Sep 16 14:04:06 2007 +0300
@@ -65,7 +65,7 @@ bool cmd_thread(struct client_command_co
/* error in search arguments */
client_send_tagline(cmd, t_strconcat("NO ", error, NULL));
} else if (imap_thread(cmd, charset, sargs, threading) == 0) {
- pool_unref(pool);
+ pool_unref(&pool);
return cmd_sync(cmd, MAILBOX_SYNC_FLAG_FAST |
(cmd->uid ? 0 : MAILBOX_SYNC_FLAG_NO_EXPUNGES),
0, "OK Thread completed.");
@@ -74,6 +74,6 @@ bool cmd_thread(struct client_command_co
mailbox_get_storage(client->mailbox));
}
- pool_unref(pool);
+ pool_unref(&pool);
return TRUE;
}
diff -r c242677f2aa9 -r 7cad076906eb src/imap/imap-thread.c
--- a/src/imap/imap-thread.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/imap/imap-thread.c Sun Sep 16 14:04:06 2007 +0300
@@ -97,8 +97,8 @@ static void mail_thread_deinit(struct th
if (ctx->subject_hash != NULL)
hash_destroy(&ctx->subject_hash);
- pool_unref(ctx->temp_pool);
- pool_unref(ctx->pool);
+ pool_unref(&ctx->temp_pool);
+ pool_unref(&ctx->pool);
}
int imap_thread(struct client_command_context *cmd, const char *charset,
diff -r c242677f2aa9 -r 7cad076906eb src/imap/main.c
--- a/src/imap/main.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/imap/main.c Sun Sep 16 14:04:06 2007 +0300
@@ -260,7 +260,7 @@ static void main_deinit(void)
mail_storage_deinit();
dict_driver_unregister(&dict_driver_client);
random_deinit();
- pool_unref(namespace_pool);
+ pool_unref(&namespace_pool);
str_free(&capability_string);
diff -r c242677f2aa9 -r 7cad076906eb src/lib-auth/auth-server-connection.c
--- a/src/lib-auth/auth-server-connection.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/lib-auth/auth-server-connection.c Sun Sep 16 14:04:06 2007 +0300
@@ -306,7 +306,7 @@ static void auth_server_connection_unref
i_stream_unref(&conn->input);
o_stream_unref(&conn->output);
- pool_unref(conn->pool);
+ pool_unref(&conn->pool);
}
struct auth_server_connection *
diff -r c242677f2aa9 -r 7cad076906eb src/lib-dict/dict-client.c
--- a/src/lib-dict/dict-client.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/lib-dict/dict-client.c Sun Sep 16 14:04:06 2007 +0300
@@ -323,7 +323,7 @@ static void client_dict_deinit(struct di
struct client_dict *dict = (struct client_dict *)_dict;
client_dict_disconnect(dict);
- pool_unref(dict->pool);
+ pool_unref(&dict->pool);
}
static int client_dict_lookup(struct dict *_dict, pool_t pool,
@@ -427,7 +427,7 @@ static void client_dict_iterate_deinit(s
struct client_dict_iterate_context *ctx =
(struct client_dict_iterate_context *)_ctx;
- pool_unref(ctx->pool);
+ pool_unref(&ctx->pool);
i_free(ctx);
dict->in_iteration = TRUE;
}
diff -r c242677f2aa9 -r 7cad076906eb src/lib-dict/dict-db.c
--- a/src/lib-dict/dict-db.c Sun Sep 16 13:51:51 2007 +0300
+++ b/src/lib-dict/dict-db.c Sun Sep 16 14:04:06 2007 +0300
@@ -79,7 +79,7 @@ static struct dict *db_dict_init(struct
ret = db_env_create(&dict->db_env, 0);
if (ret != 0) {
i_error("db_env:%s\n", db_strerror(ret));
- pool_unref(pool);
+ pool_unref(&pool);
return NULL;
}
@@ -93,13 +93,13 @@ static struct dict *db_dict_init(struct
ret = dict->db_env->open(dict->db_env, hdir, DB_CREATE |
DB_INIT_MPOOL | DB_INIT_TXN, 0);
if (ret != 0) {
- pool_unref(pool);
+ pool_unref(&pool);
return NULL;
}
ret = dict->db_env->txn_begin(dict->db_env, NULL, &tid, 0);
if (ret != 0) {
- pool_unref(pool);
+ pool_unref(&pool);
return NULL;
}
@@ -168,7 +168,7 @@ static void db_dict_deinit(struct dict *
dict->pdb->close(dict->pdb, 0);
More information about the dovecot-cvs
mailing list