curl-library
Re: Patch for TFTP Support
Date: Thu, 1 Sep 2005 23:55:01 +0200 (CEST)
On Wed, 31 Aug 2005, John Kelly wrote:
> Here is a patch from a 3 day old CVS snapshot:
Thanks!
It applied nice and cleanly even on 7.14.1. A few remarks:
1. It didn't use curl-style indenting. I fixed.
2. With picky compiler options it gave me numerous warnings. I fixed. (Use
configure --enable-debug and you'll get a huge set.)
3. I have no test server setup right now, so I can't test this but I can't see
how this code does _not_ leak memory or crash, since state->errormsg is
sometimes set to a fixed string and sometimes to the return code from
strdup(). Or am I wrong? If I'm not, can you fix?
Attached to this mail is your patch with my edits.
Does anyone have a (small) free tftp server source code lying around? It would
be neat to get a test server added so that we can have a bunch of TFTP tests
to verify this new beauty!
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
- TEXT/PLAIN attachment: tftp-2.patch