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.18047.1650520088382058171 for ; Wed, 20 Apr 2022 22:48:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=fM0WD8Kg; 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 (m0150244.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23L52CAb023930 for ; Thu, 21 Apr 2022 05:48:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=R5SLhTDstFinfu3RbWe6nlcF+B/Wj0/4czfY9uATtc8=; b=fM0WD8Kg8A4gVYujiFgX4Ja7cV4E/aJFDK+xE5Mjr2Vk0D++v9iX6KpZVqBsgM9TEpyV TQ27OplmYsWO63dtPFm2l3ybhqYLjjcdfvy+c+Hbctgu1H2IB834+wgQQSoe1nVAQkUY A2yrg54s/Ej5BFowhzcbfrxb8+83rvDDLvykHjcDHsry58TbjTFxMNJ/xa2wNIO5A0hs inuhQSl/jAQbCka3O7ybVjSRvkalrpVBj+mIQYK1e+M66vZcHlm6qqFsMyl1edZOJs79 6iv2juI2bks1AMWTXk+jtlORufpvP3TsVTeiys7n8Kb7LK9Kynqb67iDjicZFEFTzoVv EQ== Received: from p1lg14879.it.hpe.com (p1lg14879.it.hpe.com [16.230.97.200]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3fjxufh3a2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 21 Apr 2022 05:48:07 +0000 Received: from p1wg14923.americas.hpqcorp.net (unknown [10.119.18.111]) (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 B824213161 for ; Thu, 21 Apr 2022 05:48:04 +0000 (UTC) Received: from p1wg14927.americas.hpqcorp.net (10.119.18.117) by p1wg14923.americas.hpqcorp.net (10.119.18.111) 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 17:47:48 -1200 Received: from p1wg14924.americas.hpqcorp.net (10.119.18.113) by p1wg14927.americas.hpqcorp.net (10.119.18.117) 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 17:47:47 -1200 Received: from p1wg14921.americas.hpqcorp.net (16.230.19.124) by p1wg14924.americas.hpqcorp.net (10.119.18.113) 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 17:47:47 -1200 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (192.58.206.38) by edge.it.hpe.com (16.230.19.124) 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 17:47:39 -1200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BE47yN+aZhvFy8KCUoz7Gu5r3r3aw0PitVPSp8roQk7bjSbW3kGmvpNzq/DKEuwSrnGaA3WFYASQXWO7TNswks0keAOOdRu1PznKmucyep65+38Oc/iz6PwC8xCyPni7D9hOs+8bYIQ35FK3aMHadIGc1Wxd3DOFKBuKlQiB/qhGMQw6uCLIR7MHDlLvX7fHLO0/fRuVrtMgybgY8eYtiPX8biEtZDeVCD9ZMW/cyS1CsiL+eXsK/JLrVTv2AxrSZmFvPoOYzBAwi79yPlktvp/sc54RZr1WDsbK4+uqcK4pwzBxnrhgy8Lg/Aca6Loy8o7p/rkSIWwwRZVTbKFL/w== 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=AyeTVWZ3rsJAYS+ZRC388x7QACDP7RsKb4/L2Q/6Wg4=; b=nltAuwDeCOdCptYuFkRVTLtHqQiwBACr0Z+0B7rfUqBCPWyxQRJ4jgjM+qeMVbcELpQXYPx//fHg7+PbN9XAW+mA/ndRrBsUpmdO6JUfQqILKoXmdwYwIJsZLv2iTtF+MdreHNPFP5FRmO9va5eFTAuxwow0NS21WwUPbFRSNxemQG/nKROo+YqtiguqJZup/E2Ygf9fKZAyFcn1M+T3Xqqg9dVvnQNSKP71RcjqHj0DE9HNTwn1R1H+QG7Vgx/igHEA0EDVUoAcBN7lFCHoUQKb+wVO891IeXT332vtveTE6bYCd+w1cQN0mVGrnxMBhtoAFE03UXsWg2DwBmf1ug== 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 PH7PR84MB1653.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:510:150::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Thu, 21 Apr 2022 05:47:32 +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 05:47:32 +0000 From: "Abner Chang" To: "devel@edk2.groups.io" , "Chang, Abner (HPS SW/FW Technologist)" , "Wang, Nickle (Server BIOS)" 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: AQHYVS5EoIsnES5qp0u9fNOdL4MwKaz5ze5AgAAOReA= Date: Thu, 21 Apr 2022 05:47:32 +0000 Message-ID: References: <16E7CAFFF6B9F010.23874@groups.io> <16E7D08A11B54075.23693@groups.io> In-Reply-To: <16E7D08A11B54075.23693@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 53113879-f44e-4637-4b7b-08da235a6e20 x-ms-traffictypediagnostic: PH7PR84MB1653: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: ArBa9eFTcI3tz34BdS0PXbbfwiXu/hSRT0s/OtBHu1Mw6wJUU5sD1pcVTov80GyaofwVfrH7OvjP8AIHH1eLCcpjwIIKQlMti0iwsUNK1lR98ZaKfxuffPYUn4id048KJVYN/HWiF5glMTWPi+sZsl9W8qTQc/HHS38pMHQUMK7oHiapIcnZeTzZvORC/3/P6nfyCK8T7Pn2ih0NFWoM/vo1od5RYRp2GDRuutej7mluhn7nzyWITysE1TVIySR1cwwL78v3VqWHJIOUAb9O/zeEorI7SI+DVlObLL6/CqV8ICT4q5/MluOz+4Vfj8EJnC1t0gfzDJV2QpDFfE8EYGkqS05Z7WJNXEbyQkcrQBKP/PRW3VlPHAVBo9hWoW37KXm3CfaQcpztbjKvxeKyiJUZWCWsg614UNCGXXrlVKIA/Pwadc+n/XAeOjcck2HjVQbQrqq12h89SW/eY/QmrbKFy24Nzd1RXauxz962/Z6hNgCzop33BuRQ0FQHIW5NFQ/CUWo0WvE+rXiSl/HdVeF0Pkn1sCcSiBTOcjgRFMooFXX2OoeC78SN/8wpG4X1RYPMjGEVtSynJlbdI+0K5Z4YaV6b2pSMbQqHG9QqOcPX6EYUaQ7ccaYDzkM7IbVd4i7+7rMMDEDtfHUeLKQHTUguXvo8Vzjh+ze9BqOIzW317SSpBCwgm0R569EhBkYdQju1QHr6JnI/9TOEZmv7dNRO7pTD1O3yMGmvBQktVzhbQ7GCAUlDSKUibO0WIZIvqKssA0scUTBWglmpj0K6OR1YoDRXqG3uSoVGff4l7bSVpBuBoXtZmnNugfpCGIn8Jvy002sMS1yl8kV1mRXUoA== 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)(82960400001)(9686003)(55016003)(53546011)(122000001)(6506007)(26005)(33656002)(66946007)(966005)(38070700005)(7696005)(2906002)(38100700002)(83380400001)(508600001)(316002)(71200400001)(86362001)(8676002)(8936002)(186003)(52536014)(110136005)(64756008)(66446008)(66556008)(66476007)(5660300002)(6636002)(76116006);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?CNyJxG2sZ2l+B1VG4IDntF4zuqCue6+cDV56hOutWzAgP7rL6hF+ZxhxvnJ9?= =?us-ascii?Q?It0aegoQAiiIYQy7Bcyg1MzdM0l0WwBYHX6LoupUipE0667E+UDx92TC9vdC?= =?us-ascii?Q?DeDkwwdZu7kc1nOIhtmi6SX4FqOSS1SeIqO/6N4NtnhLHopH9QwfSOsXkamC?= =?us-ascii?Q?UupeVP/10TvEvrbrgFnOHR/bbvGtLkvq6Ajua+X79QIOo7Iw8UDliJBootsN?= =?us-ascii?Q?vvJ8ZbWuny+SWKnBM4NiRwSY3fIOrEp4gvKUpZFcWBQP1uHeRxOxwy3hnzjn?= =?us-ascii?Q?QZjT84lAxOBTDXpRtETDx+3qXluJnQD1oZY0escwzLt8KZIqp1NHoZsSdcSx?= =?us-ascii?Q?2qEanOLrfwhdIZJHgwrC3gA6wnwWFGKP4CAg/IZFqZlROyakxB414iI5RoLa?= =?us-ascii?Q?OJq9WOV/GLvR13H7/WeMsZP10gjcLK6TaFaDm67ieUQ17lD69EFi2s6/MS9q?= =?us-ascii?Q?XoiZgxck88d/JBcToIufha6iQesNoGFkfr7p39mXgqhExt7XGd0n0GEfR8CY?= =?us-ascii?Q?sqqlxYJAEVTCCKPtSlXyYf++6jLxN/VTs9o/v0fkbNCsw0WTOfyLZUQJTiUz?= =?us-ascii?Q?3E+GqpA279GQK1rq1/3Y72DXTsvAnk5qiFQU4DmdrFPpMrTkV5r6UiXZOxp6?= =?us-ascii?Q?RhGb5qtEACmpkCdR6oeLKSOLliynfFHBKBF/Lp8S/rAji0ONidX9E9WvYn5h?= =?us-ascii?Q?t5aI9Kd3cHNlEbR427Qa4/37hs3HF0rvLENKTmP4ShX62yanqeuKzrysSbER?= =?us-ascii?Q?cQ/EaiBlFuGYuJxbK5Z30Uln1/X68n47DytUUXTH5ftNkk9ctQuF2KeNQfa8?= =?us-ascii?Q?99PDOgtre8d4V7sB6E5Tkwl8xXz8Bcj+fOHvBtX7E2GVhfN7d1NP700b0M6z?= =?us-ascii?Q?4zgb4gnaRqSkh44M6rx2fHUckoyICilfvWALzHe5KfTTLkZSY8ATRnyu/wUd?= =?us-ascii?Q?bHS1hssHUV247brXh3mmi9pYEoxIKRkNUslucx0zQaVTfLrnKVTrybQlIZif?= =?us-ascii?Q?h76WyfEW2FE+exM1GTg35BkwPqwibbe/c6TpjLuspcnS9yg3bSctKiZFOWuJ?= =?us-ascii?Q?Z9srt4xam56kYlXxUDBuC3yDgplTsW5GeFjLdzvvzgI6uj/xrh8v//B8LjjW?= =?us-ascii?Q?35PewgOJsdm+sxENayuv7JsOA1M//BufqjGmukc/Zpion9ob6L9wQbqRHYfz?= =?us-ascii?Q?+pl3bE56F8EhP5zWNwHMG3/S2Ttu+dBuiuIIZfB7yupnPvdZCG5heDB8vmtI?= =?us-ascii?Q?ZbLCn3ZhzCABqYT3nhpgVJLTxqNTtp5FBh7DbfcKC8E+8tdsKhD0vVINlpzW?= =?us-ascii?Q?C6G3MlxOB0X0Cg2o3ihjtQgeG5KdAFrkmOvV1abLc7wzQaPc1x5QdUXbcVgd?= =?us-ascii?Q?+cGXqu1IlgLhpH27GAkiYm2eZQ94EO7fwMo9M6/6uW5EJJr2qiYN58e1PTEy?= =?us-ascii?Q?Fp8tEjPcdNibR1kmi4CTiAp4xtpbLSpmdNmBmxCiShnMfBoJluEl+3Z/lbxm?= =?us-ascii?Q?u0dwTTH6wcFh6VFJnSRFNjPeXjMY9dx7aXFSIIie6i1OR8mMvApr97ZqBkUp?= =?us-ascii?Q?IwnBuFQHliILR7HsraDQgCzs2hkA0fOoCy6jJ617RGA+BInYYcp2WYoZp3CM?= =?us-ascii?Q?ZPA9FQjZllq2ewxLDIbvqBG1XmOWIgXQXcXXkcrhlF4eZQ2U9E4i9u5TEVtu?= =?us-ascii?Q?AslifVMqTviil6grRwS/k5gVgNZTBC+cp8e+W77x5TNSBOMJ70vByJcqtdDh?= =?us-ascii?Q?rbtiHC53pA=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: 53113879-f44e-4637-4b7b-08da235a6e20 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2022 05:47:32.6579 (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: yxWP6Ke18QRMultXhLpMDPAXIgSfCc1I4jvYaj4YpZkmS6CtE3dg9zjxAzLOZ5+j9+zCIUiU0Cp81yWpI5iuKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR84MB1653 X-OriginatorOrg: hpe.com X-Proofpoint-ORIG-GUID: aFvzGbIsyimAUQPoxdYFjdkufofqpatZ X-Proofpoint-GUID: aFvzGbIsyimAUQPoxdYFjdkufofqpatZ 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 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 suspectscore=0 phishscore=0 mlxlogscore=901 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210031 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Merged! > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Abner > Chang > Sent: Thursday, April 21, 2022 12:57 PM > 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 >=20 > I will merge it. Thanks >=20 > Reviewed-by: Abner Chang >=20 >=20 > > -----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 > > > > 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. > > > > Signed-off-by: Nickle Wang > > Cc: Abner Chang > > --- > > RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > 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 > > > > - (C) Copyright 2018-2021 Hewlett Packard Enterprise Development > LP
> > + (C) Copyright 2018-2022 Hewlett Packard Enterprise Development > LP
> > > > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > @@ -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; > > > > 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