aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/imap.c b/imap.c
index 82c01b6d..edad9581 100644
--- a/imap.c
+++ b/imap.c
@@ -71,7 +71,11 @@ static int imap_untagged_response(int sock, const char *buf)
/* log the unexpected bye from server as we expect the
* connection to be cut-off after this */
if (outlevel > O_SILENT)
- report(stderr, GT_("Received BYE response from IMAP server: %s"), buf + 5);
+ report(stderr, GT_("Received BYE response from IMAP server: %s\n"), buf + 5);
+ return PS_SOCKET; /* tell caller to not touch the socket any longer.
+ Note this is under stage != STAGE_LOGOUT, so when
+ we are logging out properly, we will complete the
+ protocol exchange. */
}
else if (strstr(buf, " EXISTS"))
{
@@ -392,7 +396,7 @@ static int do_authcert (int sock, const char *command, const char *name)
{
size_t len = strlen(name);
if ((len / 3) + ((len % 3) ? 4 : 0) < sizeof(buf))
- to64frombits (buf, name, strlen(name));
+ to64frombits (buf, name, strlen(name), sizeof buf);
else
return PS_AUTHFAIL; /* buffer too small. */
}
@@ -1301,12 +1305,7 @@ static int imap_delete(int sock, struct query *ctl, int number)
{
int ok;
/* Select which flags to set on message deletion: */
- const char delflags_seen[] = "\\Seen \\Deleted";
- static const char *delflags;
- /* Which environment variable to look for: */
-
- /* DEFAULT since many fetchmail versions <= 6.3.X */
- delflags = delflags_seen;
+ static const char delflags[] = "\\Seen \\Deleted";
(void)ctl;
/* expunges change the fetch numbers */