public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [edk2-redfish-client][PATCH 13/13] RedfishClientPkg/MemoryCollectionDxe: ues RedfishHttpLib
@ 2024-02-29  8:55 Nickle Wang via groups.io
  0 siblings, 0 replies; only message in thread
From: Nickle Wang via groups.io @ 2024-02-29  8:55 UTC (permalink / raw)
  To: devel; +Cc: Abner Chang, Igor Kulchytskyy

Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 .../MemoryCollectionDxe/MemoryCollectionDxe.inf   |  3 +--
 .../MemoryCollectionDxe/MemoryCollectionDxe.c     | 15 ++-------------
 2 files changed, 3 insertions(+), 15 deletions(-)

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
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;
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116153): https://edk2.groups.io/g/devel/message/116153
Mute This Topic: https://groups.io/mt/104640238/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-29  8:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-29  8:55 [edk2-devel] [edk2-redfish-client][PATCH 13/13] RedfishClientPkg/MemoryCollectionDxe: ues RedfishHttpLib Nickle Wang via groups.io

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox