]> Pileus Git - aweather/commitdiff
Fix Win32 threading bug
authorAndy Spencer <andy753421@gmail.com>
Thu, 6 May 2010 05:49:56 +0000 (05:49 +0000)
committerAndy Spencer <andy753421@gmail.com>
Thu, 6 May 2010 05:54:22 +0000 (05:54 +0000)
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.

src/plugins/radar.c

index a4ed00479bc19b5713505f7d310ae7a88d058e50..5680d2f1cace465d4f72da5213be4b29d34612a9 100644 (file)
@@ -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);