Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib
Signed-off-by: Nickle Wang <[email protected]>
Cc: Abner Chang <[email protected]>
Cc: Igor Kulchytskyy <[email protected]>
---
.../ComputerSystemCollectionDxe.inf | 3 +--
.../ComputerSystemCollectionDxe.c | 15 ++-------------
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git
a/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCollectionDxe.inf
b/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCollectionDxe.inf
index b848f69f9..7c00f8f56 100644
---
a/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCollectionDxe.inf
+++
b/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCollectionDxe.inf
@@ -35,13 +35,12 @@
ConverterCommonLib
MemoryAllocationLib
RedfishFeatureUtilityLib
- RedfishLib
+ RedfishHttpLib
UefiLib
UefiDriverEntryPoint
UefiBootServicesTableLib
EdkIIRedfishResourceConfigLib
RedfishVersionLib
- RedfishHttpCacheLib
[Protocols]
gEdkIIRedfishConfigHandlerProtocolGuid ## CONSUMED
diff --git
a/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCollectionDxe.c
b/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCollectionDxe.c
index 05d746252..975ba0564 100644
---
a/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCollectionDxe.c
+++
b/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCollectionDxe.c
@@ -256,18 +256,7 @@ ReleaseCollectionResource (
//
// Release resource
//
- if (Private->Response.Payload != NULL) {
- RedfishFreeResponse (
- Private->Response.StatusCode,
- Private->Response.HeaderCount,
- Private->Response.Headers,
- Private->Response.Payload
- );
- Private->Response.StatusCode = NULL;
- Private->Response.HeaderCount = 0;
- Private->Response.Headers = NULL;
- Private->Response.Payload = NULL;
- }
+ RedfishHttpFreeResponse (&Private->Response);
if (Private->CollectionJson != NULL) {
FreePool (Private->CollectionJson);
@@ -298,7 +287,7 @@ CollectionHandler (
//
// Query collection from Redfish service.
//
- Status = RedfishHttpGetResource (Private->RedfishService,
Private->CollectionUri, &Private->Response, TRUE);
+ Status = RedfishHttpGetResource (Private->RedfishService,
Private->CollectionUri, NULL, &Private->Response, TRUE);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: unable to get resource from: %s :%r\n",
__func__, Private->CollectionUri, Status));
goto ON_RELEASE;
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116152): https://edk2.groups.io/g/devel/message/116152
Mute This Topic: https://groups.io/mt/104640235/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-