/* * config.c - tcl backend configuration file routine * * Copyright 1999, Ben Collins , All rights reserved. * * Redistribution and use in source and binary forms are permitted only * as authorized by the OpenLDAP Public License. A copy of this * license is available at http://www.OpenLDAP.org/license.html or * in file LICENSE in the top-level directory of the distribution. * * $Id: tcl_config.c,v 1.2 1999/02/16 23:30:36 bcollins Exp $ * * $Log: tcl_config.c,v $ * Revision 1.2 1999/02/16 23:30:36 bcollins * fixed exit()'s to be return()'s * */ #include "portable.h" #include #include "slap.h" #include "tcl_back.h" struct i_info *global_i; int tcl_back_db_config ( BackendDB * bd, char *fname, int lineno, int argc, char **argv ) { struct tclinfo *ti = (struct tclinfo *) bd->be_private; int script_loaded = 0; if (ti == NULL) { fprintf (stderr, "%s: line %d: tcl backend info is null!\n", fname, lineno); return( 1 ); } if (ti->ti_ii == NULL) { ti->ti_ii = global_i; } /* Script to load */ if (strcasecmp (argv[0], "scriptpath") == 0) { if (argc < 2) { Debug (LDAP_DEBUG_ANY, "%s: line %d: missing script in \"scriptpath