Loading lib/connect.c +7 −5 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -124,15 +124,17 @@ singleipconnect(struct connectdata *conn, * transfer/connection. If the value is negative, the timeout time has already * elapsed. * * The start time is stored in progress.t_startsingle - as set with * Curl_pgrsTime(..., TIMER_STARTSINGLE); * * If 'nowp' is non-NULL, it points to the current time. * 'duringconnect' is FALSE if not during a connect, as then of course the * connect timeout is not taken into account! */ long Curl_timeleft(struct connectdata *conn, long Curl_timeleft(struct SessionHandle *data, struct timeval *nowp, bool duringconnect) { struct SessionHandle *data = conn->data; int timeout_set = 0; long timeout_ms = duringconnect?DEFAULT_CONNECT_TIMEOUT:0; struct timeval now; Loading Loading @@ -673,7 +675,7 @@ CURLcode Curl_is_connected(struct connectdata *conn, now = Curl_tvnow(); /* figure out how long time we have left to connect */ allow = Curl_timeleft(conn, &now, TRUE); allow = Curl_timeleft(data, &now, TRUE); if(allow < 0) { /* time-out, bail out, go home */ Loading Loading @@ -1040,7 +1042,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ *connected = FALSE; /* default to not connected */ /* get the timeout left */ timeout_ms = Curl_timeleft(conn, &before, TRUE); timeout_ms = Curl_timeleft(data, &before, TRUE); if(timeout_ms < 0) { /* a precaution, no need to continue if time already is up */ Loading lib/connect.h +2 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -37,7 +37,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* generic function that returns how much time there's left to run, according to the timeouts set */ long Curl_timeleft(struct connectdata *conn, long Curl_timeleft(struct SessionHandle *data, struct timeval *nowp, bool duringconnect); Loading lib/ftp.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -322,7 +322,7 @@ static CURLcode AllowServerConnect(struct connectdata *conn) curl_socklen_t size = (curl_socklen_t) sizeof(add); for(;;) { timeout_ms = Curl_timeleft(conn, NULL, TRUE); timeout_ms = Curl_timeleft(data, NULL, TRUE); if(timeout_ms < 0) { /* if a timeout was already reached, bail out */ Loading lib/gtls.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -238,7 +238,7 @@ static CURLcode handshake(struct connectdata *conn, for(;;) { /* check allowed time left */ timeout_ms = Curl_timeleft(conn, NULL, duringconnect); timeout_ms = Curl_timeleft(data, NULL, duringconnect); if(timeout_ms < 0) { /* no need to continue if time already is up */ Loading lib/hostares.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -224,7 +224,7 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn, long timeout; struct timeval now = Curl_tvnow(); timeout = Curl_timeleft(conn, &now, TRUE); timeout = Curl_timeleft(data, &now, TRUE); if(!timeout) timeout = CURL_TIMEOUT_RESOLVE * 1000; /* default name resolve timeout */ Loading Loading
lib/connect.c +7 −5 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -124,15 +124,17 @@ singleipconnect(struct connectdata *conn, * transfer/connection. If the value is negative, the timeout time has already * elapsed. * * The start time is stored in progress.t_startsingle - as set with * Curl_pgrsTime(..., TIMER_STARTSINGLE); * * If 'nowp' is non-NULL, it points to the current time. * 'duringconnect' is FALSE if not during a connect, as then of course the * connect timeout is not taken into account! */ long Curl_timeleft(struct connectdata *conn, long Curl_timeleft(struct SessionHandle *data, struct timeval *nowp, bool duringconnect) { struct SessionHandle *data = conn->data; int timeout_set = 0; long timeout_ms = duringconnect?DEFAULT_CONNECT_TIMEOUT:0; struct timeval now; Loading Loading @@ -673,7 +675,7 @@ CURLcode Curl_is_connected(struct connectdata *conn, now = Curl_tvnow(); /* figure out how long time we have left to connect */ allow = Curl_timeleft(conn, &now, TRUE); allow = Curl_timeleft(data, &now, TRUE); if(allow < 0) { /* time-out, bail out, go home */ Loading Loading @@ -1040,7 +1042,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ *connected = FALSE; /* default to not connected */ /* get the timeout left */ timeout_ms = Curl_timeleft(conn, &before, TRUE); timeout_ms = Curl_timeleft(data, &before, TRUE); if(timeout_ms < 0) { /* a precaution, no need to continue if time already is up */ Loading
lib/connect.h +2 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -37,7 +37,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* generic function that returns how much time there's left to run, according to the timeouts set */ long Curl_timeleft(struct connectdata *conn, long Curl_timeleft(struct SessionHandle *data, struct timeval *nowp, bool duringconnect); Loading
lib/ftp.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -322,7 +322,7 @@ static CURLcode AllowServerConnect(struct connectdata *conn) curl_socklen_t size = (curl_socklen_t) sizeof(add); for(;;) { timeout_ms = Curl_timeleft(conn, NULL, TRUE); timeout_ms = Curl_timeleft(data, NULL, TRUE); if(timeout_ms < 0) { /* if a timeout was already reached, bail out */ Loading
lib/gtls.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -238,7 +238,7 @@ static CURLcode handshake(struct connectdata *conn, for(;;) { /* check allowed time left */ timeout_ms = Curl_timeleft(conn, NULL, duringconnect); timeout_ms = Curl_timeleft(data, NULL, duringconnect); if(timeout_ms < 0) { /* no need to continue if time already is up */ Loading
lib/hostares.c +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -224,7 +224,7 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn, long timeout; struct timeval now = Curl_tvnow(); timeout = Curl_timeleft(conn, &now, TRUE); timeout = Curl_timeleft(data, &now, TRUE); if(!timeout) timeout = CURL_TIMEOUT_RESOLVE * 1000; /* default name resolve timeout */ Loading