diff options
author | Bastien Nocera <hadess@hadess.net> | 2021-01-12 12:07:53 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-01-12 15:11:55 +0100 |
commit | a4722d9c3bac334b00166c8fcb3deaf8338ec77b (patch) | |
tree | e3dd76571ddb46caa950e2181d0186e904138de8 | |
parent | 104ed26b3093d50d6ca4ef33d3fe43d6098d997b (diff) | |
download | libgweather-a4722d9c3bac334b00166c8fcb3deaf8338ec77b.tar.gz |
gweather: Change the user-agent when the app ID changes
As uncommon as that might be...
-rw-r--r-- | libgweather/gweather-weather.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c index 5b3db96..348ec6b 100644 --- a/libgweather/gweather-weather.c +++ b/libgweather/gweather-weather.c @@ -2205,6 +2205,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 |