[evolution-data-server] [WebCal] Does not refresh when it's authenticated



commit d198f287d7050eb55af8523373c0a631256ce3a9
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 1 17:56:20 2016 +0100

    [WebCal] Does not refresh when it's authenticated
    
    Authenticated On The Web calendars didn't assign a refresh timeout
    callback, because the backend's open failed first, then it asked
    for credentials. this installs the refresh timeout callback also
    after successful authentication.

 calendar/backends/http/e-cal-backend-http.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/calendar/backends/http/e-cal-backend-http.c b/calendar/backends/http/e-cal-backend-http.c
index 445ff0c..24c0b83 100644
--- a/calendar/backends/http/e-cal-backend-http.c
+++ b/calendar/backends/http/e-cal-backend-http.c
@@ -1502,7 +1502,13 @@ e_cal_backend_http_authenticate_sync (EBackend *backend,
        }
 
        uri = cal_backend_http_ensure_uri (cbhttp);
-       cal_backend_http_load (cbhttp, uri, out_certificate_pem, out_certificate_errors, cancellable, 
&local_error);
+       if (cal_backend_http_load (cbhttp, uri, out_certificate_pem, out_certificate_errors, cancellable, 
&local_error)) {
+               if (!cbhttp->priv->reload_timeout_id) {
+                       ESource *source = e_backend_get_source (backend);
+
+                       cbhttp->priv->reload_timeout_id = e_source_refresh_add_timeout (source, NULL, 
http_cal_reload_cb, backend, NULL);
+               }
+       }
 
        if (local_error == NULL) {
                result = E_SOURCE_AUTHENTICATION_ACCEPTED;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]