Re: [Dovecot] Wrong UIDs returned from mailbox_transaction_commit_get_uids()
It should be:
int mailbox_transaction_commit(struct mailbox_transaction_context **t) { uint32_t tmp1, tmp2, tmp3;
return mailbox_transaction_commit_get_uids(t, &tmp1, &tmp2, &tmp3);
}
How/where does this help? The tmp values are ignored in any case, so I don't think this is the right fix for it.
The problem occurs if transaction_commit() is hooked. In mail_log plugin I wanted to print the committed UIDs. I changed mail_log_transaction_commit() to: { ... ret = lbox->super.transaction_commit(t, uid_validity_r, first_saved_uid_r, last_saved_uid_r); if (0 == ret) { i_info("uid_validity=%u, first_uid=%u, last_uid=%u", *uid_validity_r, *first_saved_uid_r, *last_saved_uid_r); } return ret; }
the result was: Apr 1 14:59:37 ha-test1 deliver(test1@test.com): uid_validity=1202218363, first_uid=1202218363, last_uid=1202218363
These values are equal to the UID validity.
After changing mailbox_transaction_commit() as described above, I got correct values: Apr 1 15:09:50 ha-test1 deliver(test1@test.com): uid_validity=1202218363, first_uid=139, last_uid=139
Ron
____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
participants (1)
-
Ron Avriel