aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-weather.c
diff options
context:
space:
mode:
Diffstat (limited to 'my-evolution/e-summary-weather.c')
-rw-r--r--my-evolution/e-summary-weather.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c
index 070e5ed618..0b86471077 100644
--- a/my-evolution/e-summary-weather.c
+++ b/my-evolution/e-summary-weather.c
@@ -364,7 +364,7 @@ open_callback (GnomeVFSAsyncHandle *handle,
(GnomeVFSAsyncReadCallback) read_callback, w);
}
-static gboolean
+gboolean
e_summary_weather_update (ESummary *summary)
{
GList *w;
@@ -379,6 +379,19 @@ e_summary_weather_update (ESummary *summary)
char *uri;
Weather *weather = w->data;
+ if (weather->handle != NULL) {
+ gnome_vfs_async_cancel (weather->handle);
+ weather->handle = NULL;
+ }
+ if (weather->string) {
+ g_string_free (weather->string, TRUE);
+ weather->string = NULL;
+ }
+ if (weather->buffer) {
+ g_free (weather->buffer);
+ weather->buffer = NULL;
+ }
+
uri = g_strdup_printf ("http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=%s", weather->location);
gnome_vfs_async_open (&weather->handle, uri, GNOME_VFS_OPEN_READ,