]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/error.c
Add O_EXCL
[openldap] / libraries / libldap / error.c
index 8fc685b25f330ff17ba2a49e8c20590af7650334..45f9eec86e4a8542766b7064a11d6c324ea5ce90 100644 (file)
@@ -30,13 +30,13 @@ static struct ldaperror ldap_builtin_errlist[] = {
        {LDAP_COMPARE_FALSE,                    "Compare False" },
        {LDAP_COMPARE_TRUE,                     "Compare True" },
        {LDAP_STRONG_AUTH_NOT_SUPPORTED, "Authentication method not supported" },
-       {LDAP_STRONG_AUTH_REQUIRED,     "Strong authentication required" },
+       {LDAP_STRONG_AUTH_REQUIRED,     "Strong(er) authentication required" },
        {LDAP_PARTIAL_RESULTS,                  "Partial results and referral received" },
 
        {LDAP_REFERRAL,                                 "Referral"},
        {LDAP_ADMINLIMIT_EXCEEDED,              "Administrative limit exceeded"},
        {LDAP_UNAVAILABLE_CRITICAL_EXTENSION,
-                                                                       "Criticial extension is unavailable"},
+                                                                       "Critical extension is unavailable"},
        {LDAP_CONFIDENTIALITY_REQUIRED, "Confidentiality required"},
        {LDAP_SASL_BIND_IN_PROGRESS,    "SASL bind in progress"},
 
@@ -56,21 +56,21 @@ static struct ldaperror ldap_builtin_errlist[] = {
        {LDAP_INAPPROPRIATE_AUTH,               "Inappropriate authentication" },
        {LDAP_INVALID_CREDENTIALS,              "Invalid credentials" },
        {LDAP_INSUFFICIENT_ACCESS,              "Insufficient access" },
-       {LDAP_BUSY,                                     "DSA is busy" },
-       {LDAP_UNAVAILABLE,                              "DSA is unavailable" },
-       {LDAP_UNWILLING_TO_PERFORM,     "DSA is unwilling to perform" },
+       {LDAP_BUSY,                                     "Server is busy" },
+       {LDAP_UNAVAILABLE,                              "Server is unavailable" },
+       {LDAP_UNWILLING_TO_PERFORM,     "Server is unwilling to perform" },
        {LDAP_LOOP_DETECT,                              "Loop detected" },
 
        {LDAP_NAMING_VIOLATION,                 "Naming violation" },
        {LDAP_OBJECT_CLASS_VIOLATION,   "Object class violation" },
-       {LDAP_NOT_ALLOWED_ON_NONLEAF,   "Operation not allowed on nonleaf" },
+       {LDAP_NOT_ALLOWED_ON_NONLEAF,   "Operation not allowed on non-leaf" },
        {LDAP_NOT_ALLOWED_ON_RDN,               "Operation not allowed on RDN" },
        {LDAP_ALREADY_EXISTS,                   "Already exists" },
        {LDAP_NO_OBJECT_CLASS_MODS,     "Cannot modify object class" },
        {LDAP_RESULTS_TOO_LARGE,                "Results too large" },
        {LDAP_AFFECTS_MULTIPLE_DSAS,    "Operation affects multiple DSAs" },
 
-       {LDAP_OTHER,                                    "Unknown error" },
+       {LDAP_OTHER,                                    "Internal (implementation specific) error" },
 
        /* API ResultCodes */
        {LDAP_SERVER_DOWN,                              "Can't contact LDAP server" },
@@ -147,7 +147,7 @@ ldap_err2string( int err )
        const struct ldaperror *e;
        
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "error", LDAP_LEVEL_ENTRY, "ldap_err2string\n" ));
+       LDAP_LOG ( OPERATION, ENTRY, "ldap_err2string\n", 0,0,0 );
 #else
        Debug( LDAP_DEBUG_TRACE, "ldap_err2string\n", 0, 0, 0 );
 #endif
@@ -163,7 +163,7 @@ ldap_perror( LDAP *ld, LDAP_CONST char *str )
 {
        const struct ldaperror *e;
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "error", LDAP_LEVEL_ENTRY, "ldap_perror\n" ));
+       LDAP_LOG ( OPERATION, ENTRY, "ldap_perror\n", 0,0,0 );
 #else
        Debug( LDAP_DEBUG_TRACE, "ldap_perror\n", 0, 0, 0 );
 #endif
@@ -172,11 +172,6 @@ ldap_perror( LDAP *ld, LDAP_CONST char *str )
        assert( LDAP_VALID( ld ) );
        assert( str );
 
-       if ( ld == NULL ) {
-               fprintf( stderr, "ldap_perror: invalid session handle\n" );
-               return;
-       }
-
        e = ldap_int_error( ld->ld_errno );
 
        fprintf( stderr, "%s: %s (%d)\n",
@@ -248,7 +243,7 @@ ldap_parse_result(
        BerElement      *ber;
 
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "error", LDAP_LEVEL_ENTRY, "ldap_parse_result\n" ));
+       LDAP_LOG ( OPERATION, ENTRY, "ldap_parse_result\n", 0,0,0 );
 #else
        Debug( LDAP_DEBUG_TRACE, "ldap_parse_result\n", 0, 0, 0 );
 #endif
@@ -257,10 +252,6 @@ ldap_parse_result(
        assert( LDAP_VALID( ld ) );
        assert( r != NULL );
 
-       if ( ld == NULL || r == NULL ) {
-               return LDAP_PARAM_ERROR;
-       }
-
        if(errcodep != NULL) *errcodep = LDAP_SUCCESS;
        if(matcheddnp != NULL) *matcheddnp = NULL;
        if(errmsgp != NULL) *errmsgp = NULL;