Loading lib/tftp.c +10 Changes for lib/tftp.c: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ #include "multiif.h" #include "url.h" #include "rawstr.h" #include "speedcheck.h" #define _MPRINTF_REPLACE /* use our functions only */ #include <curl/mprintf.h> Loading Loading @@ -1255,6 +1256,15 @@ static CURLcode tftp_doing(struct connectdata *conn, bool *dophase_done) if(*dophase_done) { DEBUGF(infof(conn->data, "DO phase is complete\n")); } else { /* The multi code doesn't have this logic for the DOING state so we provide it for TFTP since it may do the entire transfer in this state. */ if(Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; else result = Curl_speedcheck(conn->data, Curl_tvnow()); } return result; } Loading tests/data/Makefile.am +1 −1 Changes for tests/data/Makefile.am: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \ test1216 test1217 test1218 test1219 \ test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 \ test1228 test1229 test1230 test1231 test1232 test1233 test1234 test1235 \ test1236 test1237 \ test1236 test1237 test1238 \ \ test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \ test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \ Loading tests/data/test1238 +49 Changes for tests/data/test1238: 49 added lines, 0 removed lines. Original line number Diff line number Diff line <testcase> <info> <keywords> TFTP TFTP RRQ </keywords> </info> # # Server-side <reply> <servercmd> writedelay: 1 </servercmd> # ~1200 bytes (so that they don't fit in two 512 byte chunks) <data nocheck="yes"> 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 </data> </reply> # # Client-side <client> <server> tftp </server> <name> slow TFTP retrieve cancel due to -Y and -y </name> # if less than 1000 bytes/sec within 2 seconds, abort! <command> tftp://%HOSTIP:%TFTPPORT//1238 -Y1000 -y2 </command> </client> # # Verify pseudo protocol after the test has been "shot" <verify> <protocol> opcode: 1 filename: /1238 mode: octet </protocol> # 28 = CURLE_OPERATION_TIMEDOUT <errorcode> 28 </errorcode> </verify> </testcase> Loading
lib/tftp.c +10 Changes for lib/tftp.c: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ #include "multiif.h" #include "url.h" #include "rawstr.h" #include "speedcheck.h" #define _MPRINTF_REPLACE /* use our functions only */ #include <curl/mprintf.h> Loading Loading @@ -1255,6 +1256,15 @@ static CURLcode tftp_doing(struct connectdata *conn, bool *dophase_done) if(*dophase_done) { DEBUGF(infof(conn->data, "DO phase is complete\n")); } else { /* The multi code doesn't have this logic for the DOING state so we provide it for TFTP since it may do the entire transfer in this state. */ if(Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; else result = Curl_speedcheck(conn->data, Curl_tvnow()); } return result; } Loading
tests/data/Makefile.am +1 −1 Changes for tests/data/Makefile.am: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \ test1216 test1217 test1218 test1219 \ test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 \ test1228 test1229 test1230 test1231 test1232 test1233 test1234 test1235 \ test1236 test1237 \ test1236 test1237 test1238 \ \ test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \ test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \ Loading
tests/data/test1238 +49 Changes for tests/data/test1238: 49 added lines, 0 removed lines. Original line number Diff line number Diff line <testcase> <info> <keywords> TFTP TFTP RRQ </keywords> </info> # # Server-side <reply> <servercmd> writedelay: 1 </servercmd> # ~1200 bytes (so that they don't fit in two 512 byte chunks) <data nocheck="yes"> 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 </data> </reply> # # Client-side <client> <server> tftp </server> <name> slow TFTP retrieve cancel due to -Y and -y </name> # if less than 1000 bytes/sec within 2 seconds, abort! <command> tftp://%HOSTIP:%TFTPPORT//1238 -Y1000 -y2 </command> </client> # # Verify pseudo protocol after the test has been "shot" <verify> <protocol> opcode: 1 filename: /1238 mode: octet </protocol> # 28 = CURLE_OPERATION_TIMEDOUT <errorcode> 28 </errorcode> </verify> </testcase>