Regarding DateAndTime

Frank Fock Frank.Fock____t-online.de
Wed May 14 21:06:13 CEST 2003


Hi Cheng,

this was a bug in AgenPro 2 that did not
handle alternative range restrictions
correctly in some cases. DatenAndTime was
one of those. AgenPro v2.0.5 can be
downloaded from http://www.agentpp.com

Best regards,
Frank Fock

Cheng Chaoting wrote:
> Hi,
>  
> One mib leaf,which is DateAndTime type,after compiling,the generated 
> code is:
>  
> int 
> imap_northbound_common_hwIMAPNorthboundCommonSystemLable::prepare_set_request(Request* 
> req, int& ind)
> {
>  int status;
>  if ((status = DateAndTime::prepare_set_request(req, ind)) !=
>      SNMP_ERROR_SUCCESS) return status;
>  
>  Vb vb(req->get_value(ind));
>  OctetStr v;
>  vb.get_value(v);
>  if (!(((v.len() >= 8) && (v.len() <= 8))))
>    return SNMP_ERROR_WRONG_LENGTH;
>  //--AgentGen BEGIN=hwIMAPNorthboundCommonSystemLable::prepare_set_request
>  //--AgentGen END
>  return SNMP_ERROR_SUCCESS;
> }
>  
> For this code line:
> if (!(((v.len() >= 8) && (v.len() <= 8))))//only 8 is allowed,but 11 
> should be allowed too.
> I guess it should be:
> if(!(v.len() ==8 || v.len()==11))
>  
> Right?
>  
> TIA
>  
> Best regards,
> Cheng Chaoting






More information about the AGENTPP mailing list