Debian Codegraph @

servers/slapd/overlays/overlays.c

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