libgweather r292 - in trunk: . libgweather



Author: matthiasc
Date: Fri Jul 25 22:28:28 2008
New Revision: 292
URL: http://svn.gnome.org/viewvc/libgweather?rev=292&view=rev

Log:
2008-07-25  Matthias Clasen  <mclasen redhat com>

        * libgweather/weather*.c: Only increase pending_requests if
        we actually queued request, else we may never call the finish_cb.
        Fixes weather information not showing up in the clock applet.



Modified:
   trunk/ChangeLog
   trunk/libgweather/weather-bom.c
   trunk/libgweather/weather-iwin.c
   trunk/libgweather/weather-met.c
   trunk/libgweather/weather-metar.c
   trunk/libgweather/weather-wx.c
   trunk/libgweather/weather.c

Modified: trunk/libgweather/weather-bom.c
==============================================================================
--- trunk/libgweather/weather-bom.c	(original)
+++ trunk/libgweather/weather-bom.c	Fri Jul 25 22:28:28 2008
@@ -71,4 +71,6 @@
     msg = soup_message_new ("GET", url);
     soup_session_queue_message (info->session, msg, bom_finish, info);
     g_free (url);
+
+    info->requests_pending++;
 }

Modified: trunk/libgweather/weather-iwin.c
==============================================================================
--- trunk/libgweather/weather-iwin.c	(original)
+++ trunk/libgweather/weather-iwin.c	Fri Jul 25 22:28:28 2008
@@ -125,8 +125,10 @@
         		   state, zone);
     g_free (zone);
     g_free (state);
-
+    
     msg = soup_message_new ("GET", url);
     g_free (url);
     soup_session_queue_message (info->session, msg, iwin_finish, info);
+
+    info->requests_pending++;
 }

Modified: trunk/libgweather/weather-met.c
==============================================================================
--- trunk/libgweather/weather-met.c	(original)
+++ trunk/libgweather/weather-met.c	Fri Jul 25 22:28:28 2008
@@ -170,4 +170,6 @@
     msg = soup_message_new ("GET", url);
     soup_session_queue_message (info->session, msg, met_finish, info);
     g_free (url);
+   
+    info->requests_pending++;
 }

Modified: trunk/libgweather/weather-metar.c
==============================================================================
--- trunk/libgweather/weather-metar.c	(original)
+++ trunk/libgweather/weather-metar.c	Fri Jul 25 22:28:28 2008
@@ -492,7 +492,7 @@
     gboolean success = FALSE;
 
     g_return_if_fail (info != NULL);
-
+   
     if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) {
         g_warning (_("Failed to get METAR data: %d %s.\n"),
 		   msg->status_code, msg->reason_phrase);
@@ -540,4 +540,6 @@
 	"cccc", loc->code,
 	NULL);
     soup_session_queue_message (info->session, msg, metar_finish, info);
+
+    info->requests_pending++;
 }

Modified: trunk/libgweather/weather-wx.c
==============================================================================
--- trunk/libgweather/weather-wx.c	(original)
+++ trunk/libgweather/weather-wx.c	Fri Jul 25 22:28:28 2008
@@ -93,4 +93,6 @@
     soup_message_set_flags (msg, SOUP_MESSAGE_OVERWRITE_CHUNKS);
     soup_session_queue_message (info->session, msg, wx_finish, info);
     g_free (url);
+
+    info->requests_pending++;
 }

Modified: trunk/libgweather/weather.c
==============================================================================
--- trunk/libgweather/weather.c	(original)
+++ trunk/libgweather/weather.c	Fri Jul 25 22:28:28 2008
@@ -484,13 +484,10 @@
 	info->session = soup_session_async_new ();
 
     metar_start_open (info);
-    info->requests_pending++;
     iwin_start_open (info);
-    info->requests_pending++;
 
     if (prefs->radar) {
         wx_start_open (info);
-	info->requests_pending++;
     }
 
     return info;



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