diff options
Diffstat (limited to 'plugins/calendar-http')
-rw-r--r-- | plugins/calendar-http/ChangeLog | 8 | ||||
-rw-r--r-- | plugins/calendar-http/calendar-http.c | 24 |
2 files changed, 27 insertions, 5 deletions
diff --git a/plugins/calendar-http/ChangeLog b/plugins/calendar-http/ChangeLog index b65104d99b..7f9c5faa79 100644 --- a/plugins/calendar-http/ChangeLog +++ b/plugins/calendar-http/ChangeLog @@ -1,3 +1,10 @@ +2004-11-12 Diego Sevilla Ruiz <dsevilla@ditec.um.es> + + * calendar-http.c (e_calendar_http_check): Accept protocol-less + URIs. Fixes #68264. + (e_calendar_http_check): Fixed a memory leak. + (e_calendar_http_refresh): Another mem. leak fix. + 2004-11-09 Rodney Dawes <dobey@novell.com> * Makefile.am: Add EXTRA_DIST variable for the eplug.in file @@ -9,4 +16,3 @@ 2004-11-04 David Trowbridge <David.Trowbridge@Colorado.edu> * Initial import of webcal properties plugin. - diff --git a/plugins/calendar-http/calendar-http.c b/plugins/calendar-http/calendar-http.c index 6b076b02f3..cbc13193f3 100644 --- a/plugins/calendar-http/calendar-http.c +++ b/plugins/calendar-http/calendar-http.c @@ -1,5 +1,5 @@ /* - * + * * * Copyright (C) 2004 David Trowbridge * @@ -218,6 +218,7 @@ e_calendar_http_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; EUri *uri; + char* uri_text; static GtkWidget *hidden = NULL; if (!hidden) @@ -226,13 +227,16 @@ e_calendar_http_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) if (data->old) gtk_widget_destroy (label); - uri = e_uri_new (e_source_get_uri (t->source)); + uri_text = e_source_get_uri (t->source); + uri = e_uri_new (uri_text); if ((strcmp (uri->protocol, "http") && strcmp (uri->protocol, "webcal"))) { e_uri_free (uri); + g_free (uri_text); return hidden; } e_uri_free (uri); + g_free (uri_text); parent = data->parent; @@ -285,12 +289,24 @@ e_calendar_http_check (EPlugin *epl, EConfigHookPageCheckData *data) EUri *uri; gboolean ok = FALSE; ESourceGroup *group = e_source_peek_group (t->source); + char *uri_text; if (strcmp (e_source_group_peek_base_uri (group), "webcal")) return TRUE; - uri = e_uri_new (e_source_get_uri (t->source)); - ok = ((!strcmp (uri->protocol, "webcal")) || (!strcmp (uri->protocol, "http"))); + uri_text = e_source_get_uri (t->source); + if (!strncmp (uri_text, "file:", 5)) + { + g_free (uri_text); + return FALSE; + } + + uri = e_uri_new (uri_text); + ok = ((!strcmp (uri->protocol, "webcal")) || + (!strcmp (uri->protocol, "http")) || + (!strcmp (uri->protocol, "file")) ); e_uri_free (uri); + g_free (uri_text); + return ok; } |