]> git.sur5r.net Git - openldap/commitdiff
rework ITS#4322 check
authorPierangelo Masarati <ando@openldap.org>
Mon, 6 Aug 2007 14:46:51 +0000 (14:46 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 6 Aug 2007 14:46:51 +0000 (14:46 +0000)
servers/slapd/back-relay/config.c

index 502bfae4619e6aa6d5558d6c1ac4c8ddc2f736a2..db2e3c15506f01fad8080c5ccd4a653fc9ab6cbc 100644 (file)
@@ -48,6 +48,14 @@ relay_back_db_config(
                int             rc;
                BackendDB       *bd;
 
+               if ( !BER_BVISNULL( &ri->ri_realsuffix ) ) {
+                       Log2( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
+                               "%s: line %d: "
+                               "relay dn already specified.\n",
+                               fname, lineno );
+                       return 1;
+               }
+
                switch ( argc ) {
                case 3:
                        if ( strcmp( argv[ 2 ], "massage" ) != 0 ) {
@@ -96,14 +104,6 @@ relay_back_db_config(
                        return 1;
                }
 
-               if ( !BER_BVISNULL( &ri->ri_realsuffix ) ) {
-                       Log2( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
-                               "%s: line %d: "
-                               "relay dn already specified.\n",
-                               fname, lineno );
-                       return 1;
-               }
-
                /* The man page says that the "relay" directive
                 * automatically instantiates slapo-rwm; I don't
                 * like this very much any more, I'd prefer to