~deejay1/geoclue/master

« back to all changes in this revision

Viewing changes to src/gclue-web-source.c

  • Committer: Will Thompson
  • Date: 2018-11-06 16:57:54 UTC
  • Revision ID: git-v1:2d4f3d5648b248cc6ddfb505a70320edfd43213a
web-source: drop GLib < 2.44 fallback path

Since 5ae456312c941ba2951563de0aef64ca5c25b0e6, GLib 2.44 has been a
hard dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
        GNetworkMonitor *monitor = g_network_monitor_get_default ();
107
107
        gboolean available;
108
108
 
109
 
#if GLIB_CHECK_VERSION(2, 44, 0)
110
109
        available = (g_network_monitor_get_connectivity (monitor) ==
111
110
                     G_NETWORK_CONNECTIVITY_FULL);
112
 
#else
113
 
        GSocketConnectable *connectable;
114
 
 
115
 
        connectable = g_network_address_new ("location.services.mozilla.com",
116
 
                                             80);
117
 
        available = g_network_monitor_can_reach (monitor,
118
 
                                                 connectable,
119
 
                                                 NULL,
120
 
                                                 NULL);
121
 
        g_object_unref (connectable);
122
 
#endif
123
111
 
124
112
        return available;
125
113
}