aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-07 00:52:44 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-07 00:52:44 +0800
commit15aeda78aa5c7edd4e4c30a4f728290126b2e0bd (patch)
tree5c420da0d3b3c083092a915a422975e2a71f04e7
parent40c22b25f1e318b405bf2f995d2636de5c731959 (diff)
downloadgsoc2013-evolution-15aeda78aa5c7edd4e4c30a4f728290126b2e0bd.tar.gz
gsoc2013-evolution-15aeda78aa5c7edd4e4c30a4f728290126b2e0bd.tar.zst
gsoc2013-evolution-15aeda78aa5c7edd4e4c30a4f728290126b2e0bd.zip
Set the pipe fd's to nonblocking.
2001-07-06 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's to nonblocking. svn path=/trunk/; revision=10847
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-pgp-context.c4
-rw-r--r--camel/providers/imap/camel-imap-command.c4
3 files changed, 11 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 81fd8868fa..4928827e49 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
+ to nonblocking.
+
2001-07-06 Peter Williams <peterw@ximian.com>
* camel-object.c (camel_object_unref): Make sure that after the
diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c
index 881cc0c16a..aae330bc8e 100644
--- a/camel/camel-pgp-context.c
+++ b/camel/camel-pgp-context.c
@@ -332,6 +332,10 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int
close (diag_fds[1]);
close (passwd_fds[0]);
+ fcntl (ip_fds[1], F_SETFL, O_NONBLOCK);
+ fcntl (op_fds[0], F_SETFL, O_NONBLOCK);
+ fcntl (diag_fds[0], F_SETFL, O_NONBLOCK);
+
timeout.tv_sec = 10; /* timeout in seconds */
timeout.tv_usec = 0;
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c
index 8c5532c612..6f19e579e4 100644
--- a/camel/providers/imap/camel-imap-command.c
+++ b/camel/providers/imap/camel-imap-command.c
@@ -286,9 +286,9 @@ imap_read_untagged (CamelImapStore *store, char *line, CamelException *ex)
str->str + 1, length);
if (nread == -1) {
if (errno == EINTR)
- camel_exception_set(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
+ camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
else
- camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, strerror(errno));
+ camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, strerror(errno));
camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
goto lose;
}