diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-05-03 02:19:57 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-05-03 02:19:57 +0800 |
commit | e7432164869e777b21aee021e23033bbdf747cac (patch) | |
tree | 189a31d7a107ae40935a591a88fea09e2db551d1 /camel/camel-pgp-context.c | |
parent | c61f26fa581964ff51e1f335840a61078f80cf29 (diff) | |
download | gsoc2013-evolution-e7432164869e777b21aee021e23033bbdf747cac.tar gsoc2013-evolution-e7432164869e777b21aee021e23033bbdf747cac.tar.gz gsoc2013-evolution-e7432164869e777b21aee021e23033bbdf747cac.tar.bz2 gsoc2013-evolution-e7432164869e777b21aee021e23033bbdf747cac.tar.lz gsoc2013-evolution-e7432164869e777b21aee021e23033bbdf747cac.tar.xz gsoc2013-evolution-e7432164869e777b21aee021e23033bbdf747cac.tar.zst gsoc2013-evolution-e7432164869e777b21aee021e23033bbdf747cac.zip |
Change the order of some code so that we check if the select() failed
2002-05-02 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-context.c (crypto_exec_with_passwd): Change the order
of some code so that we check if the select() failed before we
check for user-cancellation.
* camel-service.c (camel_gethostbyname): Check for EINTR when
select()ing.
(camel_gethostbyaddr): Same.
svn path=/trunk/; revision=16666
Diffstat (limited to 'camel/camel-pgp-context.c')
-rw-r--r-- | camel/camel-pgp-context.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c index 29a948e881..e6ef1a7820 100644 --- a/camel/camel-pgp-context.c +++ b/camel/camel-pgp-context.c @@ -422,21 +422,20 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int select_result = select (max + 1, &fdset, &write_fdset, NULL, &timeout); - if (cancel_fd != -1 && FD_ISSET (cancel_fd, &fdset)) { - /* user-cancelled */ - break; - } - if (select_result < 0) { if (errno == EINTR) continue; break; - } - if (select_result == 0) { + } else if (select_result == 0) { /* timeout */ break; } + if (cancel_fd != -1 && FD_ISSET (cancel_fd, &fdset)) { + /* user-cancelled */ + break; + } + if (FD_ISSET (op_fds[0], &fdset)) { /* More output is available. */ |