Mercurial > dovecot > core-2.2
changeset 10932:2c0e9bea1bea HEAD
mail_storage_service_lookup_next() returns -2 for if _next() fails.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 16 Mar 2010 20:40:11 +0200 |
parents | 03b679cd8d1f |
children | 35cda1373e6f |
files | src/lib-storage/mail-storage-service.c src/lib-storage/mail-storage-service.h |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mail-storage-service.c Tue Mar 16 20:33:18 2010 +0200 +++ b/src/lib-storage/mail-storage-service.c Tue Mar 16 20:40:11 2010 +0200 @@ -932,7 +932,7 @@ if (mail_storage_service_next(ctx, user, mail_user_r, &error) < 0) { mail_storage_service_user_free(&user); *error_r = t_strdup_printf("User init failed: %s", error); - return -1; + return -2; } *user_r = user; return 1;
--- a/src/lib-storage/mail-storage-service.h Tue Mar 16 20:33:18 2010 +0200 +++ b/src/lib-storage/mail-storage-service.h Tue Mar 16 20:40:11 2010 +0200 @@ -66,13 +66,15 @@ const struct mail_storage_service_input *input, struct mail_storage_service_user **user_r, const char **error_r); +/* Returns 0 if ok, -1 if user had invalid settings. */ int mail_storage_service_next(struct mail_storage_service_ctx *ctx, struct mail_storage_service_user *user, struct mail_user **mail_user_r, const char **error_r); void mail_storage_service_restrict_setenv(struct mail_storage_service_ctx *ctx, struct mail_storage_service_user *user); -/* Combine lookup() and next() into one call. */ +/* Combine lookup() and next() into one call. If either one fails with + "invalid settings", this function returns -2. */ int mail_storage_service_lookup_next(struct mail_storage_service_ctx *ctx, const struct mail_storage_service_input *input, struct mail_storage_service_user **user_r,