diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-07-28 15:49:36 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-07-28 15:51:25 +0200 |
commit | 4dee50b9c80f9b18d2eb9a1c20bd879abb342302 (patch) | |
tree | 7a9c5ddd299e23ad27c7efa6a8759ae3122f31c9 /lib/connect.c | |
parent | 7551e55d6614cddb039602e08f3d7aa302299617 (diff) |
timeval: struct curltime is a struct timeval replacement
... to make all libcurl internals able to use the same data types for
the struct members. The timeval struct differs subtly on several
platforms so it makes it cumbersome to use everywhere.
Ref: #1652
Closes #1693
Diffstat (limited to 'lib/connect.c')
-rw-r--r-- | lib/connect.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/connect.c b/lib/connect.c index 8063cf005..8d5d32ba6 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -180,12 +180,12 @@ singleipconnect(struct connectdata *conn, * @unittest: 1303 */ time_t Curl_timeleft(struct Curl_easy *data, - struct timeval *nowp, + struct curltime *nowp, bool duringconnect) { int timeout_set = 0; time_t timeout_ms = duringconnect?DEFAULT_CONNECT_TIMEOUT:0; - struct timeval now; + struct curltime now; /* if a timeout is set, use the most restrictive one */ @@ -723,7 +723,7 @@ CURLcode Curl_is_connected(struct connectdata *conn, CURLcode result = CURLE_OK; time_t allow; int error = 0; - struct timeval now; + struct curltime now; int rc; int i; @@ -1136,7 +1136,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ const struct Curl_dns_entry *remotehost) { struct Curl_easy *data = conn->data; - struct timeval before = Curl_tvnow(); + struct curltime before = Curl_tvnow(); CURLcode result = CURLE_COULDNT_CONNECT; time_t timeout_ms = Curl_timeleft(data, &before, TRUE); |