From: Milan Crha Date: Thu, 21 Feb 2013 15:56:22 +0000 (+0100) Subject: Do not compile code which might be unnecessary with GLib 2.35.9+ X-Git-Tag: upstream/3.7.91~109 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4c7b6eb3e725c9a43d52718168e1767c37194a5;p=platform%2Fupstream%2Fevolution-data-server.git 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. --- 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;