]> git.sur5r.net Git - openldap/commitdiff
Send correct pid in 'pid:' line (ITS#2519).
authorHallvard Furuseth <hallvard@openldap.org>
Fri, 23 May 2003 12:45:18 +0000 (12:45 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Fri, 23 May 2003 12:45:18 +0000 (12:45 +0000)
Also don't lock conn->c_mutex.  It is already locked by slapd/abandon.c.

servers/slapd/back-shell/abandon.c

index 801b16c6f16739487511a9f4e449459d3cd76b0c..0f2169f4dba1af84b2ffdd83ae1e6533b4b7b09d 100644 (file)
@@ -28,17 +28,16 @@ shell_back_abandon(
        pid_t                   pid;
        Operation               *o;
 
-       /* no abandon command defined - just kill the process handling it */
        if ( si->si_abandon == NULL ) {
-               ldap_pvt_thread_mutex_lock( &conn->c_mutex );
-               pid = -1;
-               LDAP_STAILQ_FOREACH( o, &conn->c_ops, o_next ) {
-                       if ( o->o_msgid == msgid ) {
-                               pid = (pid_t) o->o_private;
-                               break;
-                       }
+               return 0;
+       }
+
+       pid = -1;
+       LDAP_STAILQ_FOREACH( o, &conn->c_ops, o_next ) {
+               if ( o->o_msgid == msgid ) {
+                       pid = (pid_t) o->o_private;
+                       break;
                }
-               ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
        }
 
        if ( pid == -1 ) {