drop iscsi->is_reconnecting

iscsi->is_reconnecting != 0 is equal to iscsi->old_iscsi != NULL.

Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
Peter Lieven
2015-04-13 10:13:36 +02:00
parent 63fd8679fa
commit a8b33cefac
4 changed files with 5 additions and 10 deletions

View File

@@ -402,7 +402,7 @@ iscsi_which_events(struct iscsi_context *iscsi)
{
int events = iscsi->is_connected ? POLLIN : POLLOUT;
if (iscsi->pending_reconnect && iscsi->is_reconnecting &&
if (iscsi->pending_reconnect && iscsi->old_iscsi &&
time(NULL) < iscsi->next_reconnect) {
return 0;
}
@@ -779,7 +779,7 @@ iscsi_service_reconnect_if_loggedin(struct iscsi_context *iscsi)
return 0;
}
}
if (iscsi->is_reconnecting) {
if (iscsi->old_iscsi) {
return 0;
}
return -1;
@@ -796,7 +796,7 @@ iscsi_service(struct iscsi_context *iscsi, int revents)
if (time(NULL) >= iscsi->next_reconnect) {
return iscsi_reconnect(iscsi);
} else {
if (iscsi->is_reconnecting) {
if (iscsi->old_iscsi) {
return 0;
}
}