}\r
\r
/**\r
- Check wheather the Controller handle is configured to use DNS protocol.\r
+ Check whether the Controller handle is configured to use DNS protocol.\r
\r
@param[in] Controller The handle of the controller.\r
\r
EFI_MAC_ADDRESS MacAddr;\r
UINTN HwAddressSize;\r
UINT16 VlanId;\r
+ CHAR16 AttemptMacString[ISCSI_MAX_MAC_STRING_LEN];\r
CHAR16 MacString[ISCSI_MAX_MAC_STRING_LEN];\r
CHAR16 AttemptName[ISCSI_NAME_IFR_MAX_SIZE];\r
\r
UnicodeSPrint (\r
AttemptName,\r
(UINTN) 128,\r
- L"%s%d",\r
- MacString,\r
+ L"Attempt %d",\r
(UINTN) AttemptConfigOrder[Index]\r
);\r
+\r
Status = GetVariable2 (\r
AttemptName,\r
&gEfiIScsiInitiatorNameProtocolGuid,\r
\r
ASSERT (AttemptConfigOrder[Index] == AttemptTmp->AttemptConfigIndex);\r
\r
- if (AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED) {\r
+ AsciiStrToUnicodeStrS (AttemptTmp->MacString, AttemptMacString, sizeof (AttemptMacString) / sizeof (AttemptMacString[0]));\r
+\r
+ if (AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED || StrCmp (MacString, AttemptMacString)) {\r
FreePool (AttemptTmp);\r
continue;\r
}\r