use slap_str2undef_ad for unknown attributes

This commit is contained in:
Pierangelo Masarati 2001-10-03 18:17:08 +00:00
parent 8a3768276a
commit 35c38e271d
2 changed files with 29 additions and 4 deletions

View File

@ -435,8 +435,21 @@ ldap_send_entry(
attr->a_next = 0;
attr->a_desc = NULL;
if (slap_str2ad(mapped, &attr->a_desc, &text) != LDAP_SUCCESS) {
ch_free(attr);
continue;
if (slap_str2undef_ad(mapped, &attr->a_desc, &text)
!= LDAP_SUCCESS) {
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
"slap_str2undef_ad(%s): "
"%s\n", mapped, text ));
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
"slap_str2undef_ad(%s): "
"%s\n%s", mapped, text, "" );
#endif /* !NEW_LOGGING */
ch_free(attr);
continue;
}
}
attr->a_vals = ldap_get_values_len(lc->ld, e, a);
if (!attr->a_vals) {

View File

@ -652,8 +652,20 @@ meta_send_entry(
attr->a_desc = NULL;
if ( slap_str2ad( mapped, &attr->a_desc, &text )
!= LDAP_SUCCESS) {
ch_free( attr );
continue;
if (slap_str2undef_ad(mapped, &attr->a_desc, &text)
!= LDAP_SUCCESS) {
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
"slap_str2undef_ad(%s): "
"%s\n", mapped, text ));
#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_ANY,
"slap_str2undef_ad(%s): "
"%s\n%s", mapped, text, "" );
#endif /* !NEW_LOGGING */
ch_free(attr);
continue;
}
}
attr->a_vals = ldap_get_values_len( lsc->ld, e, a );
if ( !attr->a_vals ) {