Message ID | 20231017140657.95860-7-stefano.babic@swupdate.org |
---|---|
State | Accepted |
Delegated to: | Stefano Babic |
Headers | show
Return-Path: <swupdate+bncBAABBBVKXKUQMGQE4R2PGJI@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=FBBsR0++; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::53e; helo=mail-ed1-x53e.google.com; envelope-from=swupdate+bncbaabbbvkxkuqmgqe4r2pgji@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-ed1-x53e.google.com (mail-ed1-x53e.google.com [IPv6:2a00:1450:4864:20::53e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S8wlZ1Hwvz20cb for <incoming@patchwork.ozlabs.org>; Wed, 18 Oct 2023 01:07:05 +1100 (AEDT) Received: by mail-ed1-x53e.google.com with SMTP id 4fb4d7f45d1cf-53e119e615asf6221196a12.0 for <incoming@patchwork.ozlabs.org>; Tue, 17 Oct 2023 07:07:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697551623; cv=pass; d=google.com; s=arc-20160816; b=0zXub+4zNN8aXLiBjmzOfTv8d7WFVcNoJBx4hxJMoXBQy02LrNdI0zZiLZlEWZ2+WD 4YJDBeUxEbxrJoDTZjj615XQucm+GRfE5M1hCq/7aPWOqeNhAE/tK+b47dZPsgDxyav/ QTlegX5RRXZznHJhkCO5cZAB/EfC8UK3bVTn7g7FOrurU39kV3D5XtEXE5rBBPq+mTmg xWFTVHC4MX58SebhudduZYxwwSsV6OFNNEcnSFtwuJc69syz9ZZ/S07eP3RdIc2EqgOO ECBPuRorkLHkjXONzbAewb5abWuYQ0NuCeDeNOKbfa01290WLX8nWkjEHRjHZYOk9E0K DB5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:ui-outboundreport:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=kpqiNl6nWKO0UOPqQYIlSVPXI0w+ofIJB9DvrO8WE+w=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=T0ua1ZBkJTUJS55mKIvaR0s+y0TN7R1b58uyegVWBvNBHOYwL+agsWyCehIXPpUUUN aBmiHesWpx3ImYS62ZCE91CT1M+1E2f78RFo+57nG+r8N2Wg/Y/IlZk/aDENWj1bpUn8 ADdetfFw2ZvKA/QXMml2rn0rJ1gFR/xP6m5LZbnvDxhdCNHrK41ZtI4bCZmE06qGq/Lr 1VXKNZMKaMDuTBnSVVckMeZ9QW8atjdMrs/H8wjG+KfPzoG/oIH29Uhmq387OqliqUVc c7OS3lXhi6LgzqTL2vv0ktgZR45z0jf8HLfwCJ1rEw4QxQzJMurivgZDwLlA6Bjm0Bkc ayoA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.17.10 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1697551623; x=1698156423; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:ui-outboundreport:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=kpqiNl6nWKO0UOPqQYIlSVPXI0w+ofIJB9DvrO8WE+w=; b=FBBsR0++iJ7XBE+ulpRh9Cu+GPzfqRDFkVY8MHoCEZWaGFsQXNu+iJzhg8UFgtXDKb QJ9yo43vnxVtOptrurTYtJjFVBcCrpxSW95tl6qOCs94aCcIuvHr2EZW+S53DzChJH5G DsLmRSjYpg19uFwfE+yebI7q9nSGvP5fXy6brLuYZysYyQECs6pAd7Su9hLCpPXpQZ9G mM3E5N8BUhYWeLiblaX86CIKp9WPDeQA+pjmQTPOdZJ7c4LcWTC/cnnOR6+BkACHhDmp IJE1WrtYvgihnprCMy7DCwNdT8DxDZdciwRm0emx9PYcJygFfBW4xP/cb6ZL3AZTKr9M 3TAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697551623; x=1698156423; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :ui-outboundreport:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=kpqiNl6nWKO0UOPqQYIlSVPXI0w+ofIJB9DvrO8WE+w=; b=WYvLEDuTG0koLiXbDuw9al6MVql3O5q9eJ8WTCJjsh0WDW1lYrTaSS6cHPE+i0c3eP WxsfD23p4kgpkXOjclIg3xk5OM6+ObkNdPPsmt3gi6z+sa8TIsFD5T+u65CJHgzWUnHX P5PgsVIiBR0A1mA6bqGRfyLLq43LFmp21YFDZNoo5+3LH625UQdu+L/9OUD6jR4p6klf +rzRD63hZo1Go53Y3vXomlTu4iyIGdkkydCOIL2zj0Cjp9uHtCkB0Dxiwfsk5JBs/hoZ /4Jm6QXf50u9c1D3DW94KFIsXXlbxEdXGMYHjPqiykEo0dqJRqJndUQ4OeTTq168gMHr Ln3g== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOJu0YztZv38Ceph1q2QorRcaYsdZCRQ2T9JoAtLDdAWO7V3/APToXnq M5+X4xTlK5+941/CRxcOfDk= X-Google-Smtp-Source: AGHT+IHjL5S/dCCbr7h9EJlty/8S20JDFsVf/iWBMV1LIYLaytnEd0QJ4nINjNekUD41PmP9LGDGCA== X-Received: by 2002:a05:6402:1a52:b0:530:8fdb:39c8 with SMTP id bf18-20020a0564021a5200b005308fdb39c8mr1831211edb.15.1697551622630; Tue, 17 Oct 2023 07:07:02 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6402:4487:b0:530:eb75:8932 with SMTP id er7-20020a056402448700b00530eb758932ls192787edb.2.-pod-prod-00-eu; Tue, 17 Oct 2023 07:07:01 -0700 (PDT) X-Received: by 2002:a17:907:7203:b0:9aa:1794:945b with SMTP id dr3-20020a170907720300b009aa1794945bmr1961636ejc.22.1697551621152; Tue, 17 Oct 2023 07:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697551621; cv=none; d=google.com; s=arc-20160816; b=Ae+Ctpwb1cB/RjZQH2Ch5R8MdZYgLgF4imPThZ6wotgPIktLKKpij9CX++CwaA4fxR dG3/9oRNGg1fNBTWR+f56pwqZKleqIdHJqAKMi0tZjkXM33b7HbDiKT5R4U5BDnSt1yb QA4Qn680L4f7n3GxI52M0JGvpVyP2uFpVJl8wWso6A4bG6c8vTp008JzlDsCLUTbVuI5 rcTPrPjmzcqKQPsWy1FG2hgW1hM8ipynfVCCYDs1DrXKLF21BBilK88z5KoDrpXwPHPp +hpwrWMHs8EsyLkW23M3GHKhGAk30RR3rJnUveioTTaZrO4yv1LNA4Dvv0IRF5R//zIK b3GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=uL210sGOm4WPqM3TfCtmtOur3IknzwwwxuBACe7IQcc=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=DVf97Fh/pUTDy3MQb+1n99cjeCb5MeN61gDCTG/Dhob6LbfEvSREc/VDoFiySihJPZ ktyW88nTbeQdDjzfOFmYarbfE+FNgqilzEn5bXOK6bOZtqn8nu3f8h/WpbbJDTn3jWj5 muBYVOXkPmAJNW5NwMEjaCH9u19BU9ctmNcSFfT84lTMXM2e5MQdWb7HU9MCkD/9UXfx +PDC1Zw/tXU5v//MXMJuYgF0aDm7nW2xHwgALN8QYXcoKS23713ZSxxgs2prgRFeO/KM GQfPNetXExyy+nZXqlmXTqunHFIRLzaDv1m17BrBAi3F9Y9tBhTkFEVhUcCpnSS+cArR yO+w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.17.10 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.17.10]) by gmr-mx.google.com with ESMTPS id dy3-20020a05640231e300b0053ea9bd0510si80113edb.0.2023.10.17.07.07.01 for <swupdate@googlegroups.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 07:07:01 -0700 (PDT) Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.17.10 as permitted sender) client-ip=212.227.17.10; Received: from paperino.fritz.box ([88.217.136.221]) by mrelayeu.kundenserver.de (mreue108 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MUooJ-1r1vgj2br7-00QkB4; Tue, 17 Oct 2023 16:07:00 +0200 From: Stefano Babic <stefano.babic@swupdate.org> To: swupdate@googlegroups.com Cc: Stefano Babic <stefano.babic@swupdate.org> Subject: [swupdate] [PATCH V2 06/11] IPC: check if variable is set in SET_SWUPDATE_VARS Date: Tue, 17 Oct 2023 16:06:52 +0200 Message-Id: <20231017140657.95860-7-stefano.babic@swupdate.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231017140657.95860-1-stefano.babic@swupdate.org> References: <20231017140657.95860-1-stefano.babic@swupdate.org> MIME-Version: 1.0 X-Provags-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DDD0cnLXKNqvlmB6OkRZh+uKFVjaIbESKax3Pyv 95UVyj8IK+H09eUOAcHjpUrLfpy6JrFcc7ORUl4zUnd0E69GsLvLgX4N8IYJDSRy+abAu3PuW aCkVo7t7I5xiuEA== X-Original-Sender: stefano.babic@swupdate.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.17.10 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
Handle Hawkbit action_id and on the fly updates
|
expand
|
diff --git a/core/network_thread.c b/core/network_thread.c index 6b349784..49e165df 100644 --- a/core/network_thread.c +++ b/core/network_thread.c @@ -694,7 +694,7 @@ void *network_thread (void *data) break; case SET_SWUPDATE_VARS: msg.type = swupdate_vars_set(msg.data.vars.varname, - msg.data.vars.varvalue, + strlen(msg.data.vars.varvalue) ? msg.data.vars.varvalue : NULL, msg.data.vars.varnamespace) == 0 ? ACK : NACK; break; case GET_SWUPDATE_VARS:
Check if the passed string is empty instead of check the buffer, that is always valid. In last case, an empty string is passed and the variable is set to "" instead to be removed. Signed-off-by: Stefano Babic <stefano.babic@swupdate.org> --- core/network_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)