summaryrefslogtreecommitdiff
path: root/src/gclue-wifi.c
diff options
context:
space:
mode:
authorTeemu Ikonen <tpikonen@mailbox.org>2022-10-09 22:18:46 +0300
committerTeemu Ikonen <tpikonen@mailbox.org>2022-10-31 08:06:42 +0000
commitc8a316fd85a0a7f9b91f5953627ba7c5b9a53d04 (patch)
tree46cc48bf0d1f918b37aff22ea226950f326f629f /src/gclue-wifi.c
parenta0e7368f8d518785c7b8e18e33c0d86515a3f870 (diff)
downloadgeoclue-c8a316fd85a0a7f9b91f5953627ba7c5b9a53d04.tar.gz
web-source: Check connectivity with g_network_monitor_can_reach
Add instance variables locate_url and submit_url and setter functions for them. Set these URLs in the initializers of child classes GClue3G and GClueWifi. Do separate connectivity checks for submit_url and locate_url using g_network_monitor_can_reach_async(). This allows location and submission servers running on localhost to be reached when there is no outside connectivity. Add a GCancellable priv->cancellable and use it in g_network_monitor_can_reach_async() calls.
Diffstat (limited to 'src/gclue-wifi.c')
-rw-r--r--src/gclue-wifi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gclue-wifi.c b/src/gclue-wifi.c
index 97ab12c..cd20b0d 100644
--- a/src/gclue-wifi.c
+++ b/src/gclue-wifi.c
@@ -970,10 +970,17 @@ on_interface_removed (WPASupplicant *supplicant,
static void
gclue_wifi_init (GClueWifi *wifi)
{
+ GClueWebSource *web_source = GCLUE_WEB_SOURCE (wifi);
+
wifi->priv = gclue_wifi_get_instance_private (wifi);
wifi->priv->intf_cancellable = g_cancellable_new ();
wifi->priv->mozilla = gclue_mozilla_get_singleton ();
+ gclue_web_source_set_locate_url (web_source,
+ gclue_mozilla_get_locate_url (wifi->priv->mozilla));
+ gclue_web_source_set_submit_url (web_source,
+ gclue_mozilla_get_submit_url (wifi->priv->mozilla));
+
wifi->priv->bss_proxies = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,