aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog3
-rw-r--r--camel/camel-mime-message.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 5e30c5670b..a28037b561 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -3,6 +3,9 @@
* camel-mime-message.c
(camel_mime_message_get_part_by_content_id): New function to
convenience Larry ;-)
+ (check_content_id): Oops, return !found instead of found. This
+ callback has to return whether or not to keep searching, not
+ whether or not it found what it's looking for. Do'h!
* camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): block out
some code if ENABLE_PEDANTIC_PGPMIME is not defined.
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index fb396a27d9..3ffa25f84e 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -846,17 +846,17 @@ static gboolean
check_content_id (CamelMimeMessage *message, CamelMimePart *part, struct _check_content_id *data)
{
const char *content_id;
- gboolean ret;
+ gboolean found;
content_id = camel_mime_part_get_content_id (part);
- ret = content_id && !strcmp (content_id, data->content_id) ? TRUE : FALSE;
- if (ret) {
+ found = content_id && !strcmp (content_id, data->content_id) ? TRUE : FALSE;
+ if (found) {
data->part = part;
camel_object_ref (CAMEL_OBJECT (part));
}
- return ret;
+ return !found;
}
CamelMimePart *