[dovecot-cvs] dovecot/src/imap imap-thread.c,1.26,1.27
cras at dovecot.org
cras at dovecot.org
Sun Sep 17 20:49:06 EEST 2006
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv2225/imap
Modified Files:
imap-thread.c
Log Message:
mail_set_uid() now returns 0 = expunged, 1 = ok.
Index: imap-thread.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-thread.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- imap-thread.c 17 Sep 2006 17:12:35 -0000 1.26
+++ imap-thread.c 17 Sep 2006 17:49:04 -0000 1.27
@@ -229,9 +229,14 @@
uint32_t msgid_crc32, const char **msgid_r)
{
const char *msgids, *msgid, *found_msgid = NULL;
+ int ret;
- if (mail_set_uid(ctx->tmp_mail, parent_uid) < 0)
+ if ((ret = mail_set_uid(ctx->tmp_mail, parent_uid)) < 0)
return -1;
+ if (ret == 0) {
+ *msgid_r = NULL;
+ return 0;
+ }
msgids = mail_get_first_header(ctx->tmp_mail, HDR_IN_REPLY_TO);
msgid = msgids == NULL ? NULL : message_id_get_next(&msgids);
@@ -299,7 +304,7 @@
if (rec->rec.uid != 0) {
/* we can get the Message-ID directly */
- if (mail_set_uid(ctx->tmp_mail, rec->rec.uid) < 0)
+ if (mail_set_uid(ctx->tmp_mail, rec->rec.uid) <= 0)
return NULL;
msgids = mail_get_first_header(ctx->tmp_mail, HDR_MESSAGE_ID);
@@ -1325,7 +1330,7 @@
uid = rec->rec.uid;
}
- if (mail_set_uid(ctx->tmp_mail, roots[i]->uid) == 0) {
+ if (mail_set_uid(ctx->tmp_mail, roots[i]->uid) > 0) {
t_push();
subject = mail_get_first_header(ctx->tmp_mail,
HDR_SUBJECT);
More information about the dovecot-cvs
mailing list