dovecot-2.1: imapc: Error logging cleanups.
dovecot at dovecot.org
dovecot at dovecot.org
Sun Sep 4 12:04:31 EEST 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/7db3ed5e17ed
changeset: 13381:7db3ed5e17ed
user: Timo Sirainen <tss at iki.fi>
date: Sun Sep 04 12:04:09 2011 +0300
description:
imapc: Error logging cleanups.
Don't bother to log disconnection errors for NOOP.
diffstat:
src/lib-storage/index/imapc/imapc-mail-fetch.c | 2 +-
src/lib-storage/index/imapc/imapc-storage.c | 16 ++++++++--------
src/lib-storage/index/imapc/imapc-storage.h | 4 ++--
src/lib-storage/index/imapc/imapc-sync.c | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
diffs (93 lines):
diff -r 0b786a676453 -r 7db3ed5e17ed src/lib-storage/index/imapc/imapc-mail-fetch.c
--- a/src/lib-storage/index/imapc/imapc-mail-fetch.c Sun Sep 04 12:03:12 2011 +0300
+++ b/src/lib-storage/index/imapc/imapc-mail-fetch.c Sun Sep 04 12:04:09 2011 +0300
@@ -41,7 +41,7 @@
reply);
} else {
mail_storage_set_critical(&mbox->storage->storage,
- "imapc: Command failed: %s", reply->text_full);
+ "imapc: Mail prefetch failed: %s", reply->text_full);
}
imapc_client_stop(mbox->storage->client);
}
diff -r 0b786a676453 -r 7db3ed5e17ed src/lib-storage/index/imapc/imapc-storage.c
--- a/src/lib-storage/index/imapc/imapc-storage.c Sun Sep 04 12:03:12 2011 +0300
+++ b/src/lib-storage/index/imapc/imapc-storage.c Sun Sep 04 12:04:09 2011 +0300
@@ -126,8 +126,8 @@
imapc_client_stop(ctx->storage->client);
}
-static void imapc_async_callback(const struct imapc_command_reply *reply,
- void *context)
+static void imapc_noop_callback(const struct imapc_command_reply *reply,
+ void *context)
{
struct imapc_storage *storage = context;
@@ -136,18 +136,18 @@
;
else if (reply->state == IMAPC_COMMAND_STATE_NO) {
imapc_copy_error_from_reply(storage, MAIL_ERROR_PARAMS, reply);
- } else {
+ } else if (reply->state != IMAPC_COMMAND_STATE_DISCONNECTED) {
mail_storage_set_critical(&storage->storage,
- "imapc: Command failed: %s", reply->text_full);
+ "imapc: NOOP failed: %s", reply->text_full);
}
}
-void imapc_async_stop_callback(const struct imapc_command_reply *reply,
+void imapc_noop_stop_callback(const struct imapc_command_reply *reply,
void *context)
{
struct imapc_storage *storage = context;
- imapc_async_callback(reply, context);
+ imapc_noop_callback(reply, context);
imapc_client_stop(storage->client);
}
@@ -507,7 +507,7 @@
static void imapc_idle_timeout(struct imapc_mailbox *mbox)
{
imapc_client_mailbox_cmd(mbox->client_box, "NOOP",
- imapc_async_callback, mbox->storage);
+ imapc_noop_callback, mbox->storage);
}
static void imapc_idle_noop_callback(const struct imapc_command_reply *reply,
@@ -516,7 +516,7 @@
{
struct imapc_mailbox *mbox = context;
- imapc_async_callback(reply, mbox->box.storage);
+ imapc_noop_callback(reply, mbox->box.storage);
imapc_client_mailbox_idle(mbox->client_box);
}
diff -r 0b786a676453 -r 7db3ed5e17ed src/lib-storage/index/imapc/imapc-storage.h
--- a/src/lib-storage/index/imapc/imapc-storage.h Sun Sep 04 12:03:12 2011 +0300
+++ b/src/lib-storage/index/imapc/imapc-storage.h Sun Sep 04 12:04:09 2011 +0300
@@ -87,8 +87,8 @@
void imapc_simple_run(struct imapc_simple_context *sctx);
void imapc_simple_callback(const struct imapc_command_reply *reply,
void *context);
-void imapc_async_stop_callback(const struct imapc_command_reply *reply,
- void *context);
+void imapc_noop_stop_callback(const struct imapc_command_reply *reply,
+ void *context);
int imapc_mailbox_commit_delayed_trans(struct imapc_mailbox *mbox,
bool *changes_r);
diff -r 0b786a676453 -r 7db3ed5e17ed src/lib-storage/index/imapc/imapc-sync.c
--- a/src/lib-storage/index/imapc/imapc-sync.c Sun Sep 04 12:03:12 2011 +0300
+++ b/src/lib-storage/index/imapc/imapc-sync.c Sun Sep 04 12:04:09 2011 +0300
@@ -314,7 +314,7 @@
/* IDLE not supported. do NOOP to get latest changes
before starting sync. */
imapc_client_mailbox_cmdf(mbox->client_box,
- imapc_async_stop_callback,
+ imapc_noop_stop_callback,
mbox->storage, "NOOP");
imapc_client_run(mbox->storage->client);
}
More information about the dovecot-cvs
mailing list