-/* $Id$
+/* $Id: Version.c,v 1.2 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
* in file LICENSE in the top-level directory of the distribution.
*/
-static char Versionstr[] = " tcl backend %VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
+static char Versionstr[] =
+
+" tcl backend %VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
/* abandon.c - tcl abandon routine
*
- * $Id: tcl_abandon.c,v 1.2 1999/02/16 23:32:49 bcollins Exp $
+ * $Id: tcl_abandon.c,v 1.3 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
code = Tcl_GlobalEval (ti->ti_ii->interp, command);
- results = (char *) strdup (ti->ti_ii->interp->result);
+ results = (char *) ch_strdup (ti->ti_ii->interp->result);
ldap_pvt_thread_mutex_unlock (&tcl_interpreter_mutex);
free (command);
- if (code != TCL_OK) {
- err = LDAP_OPERATIONS_ERROR;
- Debug (LDAP_DEBUG_ANY, "tcl_abandon_error: %s\n", results,
- 0, 0);
- }
+ if (code != TCL_OK) {
+ err = LDAP_OPERATIONS_ERROR;
+ Debug (LDAP_DEBUG_ANY, "tcl_abandon_error: %s\n", results,
+ 0, 0);
+ }
- free(results);
- return (err);
+ free (results);
+ return (err);
}
/* add.c - tcl add routine
*
- * $Id: tcl_add.c,v 1.2 1999/02/17 01:05:28 bcollins Exp $
+ * $Id: tcl_add.c,v 1.3 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
code = Tcl_GlobalEval (ti->ti_ii->interp, command);
- results = (char *) strdup (ti->ti_ii->interp->result);
+ results = (char *) ch_strdup (ti->ti_ii->interp->result);
ldap_pvt_thread_mutex_unlock (&tcl_interpreter_mutex);
free (command);
send_ldap_result (conn, op, err, NULL,
"internal backend error");
- free(results);
+ free (results);
return (err);
}
/* bind.c - tcl bind routines
*
- * $Id: tcl_bind.c,v 1.2 1999/02/17 01:05:28 bcollins Exp $
+ * $Id: tcl_bind.c,v 1.3 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
code = Tcl_GlobalEval (ti->ti_ii->interp, command);
- results = (char *) strdup (ti->ti_ii->interp->result);
+ results = (char *) ch_strdup (ti->ti_ii->interp->result);
ldap_pvt_thread_mutex_unlock (&tcl_interpreter_mutex);
free (command);
send_ldap_result (conn, op, err, NULL,
"internal backend error");
- free(results);
+ free (results);
return (err);
}
/* compare.c - tcl compare routines
*
- * $Id: tcl_compare.c,v 1.2 1999/02/17 01:05:28 bcollins Exp $
+ * $Id: tcl_compare.c,v 1.3 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
code = Tcl_GlobalEval (ti->ti_ii->interp, command);
- results = (char *) strdup (ti->ti_ii->interp->result);
+ results = (char *) ch_strdup (ti->ti_ii->interp->result);
ldap_pvt_thread_mutex_unlock (&tcl_interpreter_mutex);
free (command);
send_ldap_result (conn, op, err, NULL,
"internal backend error");
- free(results);
+ free (results);
return (err);
}
/* config.c - tcl backend configuration file routine
*
- * $Id: tcl_config.c,v 1.3 1999/02/17 00:53:59 bcollins Exp $
+ * $Id: tcl_config.c,v 1.4 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
fname, lineno, 0);
return (1);
}
- ti->script_path = (char *) strdup (argv[1]);
+ ti->script_path = (char *) ch_strdup (argv[1]);
/* use local interpreter */
} else if (strcasecmp (argv[0], "tclrealm") == 0) {
(sizeof (struct i_info));
ii->next->count = 0;
- ii->next->name = (char *) strdup (argv[1]);
+ ii->next->name = (char *) ch_strdup (argv[1]);
ii->next->interp = NULL;
ii->next->next = NULL;
ti->ti_ii = ii->next;
fname, lineno, 0);
return (1);
}
- ti->ti_bind = (char *) strdup (argv[1]);
+ ti->ti_bind = (char *) ch_strdup (argv[1]);
/* proc for unbinds */
} else if (strcasecmp (argv[0], "unbind") == 0) {
fname, lineno, 0);
return (1);
}
- ti->ti_unbind = (char *) strdup (argv[1]);
+ ti->ti_unbind = (char *) ch_strdup (argv[1]);
/* proc for search */
} else if (strcasecmp (argv[0], "search") == 0) {
fname, lineno, 0);
return (1);
}
- ti->ti_search = (char *) strdup (argv[1]);
+ ti->ti_search = (char *) ch_strdup (argv[1]);
/* proc for compares */
} else if (strcasecmp (argv[0], "compare") == 0) {
fname, lineno, 0);
return (1);
}
- ti->ti_compare = (char *) strdup (argv[1]);
+ ti->ti_compare = (char *) ch_strdup (argv[1]);
/* proc for modify */
} else if (strcasecmp (argv[0], "modify") == 0) {
fname, lineno, 0);
return (1);
}
- ti->ti_modify = (char *) strdup (argv[1]);
+ ti->ti_modify = (char *) ch_strdup (argv[1]);
/* proc for modrdn */
} else if (strcasecmp (argv[0], "modrdn") == 0) {
fname, lineno, 0);
return (1);
}
- ti->ti_modrdn = (char *) strdup (argv[1]);
+ ti->ti_modrdn = (char *) ch_strdup (argv[1]);
/* proc for add */
} else if (strcasecmp (argv[0], "add") == 0) {
fname, lineno, 0);
return (1);
}
- ti->ti_add = (char *) strdup (argv[1]);
+ ti->ti_add = (char *) ch_strdup (argv[1]);
/* proc for delete */
} else if (strcasecmp (argv[0], "delete") == 0) {
fname, lineno, 0);
return (1);
}
- ti->ti_delete = (char *) strdup (argv[1]);
+ ti->ti_delete = (char *) ch_strdup (argv[1]);
/* proc for abandon */
} else if (strcasecmp (argv[0], "abandon") == 0) {
fname, lineno, 0);
return (1);
}
- ti->ti_search = (char *) strdup (argv[1]);
+ ti->ti_search = (char *) ch_strdup (argv[1]);
} else {
Debug (LDAP_DEBUG_ANY,
/* delete.c - tcl delete routines
*
- * $Id: tcl_delete.c,v 1.2 1999/02/17 01:05:28 bcollins Exp $
+ * $Id: tcl_delete.c,v 1.3 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
code = Tcl_GlobalEval (ti->ti_ii->interp, command);
- results = (char *) strdup (ti->ti_ii->interp->result);
+ results = (char *) ch_strdup (ti->ti_ii->interp->result);
ldap_pvt_thread_mutex_unlock (&tcl_interpreter_mutex);
free (command);
send_ldap_result (conn, op, err, NULL,
"internal backend error");
- free(results);
+ free (results);
return (err);
}
/* modify.c - tcl modify routines
*
- * $Id: tcl_modify.c,v 1.2 1999/02/17 01:05:28 bcollins Exp $
+ * $Id: tcl_modify.c,v 1.3 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
code = Tcl_GlobalEval (ti->ti_ii->interp, command);
- results = (char *) strdup (ti->ti_ii->interp->result);
+ results = (char *) ch_strdup (ti->ti_ii->interp->result);
ldap_pvt_thread_mutex_unlock (&tcl_interpreter_mutex);
free (command);
send_ldap_result (conn, op, err, NULL,
"internal backend error");
- free(results);
+ free (results);
return (err);
}
/* modrdn.c - tcl modify rdn routines
*
- * $Id: tcl_modrdn.c,v 1.2 1999/02/17 01:05:28 bcollins Exp $
+ * $Id: tcl_modrdn.c,v 1.3 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
code = Tcl_GlobalEval (ti->ti_ii->interp, command);
- results = (char *) strdup (ti->ti_ii->interp->result);
+ results = (char *) ch_strdup (ti->ti_ii->interp->result);
ldap_pvt_thread_mutex_unlock (&tcl_interpreter_mutex);
free (command);
send_ldap_result (conn, op, err, NULL,
"internal backend error");
- free(results);
+ free (results);
return (err);
}
/* search.c - tcl search routines
*
- * $Id: tcl_search.c,v 1.2 1999/02/17 01:05:28 bcollins Exp $
+ * $Id: tcl_search.c,v 1.3 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
code = Tcl_GlobalEval (ti->ti_ii->interp, command);
- results = (char *) strdup(ti->ti_ii->interp->result);
+ results = (char *) ch_strdup (ti->ti_ii->interp->result);
ldap_pvt_thread_mutex_unlock (&tcl_interpreter_mutex);
free (command);
send_ldap_result (conn, op, err, NULL,
"internal backend error");
- free(results);
+ free (results);
return (err);
}
/* unbind.c - tcl unbind routines
*
- * $Id: tcl_unbind.c,v 1.2 1999/02/17 01:05:28 bcollins Exp $
+ * $Id: tcl_unbind.c,v 1.3 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
if (ti->ti_unbind == NULL) {
send_ldap_result (conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
"unbind not implemented");
- return(-1);
+ return (-1);
}
for (i = 0; be->be_suffix[i] != NULL; i++);
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
code = Tcl_GlobalEval (ti->ti_ii->interp, command);
- results = (char *) strdup (ti->ti_ii->interp->result);
+ results = (char *) ch_strdup (ti->ti_ii->interp->result);
ldap_pvt_thread_mutex_unlock (&tcl_interpreter_mutex);
free (command);
0, 0);
}
- free(results);
+ free (results);
return (err);
}
/* result.c - tcl backend utility functions
*
- * $Id: tcl_util.c,v 1.2 1999/02/17 01:05:28 bcollins Exp $
+ * $Id: tcl_util.c,v 1.3 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
if (mark1[0] == '\n') {
mark1++;
}
- dup = (char *) strdup (mark1);
+ dup = (char *) ch_strdup (mark1);
if (dup[0] != '\0') {
if ((mark2 = (char *) strchr (dup, '\n')) != NULL) {
mark2[0] = '\0';