aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-11-20 05:00:25 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-11-20 05:00:25 +0800
commit9b0ffde9c0478e5f175ca085318db8ea68d32fe7 (patch)
treeeb7cfd9c000207074fcf3bc06eca4cf944b5c5e3
parent5d3580719ac1e50d707fa720597c1c62ff8e4287 (diff)
downloadgsoc2013-evolution-9b0ffde9c0478e5f175ca085318db8ea68d32fe7.tar
gsoc2013-evolution-9b0ffde9c0478e5f175ca085318db8ea68d32fe7.tar.gz
gsoc2013-evolution-9b0ffde9c0478e5f175ca085318db8ea68d32fe7.tar.bz2
gsoc2013-evolution-9b0ffde9c0478e5f175ca085318db8ea68d32fe7.tar.lz
gsoc2013-evolution-9b0ffde9c0478e5f175ca085318db8ea68d32fe7.tar.xz
gsoc2013-evolution-9b0ffde9c0478e5f175ca085318db8ea68d32fe7.tar.zst
gsoc2013-evolution-9b0ffde9c0478e5f175ca085318db8ea68d32fe7.zip
Added a check to see if the operation has been cancelled. (stream_write):
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. svn path=/trunk/; revision=14751
-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)