← Commit list

bc90f80556

Daniel Stenberg
Daniel Stenberg
2025-10-06
SUCCESS Duration: 181s

Subject

tftp: default timeout per block is now 15 seconds

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/tftp.c+4 -6
@@ -206,7 +206,7 @@ const struct Curl_handler Curl_handler_tftp = {
**********************************************************/
static CURLcode tftp_set_timeouts(struct tftp_conn *state)
{
- time_t maxtime, timeout;
+ time_t timeout;
timediff_t timeout_ms;
bool start = (state->state == TFTP_STATE_START);
@@ -219,13 +219,11 @@ static CURLcode tftp_set_timeouts(struct tftp_conn *state)
return CURLE_OPERATION_TIMEDOUT;
}
+ /* Set per-block timeout to total */
if(timeout_ms > 0)
- maxtime = (time_t)(timeout_ms + 500) / 1000;
+ timeout = (time_t)(timeout_ms + 500) / 1000;
else
- maxtime = 3600; /* use for calculating block timeouts */
-
- /* Set per-block timeout to total */
- timeout = maxtime;
+ timeout = 15;
/* Average reposting an ACK after 5 seconds */
state->retry_max = (int)timeout/5;