[libgweather/wip/hadess/app-id: 8/11] gweather: Change the user-agent when the app ID changes




commit 8e22076d7cc6eb6be5d85ad9da9d1d86fcee31c7
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 12 12:07:53 2021 +0100

    gweather: Change the user-agent when the app ID changes
    
    As uncommon as that might be...

 libgweather/gweather-weather.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
index 5b3db965..348ec6b9 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]