From: Casper G. <cas...@ko...> - 2006-02-20 01:34:28
|
Well, without actually knowing what I'm doing (I think) this is how I fixed it: ------------------------------------------------------------- *** imap_orig.c Mon Feb 20 02:26:35 2006 --- imap.c Mon Feb 20 02:17:05 2006 *************** *** 110,115 **** --- 110,118 ---- mytimeout = saved_timeout; stage = STAGE_FETCH; + + recentcount = count; + return PS_SUCCESS; } } else if (strstr(buf, " RECENT")) ------------------------------------------------------------- Seems somehow the 'stage = STAGE_FETCH' never gets any action if we don't do it like that. Otherwise on the next round we'll just be stage = STAGE_IDLE again, and nobody ever checks if we went to FETCH in between. In fact as far as I could see changing the stage variable has no effect whatsoever, it's the recentcount that does the trick. It gets imap_getrange() out of its stubborn imap_idle() loop, and then things start to happen, and I get my mail. Works for me. Could break something on a server supporting IDLE though, not sure about that. Someone might want to check that? Casper |