]> git.sur5r.net Git - openldap/commitdiff
Send correct pid in 'pid:' line (ITS#2519).
authorHallvard Furuseth <hallvard@openldap.org>
Thu, 22 May 2003 19:44:01 +0000 (19:44 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Thu, 22 May 2003 19:44:01 +0000 (19:44 +0000)
Also don't lock op->o_conn->c_mutex.  It is already locked by slapd/abandon.c.

servers/slapd/back-shell/abandon.c

index 12f7a74eaeb86223ae2c6cc5fe8bf5bc38fbb823..040a9993b624f7a48537993f7e06bdc89c0ce2b4 100644 (file)
@@ -25,21 +25,21 @@ 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( &op->o_conn->c_mutex );
-               pid = -1;
-               LDAP_STAILQ_FOREACH( o, &op->o_conn->c_ops, o_next ) {
-                       if ( o->o_msgid == op->oq_abandon.rs_msgid ) {
-                               pid = (pid_t) o->o_private;
-                               break;
-                       }
+               return 0;
+       }
+
+       pid = -1;
+       LDAP_STAILQ_FOREACH( o, &op->o_conn->c_ops, o_next ) {
+               if ( o->o_msgid == op->oq_abandon.rs_msgid ) {
+                       pid = (pid_t) o->o_private;
+                       break;
                }
-               ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
        }
 
        if ( pid == -1 ) {
-               Debug( LDAP_DEBUG_ARGS, "shell could not find op %d\n", op->oq_abandon.rs_msgid, 0, 0 );
+               Debug( LDAP_DEBUG_ARGS, "shell could not find op %ld\n",
+                      (long) op->oq_abandon.rs_msgid, 0, 0 );
                return 0;
        }