Diff for /libraries/libldap/result.c between versions 1.124 and 1.124.2.1

version 1.124, 2006/03/24 00:18:36 version 1.124.2.1, 2006/04/11 16:07:16
Line 1 Line 1
 /* result.c - wait for an ldap result */  /* result.c - wait for an ldap result */
 /* $OpenLDAP: pkg/ldap/libraries/libldap/result.c,v 1.123 2006/02/14 22:18:12 kurt Exp $ */  /* $OpenLDAP: pkg/ldap/libraries/libldap/result.c,v 1.125 2006/04/08 09:01:19 ando Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
  * Copyright 1998-2006 The OpenLDAP Foundation.   * Copyright 1998-2006 The OpenLDAP Foundation.
Line 140  chkResponseList( Line 140  chkResponseList(
         int all)          int all)
 {  {
         LDAPMessage     *lm, **lastlm, *nextlm;          LDAPMessage     *lm, **lastlm, *nextlm;
     /*  
           /*
          * Look through the list of responses we have received on           * Look through the list of responses we have received on
          * this association and see if the response we're interested in           * this association and see if the response we're interested in
          * is there.  If it is, return it.  If not, call wait4msg() to           * is there.  If it is, return it.  If not, call wait4msg() to
          * wait until it arrives or timeout occurs.           * wait until it arrives or timeout occurs.
          */           */
   
   #ifdef LDAP_R_COMPILE
           LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER( &ld->ld_res_mutex );
   #endif
   
         Debug( LDAP_DEBUG_TRACE,          Debug( LDAP_DEBUG_TRACE,
                 "ldap_chkResponseList ld %p msgid %d all %d\n",                  "ldap_chkResponseList ld %p msgid %d all %d\n",
                 (void *)ld, msgid, all );                  (void *)ld, msgid, all );
   
         lastlm = &ld->ld_responses;          lastlm = &ld->ld_responses;
         for ( lm = ld->ld_responses; lm != NULL; lm = nextlm ) {          for ( lm = ld->ld_responses; lm != NULL; lm = nextlm ) {
                 nextlm = lm->lm_next;                  nextlm = lm->lm_next;
Line 238  wait4msg( Line 244  wait4msg(
         assert( ld != NULL );          assert( ld != NULL );
         assert( result != NULL );          assert( result != NULL );
   
   #ifdef LDAP_R_COMPILE
           LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER( &ld->ld_res_mutex );
   #endif
   
 #ifdef LDAP_DEBUG  #ifdef LDAP_DEBUG
         if ( timeout == NULL ) {          if ( timeout == NULL ) {
                 Debug( LDAP_DEBUG_TRACE, "wait4msg ld %p msgid %d (infinite timeout)\n",                  Debug( LDAP_DEBUG_TRACE, "wait4msg ld %p msgid %d (infinite timeout)\n",
Line 416  try_read1msg( Line 426  try_read1msg(
         assert( lcp != NULL );          assert( lcp != NULL );
         assert( *lcp != NULL );          assert( *lcp != NULL );
                   
   #ifdef LDAP_R_COMPILE
           LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER( &ld->ld_res_mutex );
   #endif
   
         Debug( LDAP_DEBUG_TRACE, "read1msg: ld %p msgid %d all %d\n",          Debug( LDAP_DEBUG_TRACE, "read1msg: ld %p msgid %d all %d\n",
                 (void *)ld, msgid, all );                  (void *)ld, msgid, all );
   
Line 1159  ldap_msgdelete( LDAP *ld, int msgid ) Line 1173  ldap_msgdelete( LDAP *ld, int msgid )
   
   
 /*  /*
    * ldap_abandoned
    *
  * return 1 if message msgid is waiting to be abandoned, 0 otherwise   * return 1 if message msgid is waiting to be abandoned, 0 otherwise
    *
    * expects ld_res_mutex to be locked
  */   */
 static int  static int
 ldap_abandoned( LDAP *ld, ber_int_t msgid )  ldap_abandoned( LDAP *ld, ber_int_t msgid )
 {  {
         int     i;          int     i;
   
   #ifdef LDAP_R_COMPILE
           LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER( &ld->ld_res_mutex );
   #endif
   
         if ( ld->ld_abandoned == NULL )          if ( ld->ld_abandoned == NULL )
                 return( 0 );                  return( 0 );
   
Line 1177  ldap_abandoned( LDAP *ld, ber_int_t msgi Line 1199  ldap_abandoned( LDAP *ld, ber_int_t msgi
 }  }
   
   
   /*
    * ldap_mark_abandoned
    *
    * expects ld_res_mutex to be locked
    */
 static int  static int
 ldap_mark_abandoned( LDAP *ld, ber_int_t msgid )  ldap_mark_abandoned( LDAP *ld, ber_int_t msgid )
 {  {
         int     i;          int     i;
   
   #ifdef LDAP_R_COMPILE
           LDAP_PVT_THREAD_ASSERT_MUTEX_OWNER( &ld->ld_res_mutex );
   #endif
   
         if ( ld->ld_abandoned == NULL )          if ( ld->ld_abandoned == NULL )
                 return( -1 );                  return( -1 );
   

Removed from v.1.124  
changed lines
  Added in v.1.124.2.1


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org