[geary/wip/789924-network-transition: 9/15] Minor SmtpOutboxFolder cleanup.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/789924-network-transition: 9/15] Minor SmtpOutboxFolder cleanup.
- Date: Sun, 12 Nov 2017 11:11:24 +0000 (UTC)
commit f64a2035c4f3f80c71aec03cbef84223ef58940b
Author: Michael James Gratton <mike vee net>
Date: Thu Nov 9 17:58:36 2017 +1100
Minor SmtpOutboxFolder cleanup.
src/engine/imap-db/outbox/smtp-outbox-folder.vala | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/src/engine/imap-db/outbox/smtp-outbox-folder.vala
b/src/engine/imap-db/outbox/smtp-outbox-folder.vala
index 910e8ee..c991a2a 100644
--- a/src/engine/imap-db/outbox/smtp-outbox-folder.vala
+++ b/src/engine/imap-db/outbox/smtp-outbox-folder.vala
@@ -91,9 +91,13 @@ private class Geary.SmtpOutboxFolder :
private TimeoutManager start_timer;
- public signal void report_problem(Geary.Account.Problem problem, Error? err);
+ /** Fired when an email has successfully been sent. */
public signal void email_sent(Geary.RFC822.Message rfc822);
+ /** Fired if a user-notifiable problem occurs. */
+ public signal void report_problem(Geary.Account.Problem problem, Error? err);
+
+
// Requires the Database from the get-go because it runs a background task that access it
// whether open or not
public SmtpOutboxFolder(ImapDB.Database db, Account account, Geary.ProgressMonitor sending_monitor) {
@@ -422,11 +426,13 @@ private class Geary.SmtpOutboxFolder :
if (row != null) {
this.outbox_queue.send(row);
}
- debug("Outbox postman error: %s", err.message);
- if (err is SmtpError.AUTHENTICATION_FAILED) {
- report_problem(Geary.Account.Problem.SEND_EMAIL_LOGIN_FAILED, err);
- } else if (!(err is IOError.CANCELLED)) {
- report_problem(Geary.Account.Problem.SEND_EMAIL_ERROR, err);
+ if (!(err is IOError.CANCELLED)) {
+ debug("Outbox postman error: %s", err.message);
+ if (err is SmtpError.AUTHENTICATION_FAILED) {
+ report_problem(Geary.Account.Problem.SEND_EMAIL_LOGIN_FAILED, err);
+ } else {
+ report_problem(Geary.Account.Problem.SEND_EMAIL_ERROR, err);
+ }
}
// Get out of here
cancellable.cancel();
@@ -866,7 +872,6 @@ private class Geary.SmtpOutboxFolder :
}
private void on_reachable_changed() {
- print("Connectivity changed");
if (this.smtp_endpoint.connectivity.is_reachable) {
if (this.queue_cancellable == null) {
this.start_timer.start();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]