Commit be1cece6 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

- Larry Campbell added CURLINFO_OS_ERRNO to curl_easy_getinfo() that allows an

  app to retrieve the errno variable after a (connect) failure. It will make
  sense to provide this for more failures in a more generic way, but let's
  start like this.
parent 45be6d66
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -7,6 +7,11 @@
                                  Changelog

Daniel (30 September 2004)
- Larry Campbell added CURLINFO_OS_ERRNO to curl_easy_getinfo() that allows an
  app to retrieve the errno variable after a (connect) failure. It will make
  sense to provide this for more failures in a more generic way, but let's
  start like this.

- Günter Knauf and Casey O'Donnell worked out an extra #if condition for the
  curl/multi.h header to work better in winsock-using apps.

+2 −2
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ Issues not sorted in any particular order.
To get fixed in 7.12.2 (planned release: mid October 2004)
======================

40 - Larry Campbell's curl_easy_getinfo patch
40 - fixed

41 - Fedor Karpelevitch's formpost path basename patch

@@ -15,7 +15,7 @@ To get fixed in 7.12.2 (planned release: mid October 2004)

45 - Chris' suspected race condition in the windows threaded resolver

46 - Casey O'Donnell's multi.h winsock header fix
46 - fixed

47 - Peter Sylvester's patch related to the new SRP on the TLS layer

+2 −0
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ CURLOPT_HTTPAUTH option for \fIcurl_easy_setopt(3)\fP. (Added in 7.10.8)
.IP CURLINFO_PROXYAUTH_AVAIL
Pass a pointer to a long to receive a bitmask indicating the authentication
method(s) available for your proxy authentication.  (Added in 7.10.8)
.IP CURLINFO_OS_ERRNO
Pass a pointer to a long to receive the errno variable from a connect failure.
.SH RETURN VALUE
If the operation was successful, CURLE_OK is returned. Otherwise an
appropriate error code will be returned.
+2 −1
Original line number Diff line number Diff line
@@ -1178,9 +1178,10 @@ typedef enum {
  CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG   + 22,
  CURLINFO_HTTPAUTH_AVAIL   = CURLINFO_LONG   + 23,
  CURLINFO_PROXYAUTH_AVAIL  = CURLINFO_LONG   + 24,
  CURLINFO_OS_ERRNO	    = CURLINFO_LONG   + 25,
  /* Fill in new entries below here! */

  CURLINFO_LASTONE          = 23
  CURLINFO_LASTONE          = 26
} CURLINFO;

/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
+8 −3
Original line number Diff line number Diff line
@@ -355,7 +355,8 @@ static CURLcode bindlocal(struct connectdata *conn,
        }

        if(!bindworked) {
          failf(data, "%s", Curl_strerror(conn, Curl_ourerrno()));
          data->state.os_errno = Curl_ourerrno();
          failf(data, "%s", Curl_strerror(conn, data->state.os_errno));
          return CURLE_HTTP_PORT_FAILED;
        }

@@ -508,12 +509,14 @@ CURLcode Curl_is_connected(struct connectdata *conn,
  rc = waitconnect(sockfd, 0);

  if(WAITCONN_CONNECTED == rc) {
    if (verifyconnect(sockfd, NULL)) {
    int error;
    if (verifyconnect(sockfd, &error)) {
      /* we are connected, awesome! */
      *connected = TRUE;
      return CURLE_OK;
    }
    /* nope, not connected for real */
    data->state.os_errno = error;
    infof(data, "Connection failed\n");
    if(trynextip(conn, sockindex, connected)) {
      code = CURLE_COULDNT_CONNECT;
@@ -635,8 +638,10 @@ singleipconnect(struct connectdata *conn,
  }
  else if(WAITCONN_TIMEOUT == rc)
    infof(data, "Timeout\n");
  else
  else {
    data->state.os_errno = error;
    infof(data, "%s\n", Curl_strerror(conn, error));
  }

  /* connect failed or timed out */
  sclose(sockfd);
Loading