From 2f8d756c4847ebd2971d03a1fd91c53fd711ba16 Mon Sep 17 00:00:00 2001 From: Nickle Wang Date: Thu, 29 Feb 2024 15:46:43 +0800 Subject: [PATCH] RedfishClientPkg/MemoryCollectionDxe: ues RedfishHttpLib Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../MemoryCollectionDxe/MemoryCollectionDxe.c | 15 ++------------- .../MemoryCollectionDxe/MemoryCollectionDxe.inf | 3 +-- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c index 2127570fb..1b7d74e86 100644 --- a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c +++ b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c @@ -247,18 +247,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); @@ -289,7 +278,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; diff --git a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.inf b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.inf index 67c38f62d..97c59000c 100644 --- a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.inf +++ b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.inf @@ -35,13 +35,12 @@ ConverterCommonLib MemoryAllocationLib RedfishFeatureUtilityLib - RedfishLib + RedfishHttpLib UefiLib UefiDriverEntryPoint UefiBootServicesTableLib EdkIIRedfishResourceConfigLib RedfishVersionLib - RedfishHttpCacheLib [Protocols] gEdkIIRedfishConfigHandlerProtocolGuid ## CONSUMED