From: Pierangelo Masarati Date: Tue, 13 Apr 2004 15:59:51 +0000 (+0000) Subject: cleanup error messages and logs X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~41 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=171a47c05b6e6aa38be0d92febd84a560345c7f3;p=openldap cleanup error messages and logs --- diff --git a/servers/slapd/back-sql/sql-wrap.c b/servers/slapd/back-sql/sql-wrap.c index 91df43f3a5..86b4689316 100644 --- a/servers/slapd/back-sql/sql-wrap.c +++ b/servers/slapd/back-sql/sql-wrap.c @@ -47,17 +47,13 @@ backsql_PrintErrors( SQLHENV henv, SQLHDBC hdbc, SQLHSTMT sth, int rc ) Debug( LDAP_DEBUG_TRACE, "Return code: %d\n", rc, 0, 0 ); - - rc = SQLError( henv, hdbc, sth, state, &iSqlCode, msg, - SQL_MAX_MESSAGE_LENGTH - 1, &len ); - for ( ; BACKSQL_SUCCESS( rc ); ) { - Debug( LDAP_DEBUG_TRACE, "Native error code: %d\n", - (int)iSqlCode, 0, 0 ); - Debug( LDAP_DEBUG_TRACE, "SQL engine state: %s\n", - state, 0, 0 ); - Debug( LDAP_DEBUG_TRACE, "Message: %s\n", msg, 0, 0 ); - rc = SQLError( henv, hdbc, sth, state, &iSqlCode, msg, - SQL_MAX_MESSAGE_LENGTH - 1, &len ); + for ( ; rc = SQLError( henv, hdbc, sth, state, &iSqlCode, msg, + SQL_MAX_MESSAGE_LENGTH - 1, &len ), BACKSQL_SUCCESS( rc ); ) { + Debug( LDAP_DEBUG_TRACE, + " Native error code: %d\n" + " SQL engine state: %s\n" + " Message: %s\n", + (int)iSqlCode, state, msg ); } }