PR_IO_TIMEOUT_ERROR should map to ETIMEDOUT and not EAGAIN.
authorJeffrey Stedfast <fejj@ximian.com>
Thu, 20 Jun 2002 06:34:14 +0000 (06:34 +0000)
committerJeffrey Stedfast <fejj@src.gnome.org>
Thu, 20 Jun 2002 06:34:14 +0000 (06:34 +0000)
2002-06-20  Jeffrey Stedfast  <fejj@ximian.com>

* camel-tcp-stream-ssl.c (set_errno): PR_IO_TIMEOUT_ERROR should
map to ETIMEDOUT and not EAGAIN.
(stream_connect): Reset the PR_Poll() timeout back to 2 minutes as
this wasn't the problem afterall.

camel/ChangeLog
camel/camel-tcp-stream-ssl.c

index 6b027bd..1840d4d 100644 (file)
@@ -1,3 +1,10 @@
+2002-06-20  Jeffrey Stedfast  <fejj@ximian.com>
+
+       * camel-tcp-stream-ssl.c (set_errno): PR_IO_TIMEOUT_ERROR should
+       map to ETIMEDOUT and not EAGAIN.
+       (stream_connect): Reset the PR_Poll() timeout back to 2 minutes as
+       this wasn't the problem afterall.
+
 2002-06-19  Not Zed  <NotZed@Ximian.com>
 
        * camel-mime-parser.c (folder_scan_drop_step): Drop back to
index 9790194..31a69eb 100644 (file)
@@ -216,7 +216,6 @@ set_errno (int code)
                errno = EINTR;
                break;
        case PR_IO_PENDING_ERROR:
-       case PR_IO_TIMEOUT_ERROR:
                errno = EAGAIN;
                break;
        case PR_WOULD_BLOCK_ERROR:
@@ -235,6 +234,7 @@ set_errno (int code)
                errno = ECONNREFUSED;
                break;
        case PR_CONNECT_TIMEOUT_ERROR:
+       case PR_IO_TIMEOUT_ERROR:
                errno = ETIMEDOUT;
                break;
        case PR_NOT_CONNECTED_ERROR:
@@ -617,7 +617,7 @@ stream_connect (CamelTcpStream *stream, struct hostent *host, int port)
                                poll.in_flags = PR_POLL_WRITE | PR_POLL_EXCEPT;
                                poll.out_flags = 0;
                                
-                               timeout = PR_INTERVAL_MIN;
+                               timeout = CONNECT_TIMEOUT;
                                
                                if (PR_Poll (&poll, 1, timeout) == PR_FAILURE) {
                                        set_errno (PR_GetError ());