- /* generate normalized dn */
- {
- struct berval *ndn = NULL;
-
- rc = dnNormalize( NULL, &e->e_name, &ndn );
- if( rc != LDAP_SUCCESS ) {
-#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "str2entry: entry %ld has invalid dn: %s\n",
- (long) e->e_id, e->e_dn ));
-#else
- Debug( LDAP_DEBUG_ANY,
- "str2entry: entry %ld has invalid dn: %s\n",
- (long) e->e_id, e->e_dn, 0 );
-#endif
- entry_free( e );
- return NULL;
- }
-
- e->e_nname.bv_val = ndn->bv_val;
- e->e_nname.bv_len = ndn->bv_len;
- free( ndn );
- }
-