iscsi-command.c: use pdu->expxferlen instead of pdu->expxferlen

Both are the same value at this point but it is better to
do the computation only based on pdy-> fields.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2015-02-20 20:39:51 -08:00
parent 7dfd42ebfe
commit 831ecb3656

View File

@@ -326,7 +326,7 @@ iscsi_scsi_command_async(struct iscsi_context *iscsi, int lun,
* subtract from first_burst_length.
*/
if (!(flags & ISCSI_PDU_SCSI_FINAL)) {
uint32_t len = task->expxferlen - pdu->payload_len;
uint32_t len = pdu->expxferlen - pdu->payload_len;
if (len > iscsi->first_burst_length) {
len = iscsi->first_burst_length;