Path: blob/main/mail/asmail/files/patch-imap.c
16462 views
--- imap.c.orig 2007-02-27 10:19:38.000000000 -08001+++ imap.c 2011-01-06 23:12:58.000000000 -08002@@ -138,13 +138,18 @@34/* connection is open, let's log in */56- sprintf(output, "A000 LOGIN %s %s\r\n", mb->user, mb->pass);7- WRITE_OUTPUT;8+ sprintf(output, "A000 LOGIN %s %s\r\n", mb->user, mb->pass);9+ WRITE_OUTPUT;10+ while (1) {11WAITOK;12+ if (strncmp(input, "A000 ", 5)) /* allow for other tags/untagged */13+ continue;14+15if ( strncmp(input, "A000 OK", 7) ) {16- BYE(STAT_LOGIN);17+ BYE(STAT_LOGIN);18}19return(STAT_IDLE);20+ }21}222324@@ -287,6 +292,7 @@25imap_checkmbox(mb, &s);26}27} else {28+ mb->status = STAT_RUN;29mb->status |= imap_login(mb, &s);30mb->status |= imap_checkmbox(mb, &s);31mb->status |= imap_goodbye(mb, &s);323334