summaryrefslogtreecommitdiff
path: root/imap4d/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap4d/search.c')
-rw-r--r--imap4d/search.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/imap4d/search.c b/imap4d/search.c
index 8bc9770c1..003796447 100644
--- a/imap4d/search.c
+++ b/imap4d/search.c
@@ -1019,17 +1019,23 @@ _match_multipart (struct parsebuf *pb, mu_message_t msg, char *text)
{
size_t i, nparts;
- mu_message_get_num_parts (msg, &nparts);
-
- for (i = 1; i <= nparts; i++)
+ rc = mu_message_get_num_parts (msg, &nparts);
+ if (rc)
{
- mu_message_t submsg = NULL;
-
- if (mu_message_get_part (msg, i, &submsg) == 0)
+ mu_diag_funcall (MU_DIAG_ERR, "mu_message_get_num_parts", NULL, rc);
+ }
+ else
+ {
+ for (i = 1; i <= nparts; i++)
{
- result = _match_multipart (pb, submsg, text);
- if (result)
- break;
+ mu_message_t submsg = NULL;
+
+ if (mu_message_get_part (msg, i, &submsg) == 0)
+ {
+ result = _match_multipart (pb, submsg, text);
+ if (result)
+ break;
+ }
}
}
}

Return to:

Send suggestions and report system problems to the System administrator.