[dovecot-cvs] dovecot/src/imap cmd-fetch.c, 1.34, 1.35 commands-util.c, 1.54, 1.55 imap-search.c, 1.17, 1.18
tss at dovecot.org
tss at dovecot.org
Sun May 13 18:46:09 EEST 2007
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv17914/imap
Modified Files:
cmd-fetch.c commands-util.c imap-search.c
Log Message:
lib-storage doesn't need the ability to return syntax errors. They should be
checked before lib-storage is called.
Index: cmd-fetch.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-fetch.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- cmd-fetch.c 28 Dec 2006 18:40:29 -0000 1.34
+++ cmd-fetch.c 13 May 2007 15:46:07 -0000 1.35
@@ -79,7 +79,7 @@
if (ctx->failed) {
struct mail_storage *storage;
const char *error;
- bool syntax, temporary_error;
+ bool temporary_error;
if (ctx->client->output->closed) {
client_disconnect(cmd->client, "Disconnected");
@@ -87,16 +87,11 @@
}
storage = mailbox_get_storage(cmd->client->mailbox);
- error = mail_storage_get_last_error(storage, &syntax,
- &temporary_error);
- if (!syntax) {
- /* We never want to reply NO to FETCH requests,
- BYE is preferrable (see imap-ml for reasons). */
- client_disconnect_with_error(cmd->client, error);
- } else {
- /* user error, we'll reply with BAD */
- client_send_storage_error(cmd, storage);
- }
+ error = mail_storage_get_last_error(storage, &temporary_error);
+
+ /* We never want to reply NO to FETCH requests,
+ BYE is preferrable (see imap-ml for reasons). */
+ client_disconnect_with_error(cmd->client, error);
return TRUE;
}
Index: commands-util.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/commands-util.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- commands-util.c 3 Apr 2007 08:34:29 -0000 1.54
+++ commands-util.c 13 May 2007 15:46:07 -0000 1.55
@@ -147,7 +147,7 @@
struct mail_storage *storage)
{
const char *error;
- bool syntax, temporary_error;
+ bool temporary_error;
if (cmd->client->mailbox != NULL &&
mailbox_is_inconsistent(cmd->client->mailbox)) {
@@ -157,16 +157,15 @@
return;
}
- error = mail_storage_get_last_error(storage, &syntax, &temporary_error);
- client_send_tagline(cmd,
- t_strconcat(syntax ? "BAD " : "NO ", error, NULL));
+ error = mail_storage_get_last_error(storage, &temporary_error);
+ client_send_tagline(cmd, t_strconcat("NO ", error, NULL));
}
void client_send_untagged_storage_error(struct client *client,
struct mail_storage *storage)
{
const char *error;
- bool syntax, temporary_error;
+ bool temporary_error;
if (client->mailbox != NULL &&
mailbox_is_inconsistent(client->mailbox)) {
@@ -176,9 +175,8 @@
return;
}
- error = mail_storage_get_last_error(storage, &syntax, &temporary_error);
- client_send_line(client,
- t_strconcat(syntax ? "* BAD " : "* NO ", error, NULL));
+ error = mail_storage_get_last_error(storage, &temporary_error);
+ client_send_line(client, t_strconcat("* NO ", error, NULL));
}
static bool is_valid_keyword(struct client_command_context *cmd,
Index: imap-search.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-search.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- imap-search.c 13 May 2007 13:23:02 -0000 1.17
+++ imap-search.c 13 May 2007 15:46:07 -0000 1.18
@@ -19,7 +19,7 @@
struct mail_search_seqset **seqset_r, const char **error_r)
{
struct mail_search_seqset *seqset, **p;
- bool syntax, temporary, last;
+ bool temporary, last;
*seqset_r = imap_messageset_parse(pool, uidset);
if (*seqset_r == NULL) {
@@ -39,7 +39,6 @@
&seqset->seq1, &seqset->seq2) < 0) {
struct mail_storage *storage = mailbox_get_storage(box);
*error_r = mail_storage_get_last_error(storage,
- &syntax,
&temporary);
return -1;
}
More information about the dovecot-cvs
mailing list