[evolution-data-server] Do not compile code which might be unnecessary with GLib 2.35.9+



commit b4c7b6eb3e725c9a43d52718168e1767c37194a5
Author: Milan Crha <mcrha redhat com>
Date:   Thu Feb 21 16:56:22 2013 +0100

    Do not compile code which might be unnecessary with GLib 2.35.9+
    
    This is the only relevant part of the code which should be "removed"
    from the previous commit due to changes in GNetworkManager's bug:
    https://bugzilla.gnome.org/show_bug.cgi?id=694181
    
    Once eds will depends on such GLib the conditioned code can be
    completely removed.

 libebackend/e-backend.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/libebackend/e-backend.c b/libebackend/e-backend.c
index c22fc29..2181098 100644
--- a/libebackend/e-backend.c
+++ b/libebackend/e-backend.c
@@ -155,6 +155,12 @@ backend_update_online_state (EBackend *backend)
        GSocketConnectable *connectable;
        GCancellable *cancellable;
 
+       /* This should be eventually replaced with default implementation
+          of EBackend::get_destination_address() doing basically the same
+          what currently does the backend silently on construction, thus
+          it'll get also current values from the ESource, not stale from
+          construct time.
+       */
        connectable = e_backend_ref_connectable (backend);
 
        g_mutex_lock (&backend->priv->network_monitor_cancellable_lock);
@@ -168,6 +174,7 @@ backend_update_online_state (EBackend *backend)
                cancellable = NULL;
        }
 
+       #if !GLIB_CHECK_VERSION (2, 35, 9)
        if (connectable && G_IS_NETWORK_ADDRESS (connectable)) {
                GNetworkAddress *network_address = G_NETWORK_ADDRESS (connectable);
 
@@ -175,11 +182,8 @@ backend_update_online_state (EBackend *backend)
                   reaches its destination it caches the value and doesn't retry after
                   network changes.
 
-                  This should be eventually replaced with default implementation
-                  of EBackend::get_destination_address() doing basically the same
-                  what currently does the backend silently on construction, thus
-                  it'll get also current values from the ESource, not stale from
-                  construct time.
+                  This might be fixed since GLib 2.35.9, see:
+                  https://bugzilla.gnome.org/show_bug.cgi?id=694181
                */
                connectable = g_network_address_new (
                        g_network_address_get_hostname (network_address),
@@ -187,6 +191,7 @@ backend_update_online_state (EBackend *backend)
 
                g_object_unref (network_address);
        }
+       #endif
 
        if (!connectable) {
                gchar *host = NULL;


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