cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl tftp large file transfer rollover at 32MB problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 31 Jul 2009 20:34:19 +0200 (CEST)

On Fri, 31 Jul 2009, NCarolina 350 wrote:

> Either way, I think the following logic can be added to the library
> (pseudo-code):

[...]

> Does this make sense? Is there a better solution? I can sen da patch for
> review next week if this approach makes sense.

I'm not very into the TFTP protocol nor the libcurl implementation, and I
don't have the time and energy to sink into that right now, but if you can
come up with a patch that corrects your problem and still runs the test cases
fine I'll be glad to have it go in!

> if ((tsize / blksize) > blksize*0x10000) {

This seems incorrect though as this would essentially be the same as:

   if(tsize > 0x10000)

While I would expect that you want something like:

   if((tsize / blksize) >= 0x10000)

IE: if the last block would need a counter larger than 0xffff, we need to get
a larger block size.

-- 
  / daniel.haxx.se
Received on 2009-07-31