Re: [PATCH] SMP SNMP

From: Tsantilas Christos <chtsanti_at_users.sourceforge.net>
Date: Mon, 31 Jan 2011 13:49:17 +0200

On 01/29/2011 03:06 AM, Amos Jeffries wrote:
> On 29/01/11 07:04, Tsantilas Christos wrote:
>> On 01/27/2011 05:10 PM, Amos Jeffries wrote:
>>> include/Range.h:
>>> * is this change able to be applied separately? it looks like a bug fix
>>> unrelated to the actual SMP changes.
>>
>> I think it is part of this patch. This change required because the
>> "Range" class used in Snmp::Var and Snmp::Pdu classes
>>
>
> The new code depending on correct behaviour of Range is not relevant to
> it's being an unrelated bug.
> Please commit this immediately along with the required casting changes
> the existing code needs.

There is problem with the range part of the patch.
This patch change the returned type of Range::size() to be size_t
The size_t on a 32bit system is 32bit, so we may have problem in some
range HTTP requests/responses with large objects.

I think we have the following options:
  1) use uint64_t as return type for Range::size() method
  2) Define a new template argument for range (Range<C, S>) for use as
return type of Range::size()
  3) Modify the current patch to not use Range.

I think the easier to implement is the 1, but I am not sure if it is the
best choice.
Received on Mon Jan 31 2011 - 11:49:19 MST

This archive was generated by hypermail 2.2.0 : Mon Jan 31 2011 - 12:00:07 MST