return FALSE;
if (ctx->ufetch != NULL) {
- if (cmd->client->user->mail_debug) {
- i_debug("URLFETCH: Canceling command; "
- "aborting URLAUTH fetch requests prematurely");
- }
+ e_debug(cmd->client->event,
+ "URLFETCH: Canceling command; "
+ "aborting URLAUTH fetch requests prematurely");
imap_urlauth_fetch_deinit(&ctx->ufetch);
}
return TRUE;
"Couldn't export state: %s (mailbox=%s)", error,
client->mailbox == NULL ? "" :
mailbox_get_vname(client->mailbox));
- } else if (ret == 0 && client->user->mail_debug) {
- i_debug("Couldn't hibernate imap client: "
+ } else if (ret == 0) {
+ e_debug(client->event, "Couldn't hibernate imap client: "
"Couldn't export state: %s (mailbox=%s)", error,
client->mailbox == NULL ? "" :
mailbox_get_vname(client->mailbox));
fd_notify = mailbox_watch_extract_notify_fd(client->mailbox,
&error);
if (fd_notify == -1) {
- if (client->user->mail_debug) {
- i_debug("Couldn't hibernate imap client: "
- "Couldn't extract notifications fd: %s",
- error);
- }
+ e_debug(client->event, "Couldn't hibernate imap client: "
+ "Couldn't extract notifications fd: %s",
+ error);
ret = -1;
}
}
if (ret > 0) {
/* hide the disconnect log message, because the client didn't
actually log out */
- if (client->user->mail_debug) {
- i_debug("Successfully hibernated imap client in mailbox %s",
- client->mailbox == NULL ? "<none>" :
- mailbox_get_vname(client->mailbox));
- }
+ e_debug(client->event,
+ "Successfully hibernated imap client in mailbox %s",
+ client->mailbox == NULL ? "<none>" :
+ mailbox_get_vname(client->mailbox));
client->disconnected = TRUE;
client->hibernated = TRUE;
client_destroy(client, NULL);
master_input.state_import_bad_idle_done;
imap_client->state_import_idle_continue =
master_input.state_import_idle_continue;
- if (imap_client->user->mail_debug) {
- if (imap_client->state_import_bad_idle_done)
- i_debug("imap-master: Unhibernated because IDLE was stopped with BAD command");
- else if (imap_client->state_import_idle_continue)
- i_debug("imap-master: Unhibernated to send mailbox changes");
- else
- i_debug("imap-master: Unhibernated because IDLE was stopped with DONE");
+ if (imap_client->state_import_bad_idle_done) {
+ e_debug(imap_client->event,
+ "imap-master: Unhibernated because IDLE was stopped with BAD command");
+ } else if (imap_client->state_import_idle_continue) {
+ e_debug(imap_client->event,
+ "imap-master: Unhibernated to send mailbox changes");
+ } else {
+ e_debug(imap_client->event,
+ "imap-master: Unhibernated because IDLE was stopped with DONE");
}
ret = imap_state_import_internal(imap_client, master_input.state->data,
/* make sure all pending input gets handled */
i_assert(imap_client->to_delayed_input == NULL);
if (master_input.client_input->used > 0) {
- if (imap_client->user->mail_debug) {
- i_debug("imap-master: Pending client input: '%s'",
- str_sanitize(str_c(master_input.client_input), 128));
- }
+ e_debug(imap_client->event,
+ "imap-master: Pending client input: '%s'",
+ str_sanitize(str_c(master_input.client_input), 128));
imap_client->to_delayed_input =
timeout_add(0, client_input, imap_client);
}
status.highest_modseq));
client->sync_last_full_modseq = status.highest_modseq;
}
- if (client->user->mail_debug) {
- i_debug("Unhibernation sync: %u expunges, %u new messages, %u flag changes, %"PRIu64" modseq changes",
- expunge_count, new_mails_count, flag_change_count,
- status.highest_modseq - state->highest_modseq);
- }
+ e_debug(client->event,
+ "Unhibernation sync: %u expunges, %u new messages, %u flag changes, %"PRIu64" modseq changes",
+ expunge_count, new_mails_count, flag_change_count,
+ status.highest_modseq - state->highest_modseq);
return 0;
}