[gmime] Fixed some bugs in GMimeHeaderList
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Fixed some bugs in GMimeHeaderList
- Date: Fri, 23 Nov 2012 20:49:46 +0000 (UTC)
commit 6e22c7f4bb73694f5aee0a7b492648ef71aae60a
Author: Jeffrey Stedfast <fejj gnome org>
Date: Fri Nov 23 15:49:07 2012 -0500
Fixed some bugs in GMimeHeaderList
2012-11-23 Jeffrey Stedfast <jeff xamarin com>
* gmime/gmime-header.c (g_mime_header_list_prepend): Prepend the
header to the list, don't *append* it. Oops.
(g_mime_header_list_clear): Don't forget to reset the linked list
so that it doesn't contained free'd nodes.
ChangeLog | 7 +++++++
gmime/gmime-header.c | 3 ++-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 30b78c6..7715048 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-11-23 Jeffrey Stedfast <jeff xamarin com>
+
+ * gmime/gmime-header.c (g_mime_header_list_prepend): Prepend the
+ header to the list, don't *append* it. Oops.
+ (g_mime_header_list_clear): Don't forget to reset the linked list
+ so that it doesn't contained free'd nodes.
+
2012-11-02 Jeffrey Stedfast <fejj gnome org>
* README: Bumped version
diff --git a/gmime/gmime-header.c b/gmime/gmime-header.c
index 646507f..96c2f51 100644
--- a/gmime/gmime-header.c
+++ b/gmime/gmime-header.c
@@ -598,6 +598,7 @@ g_mime_header_list_clear (GMimeHeaderList *headers)
}
g_hash_table_remove_all (headers->hash);
+ list_init (&headers->list);
g_mime_header_list_set_stream (headers, NULL);
}
@@ -646,7 +647,7 @@ g_mime_header_list_prepend (GMimeHeaderList *headers, const char *name, const ch
g_return_if_fail (name != NULL);
header = g_mime_header_new (name, value, -1);
- list_append (&headers->list, (ListNode *) header);
+ list_prepend (&headers->list, (ListNode *) header);
g_hash_table_replace (headers->hash, header->name, header);
g_mime_header_list_set_stream (headers, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]