diff options
author | Not Zed <NotZed@Ximian.com> | 2001-09-08 08:45:24 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-09-08 08:45:24 +0800 |
commit | f1e3395ff231298f05120917817d5ed1732345b6 (patch) | |
tree | 1f26989cae46e4d2238e35df2047a45323d0bbd6 | |
parent | 1751d7033533f18c89dd0d65853eb7ddbf0e2a88 (diff) | |
download | gsoc2013-evolution-f1e3395ff231298f05120917817d5ed1732345b6.tar.gz gsoc2013-evolution-f1e3395ff231298f05120917817d5ed1732345b6.tar.zst gsoc2013-evolution-f1e3395ff231298f05120917817d5ed1732345b6.zip |
Likewise.
2001-09-08 Not Zed <NotZed@Ximian.com>
* providers/local/camel-spool-summary.c (spool_summary_sync_full): Likewise.
* providers/local/camel-mbox-summary.c (mbox_summary_sync_full): Fix the wording.
* camel-tcp-stream-raw.c (stream_read): Save errno around fcntl
call in cancellable read case. Also, loop while we get EINTR.
This might fix some weird reconnect behaviour with pop.
(stream_write): "
svn path=/trunk/; revision=12700
-rw-r--r-- | camel/ChangeLog | 11 | ||||
-rw-r--r-- | camel/camel-tcp-stream-raw.c | 19 | ||||
-rw-r--r-- | camel/providers/local/camel-mbox-summary.c | 8 | ||||
-rw-r--r-- | camel/providers/local/camel-spool-summary.c | 8 |
4 files changed, 34 insertions, 12 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 3f6f07f71c..2e0473e300 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,14 @@ +2001-09-08 Not Zed <NotZed@Ximian.com> + + * providers/local/camel-spool-summary.c (spool_summary_sync_full): Likewise. + + * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): Fix the wording. + + * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl + call in cancellable read case. Also, loop while we get EINTR. + This might fix some weird reconnect behaviour with pop. + (stream_write): " + 2001-09-07 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (ssl_bad_cert): #if 0 out the code that diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c index c269165411..0aa9c2e1e5 100644 --- a/camel/camel-tcp-stream-raw.c +++ b/camel/camel-tcp-stream-raw.c @@ -130,7 +130,8 @@ stream_read (CamelStream *stream, char *buffer, size_t n) CamelTcpStreamRaw *tcp_stream_raw = CAMEL_TCP_STREAM_RAW (stream); ssize_t nread; int cancel_fd; - + int saveerrno; + if (camel_operation_cancel_check (NULL)) { errno = EINTR; return -1; @@ -160,8 +161,12 @@ stream_read (CamelStream *stream, char *buffer, size_t n) return -1; } - nread = read (tcp_stream_raw->sockfd, buffer, n); + do { + nread = read (tcp_stream_raw->sockfd, buffer, n); + } while (nread == -1 && errno == EINTR); + saveerrno = errno; fcntl (tcp_stream_raw->sockfd, F_SETFL, flags); + errno = saveerrno; } return nread; @@ -173,7 +178,8 @@ stream_write (CamelStream *stream, const char *buffer, size_t n) CamelTcpStreamRaw *tcp_stream_raw = CAMEL_TCP_STREAM_RAW (stream); ssize_t w, written = 0; int cancel_fd; - + int saveerrno; + if (camel_operation_cancel_check (NULL)) { errno = EINTR; return -1; @@ -205,12 +211,17 @@ stream_write (CamelStream *stream, const char *buffer, size_t n) return -1; } - w = write (tcp_stream_raw->sockfd, buffer + written, n - written); + do { + w = write (tcp_stream_raw->sockfd, buffer + written, n - written); + } while (w == -1 && errno == EINTR); + if (w > 0) written += w; } while (w != -1 && written < n); + saveerrno = errno; fcntl (tcp_stream_raw->sockfd, F_SETFL, flags); + errno = saveerrno; } return written; diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c index eed8a9d083..a1b563dc69 100644 --- a/camel/providers/local/camel-mbox-summary.c +++ b/camel/providers/local/camel-mbox-summary.c @@ -499,12 +499,12 @@ mbox_summary_sync_full(CamelLocalSummary *cls, gboolean expunge, CamelFolderChan d(printf("performing full summary/sync\n")); - camel_operation_start(NULL, _("Synchronizing folder")); + camel_operation_start(NULL, _("Storing folder")); fd = open(cls->folder_path, O_RDONLY); if (fd == -1) { camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, - _("Could not open folder to summarize: %s: %s"), + _("Could not open file: %s: %s"), cls->folder_path, strerror(errno)); camel_operation_end(NULL); return -1; @@ -700,12 +700,12 @@ mbox_summary_sync_quick(CamelLocalSummary *cls, gboolean expunge, CamelFolderCha d(printf("Performing quick summary sync\n")); - camel_operation_start(NULL, _("Synchronizing folder")); + camel_operation_start(NULL, _("Storing folder")); fd = open(cls->folder_path, O_RDWR); if (fd == -1) { camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, - _("Could not open folder to summarize: %s: %s"), + _("Could not open file: %s: %s"), cls->folder_path, strerror(errno)); camel_operation_end(NULL); diff --git a/camel/providers/local/camel-spool-summary.c b/camel/providers/local/camel-spool-summary.c index c5872e8cc2..2aa0dcb8e4 100644 --- a/camel/providers/local/camel-spool-summary.c +++ b/camel/providers/local/camel-spool-summary.c @@ -641,12 +641,12 @@ spool_summary_sync_full(CamelSpoolSummary *cls, gboolean expunge, CamelFolderCha d(printf("performing full summary/sync\n")); - camel_operation_start(NULL, _("Synchronising folder")); + camel_operation_start(NULL, _("Storing folder")); fd = open(cls->folder_path, O_RDWR); if (fd == -1) { camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, - _("Could not open folder to summarise: %s: %s"), + _("Could not open file: %s: %s"), cls->folder_path, strerror(errno)); camel_operation_end(NULL); return -1; @@ -928,12 +928,12 @@ spool_summary_sync_quick(CamelSpoolSummary *cls, gboolean expunge, CamelFolderCh d(printf("Performing quick summary sync\n")); - camel_operation_start(NULL, _("Synchronising folder")); + camel_operation_start(NULL, _("Storing folder")); fd = open(cls->folder_path, O_RDWR); if (fd == -1) { camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, - _("Could not open folder to summarise: %s: %s"), + _("Could not file: %s: %s"), cls->folder_path, strerror(errno)); camel_operation_end(NULL); |