From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id A9E297803E8 for ; Thu, 23 Nov 2023 14:34:30 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=X3Ddqg2KD+iG/MsXzkPAgEapgz/245WkSNyitz4faQs=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1700750069; v=1; b=BHXdwZUtqJUw20DSegiS6RAAtwtc6WCqXsLFihHdFHie5t9kHyZDAmZmQBm6DDc+ntKCf3L3 15t2env2nDIUtznm+baIj21GFxiPt+6CJvTWaN8WFKc4aDdiUYbwLMkV27IyZ/cfYusO/1jGHfN VTXwF3IQpcwPsmtNovcWeDb0= X-Received: by 127.0.0.2 with SMTP id 705JYY7687511xP3SmB4SBIA; Thu, 23 Nov 2023 06:34:29 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.52]) by mx.groups.io with SMTP id smtpd.web11.92280.1700750068767443292 for ; Thu, 23 Nov 2023 06:34:28 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FPPb7Q08fu41jIKZexfdx5jLV0IubZCCqZFNH/imLUBNG0lakPmo99r1VMMbJQ1llMjGu2jaibZaC9QiYtvq6KJN6qS4uj4DiZ4MthZeBDhV9WK5faNfrAlw27B48rKH5xWZ6ycoMEyXlcnaYtvWLYOrPSX0ovHUAjALp132z8acfn3MCMpkp7NF+cEHrQGr3Ydu3DqHw55h8grsDBxrEcQwhR1w9N74hvLGU81VT/taNXd+4N6DMYviTpsWGMZ1Ykjx0yfE1IbEXZ1aqHn98L456U52J2YfxBXJlAduDm1R5SBPkPcasgzPHqELG8+KLvOQGc+8rmRGjcjssdPSBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YiIh7McW2WzHnugylG7ORUn0uVLyoRk+88JxKmeOa04=; b=g0KbrkJ3Gltg7S+IVdmo+XHMeC9KI9piPDNVuvpVmhQc8ndF2CDlZ9SQRb/kqj9/iJSjeAyPfLHJPp8Ni8Sss2U+R3bd2ioBFzPX0C/UhA7xU4kOYh9jUydRMEtsVxqFl1+xhsBILN/sGHeMhGiO3L8LJ9FJz8uq5QOZxnITFp8jOcIzmrJ8cIV2xlNZdcCMUYG29Lb+CgiOoPcqWi54In/nhyO5+bH41bx+RmUPzLkmAQTEMiF0ud4X55/QBLeHSEJrq2aQDz/vTjKJei7ftwIhFNzuzPCzIo/Ub6dn+YyXxZKxfJJxrcT4InaoeZUQUrEN9Hm5hlP0XBMyS3GQDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-Received: from MW4PR03CA0076.namprd03.prod.outlook.com (2603:10b6:303:b6::21) by SA3PR12MB9089.namprd12.prod.outlook.com (2603:10b6:806:39f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.20; Thu, 23 Nov 2023 14:34:26 +0000 X-Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:b6:cafe::85) by MW4PR03CA0076.outlook.office365.com (2603:10b6:303:b6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.28 via Frontend Transport; Thu, 23 Nov 2023 14:34:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.117.161) by CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.3 via Frontend Transport; Thu, 23 Nov 2023 14:34:26 +0000 X-Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 23 Nov 2023 06:34:13 -0800 X-Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 23 Nov 2023 06:34:12 -0800 X-Received: from NV-CL38DL3.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Thu, 23 Nov 2023 06:34:11 -0800 From: "Nickle Wang via groups.io" To: CC: Abner Chang , Igor Kulchytskyy , "Nick Ramirez" Subject: [edk2-devel] [edk2-redfish-client][PATCH 4/6] RedfishClientPkg/ConverterLib: fix empty attribute value issue Date: Thu, 23 Nov 2023 22:34:11 +0800 Message-ID: <20231123143411.3500-1-nicklew@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FD:EE_|SA3PR12MB9089:EE_ X-MS-Office365-Filtering-Correlation-Id: cf365d52-2580-487f-fbd7-08dbec314b55 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: Mi5uGi2aRj+LkUA4/Z+N6+qkP3XmArCsT7pcK2k5nQ6tHFYpcpvAnOLlgQTc/zHpUsDOlX63QyEi9O8bGdjMXRVSQQu0UuISbOBkQhe4LV1cP9jAAcN8qH1EbAJYUOYu+tcITiBeSvXit+4YFJt6oJYDACky8bSRQ2NCH6bJGrTDGDV8jgX4aPAuSgSru1ydzvs62L3LE7XQ873g6Lsvondz0OstAiVnkZQjy8ipSBPn1Z/u9SdESVYYolmve9TfNkBJ/jpxTFrwA14aGn9QMYDcbR8dS/B7aTTzvGhl3pHZUWhfeEa9DA8X9eSshtjl6O0eG0zCCppHxxA2mIxd6QHEEn8mP70nLS8ZPGK1vtiDHp4POstpv7HOdW12oFVsTKaL3DyPd9J9zy621kIsoka7DGWFzCc+vLgvtI+jRnAnyKRjjJ7VSmsIpbMBINAMfsKs7IBo4ZLTKv8A3e7r/+kmhRu732GPZAtBArEd4HlmsWAqQZyDnJdS0vBlb/lWkNcxnOp9hXJLQRiYQ69cRN29EdOyR/N6p8RNLnBVJYGRKtdzbWp5aphpbD1XNyIfLsExMgR3hGUNLOAxmfDBu4XfKpd9N9quDnRLx7h/PA8ploN3ZYvTXq33+uxVKR5/LdizY4GBP+FYCC4uSovCy6xWMXyCXZUNoo0+XrDt/qlHUX+lzz/3usfYUj/Lhu5eWr6iaoNLU5lgO02+6p/3iw== X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2023 14:34:26.3442 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cf365d52-2580-487f-fbd7-08dbec314b55 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9089 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ZsLSGHGkwen86D0QcomvJBhOx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-Spam-Flag: yes X-Spam-Level: ************ X-GND-Spam-Score: 190 X-GND-Status: SPAM Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=BHXdwZUt; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io When attribute is empty string, converter library creates NULL attribute value in C structure instead of empty string. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez --- RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c b/RedfishC= lientPkg/ConverterLib/src/RedfishCsCommon.c index 02fcb2b2..7c2fa3c9 100644 --- a/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c +++ b/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c @@ -1,6 +1,7 @@ /** @file =20 (C) Copyright 2018-2022 Hewlett Packard Enterprise Development LP
+ Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved= . =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -446,6 +447,9 @@ CreateEmptyPropCsJson ( if (TempJsonObj =3D=3D NULL) { return RedfishCS_status_not_found; } + } else { + // Dump JSON from JsonObj. + TempJsonObj =3D JsonObj; } =20 Status =3D allocateRecordCsMemory (Cs, sizeof (RedfishCS_Type_EmptyProp_= CS_Data), (void **)&CsTypeEmptyPropCS); --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111674): https://edk2.groups.io/g/devel/message/111674 Mute This Topic: https://groups.io/mt/102767546/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-