1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r2883: set BOOL to the internal values not the wire ones

metze
(This used to be commit ad7b0385cf)
This commit is contained in:
Stefan Metzmacher 2004-10-09 23:58:11 +00:00 committed by Gerald (Jerry) Carter
parent 6ac94532bc
commit 9d26f044a3

View File

@ -241,8 +241,14 @@ BOOL asn1_write_BOOLEAN(ASN1_DATA *data, BOOL v)
BOOL asn1_read_BOOLEAN(ASN1_DATA *data, BOOL *v)
{
uint8_t tmp = 0;
asn1_start_tag(data, ASN1_BOOLEAN);
asn1_read_uint8(data, (uint8 *)v);
asn1_read_uint8(data, &tmp);
if (tmp == 0xFF) {
*v = True;
} else {
*v = False;
}
asn1_end_tag(data);
return !data->has_error;
}