openldap/servers/slapd/overlays/overlays.c

45 lines
1.0 KiB
C
Raw Normal View History

2003-12-06 18:59:27 +08:00
/* overlays.c - Static overlay framework */
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
2019-01-15 02:46:16 +08:00
* Copyright 2003-2019 The OpenLDAP Foundation.
2003-12-06 18:59:27 +08:00
* Copyright 2003 by Howard Chu.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted only as authorized by the OpenLDAP
* Public License.
*
* A copy of this license is available in the file LICENSE in the
* top-level directory of the distribution or, alternatively, at
* <http://www.OpenLDAP.org/license.html>.
*/
/* ACKNOWLEDGEMENTS:
* This work was initially developed by Howard Chu for inclusion in
* OpenLDAP Software.
*/
#include "portable.h"
#include "slap.h"
2005-11-25 20:43:43 +08:00
extern OverlayInit slap_oinfo[];
2003-12-06 18:59:27 +08:00
2003-12-13 18:57:13 +08:00
int
overlay_init(void)
{
2003-12-06 18:59:27 +08:00
int i, rc = 0;
2005-11-25 20:43:43 +08:00
for ( i= 0 ; slap_oinfo[i].ov_type; i++ ) {
rc = slap_oinfo[i].ov_init();
2003-12-06 18:59:27 +08:00
if ( rc ) {
Debug( LDAP_DEBUG_ANY,
2005-11-25 20:43:43 +08:00
"%s overlay setup failed, err %d\n",
slap_oinfo[i].ov_type, rc, 0 );
2003-12-06 18:59:27 +08:00
break;
}
}
2005-11-25 20:43:43 +08:00
2003-12-06 18:59:27 +08:00
return rc;
}