Diff for /servers/slapd/overlays/syncprov.c between versions 1.219 and 1.220

version 1.219, 2008/03/12 21:31:28 version 1.220, 2008/03/13 09:49:32
Line 1 Line 1
 /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.218 2008/03/08 22:51:07 hyc Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.219 2008/03/12 21:31:28 ando Exp $ */
 /* syncprov.c - syncrepl provider */  /* syncprov.c - syncrepl provider */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
Line 1940  syncprov_detach_op( Operation *op, synco Line 1940  syncprov_detach_op( Operation *op, synco
         op2->o_do_not_cache = 1;          op2->o_do_not_cache = 1;
   
         /* Add op2 to conn so abandon will find us */          /* Add op2 to conn so abandon will find us */
         ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );  
         op->o_conn->c_n_ops_executing++;          op->o_conn->c_n_ops_executing++;
         op->o_conn->c_n_ops_completed--;          op->o_conn->c_n_ops_completed--;
         LDAP_STAILQ_INSERT_TAIL( &op->o_conn->c_ops, op2, o_next );          LDAP_STAILQ_INSERT_TAIL( &op->o_conn->c_ops, op2, o_next );
         so->s_flags |= PS_IS_DETACHED;          so->s_flags |= PS_IS_DETACHED;
         ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );  
   
         /* Prevent anyone else from trying to send a result for this op */          /* Prevent anyone else from trying to send a result for this op */
         op->o_abandon = 1;          op->o_abandon = 1;
Line 2055  syncprov_search_response( Operation *op, Line 2053  syncprov_search_response( Operation *op,
   
                         /* Detach this Op from frontend control */                          /* Detach this Op from frontend control */
                         ldap_pvt_thread_mutex_lock( &ss->ss_so->s_mutex );                          ldap_pvt_thread_mutex_lock( &ss->ss_so->s_mutex );
                           ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
   
                         /* Turn off the refreshing flag */                          /* But not if this connection was closed along the way */
                         ss->ss_so->s_flags ^= PS_IS_REFRESHING;                          if ( op->o_abandon ) {
                                   ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
                                   ldap_pvt_thread_mutex_unlock( &ss->ss_so->s_mutex );
                                   syncprov_free_syncop( ss->ss_so );
                                   return SLAPD_ABANDON;
   
                         syncprov_detach_op( op, ss->ss_so, on );                          } else {
                                   /* Turn off the refreshing flag */
                                   ss->ss_so->s_flags ^= PS_IS_REFRESHING;
   
                                   syncprov_detach_op( op, ss->ss_so, on );
   
                         /* If there are queued responses, fire them off */                                  ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
                         if ( ss->ss_so->s_res )  
                                 syncprov_qstart( ss->ss_so );                                  /* If there are queued responses, fire them off */
                                   if ( ss->ss_so->s_res )
                                           syncprov_qstart( ss->ss_so );
                           }
                         ldap_pvt_thread_mutex_unlock( &ss->ss_so->s_mutex );                          ldap_pvt_thread_mutex_unlock( &ss->ss_so->s_mutex );
   
                         return LDAP_SUCCESS;                          return LDAP_SUCCESS;

Removed from v.1.219  
changed lines
  Added in v.1.220


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