commit dd7654ff8c56bf14bf8610ceb006b85e197219a5
Author:     Oswald Buddenhagen <o...@kde.org>
AuthorDate: Sat Mar 30 10:10:09 2013 +0100
Commit:     Oswald Buddenhagen <o...@users.sf.net>
CommitDate: Sat Mar 30 16:46:18 2013 +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.

 src/drv_imap.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c
index 1c29fde..0c6a8ea 100644
--- 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 );

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to