]> git.sur5r.net Git - openldap/commitdiff
re-fetch the request; since the mutex has been released wile freeing the message...
authorPierangelo Masarati <ando@openldap.org>
Thu, 30 Jun 2005 02:36:55 +0000 (02:36 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 30 Jun 2005 02:36:55 +0000 (02:36 +0000)
libraries/libldap/abandon.c

index 27b47b5f57afd591a11fefabcdfdf852f9f07cd3..fa7c74efc2909974ba0f7042b2c9f227e57fd539 100644 (file)
@@ -130,7 +130,7 @@ do_abandon(
                }
                if ( lr->lr_origid == msgid ) {/* child:  abandon it */
                        (void) do_abandon( ld,
-                               msgid, lr->lr_msgid, sctrls, cctrls );
+                               lr->lr_origid, lr->lr_msgid, sctrls, cctrls );
                }
        }
 
@@ -161,6 +161,15 @@ do_abandon(
                return LDAP_SUCCESS;
        }
 
+       /* fetch again the request that we are abandoning */
+       if ( lr != NULL ) {
+               for ( lr = ld->ld_requests; lr != NULL; lr = lr->lr_next ) {
+                       if ( lr->lr_msgid == msgid ) {  /* this message */
+                               break;
+                       }
+               }
+       }
+
        err = 0;
        if ( sendabandon ) {
                if( ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, NULL ) == -1 ) {