projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8b53d90
)
Fix bug where IMAP doesn't refresh counts after IDLE timeout.
author
Brenden Matthews
<brenden@diddyinc.com>
Fri, 18 Jun 2010 23:09:11 +0000
(16:09 -0700)
committer
Brenden Matthews
<brenden@diddyinc.com>
Fri, 18 Jun 2010 23:09:11 +0000
(16:09 -0700)
src/mail.c
patch
|
blob
|
history
diff --git
a/src/mail.c
b/src/mail.c
index
de41e65
..
ab2bc47
100644
(file)
--- a/
src/mail.c
+++ b/
src/mail.c
@@
-798,11
+798,13
@@
static void *imap_thread(void *arg)
*/
fetchtimeout.tv_sec = 600;
fetchtimeout.tv_usec = 0;
*/
fetchtimeout.tv_sec = 600;
fetchtimeout.tv_usec = 0;
- DBGP2("idling...");
+ DBGP("idling...");
FD_ZERO(&fdset);
FD_SET(sockfd, &fdset);
FD_SET(threadfd, &fdset);
FD_ZERO(&fdset);
FD_SET(sockfd, &fdset);
FD_SET(threadfd, &fdset);
- res = select(MAX(sockfd + 1, threadfd + 1), &fdset, NULL, NULL, &fetchtimeout);
+ res = select(MAX(sockfd + 1, threadfd + 1), &fdset, NULL,
+ NULL, &fetchtimeout);
+ DBGP("done idling");
if (timed_thread_test(mail->p_timed_thread, 1) || (res == -1 && errno == EINTR) || FD_ISSET(threadfd, &fdset)) {
if ((fstat(sockfd, &stat_buf) == 0) && S_ISSOCK(stat_buf.st_mode)) {
/* if a valid socket, close it */
if (timed_thread_test(mail->p_timed_thread, 1) || (res == -1 && errno == EINTR) || FD_ISSET(threadfd, &fdset)) {
if ((fstat(sockfd, &stat_buf) == 0) && S_ISSOCK(stat_buf.st_mode)) {
/* if a valid socket, close it */
@@
-815,9
+817,6
@@
static void *imap_thread(void *arg)
fail++;
break;
}
fail++;
break;
}
- } else if (fetchtimeout.tv_sec > 0) {
- fail++;
- break;
}
recvbuf[numbytes] = '\0';
DBGP2("imap_thread() received: %s", recvbuf);
}
recvbuf[numbytes] = '\0';
DBGP2("imap_thread() received: %s", recvbuf);