]> git.sur5r.net Git - openldap/commitdiff
Fix reject error logging
authorHoward Chu <hyc@openldap.org>
Wed, 24 Dec 2003 10:39:14 +0000 (10:39 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 24 Dec 2003 10:39:14 +0000 (10:39 +0000)
servers/slurpd/reject.c

index b147cc2b220636f10b434e0799ec9fd30dd73973..399d77305cce8a52c1490f5a6e36e1bc82d05f1b 100644 (file)
@@ -108,11 +108,11 @@ write_reject(
 #endif
     } else {
        fseek( rfp, 0, 2 );
-       if ( errmsg != NULL ) {
-           fprintf( rfp, "%s: %s\n", ERROR_STR, errmsg );
-       } else {
-           fprintf( rfp, "%s: %s\n", ERROR_STR, ldap_err2string( lderr ));
+       fprintf( rfp, "%s: %s", ERROR_STR, ldap_err2string( lderr ));
+       if ( errmsg && *errmsg ) {
+           fprintf( rfp, ": %s", errmsg );
        }
+       fprintf( rfp, "\n" );
        if ((rc = re->re_write( ri, re, rfp )) < 0 ) {
 #ifdef NEW_LOGGING
                LDAP_LOG ( SLURPD, ERR, "write_reject: "