]> git.sur5r.net Git - openldap/blob - servers/slapd/back-perl/close.c
fix previous commit
[openldap] / servers / slapd / back-perl / close.c
1 /* $OpenLDAP$ */
2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
3  *
4  * Copyright 1999-2005 The OpenLDAP Foundation.
5  * Portions Copyright 1999 John C. Quillan.
6  * Portions Copyright 2002 myinternet Limited.
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 file LICENSE in the
14  * top-level directory of the distribution or, alternatively, at
15  * <http://www.OpenLDAP.org/license.html>.
16  */
17
18 #include "perl_back.h"
19
20 /**********************************************************
21  *
22  * Close
23  *
24  **********************************************************/
25
26 int
27 perl_back_close(
28         BackendInfo *bd
29 )
30 {
31         ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex );  
32
33         perl_destruct(PERL_INTERPRETER);
34
35         ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );        
36
37         return 0;
38 }
39
40 int
41 perl_back_destroy(
42         BackendInfo *bd
43 )
44 {
45         perl_free(PERL_INTERPRETER);
46         PERL_INTERPRETER = NULL;
47
48         ldap_pvt_thread_mutex_destroy( &perl_interpreter_mutex );       
49
50         return 0;
51 }
52
53 int
54 perl_back_db_destroy(
55         BackendDB *be
56 )
57 {
58         free( be->be_private );
59         be->be_private = NULL;
60
61         return 0;
62 }