geolocation, and contribute to coverage (<https://codeberg.org/beacondb/beacondb/issues/5#issuecomment-2504311>) - Add 0001-ichnaea-include-ssid.patch: * MLS/Ichnaea: Include SSID for geolocate and submission requests - Add 0002-ichnaea-replace-user-agent.patch: * MLS/Ichnaea: Replace rather than append User-Agent - Add 0003-user-agent-os-info.patch: * Set User-Agent on Soup Session Construction * Add OS Info to user-agent OBS-URL: https://build.opensuse.org/package/show/Application:Geo/geoclue2?expand=0&rev=107
51 lines
2.5 KiB
Diff
51 lines
2.5 KiB
Diff
From: Chris Talbot <chris@talbothome.com>
|
|
Date: Sun, 1 Dec 2024 21:33:38 -0700
|
|
Subject: Mozilla: Include SSID for geolocate and submission requests
|
|
|
|
---
|
|
src/gclue-mozilla.c | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
diff --git a/src/gclue-mozilla.c b/src/gclue-mozilla.c
|
|
index 9e8feb1..abb2280 100644
|
|
--- a/src/gclue-mozilla.c
|
|
+++ b/src/gclue-mozilla.c
|
|
@@ -257,6 +257,7 @@ gclue_mozilla_create_query (GClueMozilla *mozilla,
|
|
for (iter = bss_list; iter != NULL; iter = iter->next) {
|
|
WPABSS *bss = WPA_BSS (iter->data);
|
|
char mac[BSSID_STR_LEN + 1] = { 0 };
|
|
+ char ssid[MAX_SSID_LEN + 1] = { 0 };
|
|
gint16 strength_dbm;
|
|
guint age_ms;
|
|
|
|
@@ -269,6 +270,10 @@ gclue_mozilla_create_query (GClueMozilla *mozilla,
|
|
get_bssid_from_bss (bss, mac);
|
|
json_builder_add_string_value (builder, mac);
|
|
|
|
+ json_builder_set_member_name (builder, "ssid");
|
|
+ get_ssid_from_bss (bss, ssid);
|
|
+ json_builder_add_string_value (builder, ssid);
|
|
+
|
|
json_builder_set_member_name (builder, "signalStrength");
|
|
strength_dbm = wpa_bss_get_signal (bss);
|
|
json_builder_add_int_value (builder, strength_dbm);
|
|
@@ -486,6 +491,7 @@ gclue_mozilla_create_submit_query (GClueMozilla *mozilla,
|
|
for (iter = bss_list; iter != NULL; iter = iter->next) {
|
|
WPABSS *bss = WPA_BSS (iter->data);
|
|
char mac[BSSID_STR_LEN + 1] = { 0 };
|
|
+ char ssid[MAX_SSID_LEN + 1] = { 0 };
|
|
gint16 strength_dbm;
|
|
guint16 frequency;
|
|
guint age_ms;
|
|
@@ -499,6 +505,10 @@ gclue_mozilla_create_submit_query (GClueMozilla *mozilla,
|
|
get_bssid_from_bss (bss, mac);
|
|
json_builder_add_string_value (builder, mac);
|
|
|
|
+ json_builder_set_member_name (builder, "ssid");
|
|
+ get_ssid_from_bss (bss, ssid);
|
|
+ json_builder_add_string_value (builder, ssid);
|
|
+
|
|
json_builder_set_member_name (builder, "signalStrength");
|
|
strength_dbm = wpa_bss_get_signal (bss);
|
|
json_builder_add_int_value (builder, strength_dbm);
|