xref: /netbsd-src/external/bsd/openldap/dist/servers/slapd/overlays/overlays.c (revision b7b7574d3bf8eeb51a1fa3977b59142ec6434a55)
1 /*	$NetBSD: overlays.c,v 1.1.1.4 2014/05/28 09:58:52 tron Exp $	*/
2 
3 /* overlays.c - Static overlay framework */
4 /* $OpenLDAP$ */
5 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
6  *
7  * Copyright 2003-2014 The OpenLDAP Foundation.
8  * Copyright 2003 by Howard Chu.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted only as authorized by the OpenLDAP
13  * Public License.
14  *
15  * A copy of this license is available in the file LICENSE in the
16  * top-level directory of the distribution or, alternatively, at
17  * <http://www.OpenLDAP.org/license.html>.
18  */
19 /* ACKNOWLEDGEMENTS:
20  * This work was initially developed by Howard Chu for inclusion in
21  * OpenLDAP Software.
22  */
23 
24 #include "portable.h"
25 
26 #include "slap.h"
27 
28 extern OverlayInit	slap_oinfo[];
29 
30 int
31 overlay_init(void)
32 {
33 	int i, rc = 0;
34 
35 	for ( i= 0 ; slap_oinfo[i].ov_type; i++ ) {
36 		rc = slap_oinfo[i].ov_init();
37 		if ( rc ) {
38 			Debug( LDAP_DEBUG_ANY,
39 				"%s overlay setup failed, err %d\n",
40 				slap_oinfo[i].ov_type, rc, 0 );
41 			break;
42 		}
43 	}
44 
45 	return rc;
46 }
47