]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-shell/abandon.c
Don't reeval expression
[openldap] / servers / slapd / back-shell / abandon.c
index 9761f23376d82a70c9a5b4e4762e057d79b39925..bbf84db331fb15c1bebb9b5e5a27aa53882b6f3a 100644 (file)
@@ -29,7 +29,7 @@ shell_back_abandon(
        Operation               *o;
 
        /* no abandon command defined - just kill the process handling it */
-       if ( IS_NULLCMD( si->si_abandon ) ) {
+       if ( si->si_abandon == NULL ) {
                ldap_pvt_thread_mutex_lock( &conn->c_mutex );
                pid = -1;
                LDAP_STAILQ_FOREACH( o, &conn->c_ops, o_next ) {
@@ -38,22 +38,14 @@ shell_back_abandon(
                                break;
                        }
                }
+               ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
        }
-       ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
 
        if ( pid == -1 ) {
                Debug( LDAP_DEBUG_ARGS, "shell could not find op %d\n", msgid, 0, 0 );
                return 0;
        }
 
-       /* no abandon command defined - just kill the process handling it */
-       if ( si->si_abandon == NULL ) {
-               Debug( LDAP_DEBUG_ARGS, "shell killing pid %d\n",
-                              (int) pid, 0, 0 );
-               kill( pid, SIGTERM );
-               return 0;
-       }
-
        if ( forkandexec( si->si_abandon, &rfp, &wfp ) == -1 ) {
                return 0;
        }