Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package evolution-ews for openSUSE:Factory checked in at 2022-02-11 23:06:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/evolution-ews (Old) and /work/SRC/openSUSE:Factory/.evolution-ews.new.1956 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "evolution-ews" Fri Feb 11 23:06:46 2022 rev:121 rq:953723 version:3.42.4 Changes: -------- --- /work/SRC/openSUSE:Factory/evolution-ews/evolution-ews.changes 2022-01-09 22:50:20.923293392 +0100 +++ /work/SRC/openSUSE:Factory/.evolution-ews.new.1956/evolution-ews.changes 2022-02-11 23:07:17.370585846 +0100 @@ -1,0 +2,11 @@ +Fri Feb 11 10:49:20 UTC 2022 - Bj??rn Lie <bjorn....@gmail.com> + +- Update to version 3.42.4: + + Misc: Correct response print in debug output + + Retry on Unauthorized response when server disconnected + + e-ews-connection: Clear cached connection before sending a + request + + Bugs fixed: glgo#GNOME/evolution-ews#77 + + Updated translations. + +------------------------------------------------------------------- Old: ---- evolution-ews-3.42.3.tar.xz New: ---- evolution-ews-3.42.4.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ evolution-ews.spec ++++++ --- /var/tmp/diff_new_pack.z8EmMV/_old 2022-02-11 23:07:17.926587390 +0100 +++ /var/tmp/diff_new_pack.z8EmMV/_new 2022-02-11 23:07:17.934587411 +0100 @@ -20,7 +20,7 @@ %define _version %(echo %{version} | grep -E -o '[0-9]+\.[0-9]+\.[0-9]+') Name: evolution-ews -Version: 3.42.3 +Version: 3.42.4 Release: 0 Summary: Exchange Connector for Evolution, compatible with Exchange 2007 and later License: LGPL-2.1-only ++++++ evolution-ews-3.42.3.tar.xz -> evolution-ews-3.42.4.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.42.3/CMakeLists.txt new/evolution-ews-3.42.4/CMakeLists.txt --- old/evolution-ews-3.42.3/CMakeLists.txt 2022-01-07 11:49:13.000000000 +0100 +++ new/evolution-ews-3.42.4/CMakeLists.txt 2022-02-11 11:14:03.000000000 +0100 @@ -4,7 +4,7 @@ cmake_policy(VERSION 3.1) project(evolution-ews - VERSION 3.42.3 + VERSION 3.42.4 LANGUAGES C) set(PROJECT_BUGREPORT "https://gitlab.gnome.org/GNOME/evolution-ews/issues/") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.42.3/NEWS new/evolution-ews-3.42.4/NEWS --- old/evolution-ews-3.42.3/NEWS 2022-01-07 11:49:13.000000000 +0100 +++ new/evolution-ews-3.42.4/NEWS 2022-02-11 11:14:03.000000000 +0100 @@ -1,3 +1,17 @@ +Evolution-EWS 3.42.4 2022-02-11 +------------------------------- + +Bug Fixes: + I#77 - Can sometimes stop listening for server notifications + +Miscellaneous: + Misc: Correct response print in debug output + Retry on Unauthorized response when server disconnected + e-ews-connection: Clear cached connection before sending a request + +Translations: + Daniel ??erb??nescu (ro) + Evolution-EWS 3.42.3 2022-01-07 ------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.42.3/po/ro.po new/evolution-ews-3.42.4/po/ro.po --- old/evolution-ews-3.42.3/po/ro.po 2022-01-07 11:49:13.000000000 +0100 +++ new/evolution-ews-3.42.4/po/ro.po 2022-02-11 11:14:03.000000000 +0100 @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: evolution-ews gnome-3-32\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/evolution-ews/issues\n" -"POT-Creation-Date: 2021-03-19 11:15+0000\n" -"PO-Revision-Date: 2021-05-05 12:52+0200\n" +"POT-Creation-Date: 2021-09-17 15:34+0000\n" +"PO-Revision-Date: 2022-01-07 13:20+0100\n" "Last-Translator: \n" "Language-Team: Romanian <gnomero-l...@lists.sourceforge.net>\n" "Language: ro\n" @@ -17,7 +17,7 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n==0 || (n!=1 && n%100>=1 && n" "%100<=19) ? 1 : 2);\n" -"X-Generator: Poedit 2.4.2\n" +"X-Generator: Poedit 3.0.1\n" "X-Poedit-SourceCharset: UTF-8\n" #: ../org.gnome.Evolution-ews.metainfo.xml.in.h:1 @@ -32,47 +32,47 @@ msgid "For accessing Exchange servers using Web Services" msgstr "Pentru accesarea serverelor Exchange folosind servicii web" -#: ../src/EWS/addressbook/e-book-backend-ews.c:3512 +#: ../src/EWS/addressbook/e-book-backend-ews.c:3973 msgid "Failed to update GAL:" msgstr "Eroare la actualizarea GAL:" -#: ../src/EWS/addressbook/e-book-backend-ews.c:3674 +#: ../src/EWS/addressbook/e-book-backend-ews.c:4138 msgid "" "Cannot save contact list, it???s only supported on EWS Server 2010 or later" msgstr "" "Nu s-a putut salva lista de contacte, este suportat?? numai pentru servere " "EWS 2010 sau ulterior" -#: ../src/EWS/addressbook/e-book-backend-ews.c:3767 +#: ../src/EWS/addressbook/e-book-backend-ews.c:4236 msgid "Failed to set contact photo:" msgstr "E??ec la stabilirea fotografiei de contact:" -#: ../src/EWS/calendar/e-cal-backend-ews.c:1957 +#: ../src/EWS/calendar/e-cal-backend-ews.c:2034 msgctxt "FreeBusyType" msgid "Free" msgstr "Liber" -#: ../src/EWS/calendar/e-cal-backend-ews.c:1960 +#: ../src/EWS/calendar/e-cal-backend-ews.c:2037 msgctxt "FreeBusyType" msgid "Busy" msgstr "Ocupat" -#: ../src/EWS/calendar/e-cal-backend-ews.c:1962 +#: ../src/EWS/calendar/e-cal-backend-ews.c:2039 msgctxt "FreeBusyType" msgid "Out of Office" msgstr "??n afara serviciului" -#: ../src/EWS/calendar/e-cal-backend-ews.c:1964 +#: ../src/EWS/calendar/e-cal-backend-ews.c:2041 msgctxt "FreeBusyType" msgid "Tentative" msgstr "Tentativ??" -#: ../src/EWS/calendar/e-cal-backend-ews.c:2540 -#: ../src/EWS/calendar/e-cal-backend-ews.c:2719 +#: ../src/EWS/calendar/e-cal-backend-ews.c:2621 +#: ../src/EWS/calendar/e-cal-backend-ews.c:2895 msgid "Cannot determine EWS ItemId" msgstr "Nu s-a putut determina Id-ul elementului EWS" -#: ../src/EWS/calendar/e-cal-backend-ews.c:3010 +#: ../src/EWS/calendar/e-cal-backend-ews.c:3192 msgid "" "Cannot create meetings organized by other users in an Exchange Web Services " "calendar." @@ -80,12 +80,12 @@ "Nu se pot crea ??nt??lniri organizate de utilizatori ??ntr-un calendar Servicii " "Web Exchange." -#: ../src/EWS/calendar/e-cal-backend-ews.c:3720 +#: ../src/EWS/calendar/e-cal-backend-ews.c:3902 #, c-format msgid "Cannot find user ???%s??? between attendees" msgstr "Nu s-a putut g??si utilizatorul ???%s??? printre participan??i" -#: ../src/EWS/calendar/e-cal-backend-ews-utils.c:2114 +#: ../src/EWS/calendar/e-cal-backend-ews-utils.c:2102 msgid "Invalid occurrence ID" msgstr "ID ocuren???? nevalid??" @@ -129,12 +129,12 @@ msgid "Could not load summary for %s" msgstr "Nu s-a putut ??nc??rca sumarul pentru %s" -#: ../src/EWS/camel/camel-ews-folder.c:2349 +#: ../src/EWS/camel/camel-ews-folder.c:2350 #, c-format msgid "Refreshing folder ???%s???" msgstr "Se re??mprosp??teaz?? dosarul ???%s???" -#: ../src/EWS/camel/camel-ews-folder.c:2533 +#: ../src/EWS/camel/camel-ews-folder.c:2543 #, c-format msgid "Cannot perform actions on the folder while in offline mode" msgstr "" @@ -501,25 +501,25 @@ "Nu s-a putut stoca aceast?? recuren????. Schimba??i-o ??ntr-o simpl?? recuren???? " "zilnic??, s??pt??m??nal??, lunar?? sau anual?? f??r?? excep??ii ??i cu o dat?? de start." -#: ../src/EWS/common/e-ews-camel-common.c:380 +#: ../src/EWS/common/e-ews-camel-common.c:388 #, c-format msgid "CreateItem call failed to return ID for new message" msgstr "Apelul CreateItem a e??uat s?? returneze un ID pentru noul mesaj" -#: ../src/EWS/common/e-ews-connection.c:811 +#: ../src/EWS/common/e-ews-connection.c:809 msgid "Operation Cancelled" msgstr "Opera??ie anulat??" -#: ../src/EWS/common/e-ews-connection.c:981 +#: ../src/EWS/common/e-ews-connection.c:979 msgid "Authentication failed" msgstr "Autentificare e??uat??" -#: ../src/EWS/common/e-ews-connection.c:1003 +#: ../src/EWS/common/e-ews-connection.c:1001 #, c-format msgid "No response: %s" msgstr "Niciun r??spuns: %s" -#: ../src/EWS/common/e-ews-connection.c:1066 +#: ../src/EWS/common/e-ews-connection.c:1064 #, c-format msgid "Exchange server is busy, waiting to retry (%d:%02d minute)" msgid_plural "Exchange server is busy, waiting to retry (%d:%02d minutes)" @@ -530,7 +530,7 @@ msgstr[2] "" "Serverul Exchange este ocupat, se a??teapt?? re??ncercarea (%d:%02d de minute)" -#: ../src/EWS/common/e-ews-connection.c:1072 +#: ../src/EWS/common/e-ews-connection.c:1070 #, c-format msgid "Exchange server is busy, waiting to retry (%d second)" msgid_plural "Exchange server is busy, waiting to retry (%d seconds)" @@ -541,57 +541,57 @@ msgstr[2] "" "Serverul Exchange este ocupat, se a??teapt?? re??ncercarea (%d de secunde)" -#: ../src/EWS/common/e-ews-connection.c:3215 +#: ../src/EWS/common/e-ews-connection.c:3214 #, c-format msgid "Failed to parse autodiscover response XML" msgstr "E??ec la parsarea r??spunsului XML autodiscover" -#: ../src/EWS/common/e-ews-connection.c:3222 +#: ../src/EWS/common/e-ews-connection.c:3221 #, c-format msgid "Failed to find <Autodiscover> element" msgstr "E??ec la g??sirea elementului <Autodiscover>" -#: ../src/EWS/common/e-ews-connection.c:3233 +#: ../src/EWS/common/e-ews-connection.c:3232 #, c-format msgid "Failed to find <Response> element" msgstr "E??ec la g??sirea elementului <Response>" -#: ../src/EWS/common/e-ews-connection.c:3244 +#: ../src/EWS/common/e-ews-connection.c:3243 #, c-format msgid "Failed to find <Account> element" msgstr "E??ec la g??sirea elementului <Account>" -#: ../src/EWS/common/e-ews-connection.c:3290 +#: ../src/EWS/common/e-ews-connection.c:3289 #, c-format msgid "Failed to find <ASUrl> in autodiscover response" msgstr "E??ec la g??sirea <ASUrl> ??n r??spunsul autodiscover" -#: ../src/EWS/common/e-ews-connection.c:3476 +#: ../src/EWS/common/e-ews-connection.c:3475 msgid "URL cannot be NULL" msgstr "URL nu poate fi NULL" -#: ../src/EWS/common/e-ews-connection.c:3484 +#: ../src/EWS/common/e-ews-connection.c:3483 #, c-format msgid "URL ???%s??? is not valid" msgstr "URL-ul ???%s??? nu este valid" -#: ../src/EWS/common/e-ews-connection.c:3781 +#: ../src/EWS/common/e-ews-connection.c:3780 msgid "Email address is missing a domain part" msgstr "Adresei de email ??i lipse??te por??iunea cu domeniul" -#: ../src/EWS/common/e-ews-connection.c:4090 +#: ../src/EWS/common/e-ews-connection.c:4089 msgid "Failed to parse oab XML" msgstr "E??ec la parsarea oab XML" -#: ../src/EWS/common/e-ews-connection.c:4098 +#: ../src/EWS/common/e-ews-connection.c:4097 msgid "Failed to find <OAB> element\n" msgstr "E??ec la g??sirea elementului <OAB>\n" -#: ../src/EWS/common/e-ews-connection.c:5387 +#: ../src/EWS/common/e-ews-connection.c:5386 msgid "No items found" msgstr "Niciun element g??sit" -#: ../src/EWS/common/e-ews-connection.c:11838 +#: ../src/EWS/common/e-ews-connection.c:11851 msgid "Requires at least Microsoft Exchange 2007 SP1 server" msgstr "Necesit?? cel pu??in un server Microsoft Exchange 2007 SP1" @@ -1380,18 +1380,36 @@ msgid "Retrieving ???Delegates??? settings" msgstr "Se preiau configur??rile ???Delega??ilor???" -#: ../src/EWS/evolution/e-mail-config-ews-folder-sizes-page.c:171 -#: ../src/EWS/evolution/e-mail-config-ews-folder-sizes-page.c:233 +#: ../src/EWS/evolution/e-mail-config-ews-folder-sizes-page.c:217 +#: ../src/EWS/evolution/e-mail-config-ews-folder-sizes-page.c:331 msgid "EWS Settings" msgstr "Configur??ri EWS" -#: ../src/EWS/evolution/e-mail-config-ews-folder-sizes-page.c:178 +#: ../src/EWS/evolution/e-mail-config-ews-folder-sizes-page.c:224 +msgid "Folder _Sizes" +msgstr "Dimensiunea do_sarelor" + +#: ../src/EWS/evolution/e-mail-config-ews-folder-sizes-page.c:235 msgid "View the size of all Exchange folders" msgstr "Vizualizeaz?? dimensiunea tuturor dosarelor Exchange" -#: ../src/EWS/evolution/e-mail-config-ews-folder-sizes-page.c:182 -msgid "Folder _Sizes" -msgstr "Dimensiunea do_sarelor" +#: ../src/EWS/evolution/e-mail-config-ews-folder-sizes-page.c:246 +msgid "_Reset Synchronization Tags" +msgstr "_Restabile??te etichetele de sincronizare" + +#: ../src/EWS/evolution/e-mail-config-ews-folder-sizes-page.c:257 +msgid "" +"Folders can sometimes get out of synchronization, for example after a long " +"time not being connected to the server. By resetting the synchronization " +"tags the folders are updated completely. This does not cause download of any " +"already locally stored messages. The change will take effect the next time " +"the folders are refreshed." +msgstr "" +"Dosarele pot ajunge c??teodat?? s?? fie nesincronizate, de exemplu dup?? un timp " +"??ndelungat de neconectare la server. Restabilind etichetele de sincronizare, " +"dosarele vor fi actualizate complet. Aceasta u cauzeaz?? desc??rcarea oric??ror " +"mesaje stocate deja local. Acest?? modificare va avea efect urm??toarea dat?? " +"c??nd dosarele sunt re??mprosp??tate." #: ../src/EWS/evolution/e-mail-config-ews-gal.c:204 msgid "Locating offline address books" @@ -1567,12 +1585,12 @@ msgid "Data source ???%s??? does not represent an Exchange Web Services folder" msgstr "Sursa de date ???%s??? nu reprezint?? un dosar de Servicii Web Exchange" -#: ../src/Microsoft365/addressbook/e-book-backend-m365.c:1426 +#: ../src/Microsoft365/addressbook/e-book-backend-m365.c:1427 #: ../src/Microsoft365/calendar/e-cal-backend-m365.c:2941 msgid "Folder ID is not set" msgstr "ID-ul dosarului nu este stabilit" -#: ../src/Microsoft365/addressbook/e-book-backend-m365.c:1667 +#: ../src/Microsoft365/addressbook/e-book-backend-m365.c:1668 msgid "Cannot save contact list into a Microsoft 365 address book" msgstr "Nu se poate salva lista de contacte ??ntr-o agend?? Microsoft 365" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.42.3/src/EWS/common/e-ews-connection.c new/evolution-ews-3.42.4/src/EWS/common/e-ews-connection.c --- old/evolution-ews-3.42.3/src/EWS/common/e-ews-connection.c 2022-01-07 11:49:13.000000000 +0100 +++ new/evolution-ews-3.42.4/src/EWS/common/e-ews-connection.c 2022-02-11 11:14:03.000000000 +0100 @@ -31,6 +31,7 @@ #define d(x) x #define EWS_RETRY_IO_ERROR_SECONDS 3 +#define EWS_RETRY_AUTH_ERROR_SECONDS 0.1 /* A chunk size limit when moving items in chunks. */ #define EWS_MOVE_ITEMS_CHUNK_SIZE 500 @@ -97,6 +98,9 @@ /* Set to TRUE when this connection had been disconnected and cannot be used anymore */ gboolean disconnected_flag; + /* Do that before a request is sent, rather than on request end, to avoid deadlock in libsoup */ + gboolean clear_cached_credentials; + gboolean ssl_info_set; gchar *ssl_certificate_pem; GTlsCertificateFlags ssl_certificate_errors; @@ -726,6 +730,17 @@ ews_response_cb (cnc->priv->soup_session, msg, node); } else { e_ews_debug_dump_raw_soup_request (msg); + + if (cnc->priv->clear_cached_credentials) { + SoupSessionFeature *feature; + + cnc->priv->clear_cached_credentials = FALSE; + + feature = soup_session_get_feature (cnc->priv->soup_session, SOUP_TYPE_AUTH_MANAGER); + if (feature) + soup_auth_manager_clear_cached_credentials (SOUP_AUTH_MANAGER (feature)); + } + soup_session_queue_message (cnc->priv->soup_session, msg, ews_response_cb, node); } } else { @@ -934,12 +949,7 @@ persistent_auth = soup_message_headers_get_one (msg->response_headers, "Persistent-Auth"); if (persistent_auth && g_ascii_strcasecmp (persistent_auth, "false") == 0) { - SoupSessionFeature *feature; - - feature = soup_session_get_feature (session, SOUP_TYPE_AUTH_MANAGER); - if (feature) { - soup_auth_manager_clear_cached_credentials (SOUP_AUTH_MANAGER (feature)); - } + enode->cnc->priv->clear_cached_credentials = TRUE; } if (g_cancellable_is_cancelled (enode->cancellable)) @@ -955,6 +965,14 @@ "%s", msg->reason_phrase); goto exit; } else if (msg->status_code == SOUP_STATUS_UNAUTHORIZED) { + /* This can happen when the server terminated the connection before the request started */ + if (!enode->retrying_after_network_error && + !soup_message_headers_get_one (msg->request_headers, "Authorization")) { + wait_ms = EWS_RETRY_AUTH_ERROR_SECONDS * 1000; + enode->retrying_after_network_error = TRUE; + goto retrylbl; + } + if (msg->response_headers) { const gchar *diagnostics; @@ -1015,11 +1033,12 @@ * Logging framework also */ log_level = e_ews_debug_get_log_level (); - if (log_level == 1) { + if (log_level >= 1 && log_level < 4) { /* This will dump only the headers, since we stole the body. * And only if EWS_DEBUG=1, since higher levels will have dumped * it directly from libsoup anyway. */ - e_ews_debug_dump_raw_soup_response (msg); + if (log_level == 1) + e_ews_debug_dump_raw_soup_response (msg); /* And this will dump the body... */ e_soap_response_dump_response (response, stdout); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.42.3/src/EWS/common/e-ews-debug.c new/evolution-ews-3.42.4/src/EWS/common/e-ews-debug.c --- old/evolution-ews-3.42.3/src/EWS/common/e-ews-debug.c 2022-01-07 11:49:13.000000000 +0100 +++ new/evolution-ews-3.42.4/src/EWS/common/e-ews-debug.c 2022-02-11 11:14:03.000000000 +0100 @@ -28,6 +28,19 @@ return level; } +void +e_ews_debug_print (const gchar *format, + ...) +{ + if (e_ews_debug_get_log_level () != 0) { + va_list args; + + va_start (args, format); + e_util_debug_printv ("EWS", format, args); + va_end (args); + } +} + const gchar * e_ews_connection_get_server_version_string (EEwsConnection *cnc) { @@ -79,7 +92,11 @@ const gchar *value, gpointer user_data) { - fprintf (user_data, "%s: %s\n", name, value); + gchar *header = g_strconcat (name, ": ", value, NULL); + + fprintf (user_data, "%s\n", e_ews_debug_redact_headers ('<', header)); + + g_free (header); } static void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.42.3/src/EWS/common/e-ews-debug.h new/evolution-ews-3.42.4/src/EWS/common/e-ews-debug.h --- old/evolution-ews-3.42.3/src/EWS/common/e-ews-debug.h 2022-01-07 11:49:13.000000000 +0100 +++ new/evolution-ews-3.42.4/src/EWS/common/e-ews-debug.h 2022-02-11 11:14:03.000000000 +0100 @@ -13,6 +13,8 @@ G_BEGIN_DECLS gint e_ews_debug_get_log_level (void); +void e_ews_debug_print (const gchar *format, + ...) G_GNUC_PRINTF (1, 2); const gchar * e_ews_connection_get_server_version_string (EEwsConnection *cnc); EEwsServerVersion diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/evolution-ews-3.42.3/src/EWS/common/e-ews-notification.c new/evolution-ews-3.42.4/src/EWS/common/e-ews-notification.c --- old/evolution-ews-3.42.3/src/EWS/common/e-ews-notification.c 2022-01-07 11:49:13.000000000 +0100 +++ new/evolution-ews-3.42.4/src/EWS/common/e-ews-notification.c 2022-02-11 11:14:03.000000000 +0100 @@ -13,6 +13,8 @@ #include "e-ews-notification.h" #include "e-soup-auth-negotiate.h" +#define EWS_NOTIFICATION_CANCEL_KEY "ews-notification-cancel-key" + struct _EEwsNotificationPrivate { GMutex thread_lock; SoupSession *soup_session; @@ -314,7 +316,7 @@ g_clear_object (&settings); if (!msg) { - g_warning ("%s: Failed to create Soup message for URI '%s'", G_STRFUNC, e_ews_connection_get_uri (cnc)); + e_ews_debug_print ("%s: Failed to create Soup message for URI '%s'\n", G_STRFUNC, e_ews_connection_get_uri (cnc)); g_object_unref (cnc); return FALSE; } @@ -359,7 +361,7 @@ return FALSE; } - if (log_level >= 1 && log_level != 2 && log_level < 4) { + if (log_level >= 1 && log_level < 4) { e_ews_debug_dump_raw_soup_request (SOUP_MESSAGE (msg)); } @@ -383,7 +385,7 @@ response = e_soap_response_new_from_xmldoc (doc); - if (log_level >= 1 && log_level != 2 && log_level < 4) { + if (log_level >= 1 && log_level < 4) { e_ews_debug_dump_raw_soup_response (SOUP_MESSAGE (msg)); } g_object_unref (msg); @@ -395,7 +397,7 @@ g_warn_if_fail ((param != NULL && error == NULL) || (param == NULL && error != NULL)); if (error != NULL) { - g_warning (G_STRLOC ": %s\n", error->message); + e_ews_debug_print (G_STRLOC ": %s\n", error->message); g_error_free (error); g_object_unref (response); @@ -408,7 +410,7 @@ const gchar *name = (const gchar *) subparam->name; if (!ews_get_response_status (subparam, &error)) { - g_warning (G_STRLOC ": %s\n", error->message); + e_ews_debug_print (G_STRLOC ": %s\n", error->message); g_error_free (error); g_object_unref (response); @@ -470,7 +472,7 @@ g_clear_object (&settings); if (!msg) { - g_warning ("%s: Failed to create Soup message for URI '%s'", G_STRFUNC, e_ews_connection_get_uri (cnc)); + e_ews_debug_print ("%s: Failed to create Soup message for URI '%s'\n", G_STRFUNC, e_ews_connection_get_uri (cnc)); g_object_unref (cnc); return FALSE; } @@ -512,7 +514,7 @@ g_object_unref (response); if (error != NULL) { - g_warning (G_STRLOC ": %s\n", error->message); + e_ews_debug_print (G_STRLOC ": %s\n", error->message); g_error_free (error); return FALSE; } @@ -623,7 +625,7 @@ g_warn_if_fail ((param != NULL && error == NULL) || (param == NULL && error != NULL)); if (error != NULL) { - g_warning (G_STRLOC ": %s\n", error->message); + e_ews_debug_print (G_STRLOC ": %s\n", error->message); g_error_free (error); return FALSE; } @@ -634,7 +636,7 @@ const gchar *name = (const gchar *) subparam->name; if (!ews_get_response_status (subparam, &error)) { - g_warning (G_STRLOC ": %s\n", error->message); + e_ews_debug_print (G_STRLOC ": %s\n", error->message); g_error_free (error); g_slist_free_full (events, (GDestroyNotify) e_ews_notification_event_free); return FALSE; @@ -743,12 +745,14 @@ if (response == NULL) break; - if (log_level >= 1 && log_level != 2 && log_level < 4) { + if (log_level >= 1 && log_level < 4) { e_ews_debug_dump_raw_soup_response (msg); e_soap_response_dump_response (response, stdout); } if (!ews_notification_fire_events_from_response (notification, response)) { + /* Mark the cancellation as not being fatal */ + g_object_set_data (G_OBJECT (msg), EWS_NOTIFICATION_CANCEL_KEY, GINT_TO_POINTER (1)); ews_notification_schedule_abort (notification->priv->soup_session); g_object_unref (response); @@ -861,7 +865,7 @@ g_clear_object (&settings); if (!msg) { - g_warning ("%s: Failed to create Soup message for URI '%s'", G_STRFUNC, e_ews_connection_get_uri (cnc)); + e_ews_debug_print ("%s: Failed to create Soup message for URI '%s'\n", G_STRFUNC, e_ews_connection_get_uri (cnc)); g_object_unref (cnc); return FALSE; } @@ -902,7 +906,8 @@ g_cancellable_disconnect (cancellable, cancel_handler_id); ret = SOUP_STATUS_IS_SUCCESSFUL (status_code); - *out_fatal_error = SOUP_STATUS_IS_CLIENT_ERROR (status_code) || SOUP_STATUS_IS_SERVER_ERROR (status_code) || status_code == SOUP_STATUS_CANCELLED; + *out_fatal_error = SOUP_STATUS_IS_CLIENT_ERROR (status_code) || SOUP_STATUS_IS_SERVER_ERROR (status_code) || + (status_code == SOUP_STATUS_CANCELLED && !g_object_get_data (G_OBJECT (msg), EWS_NOTIFICATION_CANCEL_KEY)); g_signal_handler_disconnect (msg, handler_id); g_object_unref (msg); @@ -953,18 +958,21 @@ ret = e_ews_notification_get_events_sync (td->notification, subscription_id, &fatal_error, td->cancellable); if (!ret && !g_cancellable_is_cancelled (td->cancellable)) { - g_debug ("%s: Failed to get notification events (SubscriptionId: '%s')", G_STRFUNC, subscription_id); + e_ews_debug_print ("%s: Failed to get notification events (SubscriptionId: '%s')\n", G_STRFUNC, subscription_id); e_ews_notification_unsubscribe_folder_sync (td->notification, subscription_id); g_free (subscription_id); subscription_id = NULL; if (!fatal_error) { + /* This will cause reconnect */ + soup_session_abort (td->notification->priv->soup_session); + ret = e_ews_notification_subscribe_folder_sync (td->notification, td->folders, &subscription_id, td->cancellable); if (ret) { - g_debug ("%s: Re-subscribed to get notifications events (SubscriptionId: '%s')", G_STRFUNC, subscription_id); + e_ews_debug_print ("%s: Re-subscribed to get notifications events (SubscriptionId: '%s')\n", G_STRFUNC, subscription_id); } else { - g_debug ("%s: Failed to re-subscribed to get notifications events", G_STRFUNC); + e_ews_debug_print ("%s: Failed to re-subscribed to get notifications events\n", G_STRFUNC); } } }