Blob Blame History Raw
From 15d7fcf0c1ce6b73bddd3ad3b145290c14bb47bb Mon Sep 17 00:00:00 2001
From: Caolan McNamara <caolanm@redhat.com>
Date: Sat, 3 Jan 2009 19:15:12 -0600
Subject: [PATCH 09/10] my guess as replacements for the missing/broken stuff against the new gmime api

---
 res/res_http_post.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/res/res_http_post.c b/res/res_http_post.c
index deab15c..563ab9c 100644
--- a/res/res_http_post.c
+++ b/res/res_http_post.c
@@ -119,14 +119,10 @@ static void process_message_callback(GMimeObject *part, gpointer user_data)
 		ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MESSAGE_PARTIAL\n");
 		return;
 	} else if (GMIME_IS_MULTIPART(part)) {
-		GList *l;
-		
 		ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MULTIPART, trying to process subparts\n");
-		l = GMIME_MULTIPART(part)->subparts;
-		while (l) {
-			process_message_callback(l->data, cbinfo);
-			l = l->next;
-		}
+
+		g_mime_multipart_foreach(GMIME_MULTIPART(part), process_message_callback,
+                               cbinfo);
 	} else if (GMIME_IS_PART(part)) {
 		const char *filename;
 
@@ -148,7 +144,7 @@ static int process_message(GMimeMessage *message, const char *post_dir)
 		.post_dir = post_dir,
 	};
 
-	g_mime_message_foreach_part(message, process_message_callback, &cbinfo);
+	g_mime_message_foreach(message, process_message_callback, &cbinfo);
 
 	return cbinfo.count;
 }
-- 
1.6.1