We should make them consistent. The state should be updated before the 
disconnect is sent.

On Thu, 23 Jun 2005, Hal Rosenstock wrote:

halr> Hi,
halr> 
halr> In dapl_evd.c, there are cases where the ep_state is updated before
halr> calling disconnect and others where this is done after. Should these be
halr> made consistent ?
halr> 
halr> void dapl_evd_connection_callback(...)
halr> {
halr> ...
halr>         case DAT_CONNECTION_EVENT_DISCONNECTED:
halr>                 ep->param.ep_state = DAT_EP_STATE_DISCONNECTED;
halr>                 spin_unlock_irqrestore(&ep->common.lock, 
ep->common.flags);
halr>                 dapl_ib_disconnect_clean(ep);
halr>                 break;
halr>         case DAT_CONNECTION_EVENT_PEER_REJECTED:
halr>         case DAT_CONNECTION_EVENT_UNREACHABLE:
halr>         case DAT_CONNECTION_EVENT_NON_PEER_REJECTED:
halr>         case DAT_CONNECTION_EVENT_BROKEN:
halr>                 ep->param.ep_state = DAT_EP_STATE_DISCONNECTED;
halr>                 spin_unlock_irqrestore(&ep->common.lock, 
ep->common.flags);
halr>                 dapl_ib_disconnect_clean(ep);
halr>                 break;
halr> 
halr> void dapl_evd_connection_callback(...)
halr> {
halr>                         dapl_ib_disconnect(ep, DAT_CLOSE_ABRUPT_FLAG);
halr>                         spin_lock_irqsave(&ep->common.lock, 
ep->common.flags);
halr>                         ep->param.ep_state = DAT_EP_STATE_DISCONNECTED;
halr>                         spin_unlock_irqrestore(&ep->common.lock,
halr>                                                ep->common.flags);
halr> 
halr> -- Hal
halr> 
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to