version 1.9, 2000/02/06 20:09:45
|
version 1.10, 2000/03/01 21:59:34
|
Line 1
|
Line 1
|
/* $OpenLDAP: pkg/ldap/servers/slapd/ava.c,v 1.8 2000/01/31 21:14:16 kurt Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/ava.c,v 1.9 2000/02/06 20:09:45 kurt Exp $ */ |
/* |
/* |
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. |
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
Line 31 ava_free(
|
Line 31 ava_free(
|
|
|
#else |
#else |
|
|
|
void |
|
ava_free( |
|
Ava *ava, |
|
int freeit |
|
) |
|
{ |
|
ch_free( (char *) ava->ava_type ); |
|
ch_free( (char *) ava->ava_value.bv_val ); |
|
if ( freeit ) { |
|
ch_free( (char *) ava ); |
|
} |
|
} |
|
|
int |
int |
get_ava( |
get_ava( |
BerElement *ber, |
BerElement *ber, |
Line 40 get_ava(
|
Line 53 get_ava(
|
if ( ber_scanf( ber, "{ao}", &ava->ava_type, &ava->ava_value ) |
if ( ber_scanf( ber, "{ao}", &ava->ava_type, &ava->ava_value ) |
== LBER_ERROR ) { |
== LBER_ERROR ) { |
Debug( LDAP_DEBUG_ANY, " get_ava ber_scanf\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_ANY, " get_ava ber_scanf\n", 0, 0, 0 ); |
return -1; |
return SLAPD_DISCONNECT; |
} |
} |
|
|
attr_normalize( ava->ava_type ); |
attr_normalize( ava->ava_type ); |
value_normalize( ava->ava_value.bv_val, attr_syntax( ava->ava_type ) ); |
value_normalize( ava->ava_value.bv_val, attr_syntax( ava->ava_type ) ); |
|
|
return( LDAP_SUCCESS ); |
return LDAP_SUCCESS; |
} |
|
|
|
void |
|
ava_free( |
|
Ava *ava, |
|
int freeit |
|
) |
|
{ |
|
ch_free( (char *) ava->ava_type ); |
|
ch_free( (char *) ava->ava_value.bv_val ); |
|
if ( freeit ) { |
|
ch_free( (char *) ava ); |
|
} |
|
} |
} |
|
|
#endif |
#endif |