aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-tcp-stream-ssl.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 631a303eb0..eaf1edd0c1 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,11 @@
2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
+ * camel-tcp-stream-ssl.c (stream_read): Added a check to see if
+ the operation has been cancelled.
+ (stream_write): Same.
+
+2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
+
Updates for compliance with rfc2231
* camel-mime-utils.c (header_encode_param):
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
index 167d94b8b7..46a8dfa6e3 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -183,6 +183,11 @@ stream_read (CamelStream *stream, char *buffer, size_t n)
ssize_t nread;
do {
+ if (camel_operation_cancel_check (NULL)) {
+ errno = EINTR;
+ return -1;
+ }
+
nread = PR_Read (tcp_stream_ssl->priv->sockfd, buffer, n);
if (nread == -1)
set_errno (PR_GetError ());
@@ -198,6 +203,11 @@ stream_write (CamelStream *stream, const char *buffer, size_t n)
ssize_t w, written = 0;
do {
+ if (camel_operation_cancel_check (NULL)) {
+ errno = EINTR;
+ return -1;
+ }
+
do {
w = PR_Write (tcp_stream_ssl->priv->sockfd, buffer + written, n - written);
if (w == -1)