1999-09-09 03:06:24 +08:00
|
|
|
/* $OpenLDAP$ */
|
2003-12-07 03:25:01 +08:00
|
|
|
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
|
|
|
*
|
2021-01-12 03:25:53 +08:00
|
|
|
* Copyright 1999-2021 The OpenLDAP Foundation.
|
2003-12-07 03:25:01 +08:00
|
|
|
* Portions Copyright 1999 John C. Quillan.
|
|
|
|
* Portions Copyright 2002 myinternet Limited.
|
|
|
|
* 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.
|
1999-01-14 14:33:09 +08:00
|
|
|
*
|
2003-12-07 03:25:01 +08:00
|
|
|
* A copy of this license is available in file LICENSE in the
|
|
|
|
* top-level directory of the distribution or, alternatively, at
|
|
|
|
* <http://www.OpenLDAP.org/license.html>.
|
1999-01-14 14:33:09 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "perl_back.h"
|
2021-01-29 07:22:46 +08:00
|
|
|
#include "../slap-config.h"
|
1999-01-14 14:33:09 +08:00
|
|
|
/**********************************************************
|
|
|
|
*
|
|
|
|
* Close
|
|
|
|
*
|
|
|
|
**********************************************************/
|
|
|
|
|
1999-02-05 17:03:47 +08:00
|
|
|
int
|
1999-01-14 14:33:09 +08:00
|
|
|
perl_back_close(
|
1999-02-05 17:03:47 +08:00
|
|
|
BackendInfo *bd
|
1999-01-14 14:33:09 +08:00
|
|
|
)
|
|
|
|
{
|
2002-04-16 12:25:44 +08:00
|
|
|
perl_destruct(PERL_INTERPRETER);
|
|
|
|
perl_free(PERL_INTERPRETER);
|
|
|
|
PERL_INTERPRETER = NULL;
|
2009-06-24 07:12:15 +08:00
|
|
|
#ifdef PERL_SYS_TERM
|
|
|
|
PERL_SYS_TERM();
|
|
|
|
#endif
|
1999-02-05 17:03:47 +08:00
|
|
|
|
|
|
|
ldap_pvt_thread_mutex_destroy( &perl_interpreter_mutex );
|
|
|
|
|
|
|
|
return 0;
|
1999-01-14 14:33:09 +08:00
|
|
|
}
|
|
|
|
|
1999-02-05 17:03:47 +08:00
|
|
|
int
|
|
|
|
perl_back_db_destroy(
|
2007-07-26 01:21:05 +08:00
|
|
|
BackendDB *be,
|
2007-08-03 20:02:07 +08:00
|
|
|
ConfigReply *cr
|
1999-02-05 17:03:47 +08:00
|
|
|
)
|
|
|
|
{
|
2011-02-04 23:25:42 +08:00
|
|
|
PerlBackend *pb = be->be_private;
|
|
|
|
|
2011-02-05 01:07:35 +08:00
|
|
|
ch_free( pb->pb_module_name );
|
2011-02-04 23:25:42 +08:00
|
|
|
ber_bvarray_free( pb->pb_module_path );
|
|
|
|
ber_bvarray_free( pb->pb_module_config );
|
|
|
|
|
1999-02-05 17:03:47 +08:00
|
|
|
free( be->be_private );
|
|
|
|
be->be_private = NULL;
|
2002-04-16 11:51:51 +08:00
|
|
|
|
|
|
|
return 0;
|
1999-02-05 17:03:47 +08:00
|
|
|
}
|