Use the literal ISCSI_STATUS_REDIRECT instead of the numeric value

This commit is contained in:
Ronnie Sahlberg
2012-10-18 20:03:58 -07:00
parent fd4c7b7108
commit abd20f3587
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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);