cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Patch for TFTP Support

From: John Kelly <johnfkelly_at_earthlink.net>
Date: Thu, 1 Sep 2005 21:24:52 -0600 (GMT-06:00)

> 1. It didn't use curl-style indenting. I fixed.

Thank you. I tried, but sometimes my fingers have a mind of their own.

> 2. With picky compiler options it gave me numerous warnings. I fixed.

Thnaks again. Missed that. I'll--enable-debug from now on.

> 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,
Yikes. It leaks. I forgot to clean that up--it was going to be forget-about-em fixed addresses, but then it seemed like strerror feedback would be wise. I was going to strdup them all and free them after use, but forgot. Now that I know about failf, though, I think it would be better to just failf the strerror messages at the point of generation, and ditch the errormsg field in the tftp_stat_t struct.

> Attached to this mail is your patch with my edits.

Should I fix and give you another patch diff-ed from CVS?

> 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!

Here is the RedHat supplied version I've been testing with:
http://home.earthlink.net/~jfkprojects/curl/tftp-hpa-0.39.tar.gz

This windows version is very nice. Many Win32 implementations will crash under load--this one is lightweight, and doesn't have the problem.
http://perso.wanadoo.fr/philippe.jounin/tftpd32.html

Sorry for not following the thread to now. I switched my e-mail now to one where I can take individual messages.

-jk
Received on 2005-09-02