]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-perl/add.c
Add a default case with assert() just in case.
[openldap] / servers / slapd / back-perl / add.c
index 6ff3b8d1cad97c74991cf5235923e2cd2999f577..707b140f94e711a74e548a00a652d52edd0f40d0 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  *      Copyright 1999, John C. Quillan, All rights reserved.
  *
@@ -34,14 +35,15 @@ perl_back_add(
 
        PerlBackend *perl_back = (PerlBackend *) be->be_private;
 
-       pthread_mutex_lock( &perl_interpreter_mutex );  
+       ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex );
+       ldap_pvt_thread_mutex_lock( &entry2str_mutex );
 
        {
                dSP; ENTER; SAVETMPS;
 
                PUSHMARK(sp);
                XPUSHs( perl_back->pb_obj_ref );
-               XPUSHs(sv_2mortal(newSVpv( entry2str( e, &len, 0 ), 0 )));
+               XPUSHs(sv_2mortal(newSVpv( entry2str( e, &len ), 0 )));
 
                PUTBACK;
 
@@ -58,13 +60,16 @@ perl_back_add(
                PUTBACK; FREETMPS; LEAVE;
        }
 
-       pthread_mutex_unlock( &perl_interpreter_mutex );        
+       ldap_pvt_thread_mutex_unlock( &entry2str_mutex );
+       ldap_pvt_thread_mutex_unlock( &perl_interpreter_mutex );        
 
        if( return_code != 0 ) {
-               send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, "", "" );
+               send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
+                       NULL, NULL, NULL, NULL );
 
        } else {
-               send_ldap_result( conn, op, LDAP_SUCCESS, "", "" );
+               send_ldap_result( conn, op, LDAP_SUCCESS,
+                       NULL, NULL, NULL, NULL );
        }
 
        Debug( LDAP_DEBUG_ANY, "Here ADD\n", 0, 0, 0 );