commit 4ab55dc46857cfcdd984769c67f0ab598cfe1cb6
parent 9261897629d74626aaa8212daa6803c147816291
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date: Sat, 30 Mar 2013 10:10:09 +0100
don't try to fetch status of minus one message
this would happen if we were trying to find newly pushed messages, but
none actually arrived.
as imap's ranges are not ordered, this would actually fetch one message.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/drv_imap.c b/src/drv_imap.c
@@ -1612,6 +1612,8 @@ imap_load( store_t *gctx, int minuid, int maxuid, int newuid, int *excs, int nex
sprintf( buf, "%d:%d", minuid, newuid - 1 );
if (imap_submit_load( ctx, buf, 0, sts ) < 0)
goto done;
+ if (newuid > maxuid)
+ goto done;
sprintf( buf, "%d:%d", newuid, maxuid );
} else {
sprintf( buf, "%d:%d", minuid, maxuid );