Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/mail/asmail/files/patch-imap.c
16462 views
1
--- imap.c.orig 2007-02-27 10:19:38.000000000 -0800
2
+++ imap.c 2011-01-06 23:12:58.000000000 -0800
3
@@ -138,13 +138,18 @@
4
5
/* connection is open, let's log in */
6
7
- sprintf(output, "A000 LOGIN %s %s\r\n", mb->user, mb->pass);
8
- WRITE_OUTPUT;
9
+ sprintf(output, "A000 LOGIN %s %s\r\n", mb->user, mb->pass);
10
+ WRITE_OUTPUT;
11
+ while (1) {
12
WAITOK;
13
+ if (strncmp(input, "A000 ", 5)) /* allow for other tags/untagged */
14
+ continue;
15
+
16
if ( strncmp(input, "A000 OK", 7) ) {
17
- BYE(STAT_LOGIN);
18
+ BYE(STAT_LOGIN);
19
}
20
return(STAT_IDLE);
21
+ }
22
}
23
24
25
@@ -287,6 +292,7 @@
26
imap_checkmbox(mb, &s);
27
}
28
} else {
29
+ mb->status = STAT_RUN;
30
mb->status |= imap_login(mb, &s);
31
mb->status |= imap_checkmbox(mb, &s);
32
mb->status |= imap_goodbye(mb, &s);
33
34