[Date Prev][Date Next]
> -----Original Message-----
> From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.org]
> At 12:53 PM 2002-01-10, Howard Chu wrote:
> >The code to deal with multi-byte tags in ber_get_next is byte-order
> dependent, it will only work on a Big-Endian platform. It seems to
> me that this code shouldn't even be here since the only valid tag at
> this point is 0x30. Any opinions?
> For the LDAPMessage SEQUENCE, the 0x30 is to be expected.
> However, once could use ber_get_next to read BER/DER
> element which had a multi-octet tag. If the code could
> can be easily patched to handle correctly and efficiently
> handle multi-byte tags, that is what I would prefer.
> Otherwise, we might as well optimize for single-octet
Ok. The code I just checked in is now byte-order independent for multi-octet
tags. It also is about 58% faster overall. (Trivial, ber_get_next was never
a significant amount of time. Dropped from 66th most CPU to 77th.)
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
Symas: Premier OpenSource Development and Support