[gmime] fixed some silly mistakes



commit b97d8a48e6ed8c075ca40ef4829d9ae17e195f03
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Sat Apr 25 19:51:46 2009 -0400

    fixed some silly mistakes
    
    2009-04-25  Jeffrey Stedfast  <fejj novell com>
    
    	* gmime/gmime-object.c (g_mime_object_set_disposition): Unref the
    	disposition after setting it on the GMimeObject, don't ref it
    	again. Oops.
    
    	* gmime/gmime-message.c (to_list_changed, cc_list_changed):
    	(bcc_list_changed): Fixed callback signatures. Oops.
    
    	* gmime/gmime-events.c: Fixed list traversal. What was I thinking
    	before?
---
 ChangeLog             |   12 ++++++++++++
 gmime/gmime-events.c  |    6 +++---
 gmime/gmime-message.c |   12 ++++++------
 gmime/gmime-object.c  |    2 +-
 4 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 187b926..04ad01a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2009-04-25  Jeffrey Stedfast  <fejj novell com>
 
+	* gmime/gmime-object.c (g_mime_object_set_disposition): Unref the
+	disposition after setting it on the GMimeObject, don't ref it
+	again. Oops.
+
+	* gmime/gmime-message.c (to_list_changed, cc_list_changed):
+	(bcc_list_changed): Fixed callback signatures. Oops.
+
+	* gmime/gmime-events.c: Fixed list traversal. What was I thinking
+	before?
+
+2009-04-25  Jeffrey Stedfast  <fejj novell com>
+
 	* gmime/gmime-parse-utils.h: Marked APIs as internal linkage only.
 
 	* gmime/gmime-common.h: Same.
diff --git a/gmime/gmime-events.c b/gmime/gmime-events.c
index 305079c..fcfbbf4 100644
--- a/gmime/gmime-events.c
+++ b/gmime/gmime-events.c
@@ -94,7 +94,7 @@ g_mime_event_destroy (GMimeEvent *event)
 {
 	EventListener *node, *next;
 	
-	node = (EventListener *) &event->list.head;
+	node = (EventListener *) event->list.head;
 	while (node->next) {
 		next = node->next;
 		event_listener_free (node);
@@ -110,7 +110,7 @@ g_mime_event_find_listener (GMimeEvent *event, GMimeEventCallback callback, gpoi
 {
 	EventListener *node;
 	
-	node = (EventListener *) &event->list.head;
+	node = (EventListener *) event->list.head;
 	while (node->next) {
 		if (node->callback == callback && node->user_data == user_data)
 			return node;
@@ -211,7 +211,7 @@ g_mime_event_emit (GMimeEvent *event, gpointer args)
 {
 	EventListener *node;
 	
-	node = (EventListener *) &event->list.head;
+	node = (EventListener *) event->list.head;
 	while (node->next) {
 		if (node->blocked <= 0)
 			node->callback (event->owner, args, node->user_data);
diff --git a/gmime/gmime-message.c b/gmime/gmime-message.c
index 3db85f4..66e8b4e 100644
--- a/gmime/gmime-message.c
+++ b/gmime/gmime-message.c
@@ -66,9 +66,9 @@ static ssize_t write_received (GMimeStream *stream, const char *name, const char
 static ssize_t write_subject (GMimeStream *stream, const char *name, const char *value);
 static ssize_t write_msgid (GMimeStream *stream, const char *name, const char *value);
 
-static void to_list_changed (InternetAddressList *list, GMimeMessage *message);
-static void cc_list_changed (InternetAddressList *list, GMimeMessage *message);
-static void bcc_list_changed (InternetAddressList *list, GMimeMessage *message);
+static void to_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message);
+static void cc_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message);
+static void bcc_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message);
 
 
 static GMimeObjectClass *parent_class = NULL;
@@ -1143,19 +1143,19 @@ sync_recipient_header (GMimeMessage *message, GMimeRecipientType type)
 }
 
 static void
-to_list_changed (InternetAddressList *list, GMimeMessage *message)
+to_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message)
 {
 	sync_recipient_header (message, GMIME_RECIPIENT_TYPE_TO);
 }
 
 static void
-cc_list_changed (InternetAddressList *list, GMimeMessage *message)
+cc_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message)
 {
 	sync_recipient_header (message, GMIME_RECIPIENT_TYPE_CC);
 }
 
 static void
-bcc_list_changed (InternetAddressList *list, GMimeMessage *message)
+bcc_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message)
 {
 	sync_recipient_header (message, GMIME_RECIPIENT_TYPE_BCC);
 }
diff --git a/gmime/gmime-object.c b/gmime/gmime-object.c
index 44a5381..bacf929 100644
--- a/gmime/gmime-object.c
+++ b/gmime/gmime-object.c
@@ -602,7 +602,7 @@ g_mime_object_set_disposition (GMimeObject *object, const char *disposition)
 	disp = g_mime_content_disposition_new ();
 	g_mime_content_disposition_set_disposition (disp, disposition);
 	g_mime_object_set_content_disposition (object, disp);
-	g_object_ref (disp);
+	g_object_unref (disp);
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]