Message ID | 20231016165740.1374614-9-stefano.babic@swupdate.org |
---|---|
State | Changes Requested |
Delegated to: | Stefano Babic |
Headers | show
Return-Path: <swupdate+bncBAABBCWXWWUQMGQEGFGQ6DA@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=tpmjutOm; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::23b; helo=mail-lj1-x23b.google.com; envelope-from=swupdate+bncbaabbcwxwwuqmgqegfgq6da@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-lj1-x23b.google.com (mail-lj1-x23b.google.com [IPv6:2a00:1450:4864:20::23b]) (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 4S8Nb450ZRz26jV for <incoming@patchwork.ozlabs.org>; Tue, 17 Oct 2023 03:57:52 +1100 (AEDT) Received: by mail-lj1-x23b.google.com with SMTP id 38308e7fff4ca-2c12bb1f751sf44877041fa.2 for <incoming@patchwork.ozlabs.org>; Mon, 16 Oct 2023 09:57:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697475468; cv=pass; d=google.com; s=arc-20160816; b=gIZSI7s1dlyKTyDsxazCMyZcaaxffSQnv215w70VpV2Om1TsDaSIC/7X/lufRzdM5H zXgPanPgK8uZSq2ozyF4Iz9FvlpvJ1t1n8FdGUxn4KjUuOMATbzbJYjBR3IZ/oe0WygX pT0OaQXCG72WTIso/Nzn5+1RbC5sWiBO2UMQt+r1jxT3IXpsgbfffKX6SAp7CP3e+f63 +lMgXL10b4r1olKOAJVBi12+UZqLC1C/VdL4bCZt2RropHzia5jEW2zlTyAYG/5KMtkq kcMSLBJPQ0476c4TNknfec/btlZPJCYXfVQLZCnNYdp3UaAC9L3WS2MxirPGH4jvfd1j Y9rg== 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=l0+ILvSKK4Bkz9uB6pOxPZJDIb/GfrJ8Q6OyguUMB0k=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=xaz+axv+E3S3+BI/GtO4pNW5iW79hAkZUUpCq25c+QZ49q+YXvtzk5HrPE5MShhbOa 5JPGLlFzyPOnu4y4qhpPO9WwXbib7BXIb2TY+jnxsrFFDC7xL+gPyeDmkFjP5SDGRm4P uyo91ehZVxs839aAKjnrJsQ0gSX401BPdvT/DhfHiaqLEICQKBn7RwlAtaE+zOr+7QC6 TyQOSDGPQUHCqEZr1tjP1axzmom49vDz9oHYLFk/C3K65bxZYL1Ypw1N1QmsH+in89aQ rQ+GVv56SsMwrO2F+FWu3Gcp5hO9X6V1Gbx2Ea7Khow4DlJaOrt5M1QYp6MIOQgJ8y5n 1G7w== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.73 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=1697475468; x=1698080268; 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=l0+ILvSKK4Bkz9uB6pOxPZJDIb/GfrJ8Q6OyguUMB0k=; b=tpmjutOm0/d9tmBNe9NIyskso5PzR9BT/MKvRJlzKxraO5Mkrar7HTRBh8SgF7Nrpd Uk78eoWFGe6PIlXPa2sOvOFcjJMf79lvEAgOFlqQXjfRrJgzWShzQl/IeNtpThJ2lmG9 QlO5NRqnjbRDS5OknI9nECEIwXn3+oH0qiVCBCN9BrHRr4gHKpSXxft7W86SgE9yN7Dw 02zADofLycT/C2ma7x82pblNd4JuYPrTGuiU9iI3PVayAmsBBMMvfHkiM0OkcEwuO5Bn D3UIr3lCxjDpQkEUFPQXg35vTzl6KJ1MyiHp+GH9MLlAFS2rwuDlWU+9fXw2CVHEzyu7 82nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697475468; x=1698080268; 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=l0+ILvSKK4Bkz9uB6pOxPZJDIb/GfrJ8Q6OyguUMB0k=; b=UZWlw7HjhdPL97Dj2T05UH6tXPqJwCy0AJYHFaF88evBl6YdSIDIrMrQ2J+ck8acfl tv68RW8sGrzYLuF3UweHT3trRcn8WmcRpjMN4kItutNi8WUGiFN190oM1JylRePkchTe XgNRvlbWHr/wgZh9LsLEfZtZ/IUdqv0hsCXAosbnNxkgpJjPZPrxYH2LsN9tZ1LY4Av/ WRRf5lNe35iWlZq/tJexEdhMJXXoB8q6K0jA1cLLIUkYujMIRJv9/0rgu6z1s6bHnZqb DHtYLs6NfcypuOycvjiUp1x/+SwRaKCIx5ecUMQRpP1gCcsXKwuCYsLUcWf1WPXBnKGE 8fIA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOJu0YyljSF5naXINr4ZaPa+/urESLIQhy3i9CdkRcMAOc2hpNFc4Rx0 qaJyuk79lg7QRFWEMoWSa8w= X-Google-Smtp-Source: AGHT+IFGs4jaGygtDykevmEDw2wYyQB70rENwDjpbCRP9nUECWCTC+0CU1j2BpJv560HqrVgpXV0gw== X-Received: by 2002:a2e:a7cd:0:b0:2c5:fb9:49b6 with SMTP id x13-20020a2ea7cd000000b002c50fb949b6mr8115419ljp.10.1697475467591; Mon, 16 Oct 2023 09:57:47 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:651c:140a:b0:2bf:c704:bca1 with SMTP id u10-20020a05651c140a00b002bfc704bca1ls277463lje.0.-pod-prod-04-eu; Mon, 16 Oct 2023 09:57:45 -0700 (PDT) X-Received: by 2002:a2e:a283:0:b0:2be:54b4:ff87 with SMTP id k3-20020a2ea283000000b002be54b4ff87mr25961727lja.40.1697475465652; Mon, 16 Oct 2023 09:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697475465; cv=none; d=google.com; s=arc-20160816; b=u1eT4u7J9lpUjY9rPrCT9JbhqrOuUZEMZmsamKaD3HIOii6z7nv4Bupj5ihFqlKbE0 r7dRmo+gr0pEQvcl0xlxuLy3hT2PF0ueuX1ABDP6whsAHIWUgvrvNWHRgRDzWm1zVgxF xJCOCPNqV0W6oPFSvKTBo+/fK1RUBhzJJrSTaZN4Uk/etcQIyiqalPZDQqxhr+dpNaMt M3VqVZX28RYTvtK8ruHuhFRZ5/fWaCdnP/DdrWqfNOf82mQyK8ISRCrfA5Gl4Ct3Uv6O 5SrSJ+QpK82GpH1bBVozjiXv7GTKluiYuc0h/wLYhKR55SKHggszgWX75mKlBDzdPXaE iWtQ== 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=09Q8CIuMDzMnT4VkJyjwcHxIkAs14a6kuorCEULdQfSQp8ThbRyBO+97CpKQlko/f2 G+rzka7fzNYYWCtq+Q/XIpDILKJnBO5LpUQVdX0bsxS1fp1FlJTAfgEhmVtzVshlNC8U oUg9cebnav1eIA2cLIhLF09cd088NeNST8jVCtojcr4GptwuYfaGtWBx72FD1ITrrrnO X+kdNry1gqbHJ/5fC/CY4fgzIEf/yaQXlnZjPEILVtXvsL3qmZf4DQY7PfcfD4hu/B/l /3oRUV7eBkEhBunML9SkLb27XtszIxVSAqwWhxDLtihSLFqZgTMY5QTRnkCay4C9BV9e Y8kg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.73 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Received: from mout.kundenserver.de (mout.kundenserver.de. [217.72.192.73]) by gmr-mx.google.com with ESMTPS id u6-20020a2e91c6000000b002c12145a0cbsi15017ljg.7.2023.10.16.09.57.45 for <swupdate@googlegroups.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 09:57:45 -0700 (PDT) Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.73 as permitted sender) client-ip=217.72.192.73; Received: from paperino.fritz.box ([88.217.136.221]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MWRZt-1r3bsp3DUR-00Xtj3; Mon, 16 Oct 2023 18:57:44 +0200 From: Stefano Babic <stefano.babic@swupdate.org> To: swupdate@googlegroups.com Cc: Stefano Babic <stefano.babic@swupdate.org> Subject: [swupdate] [PATCH 09/12] IPC: check if variable is set in SET_SWUPDATE_VARS Date: Mon, 16 Oct 2023 18:57:37 +0200 Message-Id: <20231016165740.1374614-9-stefano.babic@swupdate.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231016165740.1374614-1-stefano.babic@swupdate.org> References: <20231016165740.1374614-1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u+J 6insjuV+dUiNRtPwBSqkBysZvcirDzmdayO2JtjrO+zdB2XwLXdrD8qqh87sjAeYNeQYl4Ev+ utzbaBpuX70lgANoA7RGNA7UFL544FMQSdfrtn2R1UUrQst0IYl2W6mjPlmVbXg0GN3unxLqH qoBxnA9/7ilpNz5rTK18pQAxoTNhgr7DDVOk= 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 217.72.192.73 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 |
[01/12] Cleanup: use #pragma once in all headers
|
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(-)