commit 4f3ef54f3a261c2bf052899d647c6df46c0fd547
Author: Oswald Buddenhagen <[email protected]>
Date:   Sat Dec 13 17:57:43 2014 +0100

    fix treatment of untagged NO and BAD responses
    
    they aren't possible greeting responses. however, they are warning resp.
    error reports from the server, so print them accordingly.

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

diff --git a/src/drv_imap.c b/src/drv_imap.c
index a931ce9..f52992d 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -1245,9 +1245,13 @@ imap_socket_read( void *aux )
                        } else if (!strcmp( "OK", arg )) {
                                ctx->greeting = GreetingOk;
                                parse_response_code( ctx, 0, cmd );
-                       } else if (!strcmp( "BAD", arg ) || !strcmp( "NO", arg 
) || !strcmp( "BYE", arg )) {
+                       } else if (!strcmp( "BYE", arg )) {
                                ctx->greeting = GreetingBad;
                                parse_response_code( ctx, 0, cmd );
+                       } else if (!strcmp( "NO", arg )) {
+                               warn( "Warning from IMAP server: %s\n", cmd );
+                       } else if (!strcmp( "BAD", arg )) {
+                               error( "Error from IMAP server: %s\n", cmd );
                        } else if (!strcmp( "CAPABILITY", arg )) {
                                parse_capability( ctx, cmd );
                        } else if (!strcmp( "LIST", arg )) {

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to