]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-tcl/tcl_util.c
Don't use 'shtool mkln' as ln(1) replacement.
[openldap] / servers / slapd / back-tcl / tcl_util.c
index 879c9c34f80ca2279b2badca4cdab5101cd5d0ae..85f156aabbaa3cfb5c039e6966af138d23120d0c 100644 (file)
@@ -1,6 +1,5 @@
+/* $OpenLDAP$ */
 /* result.c - tcl backend utility functions
- *
- * $Id: tcl_util.c,v 1.7 1999/07/16 00:45:52 kdz Exp $
  *
  * Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
  *
@@ -27,7 +26,7 @@ interp_send_results (
        Connection * conn,
        Operation * op,
        char *result,
-       char **attrs,
+       AttributeName *attrs,
        int attrsonly
 )
 {
@@ -110,9 +109,8 @@ tcl_clean_entry (
        char *entrystr, *mark1, *mark2, *buf, *bp, *dup;
        int len, bsize;
 
-       pthread_mutex_lock (&entry2str_mutex);
-       entrystr = entry2str (e, &len, 0);
-       pthread_mutex_unlock (&entry2str_mutex);
+       ldap_pvt_thread_mutex_lock(&entry2str_mutex);
+       entrystr = entry2str (e, &len);
 
        buf = (char *) ch_malloc (BUFSIZ);
        buf[0] = '\0';
@@ -147,6 +145,8 @@ tcl_clean_entry (
                }
                free (dup);
        } while ((mark1 = (char *) strchr (mark1, '\n')) != NULL);
+
+       ldap_pvt_thread_mutex_unlock (&entry2str_mutex);
        return buf;
 }