diff options
author | Roy Franz <roy.franz@linaro.org> | 2015-02-03 00:53:37 +0000 |
---|---|---|
committer | tye1 <tye1@Edk2> | 2015-02-03 00:53:37 +0000 |
commit | 385d44ba4eeb6d31e4926041dc2746d06fb1fac8 (patch) | |
tree | 41ed04270c210649fe68b5e8d139704524c79878 /MdeModulePkg/Universal/Network | |
parent | 5e737e835e2bb84fe4cc94245617087633a8b6cd (diff) | |
download | edk2-385d44ba4eeb6d31e4926041dc2746d06fb1fac8.zip edk2-385d44ba4eeb6d31e4926041dc2746d06fb1fac8.tar.gz edk2-385d44ba4eeb6d31e4926041dc2746d06fb1fac8.tar.bz2 |
Update the code not require optional parameters include DataPDUInOrder and DataSequenceInOrder.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Tian Feng <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16700 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network')
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c index cb1f79b..b2bf946 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c @@ -1291,22 +1291,26 @@ IScsiCheckOpParams ( //
// DataPDUInOrder, result function is OR.
//
- Value = IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_DATA_PDU_IN_ORDER);
- if (Value == NULL) {
- goto ON_ERROR;
- }
+ if (!Session->DataPDUInOrder) {
+ Value = IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_DATA_PDU_IN_ORDER);
+ if (Value == NULL) {
+ goto ON_ERROR;
+ }
- Session->DataPDUInOrder = (BOOLEAN) (Session->DataPDUInOrder || (AsciiStrCmp (Value, "Yes") == 0));
+ Session->DataPDUInOrder = (BOOLEAN) (AsciiStrCmp (Value, "Yes") == 0);
+ }
//
// DataSequenceInorder, result function is OR.
//
- Value = IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_DATA_SEQUENCE_IN_ORDER);
- if (Value == NULL) {
- goto ON_ERROR;
- }
+ if (!Session->DataSequenceInOrder) {
+ Value = IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_DATA_SEQUENCE_IN_ORDER);
+ if (Value == NULL) {
+ goto ON_ERROR;
+ }
- Session->DataSequenceInOrder = (BOOLEAN) (Session->DataSequenceInOrder || (AsciiStrCmp (Value, "Yes") == 0));
+ Session->DataSequenceInOrder = (BOOLEAN) (AsciiStrCmp (Value, "Yes") == 0);
+ }
//
// DefaultTime2Wait, result function is Maximum.
@@ -1361,6 +1365,11 @@ IScsiCheckOpParams ( IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_SESSION_TYPE);
IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_ALIAS);
IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_PORTAL_GROUP_TAG);
+ //
+ // Remove the key-value that may not needed for result function is OR.
+ //
+ IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_DATA_PDU_IN_ORDER);
+ IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_DATA_SEQUENCE_IN_ORDER);
if (IsListEmpty (KeyValueList)) {
//
|