[dovecot-cvs] dovecot/src/pop3 client.c,1.66.2.3,1.66.2.4
tss at dovecot.org
tss at dovecot.org
Thu Feb 22 13:30:55 UTC 2007
Update of /var/lib/cvs/dovecot/src/pop3
In directory talvi:/tmp/cvs-serv12775
Modified Files:
Tag: branch_1_0
client.c
Log Message:
If INBOX can't be opened, give better error messages. The reason is never
"INBOX doesn't exist for user".
Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/client.c,v
retrieving revision 1.66.2.3
retrieving revision 1.66.2.4
diff -u -d -r1.66.2.3 -r1.66.2.4
--- client.c 5 Feb 2007 11:42:45 -0000 1.66.2.3
+++ client.c 22 Feb 2007 13:30:53 -0000 1.66.2.4
@@ -128,6 +128,7 @@
{
struct client *client;
enum mailbox_open_flags flags;
+ const char *errmsg;
bool syntax_error, temporary_error;
/* always use nonblocking I/O */
@@ -156,11 +157,13 @@
flags |= MAILBOX_OPEN_KEEP_LOCKED;
client->mailbox = mailbox_open(storage, "INBOX", NULL, flags);
if (client->mailbox == NULL) {
- i_error("Couldn't open INBOX: %s",
- mail_storage_get_last_error(storage, &syntax_error,
- &temporary_error));
- client_send_line(client, "-ERR No INBOX for user.");
- client_destroy(client, "No INBOX for user");
+ errmsg = t_strdup_printf("Couldn't open INBOX: %s",
+ mail_storage_get_last_error(storage,
+ &syntax_error,
+ &temporary_error));
+ i_error("%s", errmsg);
+ client_send_line(client, "-ERR [IN-USE] %s", errmsg);
+ client_destroy(client, "Couldn't open INBOX");
return NULL;
}
More information about the dovecot-cvs
mailing list