Browse Source

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.
Oswald Buddenhagen 12 năm trước cách đây
mục cha
commit
4ab55dc468
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/drv_imap.c

+ 2 - 0
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 );