aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSankar P <psankar@novell.com>2007-01-30 19:51:58 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2007-01-30 19:51:58 +0800
commit6bcec8a3457a5a529c5a0278688f3f059e63739b (patch)
tree479d8e7d3d69fdb6f34cbb29550ded7bcdf9a992 /plugins
parent76dbc69ce2718b69ee260262825f6b911e2a0e5f (diff)
downloadgsoc2013-evolution-6bcec8a3457a5a529c5a0278688f3f059e63739b.tar
gsoc2013-evolution-6bcec8a3457a5a529c5a0278688f3f059e63739b.tar.gz
gsoc2013-evolution-6bcec8a3457a5a529c5a0278688f3f059e63739b.tar.bz2
gsoc2013-evolution-6bcec8a3457a5a529c5a0278688f3f059e63739b.tar.lz
gsoc2013-evolution-6bcec8a3457a5a529c5a0278688f3f059e63739b.tar.xz
gsoc2013-evolution-6bcec8a3457a5a529c5a0278688f3f059e63739b.tar.zst
gsoc2013-evolution-6bcec8a3457a5a529c5a0278688f3f059e63739b.zip
Fixes a memory leak and a scenario where, some IMAP servers doesnt return
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. svn path=/trunk/; revision=33167
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imap-features/ChangeLog8
-rw-r--r--plugins/imap-features/imap-headers.c8
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");