aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-remote-store.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-01-16 11:54:45 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-01-16 11:54:45 +0800
commite3a451cb33cad9dada930fd5111bcc6c341d5a2b (patch)
tree3bee6ca799aa5e36d8c6d1a0474ab7091e688a2e /camel/camel-remote-store.c
parente202430d41d6b793e94d7ac0d252de826e80991b (diff)
downloadgsoc2013-evolution-e3a451cb33cad9dada930fd5111bcc6c341d5a2b.tar.gz
gsoc2013-evolution-e3a451cb33cad9dada930fd5111bcc6c341d5a2b.tar.zst
gsoc2013-evolution-e3a451cb33cad9dada930fd5111bcc6c341d5a2b.zip
Chganged len back to be unsigned. And do a simple range check on the
2001-01-16 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_decode_string): Chganged len back to be unsigned. And do a simple range check on the string value to try and detect corrupted summary files. * providers/imap/camel-imap-command.c (imap_read_untagged): Handle cancelled stream reads with an appropriate exception. * providers/imap/camel-imap-private.h: Fix the include-once macro. Doh, confliced with camel-private.h. * providers/imap/camel-imap-store.c (imap_store_refresh_folders): A copy of camel_remote_store_refresh_folders. We avoid locking each folder when we call it though. This should be removed when i can work out how to remove the folder lock from this function easily. * camel-stream-fs.c (stream_write): Fix n' argument of select. (stream_read): Likewise. * camel-remote-store.c (socket_connect): Bump the connect timeout upto 4 minutes. (socket_connect): Oops, fix the 'n' argument of select. * camel-session.c (camel_cancel_cancel): If we are given no cancellation node, then do it for all active ones. svn path=/trunk/; revision=7526
Diffstat (limited to 'camel/camel-remote-store.c')
-rw-r--r--camel/camel-remote-store.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/camel/camel-remote-store.c b/camel/camel-remote-store.c
index 9e7a60e378..993d9b5778 100644
--- a/camel/camel-remote-store.c
+++ b/camel/camel-remote-store.c
@@ -241,6 +241,7 @@ static int socket_connect(struct hostent *h, int port)
} else {
fd_set rdset, wrset;
long flags;
+ int fdmax;
fcntl(fd, F_GETFL, &flags);
fcntl(fd, F_SETFL, flags | O_NONBLOCK);
@@ -258,9 +259,10 @@ static int socket_connect(struct hostent *h, int port)
FD_ZERO(&wrset);
FD_SET(fd, &wrset);
FD_SET(cancel_fd, &rdset);
+ fdmax = MAX(fd, cancel_fd)+1;
tv.tv_usec = 0;
- tv.tv_sec = 30;
- if (select((fd+cancel_fd)/2+1, &rdset, &wrset, 0, &tv) == 0) {
+ tv.tv_sec = 60*4;
+ if (select(fdmax, &rdset, &wrset, 0, &tv) == 0) {
close(fd);
errno = ETIMEDOUT;
return -1;