]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-relay/init.c
Sync with HEAD
[openldap] / servers / slapd / back-relay / init.c
index d5a3d9ac15a5d4abacad01c05896079954e688ba..d3b19e6d496d8fafb53b88c47a697f9a1d745e6e 100644 (file)
@@ -21,6 +21,7 @@
 #include "portable.h"
 
 #include <stdio.h>
+#include <ac/string.h>
 
 #include "slap.h"
 #include "back-relay.h"
@@ -102,15 +103,11 @@ relay_back_db_open( Backend *be )
                assert( ri->ri_bd );
 
                /* inherit controls */
-               if ( ri->ri_bd->be_controls ) {
-                       be->be_controls = ldap_charray_dup( ri->ri_bd->be_controls );
-               }
+               AC_MEMCPY( be->be_ctrls, ri->ri_bd->be_ctrls, sizeof( be->be_ctrls ) );
 
        } else {
                /* inherit all? */
-               if ( frontendDB->be_controls ) {
-                       be->be_controls = ldap_charray_dup( frontendDB->be_controls );
-               }
+               AC_MEMCPY( be->be_ctrls, frontendDB->be_ctrls, sizeof( be->be_ctrls ) );
        }
 
        return 0;