From abd20f3587a68b325ae18a03ecb63aa6301a5143 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Thu, 18 Oct 2012 20:03:58 -0700 Subject: [PATCH] Use the literal ISCSI_STATUS_REDIRECT instead of the numeric value --- lib/connect.c | 2 +- lib/login.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/connect.c b/lib/connect.c index f82df28..492f65a 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -86,7 +86,7 @@ iscsi_login_cb(struct iscsi_context *iscsi, int status, void *command_data _U_, { struct connect_task *ct = private_data; - if (status == 0x101 && iscsi->target_address) { + if (status == SCSI_STATUS_REDIRECT && iscsi->target_address) { iscsi_disconnect(iscsi); if (iscsi_connect_async(iscsi, iscsi->target_address, iscsi_connect_cb, iscsi->connect_data) != 0) { return; diff --git a/lib/login.c b/lib/login.c index d841a4b..28b9226 100644 --- a/lib/login.c +++ b/lib/login.c @@ -1088,7 +1088,7 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, size -= len + 1; } - if (status == 0x101 && iscsi->target_address) { + if (status == SCSI_STATUS_REDIRECT && iscsi->target_address) { DPRINTF(iscsi,2,"target requests redirect to %s",iscsi->target_address); pdu->callback(iscsi, SCSI_STATUS_REDIRECT, NULL, pdu->private_data);