From patchwork Mon Nov 22 03:15:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominique Martinet X-Patchwork-Id: 1557855 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=TKkBwRRa; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::33a; helo=mail-ot1-x33a.google.com; envelope-from=swupdate+bncbcwivbv7sugrbu4w5sgamgqe2ddimwy@googlegroups.com; receiver=) Received: from mail-ot1-x33a.google.com (mail-ot1-x33a.google.com [IPv6:2607:f8b0:4864:20::33a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HyC863BD2z9t0G for ; Mon, 22 Nov 2021 14:15:34 +1100 (AEDT) Received: by mail-ot1-x33a.google.com with SMTP id z16-20020a056830129000b0055c7b3ceaf5sf9037744otp.8 for ; Sun, 21 Nov 2021 19:15:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1637550931; cv=pass; d=google.com; s=arc-20160816; b=SssHrNTTgJ5bksGwYrsLuDI586rsCyDOOwTtqUukhVKlLP2pogSoJOC/ERzW2w7RfV gLCTAqcLpjsL30/eeqYQna12XUw4bKbaWsI8SfrZPmQAWps0682gZb4kygS/6sVR6Qk2 XX1XnD9FsRRfVNoYo42AnPUUSPfvZOiLyeXyi1rn+ITZCDgqRyTColZM6ctqvU7zKOtK OsoYSHSaPfVg2wiQlYe5sCKC/Dd+DJ3+yr1GVCLVSni67HUlluv2tGusYmBy2dM4qwvd 6DIa8+YP+qR6GA8liJY6e88N0fIXiVs75h014IObiyLjEoawVc4vVVeJRx5hteIaoAG/ yU1g== 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:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=JI6UnhFVdqQouRE3AFTSLw3ZQ553dPJar31zY6cEn54=; b=SXSkOCs3pdc17pH8euy488wAzILmGZT99n0igKmqAore4bD2I7yuYANCDaYAqEdR60 eGIUaigtn69DNMkZgCZSZ3i+OwE+dEuAeHI0R+L6D0xfg9FdDjcfIv7buvjCsHctN18g C/Attxc54bEHcS83PeXpIfYGimukTsaVprrRjd35mlj18trNZrwx7RqLWFAEbLZXVB54 IEf5YrH2tdrHzECe+udvmW5k97DvPjcW4waqU3rErkG7vjBpQ3mx+yWa9J3trnv3A/ey J9dD0+aKCGcyi2+W6DcfWOBZYiOzXaMrkUjzVKrqilx4nd8jdQdhkEw8uJy65J06fWSK dlQg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=JI6UnhFVdqQouRE3AFTSLw3ZQ553dPJar31zY6cEn54=; b=TKkBwRRaY/uV/InpWxkYG1mnDHwQl9CNeWdL94vAfvvsMz+SB8+H49mgZSP0L8bXPf lrG3sjzjqi+wYIw38mH4Jh4JxPOdEXZObjVQ/QaZ0rL0J/PwtDaT9W62FufyTXZoSvQP YnoqGalBm9E1sw+eblPFL9c/z8tQr5FyMwtY27umeRp71c1Gy/oJCRiIpyuCwlLi637x gIj0dWNEndg7ppkZ49EmLWgzvtuFZyLBYz2e4ank9uKtfDbp6FY2h1FMrCIr8nZobTVe 9sI+aeiHIXzzO2jx4YKIbfOlpGxrI2gOWlWgUrdLOCfstE+vSEHQM3ShWjCQDV2Th5GK begg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=JI6UnhFVdqQouRE3AFTSLw3ZQ553dPJar31zY6cEn54=; b=2uSOYYXVNYRbjM2BOmlGlLVYqfXL5f0UaZ+fs1G0GGOtcT6LdO0Uw9wCXfRCYqlbEH K6B8asoZh+iWxXnhqUHvWS+9wmFrySu8jDyZBI6AfTq2Q9QV+X6bYmOGJ2TwIMMib6hB wUOqwM2TQ/yN/nDcooV7cop3DL2HmBHAFhonUyaAAF6Jzb9hoPiF2bASWv4e9qR1EkvF GEiFYzqK4pgvJKIjMK5MBtD7WuHQ5B26LRNxkkayqNqo4c7K6UMosdEYiu5QoO8sM6JU y1rGSd/CMv9d5hMSxsqK43OAqvoRFgR7wVQfsR1Hr8QaiaXQ5G1muiRqiNA9ZGw59xMz s1wg== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532O12UJRTKfgwEh1UtdF1uGyV1JxrGioBDqCK9B1itOL4NYmjKo Bp1ZY5NMdl0vRftqiDxpTAw= X-Google-Smtp-Source: ABdhPJzllodFxQWRm+2pgM2NDsiJtSb6AVGt8fkoekOCmw2XTK0PgcaXDRl1l70koAgEdjAj8UCcbw== X-Received: by 2002:a4a:af02:: with SMTP id w2mr13274530oon.7.1637550931313; Sun, 21 Nov 2021 19:15:31 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:aca:3245:: with SMTP id y66ls816275oiy.3.gmail; Sun, 21 Nov 2021 19:15:30 -0800 (PST) X-Received: by 2002:aca:a88f:: with SMTP id r137mr6732500oie.85.1637550930934; Sun, 21 Nov 2021 19:15:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637550930; cv=none; d=google.com; s=arc-20160816; b=ubi6y7JZFChaHsbBQuJHeG6qHc0Pg7R5uzJnXRw9QOcFdX1k1OFCPpG1RIWSIBVn8z 1rHdanKaQ+at8k90RIvS7eK5+aHDpRuBeYnauMHgXEJI5ajTFAYSkj+dU0q1dRKNrxvx YYetqmeRb/GXBMyEtjdhBuZMQZ9tq2OSsapzi//061xug8g4fFVY4rAucI+iQr/QPqij r5nJM4mWOIgBHEzgAgrGcyhZOt18Tw2unFTUCWVWSUeBrNhMJ10/zgCbYcvX96wjrXVD kuj1xtv+8dCwMGrKwK2bjSlUfMcjQQMRNNea5HlwgQupzluI/eyBM5AWvbFF/7ngpqYa agLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=gJRdyLFKr0HgmnbttiNst/kqqlCipja/7kMgqH/0cSM=; b=lh/rF0P1iwDn9D4njDO6G0Av9W/JoAo0nNb14SIIk0qq4iJuoVDyqYaPuB7asPHM2m fnB7k23vUaF0FKDPkHBbmuRrMg4RFCKa8seMzifyekJM7bmeZN+kg6LiM10Pm4KFE9JR S396qLvFeOiMZsvoGbnV6wIeJGx9fj3KkrhWhcG0vrwcpMq7HCrY2qHktRrd2SReTLNv Ugz6+RbiTTYB+nKZrKyKO/hKZt3uT+Z/zTnfdbXQU1R2JuOrSKH9rEVwXonmJoQPDuQ/ AWZPWmhhy/Xo3tJmcYIVYWZqCDSqPMQqrfDveXMRbEBv/e16uhNYJt9qC2hJEJf0k0SP RQjw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Received: from gw2.atmark-techno.com (gw2.atmark-techno.com. [35.74.137.57]) by gmr-mx.google.com with ESMTP id u27si697511ots.2.2021.11.21.19.15.30 for ; Sun, 21 Nov 2021 19:15:30 -0800 (PST) Received-SPF: pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) client-ip=35.74.137.57; Received: from gw2.atmark-techno.com (localhost [127.0.0.1]) by gw2.atmark-techno.com (Postfix) with ESMTP id 3827220D63 for ; Mon, 22 Nov 2021 12:15:29 +0900 (JST) Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by gw2.atmark-techno.com (Postfix) with ESMTPS id 2483A20D4A for ; Mon, 22 Nov 2021 12:15:29 +0900 (JST) Received: by mail-pj1-f69.google.com with SMTP id d3-20020a17090a6a4300b001a70e45f34cso8191595pjm.0 for ; Sun, 21 Nov 2021 19:15:29 -0800 (PST) X-Received: by 2002:a17:90a:1283:: with SMTP id g3mr27134430pja.174.1637550928224; Sun, 21 Nov 2021 19:15:28 -0800 (PST) X-Received: by 2002:a17:90a:1283:: with SMTP id g3mr27134399pja.174.1637550928011; Sun, 21 Nov 2021 19:15:28 -0800 (PST) Received: from pc-0115 (178.101.200.35.bc.googleusercontent.com. [35.200.101.178]) by smtp.gmail.com with ESMTPSA id i76sm4627653pgd.69.2021.11.21.19.15.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Nov 2021 19:15:27 -0800 (PST) Received: from martinet by pc-0115 with local (Exim 4.94.2) (envelope-from ) id 1mozni-009EqC-Kf; Mon, 22 Nov 2021 12:15:26 +0900 From: Dominique Martinet To: swupdate@googlegroups.com Cc: Dominique Martinet Subject: [swupdate] [PATCH 1/3] server_hawkbit: fix typo in function name s/hakwbit/hawkbit/ Date: Mon, 22 Nov 2021 12:15:16 +0900 Message-Id: <20211122031518.2201903-1-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Original-Sender: dominique.martinet@atmark-techno.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: Dominique Martinet --- silly typos like this are hard to notice... I just stumbled upon this. suricatta/server_hawkbit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index 86f050dc2c86..70f402645a16 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -155,7 +155,7 @@ unsigned int server_get_polling_interval(void); /* * Just called once to setup the tokens */ -static inline void server_hakwbit_settoken(const char *type, const char *token) +static inline void server_hawkbit_settoken(const char *type, const char *token) { char *tokens_header = NULL; if (!token) @@ -1869,8 +1869,8 @@ server_op_res_t server_start(char *fname, int argc, char *argv[]) "but just one at a time is supported.\n"); exit(EXIT_FAILURE); } - server_hakwbit_settoken("TargetToken", server_hawkbit.targettoken); - server_hakwbit_settoken("GatewayToken", server_hawkbit.gatewaytoken); + server_hawkbit_settoken("TargetToken", server_hawkbit.targettoken); + server_hawkbit_settoken("GatewayToken", server_hawkbit.gatewaytoken); /* * Allocate a channel to communicate with the server From patchwork Mon Nov 22 03:15:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominique Martinet X-Patchwork-Id: 1557856 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=CNGAc5El; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::f39; helo=mail-qv1-xf39.google.com; envelope-from=swupdate+bncbcwivbv7sugrbu4w5sgamgqe2ddimwy@googlegroups.com; receiver=) Received: from mail-qv1-xf39.google.com (mail-qv1-xf39.google.com [IPv6:2607:f8b0:4864:20::f39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HyC864hPcz9t1Q for ; Mon, 22 Nov 2021 14:15:34 +1100 (AEDT) Received: by mail-qv1-xf39.google.com with SMTP id gf10-20020a056214250a00b003c08951ea03sf15299125qvb.17 for ; Sun, 21 Nov 2021 19:15:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1637550932; cv=pass; d=google.com; s=arc-20160816; b=rWXJdSdIpFPLrvWgFfGys6flTIUqLJBUkV6t0JQ+cfx7pf6ig2avCf/8ZxegFEJ3kM 10J4AmVwdkEAive5zZXDgiDINZ5RIpHK9sG0m2/QuER0r/uEnI99XUhjla8icw2bkX7l 9sfaz75ZaLAKmTx+i7tFx+y9UjWKlmYJtJMXhNk9dLXvvNPgSiZuBOoACAteRWGnZic0 fN0rcqUhZrrxKpPWn3VuVmAqwB70M+Hl/vtUfbDCpehcmvTyTlq1S9bnAzVPrcHj471x Olnc3yMK3j3JPzPmp6/PYqTGeKBZfGbW/4168Sq9yAudV8zi8tzxqVh1lNralb/M76KK dgUQ== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=n1RCk7qeG8H6Cieqbqmv++XQJrC8t8HnrAqC7ky0/7c=; b=U2ZAg2MmeQK6gTXr5HPFH/dt6hN9+Avx9j0k4akq96nnt/gHPsPGt/Eot4o1OOakyA 8C0xNkSmOrqTD9WX4m49C7/q3ZMBjbOPEBDvq9YMCaXRgXJAyTyjkmdzDtDuBgJjR3eW rHHLW/HEl6PlxvO5gZqb6nNmnkvZhQ9Lks29dO76+WGc3BeO38TrU1eP/85O0kAE0t8k P2M1mt4AYbD3U+/ce7ZLV5iIMHjXoh5J3dNmFupvBXnML6L2AuhvDvXmN05XLiOL3abA HYFjINUkAJkUCJQTKuN6WDFVRFcZeTb3f0ypXvBM0sL4UbtTaKx5BvMzyJC99oX+EmuM 1HzQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=n1RCk7qeG8H6Cieqbqmv++XQJrC8t8HnrAqC7ky0/7c=; b=CNGAc5ElHn1QCM4gqOUH4zSSxrJgsWAfaczFuJ9yIMJ4ZWEtwDK/tWJFGt701Z8WPR MEOSC+9nbTxei4pPbLFOYIuWxYo+x8knL37NVoTbeW7CIzRVHMUf1Cx3KpHhJ9tAGwuC XxbWJtgmaTZHwOH16pu2okuWBEW6kpKthY5W5DFh2Gip3d02v2Sxq0Ucb5SV+GX4r4Hp 6tiMtOXA/f3rcx684PumW9o5nD1e3sLjIpeAe0tyiwn1wv6tbiOU6tgFIIaiWZ65Lp5A NV9jmBEHSbEFR1kTzvOjkriKONzj1vo/FH2o5ufed7p5iltn82kgoYRcU6ml7wYAoygb RUyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=n1RCk7qeG8H6Cieqbqmv++XQJrC8t8HnrAqC7ky0/7c=; b=kvRPJKLrp/FQsjZjXGFVs+XA9kueRQxBW8RlVCPcZjoZE7hKFs3ram8YozwYxYfCF4 oUheX7soh1aeBwdIrhoXMrdERpHcgKvABmx3/CKGQAbuR5uEcwVC6MJe6FWI8+UHfb9A wlobQTEe3uU8Ea0Jqvw5fQOlmsmCVcZMmhkgwuoROUGMqYPm4ahAPZK48S/UFrhAH16b wGNUJ2Fo5oOho1n4K/5obLoMyi4izsjvGekS8MdtXRhvZd88NXtD0kRDe/GckpzgTg5d PtDy3Ur4Pww9JcHKIhbX8LzgFBd1CqoM86mYt4mKqDgc9poZypic/ftsnQfm/ewlU8ll 3w+g== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM53341dtdBTIfbTDl3pkIkVzQhqBL+EbnfS22YUCHgLuVBOhSQNu0 uQlTMNId4rg15all9YaAzjA= X-Google-Smtp-Source: ABdhPJwrMo4f26MCTxfoLrtQpHxbSq+rIhO68B1z/v1OR3k8fC70wVtKGFMimPAbPGQmMi7+fFOikA== X-Received: by 2002:a05:620a:ec2:: with SMTP id x2mr45265361qkm.400.1637550932140; Sun, 21 Nov 2021 19:15:32 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:ac8:5fd4:: with SMTP id k20ls3159433qta.8.gmail; Sun, 21 Nov 2021 19:15:31 -0800 (PST) X-Received: by 2002:ac8:5a8c:: with SMTP id c12mr27254811qtc.222.1637550931662; Sun, 21 Nov 2021 19:15:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637550931; cv=none; d=google.com; s=arc-20160816; b=lqtcWgMfheR8a/hu0uuOUeTOZa2XrTheG7yJHPIAXqbVF6EbMt7N6RP+h6lAyrf7Lx coOLPWcVt/6y5l6nXqKFysQA76wAUV7c+h3k1uv4OG3ZY2Ewi9aDN0v8+3fyF3r2CU+0 d+8NUZBgYNzYFVI1B+kX+RpUdRpZq4fWbpWB3ybbRyJM8y91zJHSAXFtEg2UU75iPvPg eS6QBtPfiACsE+telHap6/LxZy6Dj8vPt/l2Wzv3RqY55vKEtrF7hS2T/Y0TDXPIxVMS JplUwnQRh20Fx4Hr5LK0dBzWZlrU0MFpvJXf3bf0ZsupzVDvHeyWuYe5ce/mdd1Ui5pX fMNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=XkeOmkYi+MZmW8WuTZ1RWVP/t6KFrITixw/73S6ezYQ=; b=a8F/K6/HSvUpdgnWbHM4Y0a6WWgroOGJDQB1NcXLu1GHcjPd0cYm6anAolgMSYUgWl kydJTHWzLM2YpXZ1pqyCuPwEshANAnCWyF8g9fNjL3ZeohcYTdRMMlKUdXXPSaID6pM8 0LrhAw6kJgQWo56OYB2TARVkTG930OEu/cnGI/FMj+lrx+gvs4s9EQlpG1VPj4uuYWPb /+KL1b6jhjaj1JMJASuuqAH3AljfTl4Pb9tgEaWIyAQks+fNWnIR2MVQuGNpLbtEO6Q5 pt3dg5S4IiWceKO9FItcBboOwfb6m9M/CxgFtYtUqM12p/GAhFN9ts1/a5zgcw2ui9lS Gdzg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Received: from gw2.atmark-techno.com (gw2.atmark-techno.com. [35.74.137.57]) by gmr-mx.google.com with ESMTP id w22si772597qkp.2.2021.11.21.19.15.31 for ; Sun, 21 Nov 2021 19:15:31 -0800 (PST) Received-SPF: pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) client-ip=35.74.137.57; Received: from gw2.atmark-techno.com (localhost [127.0.0.1]) by gw2.atmark-techno.com (Postfix) with ESMTP id DEFCB20D66 for ; Mon, 22 Nov 2021 12:15:29 +0900 (JST) Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by gw2.atmark-techno.com (Postfix) with ESMTPS id C78ED20D65 for ; Mon, 22 Nov 2021 12:15:29 +0900 (JST) Received: by mail-pj1-f70.google.com with SMTP id r23-20020a17090a941700b001a74be6cf80so5262136pjo.2 for ; Sun, 21 Nov 2021 19:15:29 -0800 (PST) X-Received: by 2002:a17:902:64c2:b0:141:c171:b99b with SMTP id y2-20020a17090264c200b00141c171b99bmr102608081pli.55.1637550928644; Sun, 21 Nov 2021 19:15:28 -0800 (PST) X-Received: by 2002:a17:902:64c2:b0:141:c171:b99b with SMTP id y2-20020a17090264c200b00141c171b99bmr102608056pli.55.1637550928408; Sun, 21 Nov 2021 19:15:28 -0800 (PST) Received: from pc-0115 (178.101.200.35.bc.googleusercontent.com. [35.200.101.178]) by smtp.gmail.com with ESMTPSA id g9sm6952769pfc.182.2021.11.21.19.15.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Nov 2021 19:15:28 -0800 (PST) Received: from martinet by pc-0115 with local (Exim 4.94.2) (envelope-from ) id 1moznj-009EqL-4J; Mon, 22 Nov 2021 12:15:27 +0900 From: Dominique Martinet To: swupdate@googlegroups.com Cc: Dominique Martinet , Roland Gaudig Subject: [swupdate] [PATCH 2/3] server_hawkbit: make ipc_lock non-recursive Date: Mon, 22 Nov 2021 12:15:17 +0900 Message-Id: <20211122031518.2201903-2-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211122031518.2201903-1-dominique.martinet@atmark-techno.com> References: <20211122031518.2201903-1-dominique.martinet@atmark-techno.com> MIME-Version: 1.0 X-Original-Sender: dominique.martinet@atmark-techno.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , musl does not have PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, instead one is expected to call pthread_mutex_init with PTHREAD_MUTEX_RECURSIVE before using the lock. Unfortunately, this part of the code does not allow for easy init before use: start_suricatta() will first start the ipc thread, then call server_start, but we do not have any guarantee that the ipc thread will not call server_ipc before server_start has had a chance to initialize the mutex. Thanksfully we apparently only need the recursivity here for a tiny portion of the code: get_target_data_length() can be called once with lock and once without lock, so just adding a toggle to get the lock is enough. Signed-off-by: Dominique Martinet Cc: Roland Gaudig --- Roland, could you please comment if that sounds good for you? The only alternative I see would be adding a server_init call before server_start, but I'd rather not change any API if I don't have to. I've tested it on our boards and there doesn't seem to be any recursive locking happening except the one I fixed (at least I didn't experience any deadlock), but it's possible I missed some in code we don't use suricatta/server_hawkbit.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index dbce9a35808c..86f050dc2c86 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -58,7 +58,7 @@ static struct option long_options[] = { static unsigned short mandatory_argument_count = 0; static pthread_mutex_t notifylock = PTHREAD_MUTEX_INITIALIZER; -static pthread_mutex_t ipc_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; +static pthread_mutex_t ipc_lock = PTHREAD_MUTEX_INITIALIZER; /* * See hawkBit's API for an explanation @@ -109,7 +109,7 @@ server_send_deployment_reply(channel_t *channel, const int job_cnt_cur, const char *finished, const char *execution_status, int numdetails, const char *details[]); server_op_res_t server_send_cancel_reply(channel_t *channel, const int action_id); -static int get_target_data_length(void); +static int get_target_data_length(bool locked); server_hawkbit_t server_hawkbit = {.url = NULL, .polling_interval = CHANNEL_DEFAULT_POLLING_INTERVAL, @@ -526,7 +526,7 @@ server_op_res_t server_set_config_data(json_object *json_root) if (server_hawkbit.configData_url) free(server_hawkbit.configData_url); server_hawkbit.configData_url = tmp; - server_hawkbit.has_to_send_configData = (get_target_data_length() > 0) ? true : false; + server_hawkbit.has_to_send_configData = (get_target_data_length(true) > 0) ? true : false; TRACE("ConfigData: %s", server_hawkbit.configData_url); pthread_mutex_unlock(&ipc_lock); } @@ -1471,19 +1471,21 @@ server_op_res_t server_install_update(void) return result; } -int get_target_data_length(void) +int get_target_data_length(bool locked) { int len = 0; struct dict_entry *entry; - pthread_mutex_lock(&ipc_lock); + if (!locked) + pthread_mutex_lock(&ipc_lock); LIST_FOREACH(entry, &server_hawkbit.configdata, next) { char *key = dict_entry_get_key(entry); char *value = dict_entry_get_value(entry); len += strlen(key) + strlen(value) + strlen (" : ") + 6; } - pthread_mutex_unlock(&ipc_lock); + if (!locked) + pthread_mutex_unlock(&ipc_lock); return len; } @@ -1499,7 +1501,7 @@ server_op_res_t server_send_target_data(void) char *url = NULL; assert(channel != NULL); - len = get_target_data_length(); + len = get_target_data_length(false); if (!len) { server_hawkbit.has_to_send_configData = false; From patchwork Mon Nov 22 03:15:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominique Martinet X-Patchwork-Id: 1557857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=i3ot4Pvp; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::f38; helo=mail-qv1-xf38.google.com; envelope-from=swupdate+bncbcwivbv7sugrbvew5sgamgqedcy4xaa@googlegroups.com; receiver=) Received: from mail-qv1-xf38.google.com (mail-qv1-xf38.google.com [IPv6:2607:f8b0:4864:20::f38]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HyC872tzJz9t0G for ; Mon, 22 Nov 2021 14:15:35 +1100 (AEDT) Received: by mail-qv1-xf38.google.com with SMTP id g12-20020a0562141ccc00b003c0322ea7b6sf15291960qvd.19 for ; Sun, 21 Nov 2021 19:15:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1637550932; cv=pass; d=google.com; s=arc-20160816; b=dcatThiGbzcamZT7AM/zgCA9x3R63iDbAsTQlbE0EPDMoSXIU0utaNUyGFwKTtLEEg x4ZumHkIB3rCIw4UYpFAo1NaQlyRZ/AV9W/fYFO9adoyfsNKGo1YLw4Xqgs7h0NlF3lF et8O0z+G+4Nlu2iwGPNnHBGVtC+wPaz08Dooji565cD4Fb2iqXnV2xtfPZg7DqifCabz TAy7FEiHk4XBpqh1Xu/L4A00KrXEwGxW/+8I9H1UCPciz7EZoE5r8Twk/FM1cnLEvqP4 EZ6Dxgk2MRS1uTjvlkbkk294H/KJjJaudFZQ7D0IhGUDIDJnxfxQyVz8/ZLkN6ur1+X1 TVGg== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=HdWWyqounLxDIkee0NgojJlm1HXoRzR3pnI6ZPKK8T0=; b=LsZSjSuC304dkoaJ/7+8qIIiqGNZIZp57xFFDNmkZoaHv8IoVCWyMIBdc+8tOs11zr iBHipI0D4vFXeqeGnf4kLbhFMppB47OMrZVRaXe8DCV7noD+PR17Uy1okpdBSyuc7Do3 7Wy/y2yo0PgZTiUcWaAe9A3rJlfqwKdaAHSYOeYZuElGPouxkh9RBpMeheWimkpq8OMk o/ge1NXnLkfZoukES0wy4ZMxXd6jMGBJxqtEE8HASE1QjC9dvVZxBN3q5CjzpQ/Nw5Yz QCL4Atc+t9n4xevDGmM6E1XzQCTxegthfh6Gy0ewNyJQCQbGMkTGIWxLe/fy1LbnQklh cbwg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=HdWWyqounLxDIkee0NgojJlm1HXoRzR3pnI6ZPKK8T0=; b=i3ot4PvpAHcAhqinT4JEw7bi7aFF6GGrxFOE4YhgGPXF+rZLhgjCCvSxbHb4qP+G21 LYObIMFPI1UmbBlSHrCW9Ue8W8/6/Gw2chpLCbGwwrHwr0NoLT+sgwb8Z0S3+9joNyLZ PVhCCgBKhjwMHSh01nJT8eYfbplyLj/kb5NnqNcDcEF4upiTmKr/uNCfweJrB4ebrdAb dfFjAvLHu1JpRURdyXm4QXk0bFXbMhvAwFq8EHwUhcFLlvF4hKg7kab+/fW4yyv3qMB0 /qo4DMDc32Vt6g8ELoQle4EjOLFtNtj+wFno4xtIY9WwoP8ib1PjK6/bhdCywTVsIFdX NpwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=HdWWyqounLxDIkee0NgojJlm1HXoRzR3pnI6ZPKK8T0=; b=z96iOoIoE/kX5bCEXpnF3dEJoKV488YC8Xr4+Pr77jsWILusn535RkXGWk/mo5mOtX n1JX1myKBdSJP019zzx6BX3CN8WuG4++OcQ/MMBXMNYleKkTiyeUWBd5+wKrX1f2YxFt P+tkLakGEh1YTwo+IkmeEESj66CNG82JMjNdGliPhuGS/yAo8okAqeMqnEEwE7eZcJ4f uD7UlL0fd/BBLHuZ0/Zu++s91RoHV3YPJXotIPjVc7AkIORWhsR7FjzEVcBAaq93C4OG oAgUEL9wvcJtKFfvRWkcuxtYHIUa9kqfgc6YpZFZQj8u4hxpGpO/IFdVszxYHDkdFbLJ Jpzw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM5333Lk6MA3RZvZrMMYzst7juY0k5buRZV4oCLIo+sCCDemAt2eh2 cWN3g2YkEvIA+/JVF7eo2Mk= X-Google-Smtp-Source: ABdhPJyk898m6mjE2F8C29iZuQJ7xFhb9xTLEN7kKHzHaRQukh8oBDLJ6MH5jQ+k6NerHzuDYT3d4A== X-Received: by 2002:a05:620a:915:: with SMTP id v21mr44739579qkv.449.1637550932580; Sun, 21 Nov 2021 19:15:32 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:620a:1aa2:: with SMTP id bl34ls3350342qkb.11.gmail; Sun, 21 Nov 2021 19:15:32 -0800 (PST) X-Received: by 2002:a37:648f:: with SMTP id y137mr45414266qkb.101.1637550932251; Sun, 21 Nov 2021 19:15:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637550932; cv=none; d=google.com; s=arc-20160816; b=VRn2jyOAvvI2UFz5NtPLdfsoDPGlQeNIjaH+DhxIqq5buda5+broSzabdsTFjkDIHj XHEhCxUK97SSqoERw1X8K5YhYREU8LyJIFOQh9Oej4l46Uv2NyxiygGizhHx9Dtp9801 T/L3+S9VkMJJ7h96uzL5+IN8LVmorIoD3Y9TIzvzWBfHOqh0MRfMubbY4CaRABFw73B5 N2XKR4BSzaHRet/4/v6RDPzltYvDYUezp/kyA9mY0y8vSUY6Ex2swwwDxIRLOARik5aY 6elSHQL3Pj+NCCfO1llktl+5PtlPP5LoqdZxhiZxm1ueCiWdxH3FuWKXR/9npVPeNRGG ilZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=knJwT7y9r7Ml8DCt5inNSEBGfZSovczUfr/YDD0a4k0=; b=qgdC2eT4eZHd6AfQy+VQD3PtWRibGEYGp1vmPGPyZHLUqdL7xwVTZ2xIIpMEakEjgw Cmy3Xr9QaFsyBXO7msGPNDfMeL17DSG3K/hcit/KRehz/gcRV1LrNpAotsSnF5nnqD4V T5Vf4PQQNclIol52lwEeU1wqVNMuzG2H1ywt50PIAAPnrg1LNFz3VpOyIk3miCi6eYVP UjwHD2PODhNivu+d2932P3YvRGOGf3DwTr6/6qQoSzC3JMakjcVb9hdn5L8clRKEXlFJ tKdMtxZBB1Q51TLMFDSF9X62fyaF17A00WcJ5kYuWe4/27XoafGTwEfqpyzgrvPHxmyQ Hnxw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Received: from gw2.atmark-techno.com (gw2.atmark-techno.com. [35.74.137.57]) by gmr-mx.google.com with ESMTP id w22si772606qkp.2.2021.11.21.19.15.32 for ; Sun, 21 Nov 2021 19:15:32 -0800 (PST) Received-SPF: pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) client-ip=35.74.137.57; Received: from gw2.atmark-techno.com (localhost [127.0.0.1]) by gw2.atmark-techno.com (Postfix) with ESMTP id B129620D64 for ; Mon, 22 Nov 2021 12:15:30 +0900 (JST) Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by gw2.atmark-techno.com (Postfix) with ESMTPS id 8D92E20D67 for ; Mon, 22 Nov 2021 12:15:30 +0900 (JST) Received: by mail-pj1-f70.google.com with SMTP id gx17-20020a17090b125100b001a6f72e2dbdso5260130pjb.7 for ; Sun, 21 Nov 2021 19:15:30 -0800 (PST) X-Received: by 2002:a17:90a:4b03:: with SMTP id g3mr26407408pjh.167.1637550929605; Sun, 21 Nov 2021 19:15:29 -0800 (PST) X-Received: by 2002:a17:90a:4b03:: with SMTP id g3mr26407366pjh.167.1637550929323; Sun, 21 Nov 2021 19:15:29 -0800 (PST) Received: from pc-0115 (162.198.187.35.bc.googleusercontent.com. [35.187.198.162]) by smtp.gmail.com with ESMTPSA id z19sm6872462pfe.181.2021.11.21.19.15.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Nov 2021 19:15:29 -0800 (PST) Received: from martinet by pc-0115 with local (Exim 4.94.2) (envelope-from ) id 1moznj-009EqO-Ua; Mon, 22 Nov 2021 12:15:27 +0900 From: Dominique Martinet To: swupdate@googlegroups.com Cc: Dominique Martinet Subject: [swupdate] [PATCH 3/3] suricatta: allow -c 0 to tell swupdate we do not expect any pending update Date: Mon, 22 Nov 2021 12:15:18 +0900 Message-Id: <20211122031518.2201903-3-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211122031518.2201903-1-dominique.martinet@atmark-techno.com> References: <20211122031518.2201903-1-dominique.martinet@atmark-techno.com> MIME-Version: 1.0 X-Original-Sender: dominique.martinet@atmark-techno.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: Dominique Martinet --- This one probably deserves some justification: we're not using the built in state mechanism though bootloader env, because we have two uboot images that each have its own env, so the builtin setenv would not necessarily update the correct environment (the logic would require updating both or having a shared env really, but it's not practical for uboot updates that might change some default value) In these conditions restarting with -c 1-3 works but prints a warning if no update is available on server; conversely not passing any -c will print an error that state could not be read from env. Having -c 0 basically acts exactly like no -c, except it'll not print that error. suricatta/server_hawkbit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index 70f402645a16..1bf23baf5211 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -1753,6 +1753,7 @@ server_op_res_t server_start(char *fname, int argc, char *argv[]) */ update_state = (unsigned int)*optarg; switch (update_state) { + case STATE_OK: case STATE_INSTALLED: case STATE_TESTING: case STATE_FAILED: