aboutsummaryrefslogtreecommitdiff
path: root/lib/tftp.c
AgeCommit message (Collapse)Author
2010-09-26TFTP: re-indented the source codeDaniel Stenberg
Just made sure that the good old curl indentation style is used all over this file.
2010-09-26TFTP: Work around tftpd-hpa upload bugTim Newsome
tftpd-hpa has a bug where it will send an incorrect ack when the block counter wraps and tftp options have been sent. Work around that by accepting an ack for 65535 when we're expecting one for 0.
2010-09-03Trial to fix another compiler warning with braces.Guenter Knauf
2010-08-11warning: silence the compilerDaniel Stenberg
warning: conversion to 'long int' from 'time_t' may alter its value ... on win64 when time_t is 64bit and long is 32bit.
2010-06-09fix compiler warning using curl_socket_t to store socket descriptorYang Tse
2010-06-08TFTP: fix compiler warningDaniel Stenberg
Curl_fillreadbuffer()'s second argument takes an int, so typecasting to another is a bad idea.
2010-06-08TFTP: fix warning for sendto() usage on non-POSIX systemsDaniel Stenberg
Older unixes want an 'int' instead of 'size_t' as the 3rd argumment so before this change it would cause warnings such as: There is an implicit conversion from "unsigned long" to "int"; rounding, sign extension, or loss of accuracy may result.
2010-05-21TFTP: send legal timeout valueDaniel Stenberg
Eric Mertens posted bug #3003705: when we made TFTP use the correct timeout option when sent to the server (fixed May 18th 2010) it became obvious that libcurl used invalid timeout values (300 by default while the RFC allows nothing above 255). While of course it is obvious that as TFTP has worked thus far without being able to set timeout at all, just removing the setting wouldn't make any difference in behavior. I decided to still keep it (but fix the problem) as it now actually allows for easier (future) customization of the timeout. (http://curl.haxx.se/bug/view.cgi?id=3003705)
2010-05-21TFTP: don't ack if wrong block num is receivedDaniel Stenberg
If an unexpected block number was received, break out of the switch loop.
2010-05-21TFTP: block id wrap bug fixDaniel Stenberg
In a normal expression, doing [unsigned short] + 1 will not wrap at 16 bits so the comparisons and outputs were done wrong. I added a macro do make sure it gets done right. Douglas Kilpatrick filed bug report #3004787 about it: http://curl.haxx.se/bug/view.cgi?id=3004787
2010-05-18TFTP: send timeout option correctlyDaniel Stenberg
Eric Mertens posted bug report #3003005 pointing out that the libcurl TFTP code was not sending the timeout option properly to the server, and suggested a fix. (http://curl.haxx.se/bug/view.cgi?id=3003005)
2010-04-16Curl_setup_transfer: no longer returns anythingDaniel Stenberg
This function could only return CURLE_OK and by changing it to a void instead, we can simplify code all over.
2010-04-16tftp_rx: Value stored to 'sbytes' is never readDaniel Stenberg
2010-03-26Make rate-limitation logic smootherBen Greear
This gives a smoother rate limitation performance by using sub-second pauses and also taking the buffer sizes into account.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2010-03-21Fix tftp return codes and tsize upload handlingBen Greear
Error codes were not properly returned to the main curl code (and on to apps using libcurl). tftp was crapping out when tsize == 0 on upload, but I see no reason to fail to upload just because the remote file is zero-length. Ignore tsize option on upload.
2010-03-18fix warning about conversions between curl_off_t and longDaniel Stenberg
2010-03-06- Ben Greear brought a patch that fixed the rate limiting logic for TFTP whenDaniel Stenberg
the easy interface was used.
2010-03-01- Ben Greear provided an update for TFTP that fixes upload.Daniel Stenberg
2010-02-04fix printf-style format stringsYang Tse
2010-01-28fix printf-style format stringsYang Tse
2010-01-21make tftp_translate_code() static, it is only used from within tftp.cYang Tse
2009-11-28s/socklen_t/curl_socklen_t/gYang Tse
2009-11-28Fix compiler warning: unused variable `data'Yang Tse
2009-11-27- Markus Koetter provided a polished and updated version of Chad Monroe's TFTPDaniel Stenberg
rework patch that now integrates TFTP properly into libcurl so that it can be used non-blocking with the multi interface and more. BLKSIZE also works. The --tftp-blksize option was added to allow setting the TFTP BLKSIZE from the command line.
2009-11-18Make usage of calloc()'s arguments consistent with rest of code baseYang Tse
2009-08-12- Carsten Lange reported a bug and provided a patch for TFTP upload and theDaniel Stenberg
sending of the TSIZE option. I don't like fixing bugs just hours before a release, but since it was broken and the patch fixes this for him I decided to get it in anyway.
2009-07-24changes to silent compiler warnings with 64bit systems.Gunter Knauf
2009-07-24changes to silent compiler warnings with 64bit systems.Gunter Knauf
2009-07-23changes to silent compiler warnings with 64bit systems.Gunter Knauf
2009-07-23fixed brace error.Gunter Knauf
2009-07-23changes to silent compiler warnings with 64bit systems.Gunter Knauf
2009-05-28fix compiler warning: unused parameterYang Tse
2009-05-10Fix function call pointed data size argument mismatch on 64Bit systemsYang Tse
2009-05-07- Vijay G filed bug report #2723236Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2723236) identifying a problem with libcurl's TFTP code and its lack of dealing with the OACK packet.
2009-05-02Use build-time configured curl_socklen_t instead of socklen_tYang Tse
2009-04-29- Based on bug report #2723219 (http://curl.haxx.se/bug/view.cgi?id=2723219)Daniel Stenberg
I've now made TFTP "connections" not being kept for re-use within libcurl. TFTP is UDP-based so the benefit was really low (if even existing) to begin with so instead of tracking down to fix this problem we instead removed the re-use. I also enabled test case 1099 that I wrote a few days ago to verify that this change fixes the reported problem.
2009-04-21libcurl's memory.h renamed to curl_memory.hYang Tse
2009-02-14In MSVC9 'time_t' is a 64-bit quantity. This causes a truncation warningGisle Vanem
when an 'int' is assigned to a 'time_t' variable. Hence redefine 'retry_time' and 'retry_max' to 'time_t'.
2009-01-28fix compiler warning: conversion from 'int' to 'bool', possible loss of dataYang Tse
2009-01-28fix compiler warning: enumerated type mixed with another typeYang Tse
2009-01-26- Chad Monroe provided the new CURLOPT_TFTP_BLKSIZE option that allows an appDaniel Stenberg
to set desired block size to use for TFTP transfers instead of the default 512 bytes.
2009-01-21Fixed a couple more locale-dependent toupper conversions, mainly forDan Fandrich
clarity. This does fix one problem that causes ;type=i FTP URLs to fail in the Turkish locale when CURLOPT_PROXY_TRANSFER_MODE is used (test case 561) Added tests 561 and 1092 through 1094 to test various combinations of ;type= and ;mode= URLs that could potentially fail in the Turkish locale.
2009-01-13Grant Erickson fixed timeouts for TFTPDaniel Stenberg
2008-12-19- Using the libssh2 0.19 function libssh2_session_block_directions(), libcurlDaniel Stenberg
now has an improved ability to do right when the multi interface (both "regular" and multi_socket) is used for SCP and SFTP transfers. This should result in (much) less busy-loop situations and thus less CPU usage with no speed loss.
2008-11-14Added some #ifdefs around header files and change the EAGAIN test toDan Fandrich
fix compilation on Cell (reported by Jeff Curley).
2008-09-29Removed unneeded includes of signal.h and setjmp.hDan Fandrich
2008-09-02Removed some redundant type castsDan Fandrich
2008-07-30Undo using the sreadfrom() wrapper to replace recvfrom() in our code.Yang Tse
2008-07-21fix compiler warning: comparison between signed and unsignedYang Tse