From: Pierangelo Masarati Date: Thu, 18 Mar 2004 20:11:49 +0000 (+0000) Subject: cleanup error messages X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~208 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d3de8c3336bb067781861411413d7e2b097cd242;p=openldap cleanup error messages --- diff --git a/servers/slapd/back-sql/schema-map.c b/servers/slapd/back-sql/schema-map.c index 12598772f3..092a0750f9 100644 --- a/servers/slapd/back-sql/schema-map.c +++ b/servers/slapd/back-sql/schema-map.c @@ -216,7 +216,7 @@ backsql_load_schema_map( backsql_info *si, SQLHDBC dbh ) backsql_oc_map_rec *oc_map; backsql_at_map_rec *at_map; - Debug( LDAP_DEBUG_TRACE, "==>load_schema_map()\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "==>backsql_load_schema_map()\n", 0, 0, 0 ); /* * TimesTen : See if the ldap_entries.dn_ru field exists in the schema @@ -240,18 +240,18 @@ backsql_load_schema_map( backsql_info *si, SQLHDBC dbh ) rc = backsql_Prepare( dbh, &oc_sth, si->oc_query, 0 ); if ( rc != SQL_SUCCESS ) { - Debug( LDAP_DEBUG_TRACE, "load_schema_map(): " + Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): " "error preparing oc_query: '%s'\n", si->oc_query, 0, 0 ); backsql_PrintErrors( si->db_env, dbh, oc_sth, rc ); return LDAP_OTHER; } - Debug( LDAP_DEBUG_TRACE, "load_schema_map(): at_query '%s'\n", + Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): at_query '%s'\n", si->at_query, 0, 0 ); rc = backsql_Prepare( dbh, &at_sth, si->at_query, 0 ); if ( rc != SQL_SUCCESS ) { - Debug( LDAP_DEBUG_TRACE, "load_schema_map(): " + Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): " "error preparing at_query: '%s'\n", si->at_query, 0, 0 ); backsql_PrintErrors( si->db_env, dbh, at_sth, rc ); @@ -260,7 +260,7 @@ backsql_load_schema_map( backsql_info *si, SQLHDBC dbh ) rc = backsql_BindParamID( at_sth, 1, &oc_id ); if ( rc != SQL_SUCCESS ) { - Debug( LDAP_DEBUG_TRACE, "load_schema_map(): " + Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): " "error binding param for at_query: \n", 0, 0, 0 ); backsql_PrintErrors( si->db_env, dbh, at_sth, rc ); return LDAP_OTHER; @@ -268,7 +268,7 @@ backsql_load_schema_map( backsql_info *si, SQLHDBC dbh ) rc = SQLExecute( oc_sth ); if ( rc != SQL_SUCCESS ) { - Debug( LDAP_DEBUG_TRACE, "load_schema_map(): " + Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): " "error executing oc_query: \n", 0, 0, 0 ); backsql_PrintErrors( si->db_env, dbh, oc_sth, rc ); return LDAP_OTHER; @@ -286,7 +286,7 @@ backsql_load_schema_map( backsql_info *si, SQLHDBC dbh ) oc_map->bom_oc = oc_find( oc_row.cols[ 1 ] ); if ( oc_map->bom_oc == NULL ) { - Debug( LDAP_DEBUG_TRACE, "load_schema_map(): " + Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): " "objectClass '%s' is not defined in schema\n", oc_row.cols[ 1 ], 0, 0 ); return LDAP_OTHER; /* undefined objectClass ? */ @@ -327,7 +327,7 @@ backsql_load_schema_map( backsql_info *si, SQLHDBC dbh ) return LDAP_OTHER; } oc_id = oc_map->bom_id; - Debug( LDAP_DEBUG_TRACE, "load_schema_map(): " + Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): " "objectClass '%s': keytbl='%s' keycol='%s'\n", BACKSQL_OC_NAME( oc_map ), oc_map->bom_keytbl.bv_val, oc_map->bom_keycol.bv_val ); @@ -348,13 +348,13 @@ backsql_load_schema_map( backsql_info *si, SQLHDBC dbh ) BACKSQL_IS_ADD( oc_map->bom_expect_return ), BACKSQL_IS_DEL( oc_map->bom_expect_return ), 0 ); - Debug( LDAP_DEBUG_TRACE, "load_schema_map(): " + Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): " "autoadding 'objectClass' and 'ref' mappings\n", 0, 0, 0 ); backsql_add_sysmaps( oc_map ); rc = SQLExecute( at_sth ); if ( rc != SQL_SUCCESS ) { - Debug( LDAP_DEBUG_TRACE, "load_schema_map(): " + Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): " "error executing at_query: \n", 0, 0, 0 ); backsql_PrintErrors( SQL_NULL_HENV, dbh, at_sth, rc ); return LDAP_OTHER; @@ -367,26 +367,28 @@ backsql_load_schema_map( backsql_info *si, SQLHDBC dbh ) struct berval bv; struct berbuf bb = BB_NULL; - Debug( LDAP_DEBUG_TRACE, "********'%s'\n", - at_row.cols[ 0 ], 0, 0 ); Debug( LDAP_DEBUG_TRACE, - "name='%s',sel_expr='%s' from='%s'", + "attributeType:\n" + "\tname='%s'\n" + "\tsel_expr='%s'\n" + "\tfrom='%s'\n", at_row.cols[ 0 ], at_row.cols[ 1 ], at_row.cols[ 2 ] ); Debug( LDAP_DEBUG_TRACE, - "join_where='%s',add_proc='%s'", - at_row.cols[ 3 ], at_row.cols[ 4 ], 0 ); - Debug( LDAP_DEBUG_TRACE, "delete_proc='%s'\n", - at_row.cols[ 5 ], 0, 0 ); + "\tjoin_where='%s'\n" + "\tadd_proc='%s'\n" + "\tdelete_proc='%s'\n", + at_row.cols[ 3 ], at_row.cols[ 4 ], + at_row.cols[ 5 ]); /* TimesTen */ - Debug( LDAP_DEBUG_TRACE, "sel_expr_u='%s'\n", + Debug( LDAP_DEBUG_TRACE, "\tsel_expr_u='%s'\n", at_row.cols[ 8 ], 0, 0 ); at_map = (backsql_at_map_rec *)ch_calloc( 1, sizeof( backsql_at_map_rec ) ); rc = slap_str2ad( at_row.cols[ 0 ], &at_map->bam_ad, &text ); if ( rc != LDAP_SUCCESS ) { - Debug( LDAP_DEBUG_TRACE, "load_schema_map(): " + Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): " "attribute '%s' for objectClass '%s' " "is not defined in schema: %s\n", at_row.cols[ 0 ], @@ -426,7 +428,7 @@ backsql_load_schema_map( backsql_info *si, SQLHDBC dbh ) at_map->bam_expect_return = strtol( at_row.cols[ 7 ], NULL, 0 ); backsql_make_attr_query( oc_map, at_map ); - Debug( LDAP_DEBUG_TRACE, "load_schema_map(): " + Debug( LDAP_DEBUG_TRACE, "backsql_load_schema_map(): " "preconstructed query '%s'\n", at_map->bam_query, 0, 0 ); at_map->bam_next = NULL; @@ -456,7 +458,7 @@ backsql_load_schema_map( backsql_info *si, SQLHDBC dbh ) SQLFreeStmt( at_sth, SQL_DROP ); SQLFreeStmt( oc_sth, SQL_DROP ); si->bsql_flags |= BSQLF_SCHEMA_LOADED; - Debug( LDAP_DEBUG_TRACE, "<==load_schema_map()\n", 0, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, "<==backsql_load_schema_map()\n", 0, 0, 0 ); return LDAP_SUCCESS; }