diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/imap-features/ChangeLog | 8 | ||||
-rw-r--r-- | plugins/imap-features/imap-headers.c | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/plugins/imap-features/ChangeLog b/plugins/imap-features/ChangeLog index d15fe4e3ec..691a47b1be 100644 --- a/plugins/imap-features/ChangeLog +++ b/plugins/imap-features/ChangeLog @@ -1,3 +1,11 @@ +2007-01-30 Sankar P <psankar@novell.com> + + * imap-headers.c: (imap_headers_commit): + Fixes a memory leak and a scenario where, + some IMAP servers doesnt return headers if + the string contains more than one consecutive + embedded spaces in the HEADER. + 2007-01-27 Nickolay V. Shmyrev <nshmyrev@yandex.ru> * imap-headers.c: (org_gnome_imap_headers): diff --git a/plugins/imap-features/imap-headers.c b/plugins/imap-features/imap-headers.c index ff29c82ebe..f64ad6235a 100644 --- a/plugins/imap-features/imap-headers.c +++ b/plugins/imap-features/imap-headers.c @@ -78,6 +78,7 @@ imap_headers_commit (GtkWidget *button, EConfigHookItemFactoryData *data) GtkTreeModel *model; GtkTreeIter iter; GString *str; + gchar *header = NULL; str = g_string_new(""); @@ -87,16 +88,19 @@ imap_headers_commit (GtkWidget *button, EConfigHookItemFactoryData *data) model = gtk_tree_view_get_model (custom_headers_tree); if (gtk_tree_model_get_iter_first(model, &iter)) { - gchar *header; do { + header = NULL; gtk_tree_model_get (model, &iter, 0, &header, -1); str = g_string_append (str, g_strstrip(header)); str = g_string_append (str, " "); + g_free (header); } while (gtk_tree_model_iter_next(model, &iter)); } - camel_url_set_param (url, "imap_custom_headers", str->str); + header = g_strstrip(g_strdup(str->str)); + camel_url_set_param (url, "imap_custom_headers", header); + g_free (header); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(all_headers))) { camel_url_set_param (url, "all_headers", "1"); |