From 8df8cc872997e909249f05288e4a4f99fc9347bb Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 23 May 2018 16:17:55 +0200 Subject: [PATCH] do not raise an error on poll/connect if the mailbox is not configured (this is very usual on first program start) --- src/mrmailbox_connect.c | 4 ++-- src/mrmailbox_securejoin.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mrmailbox_connect.c b/src/mrmailbox_connect.c index acb6b89e..45683ed2 100644 --- a/src/mrmailbox_connect.c +++ b/src/mrmailbox_connect.c @@ -45,7 +45,7 @@ void mrmailbox_ll_connect_to_imap(mrmailbox_t* mailbox, mrjob_t* job /*may be NU is_locked = 1; if( mrsqlite3_get_config_int__(mailbox->m_sql, "configured", 0) == 0 ) { - mrmailbox_log_error(mailbox, 0, "Not configured."); + mrmailbox_log_warning(mailbox, 0, "Not configured, cannot connect."); // this is no error, connect() is called eg. when the screen is switched on, it's okay if the caller does not check all circumstances here goto cleanup; } @@ -176,7 +176,7 @@ int mrmailbox_poll(mrmailbox_t* mailbox) is_locked = 1; if( mrsqlite3_get_config_int__(mailbox->m_sql, "configured", 0) == 0 ) { - mrmailbox_log_error(mailbox, 0, "Not configured."); + mrmailbox_log_warning(mailbox, 0, "Not configured, cannot poll."); // this is no error, pull() is called eg. from a timer, it's okay if the caller does not check all circumstances here goto cleanup; } diff --git a/src/mrmailbox_securejoin.c b/src/mrmailbox_securejoin.c index 77de3146..ebab163a 100644 --- a/src/mrmailbox_securejoin.c +++ b/src/mrmailbox_securejoin.c @@ -393,7 +393,7 @@ char* mrmailbox_get_securejoin_qr(mrmailbox_t* mailbox, uint32_t group_chat_id) } if( (self_addr = mrsqlite3_get_config__(mailbox->m_sql, "configured_addr", NULL)) == NULL ) { - mrmailbox_log_error(mailbox, 0, "Not configured."); + mrmailbox_log_error(mailbox, 0, "Not configured, cannot generate QR code."); goto cleanup; }