From: Andy Spencer Date: Thu, 6 May 2010 05:49:56 +0000 (+0000) Subject: Fix Win32 threading bug X-Git-Tag: v0.4~8 X-Git-Url: http://pileus.org/git/?p=aweather;a=commitdiff_plain;h=458d24250caf754b6ac3718e7e86583bd718a1e1 Fix Win32 threading bug Fix a crash when multiple sites are updated using the same GisHttp (i.e. SoupSession). SoupSessionSync is supposed to be thread-safe, so either this is a bug in libsoup, or something else is going on, but using separate GisHttp objects appears to fix the problem for now. --- diff --git a/src/plugins/radar.c b/src/plugins/radar.c index a4ed004..5680d2f 100644 --- a/src/plugins/radar.c +++ b/src/plugins/radar.c @@ -320,7 +320,8 @@ RadarSite *radar_site_new(city_t *city, GtkWidget *pconfig, RadarSite *site = g_new0(RadarSite, 1); site->viewer = g_object_ref(viewer); site->prefs = g_object_ref(prefs); - site->http = http; + //site->http = http; + site->http = gis_http_new(G_DIR_SEPARATOR_S "nexrad" G_DIR_SEPARATOR_S "level2" G_DIR_SEPARATOR_S); site->city = city; site->pconfig = pconfig; @@ -340,6 +341,7 @@ void radar_site_free(RadarSite *site) gis_viewer_remove(site->viewer, site->marker_ref); if (site->location_id) g_signal_handler_disconnect(site->viewer, site->location_id); + gis_http_free(site->http); g_object_unref(site->viewer); g_object_unref(site->prefs); g_free(site);