* 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$
+ *
+ * $Log$
*/
#include "portable.h"
if (ti == NULL) {
fprintf (stderr, "%s: line %d: tcl backend info is null!\n", fname,
lineno);
- exit (1);
+ return( 1 );
}
if (ti->ti_ii == NULL) {
ti->ti_ii = global_i;
Debug (LDAP_DEBUG_ANY,
"%s: line %d: missing script in \"scriptpath <script>\" line\n",
fname, lineno, 0);
- exit (1);
+ return( 1 );
}
ti->script_path = (char *) strdup (argv[1]);
Debug (LDAP_DEBUG_ANY,
"%s: line %d: missing script in \"tclrealm <name>\" line\n",
fname, lineno, 0);
- exit (1);
+ return( 1 );
}
ti->ti_ii = NULL;
Debug (LDAP_DEBUG_ANY,
"%s: line %d: missing proc in \"bind <proc>\" line\n",
fname, lineno, 0);
- exit (1);
+ return( 1 );
}
ti->ti_bind = (char *) strdup (argv[1]);
Debug (LDAP_DEBUG_ANY,
"%s: line %d: missing proc in \"unbind <proc>\" line\n",
fname, lineno, 0);
- exit (1);
+ return( 1 );
}
ti->ti_unbind = (char *) strdup (argv[1]);
Debug (LDAP_DEBUG_ANY,
"%s: line %d: missing proc in \"search <proc>\" line\n",
fname, lineno, 0);
- exit (1);
+ return( 1 );
}
ti->ti_search = (char *) strdup (argv[1]);
Debug (LDAP_DEBUG_ANY,
"%s: line %d: missing proc in \"compare <proc>\" line\n",
fname, lineno, 0);
- exit (1);
+ return( 1 );
}
ti->ti_compare = (char *) strdup (argv[1]);
Debug (LDAP_DEBUG_ANY,
"%s: line %d: missing proc in \"modify <proc>\" line\n",
fname, lineno, 0);
- exit (1);
+ return( 1 );
}
ti->ti_modify = (char *) strdup (argv[1]);
Debug (LDAP_DEBUG_ANY,
"%s: line %d: missing proc in \"modrdn <proc>\" line\n",
fname, lineno, 0);
- exit (1);
+ return( 1 );
}
ti->ti_modrdn = (char *) strdup (argv[1]);
Debug (LDAP_DEBUG_ANY,
"%s: line %d: missing proc in \"add <proc>\" line\n",
fname, lineno, 0);
- exit (1);
+ return( 1 );
}
ti->ti_add = (char *) strdup (argv[1]);
Debug (LDAP_DEBUG_ANY,
"%s: line %d: missing proc in \"delete <proc>\" line\n",
fname, lineno, 0);
- exit (1);
+ return( 1 );
}
ti->ti_delete = (char *) strdup (argv[1]);
Debug (LDAP_DEBUG_ANY,
"%s: line %d: missing proc in \"abandon <proc>\" line\n",
fname, lineno, 0);
- exit (1);
+ return( 1 );
}
ti->ti_search = (char *) strdup (argv[1]);
} else {
- fprintf (stderr,
- "Unknown tcl backend config: %s\n", argv[0]);
- exit (1);
+ Debug (LDAP_DEBUG_ANY,
+ "Unknown tcl backend config: %s\n", argv[0], 0, 0);
+ return( 1 );
}
return 0;
if (f == NULL) {
Debug (LDAP_DEBUG_ANY, "Could not open scriptpath %s\n", script,
0, 0);
- exit (1);
+ return( 1 );
}
fclose (f);
code = Tcl_EvalFile (my_tcl, script);
Tcl_GetVar (my_tcl, "errorInfo", TCL_GLOBAL_ONLY), 0);
Debug (LDAP_DEBUG_ANY, "%s: error at line\n", script,
my_tcl->errorLine, 0);
- exit (1);
+ return( 1 );
}
}