]> git.sur5r.net Git - openldap/commitdiff
fix previous commit (ITS#5819)
authorPierangelo Masarati <ando@openldap.org>
Wed, 19 Nov 2008 17:08:48 +0000 (17:08 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 19 Nov 2008 17:08:48 +0000 (17:08 +0000)
servers/slapd/schema_check.c

index e45a63d7d7f38a7068de8a5d053fcaeb57a42b93..eba6e707dd31cfcb78d13d76c63b154eb3fe1443 100644 (file)
@@ -880,12 +880,13 @@ entry_naming_check(
                                                ava->la_attr.bv_val );
                                        break;
                                case LDAP_NO_SUCH_ATTRIBUTE:
-                                       snprintf( textbuf, textlen, 
-                                               "value of naming attribute '%s' is not present in entry",
-                                               ava->la_attr.bv_val );
                                        if ( add_naming ) {
                                                add = 1;
                                                rc = LDAP_SUCCESS;
+                                       } else {
+                                               snprintf( textbuf, textlen, 
+                                                       "value of naming attribute '%s' is not present in entry",
+                                                       ava->la_attr.bv_val );
                                        }
                                        break;
                                default: