Reading the suspended flag in maildir folders


I'm experiencing some issues after marking a message as suspended in a
maildir folder. The problem is that I'm not able to get it anymore. The
problem is that the maildir_get_message tries to open a file whose
filename that does not exists. The reason is that the name of the file
name stored in the disk is something like blablablabla.machine!2,AON and
the get_message function tries to retrieve blablablabla.machine!2,AN.

So the suspended flag is not retrieved properly when reading the
summary. I took a look at camel_maildir_summary_name_to_info and I found

if (i > 7) {
	if (c == flagbits[i].flag) {
		set |= flagbits[i].flagbit;
} else {
	if (flagbits[i].flag == c && (info-> &
flagbits[i].flagbit) == 0)
		set |= flagbits[i].flagbit;

So, the flag 'O' (suspended) is flag number 7, then to set that flag two
things must happen
lagbits[i].flag == c &&
(info-> & flagbits[i].flagbit) == 0

the first one is true but the second one it isn't, so the flag is never
set to the summary. I don't know if the problem is this condition, or
that the code should go into the "if" (which only requires one
condition) instead of the "else". Maybe this "magic" number 7 has
something to do?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]