[dovecot-cvs] dovecot/src/lib-storage mail-storage-private.h, 1.47, 1.48 mail-storage.c, 1.74, 1.75
tss at dovecot.org
tss at dovecot.org
Fri Mar 30 17:12:50 EEST 2007
- Previous message: [dovecot-cvs] dovecot/src/auth auth-request.c, 1.93, 1.94 auth-request.h, 1.34, 1.35 auth-worker-client.c, 1.31, 1.32 db-sql.c, 1.11, 1.12 db-sql.h, 1.4, 1.5 mech-apop.c, 1.24, 1.25 mech-cram-md5.c, 1.25, 1.26 mech-digest-md5.c, 1.43, 1.44 mech-ntlm.c, 1.27, 1.28 mech-otp.c, 1.1, 1.2 mech-rpa.c, 1.28, 1.29 mech-skey.c, 1.1, 1.2 passdb-sql.c, 1.31, 1.32 passdb.c, 1.47, 1.48 passdb.h, 1.37, 1.38 userdb-static.c, 1.23, 1.24
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index index-storage.c, 1.107, 1.108 index-storage.h, 1.117, 1.118
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv21144/lib-storage
Modified Files:
mail-storage-private.h mail-storage.c
Log Message:
Moved all storage destruction code to mail-storage.c and made destroy()
optional. Removed set_callbacks(). Made autodetect() optional.
Index: mail-storage-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage-private.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- mail-storage-private.h 30 Mar 2007 13:40:12 -0000 1.47
+++ mail-storage-private.h 30 Mar 2007 14:12:48 -0000 1.48
@@ -29,10 +29,6 @@
bool (*autodetect)(const char *data, enum mail_storage_flags flags);
- void (*set_callbacks)(struct mail_storage *storage,
- struct mail_storage_callbacks *callbacks,
- void *context);
-
struct mailbox *(*mailbox_open)(struct mail_storage *storage,
const char *name,
struct istream *input,
Index: mail-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- mail-storage.c 30 Mar 2007 13:40:12 -0000 1.74
+++ mail-storage.c 30 Mar 2007 14:12:48 -0000 1.75
@@ -7,6 +7,7 @@
#include "mail-index-private.h"
#include "mailbox-list-private.h"
#include "mail-storage-private.h"
+#include "index/index-storage.h"
#include <stdlib.h>
#include <time.h>
@@ -122,7 +123,8 @@
classes = array_get(&storages, &count);
for (i = 0; i < count; i++) {
- if (classes[i]->v.autodetect(data, flags))
+ if (classes[i]->v.autodetect != NULL &&
+ classes[i]->v.autodetect(data, flags))
return classes[i];
}
return NULL;
@@ -214,7 +216,15 @@
i_assert(storage != NULL);
*_storage = NULL;
- storage->v.destroy(storage);
+
+ if (storage->v.destroy != NULL)
+ storage->v.destroy(storage);
+
+ mailbox_list_deinit(storage->list);
+ i_free(storage->error);
+ pool_unref(storage->pool);
+
+ index_storage_destroy_unrefed();
}
void mail_storage_clear_error(struct mail_storage *storage)
@@ -313,7 +323,8 @@
struct mail_storage_callbacks *callbacks,
void *context)
{
- storage->v.set_callbacks(storage, callbacks, context);
+ *storage->callbacks = *callbacks;
+ storage->callback_context = context;
}
int mail_storage_mailbox_create(struct mail_storage *storage, const char *name,
- Previous message: [dovecot-cvs] dovecot/src/auth auth-request.c, 1.93, 1.94 auth-request.h, 1.34, 1.35 auth-worker-client.c, 1.31, 1.32 db-sql.c, 1.11, 1.12 db-sql.h, 1.4, 1.5 mech-apop.c, 1.24, 1.25 mech-cram-md5.c, 1.25, 1.26 mech-digest-md5.c, 1.43, 1.44 mech-ntlm.c, 1.27, 1.28 mech-otp.c, 1.1, 1.2 mech-rpa.c, 1.28, 1.29 mech-skey.c, 1.1, 1.2 passdb-sql.c, 1.31, 1.32 passdb.c, 1.47, 1.48 passdb.h, 1.37, 1.38 userdb-static.c, 1.23, 1.24
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index index-storage.c, 1.107, 1.108 index-storage.h, 1.117, 1.118
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list