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




commit a4722d9c3bac334b00166c8fcb3deaf8338ec77b
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]