A cleaner method of handling login redirection; just use the existing
reconnection mechanism. This avoids the problems of trying to reuse the TCP connection structure before the old connection has cleanly exited.
This commit is contained in:
parent
d2bf7abe75
commit
38ae94f8ce
|
@ -735,8 +735,11 @@ static void iscsi_rx_login_response ( struct iscsi_session *iscsi, void *data,
|
||||||
/* Check for login redirection */
|
/* Check for login redirection */
|
||||||
if ( response->status_class == ISCSI_STATUS_REDIRECT ) {
|
if ( response->status_class == ISCSI_STATUS_REDIRECT ) {
|
||||||
DBG ( "iSCSI %p redirecting to new server\n", iscsi );
|
DBG ( "iSCSI %p redirecting to new server\n", iscsi );
|
||||||
iscsi_close ( iscsi, -EINPROGRESS );
|
/* Close the TCP connection; our TCP closed() method
|
||||||
tcp_connect ( &iscsi->tcp );
|
* will take care of the reconnection once this
|
||||||
|
* connection has been cleanly terminated.
|
||||||
|
*/
|
||||||
|
tcp_close ( &iscsi->tcp );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue