#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: \"%s\"\n", s ? s : "NULL" ));
+ "str2entry: \"%s\"\n", s ? s : "NULL" ));
#else
Debug( LDAP_DEBUG_TRACE, "=> str2entry\n",
s ? s : "NULL", 0, 0 );
if( e == NULL ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "str2entry: entry allocation failed.\n" ));
+ "str2entry: entry allocation failed.\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"<= str2entry NULL (entry allocation failed)\n",
return NULL;
}
- e->e_name.bv_val = pdn->bv_val != NULL
+ e->e_name.bv_val = ( pdn->bv_val != NULL )
? pdn->bv_val : ch_strdup( "" );
e->e_name.bv_len = pdn->bv_len;
free( pdn );
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: str2ad(%s): %s\n", type, text ));
+ "str2entry: str2ad(%s): %s\n", type, text ));
#else
Debug( slapMode & SLAP_TOOL_MODE
? LDAP_DEBUG_ANY : LDAP_DEBUG_TRACE,
if( rc != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: str2undef_ad(%s): %s\n", type, text ));
+ "str2entry: str2undef_ad(%s): %s\n", type, text ));
#else
Debug( LDAP_DEBUG_ANY,
"<= str2entry: str2undef_ad(%s): %s\n",
} else {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "str2entry: no validator for syntax %s\n",
- ad->ad_type->sat_syntax->ssyn_oid ));
+ "str2entry: no validator for syntax %s\n",
+ ad->ad_type->sat_syntax->ssyn_oid ));
#else
Debug( LDAP_DEBUG_ANY,
"str2entry: no validator for syntax %s\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "str2entry: invalid value for syntax %s\n",
- ad->ad_type->sat_syntax->ssyn_oid ));
+ "str2entry: invalid value for syntax %s\n",
+ ad->ad_type->sat_syntax->ssyn_oid ));
#else
Debug( LDAP_DEBUG_ANY,
"str2entry: invalid value for syntax %s\n",
if( rc != 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
- "str2entry: NULL (attr_merge)\n" ));
+ "str2entry: NULL (attr_merge)\n" ));
#else
Debug( LDAP_DEBUG_ANY,
"<= str2entry NULL (attr_merge)\n", 0, 0, 0 );
if ( e->e_dn == NULL ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "str2entry: entry %ld has no dn.\n",
- (long) e->e_id ));
+ "str2entry: entry %ld has no dn.\n",
+ (long) e->e_id ));
#else
Debug( LDAP_DEBUG_ANY, "str2entry: entry %ld has no dn\n",
(long) e->e_id, 0, 0 );
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 ));
+ "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",
/* check backend */
if( select_backend( e->e_ndn, is_entry_referral(e), nosubs ) != be ) {
- fprintf( stderr, "%s: database (%s) not configured to "
- "hold dn=\"%s\" (line=%d)\n",
- progname,
+ fprintf( stderr, "%s: line %d: "
+ "database (%s) not configured to hold \"%s\"\n",
+ progname, lineno,
be ? be->be_suffix[0] : "<none>",
- e->e_dn, lineno );
+ e->e_dn );
+ fprintf( stderr, "%s: line %d: "
+ "database (%s) not configured to hold \"%s\"\n",
+ progname, lineno,
+ be ? be->be_nsuffix[0]->bv_val : "<none>",
+ e->e_ndn );
rc = EXIT_FAILURE;
entry_free( e );
if( continuemode ) continue;