]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/rwmconf.c
ITS#6103: rev 1.331 followup for LDAP_CONNECTIONLESS
[openldap] / servers / slapd / overlays / rwmconf.c
index a0856347751f1a678a659c3c269d45bba64494cb..804f7566203ba9d41cded6d0641cee7277edf38a 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1999-2007 The OpenLDAP Foundation.
+ * Copyright 1999-2009 The OpenLDAP Foundation.
  * Portions Copyright 1999-2003 Howard Chu.
  * Portions Copyright 2000-2003 Pierangelo Masarati.
  * All rights reserved.
@@ -71,6 +71,13 @@ rwm_map_config(
                return 1;
        }
 
+       if ( !is_oc && map->map == NULL ) {
+               /* only init if required */
+               if ( rwm_map_init( map, &mapping ) != LDAP_SUCCESS ) {
+                       return 1;
+               }
+       }
+
        if ( strcmp( argv[2], "*" ) == 0 ) {
                if ( argc < 4 || strcmp( argv[3], "*" ) == 0 ) {
                        map->drop_missing = ( argc < 4 );
@@ -225,11 +232,6 @@ rwm_map_config(
                                rwm_mapping_cmp, rwm_mapping_dup );
 
 success_return:;
-       if ( !is_oc && map->map == NULL ) {
-               /* only init if required */
-               rc = rwm_map_init( map, &mapping ) != LDAP_SUCCESS;
-       }
-
        return rc;
 
 error_return:;