2 * tcl_init.c - tcl backend initialization
4 * Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
6 * Redistribution and use in source and binary forms are permitted only
7 * as authorized by the OpenLDAP Public License. A copy of this
8 * license is available at http://www.OpenLDAP.org/license.html or
9 * in file LICENSE in the top-level directory of the distribution.
16 #include <ac/socket.h>
21 ldap_pvt_thread_mutex_t tcl_interpreter_mutex;
28 /* Initialize the global interpreter array */
29 global_i = (struct i_info *) ch_malloc (sizeof (struct i_info));
31 global_i->name = "default";
32 global_i->next = NULL;
33 global_i->interp = Tcl_CreateInterp ();
34 Tcl_Init (global_i->interp);
36 /* Initialize the global interpreter lock */
37 ldap_pvt_thread_mutex_init( &tcl_interpreter_mutex );
41 bi->bi_destroy = NULL;
43 bi->bi_db_init = tcl_back_db_init;
44 bi->bi_db_config = tcl_back_db_config;
45 bi->bi_db_open = tcl_back_db_open;
46 bi->bi_db_close = NULL;
47 bi->bi_db_destroy = tcl_back_db_destroy;
49 bi->bi_op_bind = tcl_back_bind;
50 bi->bi_op_unbind = tcl_back_unbind;
51 bi->bi_op_search = tcl_back_search;
52 bi->bi_op_compare = tcl_back_compare;
53 bi->bi_op_modify = tcl_back_modify;
54 bi->bi_op_modrdn = tcl_back_modrdn;
55 bi->bi_op_add = tcl_back_add;
56 bi->bi_op_delete = tcl_back_delete;
57 bi->bi_op_abandon = tcl_back_abandon;
59 bi->bi_acl_group = NULL;
71 ti = (struct tclinfo *) ch_calloc( 1, sizeof(struct tclinfo) );
74 * For some reason this causes problems
75 * specifically set to NULL
80 ti->ti_compare = NULL;
85 ti->ti_abandon = NULL;
97 free( be->be_private );