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
I'll fix this up and re-submit shortly.
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?
I don't know..I don't have a good way to test the multi logic as my
app uses the easy interface. The 'curl' app itself works, but probably
it's not using multi either?
Thanks,
Ben
--
Ben Greear <[email protected]>
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