summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-01-12 12:07:53 +0100
committerBastien Nocera <hadess@hadess.net>2021-01-12 13:29:59 +0100
commitd19138a8869de2e3f56ba33f967612ebb845757b (patch)
tree84c154d119d15e586ba07dc005818aef1ad48a5b
parent97400eeac44e0b7cb23ad503208d1bef9d7a7b9e (diff)
downloadlibgweather-d19138a8869de2e3f56ba33f967612ebb845757b.tar.gz
gweather: Change the user-agent when the app ID changes
As uncommon as that might be...
-rw-r--r--libgweather/gweather-weather.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
index 853c84a..2d1d493 100644
--- a/libgweather/gweather-weather.c
+++ b/libgweather/gweather-weather.c
@@ -2201,6 +2201,11 @@ gweather_info_set_application_id (GWeatherInfo *info,
g_clear_pointer (&info->application_id, g_free);
info->application_id = g_strdup (application_id);
+
+ if (info->session) {
+ g_clear_object (&info->session);
+ info->session = ref_session (info);
+ }
}
static void