Back to index

openldap  2.4.31
overlays.c
Go to the documentation of this file.
00001 /* overlays.c - Static overlay framework */
00002 /* $OpenLDAP$ */
00003 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
00004  *
00005  * Copyright 2003-2012 The OpenLDAP Foundation.
00006  * Copyright 2003 by Howard Chu.
00007  * All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted only as authorized by the OpenLDAP
00011  * Public License.
00012  *
00013  * A copy of this license is available in the file LICENSE in the
00014  * top-level directory of the distribution or, alternatively, at
00015  * <http://www.OpenLDAP.org/license.html>.
00016  */
00017 /* ACKNOWLEDGEMENTS:
00018  * This work was initially developed by Howard Chu for inclusion in
00019  * OpenLDAP Software.
00020  */
00021 
00022 #include "portable.h"
00023 
00024 #include "slap.h"
00025 
00026 extern OverlayInit   slap_oinfo[];
00027 
00028 int
00029 overlay_init(void)
00030 {
00031        int i, rc = 0;
00032 
00033        for ( i= 0 ; slap_oinfo[i].ov_type; i++ ) {
00034               rc = slap_oinfo[i].ov_init();
00035               if ( rc ) {
00036                      Debug( LDAP_DEBUG_ANY,
00037                             "%s overlay setup failed, err %d\n",
00038                             slap_oinfo[i].ov_type, rc, 0 );
00039                      break;
00040               }
00041        }
00042 
00043        return rc;
00044 }