if (EFI_ERROR (Status)) {\r
RemotePort = HTTP_DEFAULT_PORT;\r
}\r
-\r
+ //\r
+ // If Configure is TRUE, it indicates the first time to call Request();\r
+ // If ReConfigure is TRUE, it indicates the request URL is not same\r
+ // with the previous call to Request();\r
+ //\r
Configure = TRUE;\r
ReConfigure = TRUE; \r
\r
//\r
// The request URL is different from previous calls to Request(), close existing TCP instance.\r
//\r
- ASSERT (HttpInstance->Tcp4 != NULL &&HttpInstance->Tcp6 != NULL);\r
+ if (!HttpInstance->LocalAddressIsIPv6) {\r
+ ASSERT (HttpInstance->Tcp4 != NULL);\r
+ } else {\r
+ ASSERT (HttpInstance->Tcp6 != NULL);\r
+ }\r
HttpCloseConnection (HttpInstance);\r
EfiHttpCancel (This, NULL);\r
}\r
Wrap->HttpInstance = HttpInstance;\r
Wrap->TcpWrap.Method = Request->Method;\r
\r
- if (Configure) {\r
- Status = HttpInitTcp (HttpInstance, Wrap);\r
- if (EFI_ERROR (Status)) {\r
- goto Error2;\r
- }\r
+ Status = HttpInitTcp (HttpInstance, Wrap, Configure);\r
+ if (EFI_ERROR (Status)) {\r
+ goto Error2;\r
+ } \r
\r
- } else {\r
+ if (!Configure) {\r
//\r
// For the new HTTP token, create TX TCP token events. \r
//\r
goto Error1;\r
}\r
}\r
-\r
+ \r
//\r
// Create request message.\r
//\r