From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web08.17784.1650517079109712298 for ; Wed, 20 Apr 2022 21:57:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=fhk9bVWI; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0110a75415=abner.chang@hpe.com) Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23L3Vxe1002804 for ; Thu, 21 Apr 2022 04:57:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=v+8uQqaufI53PNh3wSX2EbvW/WOyaaJ/EcbgOt28oRc=; b=fhk9bVWInxu8o9s/f4H1Kt48AlTE8GAM0q6uj4EcYOBDFp30AbwpIppCSFOb7r6bkr9P gio/JY2803zgSZAXwxQJrQz6IEWNFkZZW9RFSH5s1BT/J7Ggr4aMgICSe3q53KrJQP6V uwhO+9PLuuc85ZSqUHSiojddXGlvlkQucF04InxWeBpsSadUuBty82kdU4gjqChyBAXE EIk4k+/YSsArtteP3wiWCXQFz2ABJuVoFL7TZNOnTxwJCjGhd2d1MVasyygOSpRZit8y 8XzHOfD83uMA4nGZBpTUhKzvzf9rSHkwskK6Tu6zfGoOigBYsXG+7eh30HN7dSLiijeh hA== Received: from p1lg14879.it.hpe.com (p1lg14879.it.hpe.com [16.230.97.200]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3fjr2fun9t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 21 Apr 2022 04:57:58 +0000 Received: from p1wg14926.americas.hpqcorp.net (unknown [10.119.18.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by p1lg14879.it.hpe.com (Postfix) with ESMTPS id 5AC6113161 for ; Thu, 21 Apr 2022 04:57:57 +0000 (UTC) Received: from p1wg14928.americas.hpqcorp.net (10.119.18.116) by p1wg14926.americas.hpqcorp.net (10.119.18.115) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 20 Apr 2022 16:57:20 -1200 Received: from p1wg14920.americas.hpqcorp.net (16.230.19.123) by p1wg14928.americas.hpqcorp.net (10.119.18.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15 via Frontend Transport; Wed, 20 Apr 2022 16:57:20 -1200 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (192.58.206.38) by edge.it.hpe.com (16.230.19.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 20 Apr 2022 16:57:20 -1200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eKgGewUyiQ8cxRja1iTvHpYUtmdoDei4kkS4xNJJQ1uEuFTsQSK++I/Lz70jze9tdTpM10h7fRED5ab4FfmEWFgfEN/2xTckaepvYp4O8WxY7ZhgvVcQLA2W2/PEhF367ihZxx5EuS2oJiKkebMPqwZXr0+0fyhiy1+n9tTV1TqRS13TuQ35x5I38dNzo2ngKBMDSzlK65V+3Q++Fra+vCWnVOKevgPW9g5pbZHidjGFtBl35BiR0ASo6SqLKQelY1jIkKjABSjshwRYoIEHvxwQVDgq5VCCUCsR6PWb63PNY0WbiL94/uZ/bJGY3AKAxSuSlljHRAcy7+VSiCQShQ== 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=BXOIQQMI/hyzBE4FiSwMo5/t/+QNNdb7w5vjefXgbJ0=; b=Q6+mDd0UFc6pIQX9iJdoZ+I3qj5SUEemfQWKe3dJIM8LHqpIZ9kWlsEzhL5DcuYHtVuzXdslk5x16UepMFHhnnX85kwVFflIIjre+lXYgSRT9o8ah8ATN3lydT6ZNMiBNsfR7+FaixDJbyuY3d7ra1gveE3hyHi6r+JqT7DYgcNPYJdgquJ54U3wf9t2QOwxegjy/nr0iGGf8vhihn5sSoiNbsgg05nO9YkEy3SxFNISfI2dxb77mmpVUUQany7IIVIa2fCFGCUcdJBkzdNuwzqJvNeH62RQgyqbxuI2PjgiJ/uMxOmO7hk3lQj2gZdVpbPPIgC9R806V0QZ56wI3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:510:173::6) by IA1PR84MB3036.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:208:3ee::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Thu, 21 Apr 2022 04:57:19 +0000 Received: from PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM ([fe80::cc95:6a61:fb46:aed1]) by PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM ([fe80::cc95:6a61:fb46:aed1%9]) with mapi id 15.20.5164.025; Thu, 21 Apr 2022 04:57:19 +0000 From: "Abner Chang" To: "devel@edk2.groups.io" , "Wang, Nickle (Server BIOS)" CC: "Chang, Abner (HPS SW/FW Technologist)" Subject: Re: [edk2-devel] [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Do not create attribute for NULL object Thread-Topic: [edk2-devel] [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Do not create attribute for NULL object Thread-Index: AQHYVS5EoIsnES5qp0u9fNOdL4MwKaz5ze5A Date: Thu, 21 Apr 2022 04:57:18 +0000 Message-ID: References: <16E7CAFFF6B9F010.23874@groups.io> In-Reply-To: <16E7CAFFF6B9F010.23874@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: aed26c4d-0532-4968-3105-08da235369d0 x-ms-traffictypediagnostic: IA1PR84MB3036:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mkoPQf+ricSJ+qsXPsl/3s05O1tZ+n8e8i5pq9+U5+EZ25vOmQNUw+0yTc4wTc2hL7TA/LRKFFNFNPVRL3+m/iXRinvegsrknTTCNlkwLFz0mpqkFj9BCFqT2Ov0UJiEQRbf3n9T2WNPQarELSn5D4uQxOOmRNRQOlMHjGCu5E/Z1DO8TBVRhJUVNQISWhom0MjnRw3xYp8e9wwp/sS8qZHfmnMZWIBB8+Hy7w9+K0ffREp9MFdYwBGFjP4xdtH3BI7VMxWfwSeXb1EE24ff1WJGeY+R/CK3WwdI9wi8kb10HaXoChyfkplzrFdn0K6JD0SJy32j0MJle9vIb4+qIEQYmx/5Q13kJ4AjThMwimQVD7V1q7tkaX/h7jHrkyAPfabDjhhrtY0jSUe1zyR4nuNfjzU9Y9Pv5xas98BBhCxJxzDgpwCCBNiRm+QVpl7B1br0tzzDtAZfO24Mvk+PzdrNmw+UTfZD/u0jjSpaok68CQwqdkdf0ZSU9Ow4FyhjhEoJsm+QdSt54mk+FQzkE+bVLoAeWAZTV4xZ7A7xN6ZxHkrpV4zE21roF/01dJJGUlfVo8hxFkcrDXLNnfewSDhSZCGVnfRTEeqFIt4QXuAKbEBCGU46KWiYYrn+NTrzyfED5EF7vQ/Pqo40D/bIj26CyEvhiJgr5MEct3Um7+eqoutPafutL1Zp8ig/VHEaL0QJMv8wNtXHZX+k28UJBtTL4/LVm7tpGd2zTgmtRU94+RSdTf2pB4knQjnRpELSnkp1BqVNx7HfYua+TDth01PJR7TG4wtUJbmki9DBBq0TRxe7tl0BZTe70fqMSb5K6MxxZvq6DWoPcQqvGGvA+w== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230001)(366004)(38070700005)(38100700002)(508600001)(316002)(52536014)(966005)(7696005)(122000001)(82960400001)(2906002)(26005)(9686003)(33656002)(8936002)(83380400001)(53546011)(186003)(110136005)(6506007)(66946007)(66476007)(66556008)(76116006)(8676002)(66446008)(64756008)(4326008)(55016003)(6636002)(86362001)(5660300002)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Rvnpt4GVZuGSeTKl87lAePxKW6ni05O1rR8qPqAQh7cNhLEPdqz3yabdMTde?= =?us-ascii?Q?qEY5K3RRddD8GFTvnudpSuKPndW4cKS47B45Ugb9+PCxdFhLqSLYB6ynKKzT?= =?us-ascii?Q?N7iyy6G7HecOvO+KLNp0zMrfZznUHJDe87RAiKn8r2XqXMrBreXxGwrbJSVf?= =?us-ascii?Q?j32mXRCCZJqmbuIC5hZuUhIOUiwWrNqdBi0nHUNPG41+vY/cKFxJZUoiwglX?= =?us-ascii?Q?WZm1RC+os+Q+8HyYXiAeXpol51UlGXI9daD8WhR9FlLEXuA+eCirYPxOWA+l?= =?us-ascii?Q?HEcGKoq9YEK+I9S6hki0KxBBSdrTZj4Mksizhl/xoWwfWwx9LXvg8TuCyznZ?= =?us-ascii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PtXOcS5Vbl0d7M8Dumpw88lC/HPHq0T?= =?us-ascii?Q?V+6YhNpHvmzhwBzgF+S4yQes8JwSAEYZGsaE5AA0XtLJMh9gd3ZArnq6A6LL?= =?us-ascii?Q?UbRtAtVcriAFg9lNmx/cI4ltrwcrcmHfKVP9dCfprkRyEXUt5KbhUhdVgT/c?= =?us-ascii?Q?9ozcs8EbxX4VIcgGES2e6wOG/h+remeO1+mCXS/t+ziEF5+D6iJfx6MQ86Sv?= =?us-ascii?Q?8lr5PvqzNpkr1Vjcc5vWGRNlQgR1aQNHVjJj3pd/ZRErBe1BCTpDDqZtvozT?= =?us-ascii?Q?zb+y5MXn8tp2Xx42ZwZWUtGJ6ZmQAxn5vZBpc2Qxg28VX8qwC2clWNK77Wbm?= =?us-ascii?Q?2crC7kH2veEgIZqQl7J2BGY+/EPmAjmaaHkI5iPqsd3x6K8mV/UAwW0i+O87?= =?us-ascii?Q?1GZsMKwA9gRFXPtBXV8boRvWrXjGcQev7VtMecVP8uVBDXnGJuJdungPGC5F?= =?us-ascii?Q?JOanjlCA0gNW6Y1kIXBaXrqM5VJ0M0UH3WwKRSTl78S0elWjVkvWwc6zK+LV?= =?us-ascii?Q?kzWdp5vSoQ=3D=3D?= X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: aed26c4d-0532-4968-3105-08da235369d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2022 04:57:18.9762 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: IdEF7iypXkd8bPL8epHtR6f9SfP7fb8nzOK7rvByJQHZNwmnxJbskeV0+BMVdMJtx3nCuTISguq1Mj66zB2qEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR84MB3036 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: aywacWTVcETHCMCWnnDPz0yuIF-dCYVr X-Proofpoint-ORIG-GUID: aywacWTVcETHCMCWnnDPz0yuIF-dCYVr X-Proofpoint-UnRewURL: 2 URL's were un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_06,2022-04-20_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 malwarescore=0 clxscore=1015 mlxlogscore=894 priorityscore=1501 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210025 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I will merge it. Thanks Reviewed-by: Abner Chang > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Wang, > Nickle (Server BIOS) > Sent: Thursday, April 21, 2022 11:16 AM > To: devel@edk2.groups.io > Cc: Wang, Nickle (Server BIOS) ; Chang, Abner (HPS > SW/FW Technologist) > Subject: [edk2-devel] [edk2-staging][PATCH] edk2-staging/RedfishClientPkg= : > Do not create attribute for NULL object >=20 > While input object is NULL, do not generate attribute with empty string > value. This can reduce the size of HTTP context while sending "PATCH" > or "POST" request to Redfish service. >=20 > Signed-off-by: Nickle Wang > Cc: Abner Chang > --- > RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >=20 > diff --git a/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c > b/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c > index 624314a8ec..02e4c50c5f 100644 > --- a/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c > +++ b/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c > @@ -1,6 +1,6 @@ > /** @file >=20 > - (C) Copyright 2018-2021 Hewlett Packard Enterprise Development LP
> + (C) Copyright 2018-2022 Hewlett Packard Enterprise Development LP
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -795,7 +795,6 @@ RedfishCS_status GetRedfishPropertyVague (void > *Cs, json_t *JsonObj, char *Key, > RedfishCS_status InsertJsonStringObj (json_t *ParentJsonObj, char *Key, > RedfishCS_char *StringValue) > { > json_t *JsonValue; > - RedfishCS_char NullStr[] =3D ""; > RedfishCS_char *InsertStr; >=20 > InsertStr =3D StringValue; > @@ -803,7 +802,7 @@ RedfishCS_status InsertJsonStringObj (json_t > *ParentJsonObj, char *Key, RedfishC > return RedfishCS_status_invalid_parameter; > } > if (InsertStr =3D=3D (char *)NULL) { > - InsertStr =3D NullStr; > + return RedfishCS_status_success; > } > JsonValue =3D json_string(InsertStr); > if (JsonValue =3D=3D NULL) { > -- > 2.32.0.windows.2 >=20 >=20 >=20 >=20 >=20