* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*
- * $Id$
+ * $Id: tcl_close.c,v 1.2 1999/02/17 00:55:03 bcollins Exp $
+ *
+ * $Log: tcl_close.c,v $
+ * Revision 1.2 1999/02/17 00:55:03 bcollins
+ * Implemented all of the (db_)destroy and (db_)close functions
*
- * $Log$
*/
#include "portable.h"
)
{
Tcl_DeleteInterp(global_i->interp);
- Tcl_Free(global_i->interp);
- free(global_i);
return( 0 );
}
BackendInfo *bi
)
{
+ Tcl_Free(global_i->interp);
+ free(global_i);
ldap_pvt_thread_mutex_destroy( &tcl_interpreter_mutex );
return( 0 );
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*
- * $Id$
+ * $Id: tcl_init.c,v 1.2 1999/02/17 00:55:54 bcollins Exp $
+ *
+ * $Log: tcl_init.c,v $
+ * Revision 1.2 1999/02/17 00:55:54 bcollins
+ * Implemented the open, init functions correctly
*
- * $Log$
*/
#include "portable.h"
ldap_pvt_thread_mutex_init( &tcl_interpreter_mutex );
bi->bi_open = tcl_back_open;
- bi->bi_config = tcl_back_config;
+ bi->bi_config = NULL;
bi->bi_close = tcl_back_close;
bi->bi_destroy = tcl_back_destroy;
return 0;
}
+int
+tcl_back_open(
+ BackendInfo *bi
+)
+{
+ /* Initialize the global interpreter array */
+ global_i = (struct i_info *) ch_malloc (sizeof (struct i_info));
+ global_i->count = 0;
+ global_i->name = "default";
+ global_i->next = NULL;
+ global_i->interp = Tcl_CreateInterp ();
+ Tcl_Init (global_i->interp);
+
+ /* Initialize the global interpreter lock */
+ ldap_pvt_thread_mutex_init( &tcl_interpreter_mutex );
+
+ return( 0 );
+}
+
int
tcl_back_db_init(
Backend *be