curl-library
Re: PATCH: Fix tftp rate limitation logic.
Date: Fri, 05 Mar 2010 15:15:21 -0800
On 03/05/2010 01:36 PM, Daniel Stenberg wrote:
> On Wed, 3 Mar 2010, Ben Greear wrote:
>
>> Attached is a patch that implements tftp rate limitation logic.
>
> Thanks, it does need a little extra love:
>
> tftp.c:1184:7: warning: C++ style comments are not allowed in ISO C90
> tftp.c:1193: warning: ISO C90 forbids mixed declarations and code
> tftp.c:1176: warning: unused parameter ¡data¢
> tftp.c:1233: warning: conversion to ¡long int¢ from ¡curl_off_t¢ may
> alter its value
> tftp.c:1243: warning: conversion to ¡long int¢ from ¡curl_off_t¢ may
> alter its value
>
> And some additional comments:
>
> o It uses >80 column lines with non-curl indent levels
>
> o sleep_time() should be made static
>
> o sleep_time() is only used within tftp_easy_statemach() which thus
> tells us
> that it won't work for the multi interface which uses the
> tftp_multi_statemach() function instead. Hm, thinking about it. Perhaps
> the existing multi interface speed limiting is already working for TFTP
> as well. Do you know?
Here's an updated patch. I'm not seeing any of those compile warnings
on my systems (tried F11 64-bit, FC8 32-bit). Are you compiling with something
other than 'make' to get warnings to show up..or do I have to hack a makefile?
Please let me know if you see more areas for improvement.
Thanks,
Ben
-- Ben Greear <greearb_at_candelatech.com> Candela Technologies Inc http://www.candelatech.com
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- text/plain attachment: curl_tftp_rate2.patch