]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mail_storage_service_lookup_next() returns -2 for if _next() fails.
authorTimo Sirainen <tss@iki.fi>
Tue, 16 Mar 2010 18:40:11 +0000 (20:40 +0200)
committerTimo Sirainen <tss@iki.fi>
Tue, 16 Mar 2010 18:40:11 +0000 (20:40 +0200)
--HG--
branch : HEAD

src/lib-storage/mail-storage-service.c
src/lib-storage/mail-storage-service.h

index 58f9c75cd0100634b6f6aea7ae09678ebc9c36d0..41b84d5d0633b3bc47671cc303cccbfe8e33b22d 100644 (file)
@@ -932,7 +932,7 @@ int mail_storage_service_lookup_next(struct mail_storage_service_ctx *ctx,
        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;
index 75148c67ad483a7431eaf9e9278269f1b592b16b..8b040506e16e6456c71637d9b3e3a4e934a35692 100644 (file)
@@ -66,13 +66,15 @@ int mail_storage_service_lookup(struct mail_storage_service_ctx *ctx,
                                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,