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:
agc 2006-02-09 08:55:00 +00:00
parent 5f90d3d8b1
commit 9d3ba7cac4

View File

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