]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-shell/modrdn.c
Update of back-bdb2 to KDZ's new entry lock schema.
[openldap] / servers / slapd / back-shell / modrdn.c
index f3f00217ad95bfe5a553f5d988f3dfb498d6ebb3..36bec9e4bc21bd83e15df0d950aceaf78f046f22 100644 (file)
@@ -10,7 +10,7 @@
 #include "slap.h"
 #include "shell.h"
 
-void
+int
 shell_back_modrdn(
     Backend    *be,
     Connection *conn,
@@ -26,19 +26,19 @@ shell_back_modrdn(
        if ( si->si_modrdn == NULL ) {
                send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
                    "modrdn not implemented" );
-               return;
+               return( -1 );
        }
 
-       if ( (op->o_private = forkandexec( si->si_modrdn, &rfp, &wfp ))
-           == -1 ) {
+       if ( (op->o_private = (void *) forkandexec( si->si_modrdn, &rfp, &wfp ))
+           == (void *) -1 ) {
                send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
                    "could not fork/exec" );
-               return;
+               return( -1 );
        }
 
        /* write out the request to the modrdn process */
        fprintf( wfp, "MODRDN\n" );
-       fprintf( wfp, "msgid: %d\n", op->o_msgid );
+       fprintf( wfp, "msgid: %ld\n", op->o_msgid );
        print_suffixes( wfp, be );
        fprintf( wfp, "dn: %s\n", dn );
        fprintf( wfp, "newrdn: %s\n", newrdn );
@@ -48,4 +48,5 @@ shell_back_modrdn(
        /* read in the results and send them along */
        read_and_send_results( be, conn, op, rfp, NULL, 0 );
        fclose( rfp );
+       return( 0 );
 }