If we're doing discovery, and the TSIH cannot be found, set it to

the disk number held in the session parameters - avoid using a negative
index to the array of target disks.
This commit is contained in:
agc 2008-02-07 19:09:02 +00:00
parent 1d2e5fa7a1
commit 02806300b2
1 changed files with 1 additions and 0 deletions

View File

@ -909,6 +909,7 @@ login_command_t(target_session_t * sess, uint8_t *header)
sess->d = i;
} else if ((i = find_target_tsih(sess->globals, cmd.tsih)) < 0) {
iscsi_trace_error(__FILE__, __LINE__, "Abnormal SessionType cmd.tsih %d not found\n", cmd.tsih);
i = sess->d;
}
if (param_equiv(sess->params, "SessionType", "")) {
iscsi_trace_error(__FILE__, __LINE__, "SessionType not specified\n");