[evolution-ews] Adapt to CamelDataCache API changes.



commit bbeb49b45f8b4be60f6e0e041c49f814cedd349a
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Nov 2 09:45:42 2013 -0400

    Adapt to CamelDataCache API changes.

 src/camel/camel-ews-folder.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index 03b1adc..7912eca 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -146,14 +146,19 @@ ews_data_cache_get (CamelDataCache *cdc,
                     GError **error)
 {
        GChecksum *sha = g_checksum_new (G_CHECKSUM_SHA256);
-       CamelStream *ret;
+       CamelStream *stream = NULL;
+       GIOStream *base_stream;
 
        g_checksum_update (sha, (guchar *) key, strlen (key));
-       ret = camel_data_cache_get (
+       base_stream = camel_data_cache_get (
                cdc, path, g_checksum_get_string (sha), error);
+       if (base_stream != NULL) {
+               stream = camel_stream_new (base_stream);
+               g_object_unref (base_stream);
+       }
        g_checksum_free (sha);
 
-       return ret;
+       return stream;
 }
 
 static gchar *


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