]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-perl/modify.c
Add a default case with assert() just in case.
[openldap] / servers / slapd / back-perl / modify.c
index 064701d1f6bbf0ef39989399a9b543dc52c49672..dda511b4070999d8163b69d2257dc5a55af16803 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  *      Copyright 1999, John C. Quillan, All rights reserved.
  *
@@ -25,7 +26,8 @@ perl_back_modify(
        Backend *be,
        Connection      *conn,
        Operation       *op,
-       char    *dn,
+       const char      *dn,
+       const char      *ndn,
        LDAPModList     *modlist
 )
 {
@@ -38,13 +40,14 @@ perl_back_modify(
 
        PerlBackend *perl_back = (PerlBackend *)be->be_private;
 
-       pthread_mutex_lock( &perl_interpreter_mutex );  
+       ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex );  
 
        {
                dSP; ENTER; SAVETMPS;
-
+               
                PUSHMARK(sp);
                XPUSHs( perl_back->pb_obj_ref );
+               XPUSHs(sv_2mortal(newSVpv( dn , 0)));
 
                for (; modlist != NULL; modlist = modlist->ml_next ) {
                        LDAPMod *mods = &modlist->ml_mod;
@@ -63,7 +66,7 @@ perl_back_modify(
                                break;
                        }
 
-
+                       
                        XPUSHs(sv_2mortal(newSVpv( mods->mod_type, 0 )));
 
                        for ( i = 0;
@@ -89,13 +92,15 @@ perl_back_modify(
                PUTBACK; FREETMPS; LEAVE;
        }
 
-       pthread_mutex_unlock( &perl_interpreter_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, "Perl MODIFY\n", 0, 0, 0 );