Stuff to try to find the memory corruption

svn path=/trunk/; revision=13769
This commit is contained in:
Iain Holmes
2001-10-18 20:17:52 +00:00
parent 3755be0a4c
commit f19b05e456
6 changed files with 48 additions and 3 deletions

View File

@ -1,3 +1,12 @@
2001-10-18 Iain Holmes <iain@ximian.com>
* e-summary.c (e_summary_reload): Only reload the views, don't do an
entire reconfigure.
* e-summary-rdf.c (e_summary_rdf_update): Free stuff and update.
* e-summary-weather.c (e_summary_weather_update): Ditto
2001-10-16 Iain Holmes <iain@ximian.com>
* e-summary.c (e_summary_new): Don't call a draw.

View File

@ -428,7 +428,7 @@ open_callback (GnomeVFSAsyncHandle *handle,
(GnomeVFSAsyncReadCallback) read_callback, r);
}
static gboolean
gboolean
e_summary_rdf_update (ESummary *summary)
{
GList *r;
@ -441,6 +441,21 @@ e_summary_rdf_update (ESummary *summary)
for (r = summary->rdf->rdfs; r; r = r->next) {
RDF *rdf = r->data;
if (rdf->handle) {
gnome_vfs_async_cancel (rdf->handle);
rdf->handle = NULL;
}
if (rdf->buffer) {
g_free (rdf->buffer);
rdf->buffer = NULL;
}
if (rdf->string) {
g_string_free (rdf->string, TRUE);
rdf->string = NULL;
}
gnome_vfs_async_open (&rdf->handle, rdf->uri,
GNOME_VFS_OPEN_READ,
(GnomeVFSAsyncOpenCallback) open_callback, rdf);

View File

@ -32,5 +32,6 @@ char *e_summary_rdf_get_html (ESummary *summary);
void e_summary_rdf_init (ESummary *summary);
void e_summary_rdf_reconfigure (ESummary *summary);
void e_summary_rdf_free (ESummary *summary);
gboolean e_summary_rdf_update (ESummary *summary);
#endif

View File

@ -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,

View File

@ -148,5 +148,6 @@ void e_summary_weather_reconfigure (ESummary *summary);
void e_summary_weather_ctree_fill (GtkCTree *tree);
const char *e_summary_weather_code_to_name (const char *code);
void e_summary_weather_free (ESummary *summary);
gboolean e_summary_weather_update (ESummary *summary);
#endif

View File

@ -751,7 +751,13 @@ e_summary_reload (BonoboUIComponent *component,
{
ESummary *summary = userdata;
e_summary_reconfigure (summary);
if (summary->rdf != NULL) {
e_summary_rdf_update (summary);
}
if (summary->weather != NULL) {
e_summary_weather_update (summary);
}
}
int