Use the ISCSI_NTOHL macro in place of a straight ntohl(), so that this
can be abstracted away per platform.
This commit is contained in:
parent
5f90d3d8b1
commit
9d3ba7cac4
2
dist/iscsi/src/target.c
vendored
2
dist/iscsi/src/target.c
vendored
@ -217,7 +217,7 @@ scsi_command_t(target_session_t * sess, uint8_t *header)
|
||||
scsi_cmd.ext_cdb = ahs_ptr + 4;
|
||||
break;
|
||||
case 0x02:
|
||||
scsi_cmd.bidi_trans_len = ntohl(*((uint32_t *) (void *) (ahs_ptr + 4)));
|
||||
scsi_cmd.bidi_trans_len = ISCSI_NTOHL(*((uint32_t *) (void *) (ahs_ptr + 4)));
|
||||
*((uint32_t *) (void *) (ahs_ptr + 4)) = scsi_cmd.bidi_trans_len;
|
||||
TRACE(TRACE_ISCSI_DEBUG, "Got Bidirectional Read AHS (expected read length %u)\n", scsi_cmd.bidi_trans_len);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user