mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 18:45:10 +00:00
Fix IMAP IDLE with Google's IMAP service.
This commit is contained in:
parent
28978461a7
commit
4a0676d4d0
12
src/mail.c
12
src/mail.c
@ -523,6 +523,15 @@ void *imap_thread(void *arg)
|
||||
fail++;
|
||||
break;
|
||||
}
|
||||
strncpy(sendbuf, "abc CAPABILITY\r\n", MAXDATASIZE);
|
||||
if (imap_command(sockfd, sendbuf, recvbuf, "abc OK")) {
|
||||
fail++;
|
||||
break;
|
||||
}
|
||||
if (strstr(recvbuf, " IDLE ") != NULL) {
|
||||
has_idle = 1;
|
||||
}
|
||||
|
||||
strncpy(sendbuf, "a1 login ", MAXDATASIZE);
|
||||
strncat(sendbuf, mail->user, MAXDATASIZE - strlen(sendbuf) - 1);
|
||||
strncat(sendbuf, " ", MAXDATASIZE - strlen(sendbuf) - 1);
|
||||
@ -532,9 +541,6 @@ void *imap_thread(void *arg)
|
||||
fail++;
|
||||
break;
|
||||
}
|
||||
if (strstr(recvbuf, " IDLE ") != NULL) {
|
||||
has_idle = 1;
|
||||
}
|
||||
|
||||
strncpy(sendbuf, "a2 STATUS ", MAXDATASIZE);
|
||||
strncat(sendbuf, mail->folder, MAXDATASIZE - strlen(sendbuf) - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user