From patchwork Mon Oct 26 14:03:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1387762 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::43d; helo=mail-wr1-x43d.google.com; envelope-from=swupdate+bncbcxploxj6ikrbrno3p6akgqelr3ugbi@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=Sub+m09l; dkim-atps=neutral Received: from mail-wr1-x43d.google.com (mail-wr1-x43d.google.com [IPv6:2a00:1450:4864:20::43d]) (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 ozlabs.org (Postfix) with ESMTPS id 4CKc5851Cmz9sPB for ; Tue, 27 Oct 2020 01:03:54 +1100 (AEDT) Received: by mail-wr1-x43d.google.com with SMTP id m20sf8485489wrb.21 for ; Mon, 26 Oct 2020 07:03:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1603721030; cv=pass; d=google.com; s=arc-20160816; b=AY23v0hpzTyUwPjGh39to7dS9tHjEpl4yMmV0SY/lYAWaxCPbIN63rH43WHsu5/+kV 04FYyhGa/cuEdrB4uc1iIlYZn+5zjWAmEVGVEb1/0z+it92mZMOMR8OfNkl9OJEl5S9b tx53SsCrCqmrFGo9tIvG3f3hoEGY5jFeGILbdK8//SJuQI/OKZ9u43QrM8OQKRfCQjDl bWpN6ELs0g4a6jkzl27bFO6LftRZ6THwwEWGmIwEvbk+ewS7AzdUq0jg7IDgMuU2rAd9 nbapzstUWvEVQPn/uqNppTTQys0rkCE9qg+HZpA+uSbHJexB7JTIIkhaY44bnyEQ/esY CcfQ== 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=fa6QEn9dcN3B3mv9WNTdCEIrKmhPOnu0q07y3B+hH5s=; b=sInGlYPLWrYO43yJQBpcwdEjqx/nV8jafdLJPlInLvjmsQxcjRunCvyXzDgiADLl59 KwnmeOXS7b9HUM5rh5WEqEi8jU4vEx3SOl+3YG9F+MWxRSN5duV/bo3HkxJeRm+WP3S0 Htq4rQhoavylqTCNEylt1g0hCV/OnzuoyWMnL1XhpR5uASbs1h+N2aBGtnodRb33a3t8 7YMUP30CDP/C53Ml709sIAI+kYtT/yf8DInthrslcMH9sunRwKNyh1U35VNHeTrJf3Fb Vc1nBVQnO0G0/ECpW3UJ4wPFIKHLzW6hrUt1v9cITO6pfUVXxOosZADzbRkf0czDGPAq dHsg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=fa6QEn9dcN3B3mv9WNTdCEIrKmhPOnu0q07y3B+hH5s=; b=Sub+m09lTcExydID8sBa/tGsO1sJKNnYdJBoNX4VUX1MaQ5yM9GZrRcZuy1NzdGx5U 071vkj1dV/llxqiT1lasf/bngnkmZ2t1cp4D/W1iN+TYWeKcGbazdAfuxg+gmEJd0K4j SChfd6lKYTWa3JSu/N7gKC7l0yGVfYWn7dsFd/62AntC/y33MSXl4h8Sdu7wPuQqRSHY rWcvREux3PHXQtxocyryqAuk8JplwYg2J5E3XiTVAnI5//rQfTiTQ/u2Wv5raZmkNeuw YfbbFuFL9H+O2l4FVnZE8PV9Bq/e22EsflmjbWndctrftX/aNK3XG+SgWnaUL12KwIa8 nykA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=fa6QEn9dcN3B3mv9WNTdCEIrKmhPOnu0q07y3B+hH5s=; b=PAdSNBIJs2RW20GChYJLYn+WMEAFYFP4e3nm4Uw69e6/NGx/8mPP4cosE3BcoVJwP7 SGxfh00/Fc6ybwq3u1sZ4nqw8JDNFqAWvEThTBBieFV2osxDHtoPoG1TgiILMUfk7KpE LYvPHXSDopuPhhBJL1v3ZMOUthXbno5QxR7OruW38ZndyXBnXwl8fYwcfFNlmU5cvCZS qgOK2kGX9L12xl3ix0JcgH1hQEjyqN5XBpOckGoXExC7Ygym8nTZka7k/pjBm468VHjV c9aOnBX6ljxb083keJhSjw6BiPYayHHIT88/g49nUA+HyPmywAPJNtEvt7WFgO/cVEsr g4Fw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530CuQR16El2B3HHMiEdIJ/td1x2KA4Wkn8tRIn2mttJolmnr1nk 7cT5rLpCt6AhVX/AtNLy6fk= X-Google-Smtp-Source: ABdhPJxl+NPbIb/6w/AIPtnKBYy3ReQ0H4wy5nt2xOJuTX0Mcytqkkwlb16wN7dGVyWvuBw90cXniQ== X-Received: by 2002:a5d:6a85:: with SMTP id s5mr18615139wru.90.1603721030048; Mon, 26 Oct 2020 07:03:50 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a1c:208a:: with SMTP id g132ls4580478wmg.1.gmail; Mon, 26 Oct 2020 07:03:48 -0700 (PDT) X-Received: by 2002:a1c:307:: with SMTP id 7mr2342729wmd.165.1603721028443; Mon, 26 Oct 2020 07:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603721028; cv=none; d=google.com; s=arc-20160816; b=QB4HIWYRJMkV1GjakoSOYLutqE0me0YZyg3CcSZ0Twu3ivvp+mWGQ6PZc3tpF/jeaY CKJd5Gxhr9KerIBViiOlIj1zClk8zKtYRzq7wKlbZCHbU/fv6Ceca5RIbymH+jEHs2U9 6coHzDdt0kb1rdwc02CDhLFNT8eu9uObDXO7vIpgz0ZYDZy4v0wawFjCHB/+s3Q+3cGa xAMLy12U724NltH8oFpbBOGdbb8LKfZiCIMwj9II2k+ek9vGneZw/Nj9Ik0RqW7pMOi5 EPtyBZaZ5BTjHfRloWcEHx7sBkL0C6pVy1+IALTQ9ieS4vTmtreixprzckiKBX0ovFUZ rQPg== 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=iBet23aJK7XFX3ND3/ZIrJIh5yey8xp6yQB3paYSbBg=; b=ffLrM/RJg2lmxUevY62s+xl17/dMF2iyWsM4Gn8/xfmqH8PcBvMxVrPYqlXwRlmlrK a1NfWhtH1t9CXTcYd1+3DZbMBCIr3OnsL1PnARE8mPCDrz6bIgwbuOdETcntm3bs3wxL 3CzERPl2Nre2u6xDy0vZFS2bQrvBT4z1SrztzZkt04NuBExMbpT2v3VcDFk7Dt6gTH6z nYvlNLmqVLux+RZ9c2YBOkeBMFL483dOOW+lmWsvgRMWfqBG/v42phW1IUqvwURY4tQA C28hvXH4Qkbfk0Ew29pyFkokB3CkfA4Dy+gpDYerr5CUMr3whDoHCUXG1JX1EemKCEdP Luow== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id w62si273163wma.1.2020.10.26.07.03.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2020 07:03:48 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CKc5013rNz1rvm2; Mon, 26 Oct 2020 15:03:48 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CKc500pGpz1qsXC; Mon, 26 Oct 2020 15:03:48 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ExPN-wiylhQV; Mon, 26 Oct 2020 15:03:47 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 26 Oct 2020 15:03:47 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 07C4F45408D2; Mon, 26 Oct 2020 15:03:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id GCLtESE2Pth0; Mon, 26 Oct 2020 15:03:44 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id 591164540607; Mon, 26 Oct 2020 15:03:44 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [Patch V2 1/7] downloader: drop unuseful marker when dwl is started Date: Mon, 26 Oct 2020 15:03:36 +0100 Message-Id: <20201026140342.147578-1-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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: Stefano Babic --- corelib/downloader.c | 1 - 1 file changed, 1 deletion(-) diff --git a/corelib/downloader.c b/corelib/downloader.c index fc754fa..462d379 100644 --- a/corelib/downloader.c +++ b/corelib/downloader.c @@ -47,7 +47,6 @@ static RECOVERY_STATUS download_from_url(channel_data_t* channel_data) } TRACE("Image download started : %s", channel_data->url); - notify(DOWNLOAD, 0, INFOLEVEL, NULL); RECOVERY_STATUS result = SUCCESS; channel_op_res_t chanresult = channel->get_file(channel, channel_data); From patchwork Mon Oct 26 14:03:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1387764 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::239; helo=mail-lj1-x239.google.com; envelope-from=swupdate+bncbcxploxj6ikrbsvo3p6akgqe3cffd5a@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=AXJl3Q/m; dkim-atps=neutral Received: from mail-lj1-x239.google.com (mail-lj1-x239.google.com [IPv6:2a00:1450:4864:20::239]) (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 ozlabs.org (Postfix) with ESMTPS id 4CKc5C3pJwz9sPB for ; Tue, 27 Oct 2020 01:03:59 +1100 (AEDT) Received: by mail-lj1-x239.google.com with SMTP id m11sf1678299ljp.21 for ; Mon, 26 Oct 2020 07:03:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1603721035; cv=pass; d=google.com; s=arc-20160816; b=SjL4qQxw+3Zluez/9qhL1Xu+Bl0050tUFZSmFVBJfA3QI0LCqt/6NKJYpY8vG4rgaI QSX9X2JB46MdDdO/DdsAUr2E1Z1HgJR3J8rKLZDowqUTM3TSNcKU60Kh8m5vPnFxXOAs becnPKjHMJ4E95Zolz1X/EvZzHpezc440HrD6L0EpamNOPbFfWiGIEp3gbNODWUsfI6P Vxf+6WGC54nqSU31epUeBiKsrucWMG2wQ1EcZkTmxWHcJz5+cBIKb9bpoWFrnGlGQHJz c8lNV8b9saJ0XelMV/kbIFg5z0+Y3CmTonlKgoSvflnHwStym7XdMGKni3iyg0kxZyZt hdxg== 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=/dkmd311kYGxxY3PGp4uIKiJfdOJx0LbZTFs/Zvvqc0=; b=lkNsceW5NOtP/vyZVqEc7qSysr6ZCX8bRtmFuXgRa2bN7x0+zQ/yeaA8mWC1O3gmxd UsqP/uIjB18DCUMfh3w2uKD0jmcHwC8Pgzyl9P39CwyViIs0HCJ0GYPEYHxr4nBEHXqf qkp5iNdULx4cOavu2BVT1ar7rnr9envVSpXdO0tT8D9JcT0JUxc3r5GWxrJKu0eNigzU YVT0yZwUtbCSonTEAa8bDpV2FrlNvtSFr9/bSidUUp6FvHRpJc+E+6vYyjrlY17TE97s w7WxKfY11BRsZeRkEW13rT9N1gr+W4KMlJKgCNor4aiO75OwWT8jzPxRDDpSCuPZ8P4S aE0w== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=/dkmd311kYGxxY3PGp4uIKiJfdOJx0LbZTFs/Zvvqc0=; b=AXJl3Q/mpeZZlcQOtB6rx9Htf+uKsx+weRcUGjeLjl7WDMzY7XnDpNQjjcsKQ/60Y1 cGs28Ho2q9iAqLtTY3ESMlU0ShvTPuXIDOSZBhztVjJg3YKzX19mp1yW3swMBC+930/F 2pUaAJZMFgJX0UIyduV9bfIUYujfxgVk6K5AnQKGqYrQodul4mwZFpAjJI/ayLhc2qX7 9qSXWMmTWZrmbtPBKAzRD7DReB/+Ne1opqyJpBCYRXsXqQM7g0ttXLOrLAxKVx+pc8cZ 2/ay/KCxP4r9ElJS0VxooKNLWTQrBfnWk0HF0HLxF0fqlYYkjmRt8Bd3nme+fyb8eHQG ox4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=/dkmd311kYGxxY3PGp4uIKiJfdOJx0LbZTFs/Zvvqc0=; b=czD+ggLVRktw+PEld8xAc01nPFkmK6LAv8FnVL6C5XD+EaSMpTwZ84Qegssa1AqtSr RzMlef/vNqFVKS10/QXGtXZUGAs2ew59ae9/g70Z8sD9GNAfwPjpKkvPvrBl8bAtrkqz Y+z90Ha8AH0fQ1tJCX9HztR8lLM/z3HZlT3rmSNFnqsSCpakR07YFnJBau2/V9i0cKT+ CVGXQPj1r+iXWETKf/yaXP8hj2sSjjiE6rtfeJ1p52IJr6Q92mM9EPLH4yfPMqkUXQVu RXuCDs061SgIVSMml1hzAdcTPSTelAOTM4ykwtPoKKf01zlEBjamRLyqQMAE8TwzXcxu khCw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530JO1Sir3cvDcSB27A5Iq7NlxMBxHr6N6/NuVdGekrpBrnpnU1V 3WxLhD5C0MIm0LKuER0iILw= X-Google-Smtp-Source: ABdhPJyY4f8Bld4umIwAOTsA5XbDMm636dkr79NW/S64Zs0wa34TYd61Q7DyMxvT5jvT8E1abncbGA== X-Received: by 2002:a2e:3112:: with SMTP id x18mr6217669ljx.149.1603721034913; Mon, 26 Oct 2020 07:03:54 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:890b:: with SMTP id d11ls1462288lji.6.gmail; Mon, 26 Oct 2020 07:03:53 -0700 (PDT) X-Received: by 2002:a2e:301a:: with SMTP id w26mr5751539ljw.11.1603721033690; Mon, 26 Oct 2020 07:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603721033; cv=none; d=google.com; s=arc-20160816; b=wx403Nn9MjI3UithbM0q87Yd1aHmMlvHKpsb5wRbi5Tjfo/glrVY57ngKP4G0SyqOr lFNc6c7mOHN2x792vCYaRkI9ox98pWWvncRpzDJ3YUZnOiv5wq3c/m0vKMSzydJqbyLJ jj/jzibaPRO/NIHR28zKPH4EmTqws41QbGfUTBU3teuT2uK37XdygUpDQgp2mkP+DsXq r9sIEIF5DYc+wpnN/rKCFIkn4CFJmvTp6XS4Tzu1S4mlmG9XbfFPxpquJ2P3IA+6s4Q+ LatrLiWXQdA/pLWj/1BD/pspXXtXmTrDFqJ9KfWwbO3L9C2U7jBAYwxyBGkQyH/3dffB nsDw== 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=DZUHTEXuIgRDoaUtQQMtwtBz1JNSdW+DS22rVS/ouug=; b=EOMfhGE+qizAVXI4P13mSFZYDL3i47/xubx98QncP2fJF7ePtXO4EUrAsZo1P3mwtG 382KYpidg+vH4WQfhMdCCn39PBtxk16JQWR2Eu4dexgutUA1S/LZsk6Ugq06ODUzu6/b mirF9gudG3tqjflkq0QM1U187ifBLtohgsPKt6S/qSKbpBYtkghAvb/8hv8xid2tm83+ iF3H86Ie1wiI+k/ypHAnjFXx2Uuf0O3KPt4jwCuP0AU2+LVd49uncJ1uFWdbEhN6Gmw0 l8V7UghPrIlhHgnW5qhmBvA0rVdBRBiuB5ycLsJfUTv9mWF+JDlyDJr8UlDZ8vHBfyok JjFw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id l28si292619lfp.11.2020.10.26.07.03.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2020 07:03:53 -0700 (PDT) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CKc550XbKz1rvxn; Mon, 26 Oct 2020 15:03:53 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CKc550HzVz1qsXD; Mon, 26 Oct 2020 15:03:53 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id eeX4BB-osage; Mon, 26 Oct 2020 15:03:52 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 26 Oct 2020 15:03:52 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 60297454086D; Mon, 26 Oct 2020 15:03:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id JXxNrVWpOWyP; Mon, 26 Oct 2020 15:03:44 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id 9E7F1454071D; Mon, 26 Oct 2020 15:03:44 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [Patch V2 2/7] progress API: set define for info field size Date: Mon, 26 Oct 2020 15:03:37 +0100 Message-Id: <20201026140342.147578-2-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026140342.147578-1-sbabic@denx.de> References: <20201026140342.147578-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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: Stefano Babic --- Changes since V1: new patch to set define for INFO size include/progress_ipc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/progress_ipc.h b/include/progress_ipc.h index 2c242eb..f508eda 100644 --- a/include/progress_ipc.h +++ b/include/progress_ipc.h @@ -15,6 +15,7 @@ extern "C" { #endif +#define PRINFOSIZE 2048 extern char* SOCKET_PROGRESS_PATH; @@ -33,7 +34,7 @@ struct progress_msg { char hnd_name[64]; /* Name of running hanler */ sourcetype source; /* Interface that triggered the update */ unsigned int infolen; /* Len of data valid in info */ - char info[2048]; /* additional information about install */ + char info[PRINFOSIZE]; /* additional information about install */ }; char *get_prog_socket(void); From patchwork Mon Oct 26 14:03:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1387763 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::13f; helo=mail-lf1-x13f.google.com; envelope-from=swupdate+bncbcxploxj6ikrbsno3p6akgqejzgbohq@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=qT45Ld5H; dkim-atps=neutral Received: from mail-lf1-x13f.google.com (mail-lf1-x13f.google.com [IPv6:2a00:1450:4864:20::13f]) (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 ozlabs.org (Postfix) with ESMTPS id 4CKc5B2yKRz9sV0 for ; Tue, 27 Oct 2020 01:03:58 +1100 (AEDT) Received: by mail-lf1-x13f.google.com with SMTP id n25sf2751102lfb.17 for ; Mon, 26 Oct 2020 07:03:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1603721034; cv=pass; d=google.com; s=arc-20160816; b=xbJBcAPQKOW1i2x+oEQNPLs9SnoW5e0kLv/1kBNa8Czw0Vk3NOEEsb+5W5uaKgKIP3 tTUeTI9N4yreYNvJlOqAmWXR72yyEvZfBi49asBZz7fqJzvmLK0evO8Cyu0ksYfSp1vW Aba3U0WiJ7OFuVaUyu/uIYI53Q8oVUiBEVJpVPvErMS+eNHdZ+3Illz3uRGed03A/1nr a/f87mnjgjwTtncngTKSh6buJ+ur2p8dM5Zyq7O76T08uCD/4sDeqy31Xt+iMx8GGZ+a +BsGuKImkhQERSIE8+xRltfVZr1yxG1Tkyqp1rAv+v+4IPpLOyJdTucPuAzM6lR9YPQJ plQQ== 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=Xg+QlW77guSRGBo1llrrSRpHhD09mD6P4cCb7JMxvcA=; b=ISHuw8/bzBnLpzqzgr/SpYZRJn18qtEEWgDjbnRjHLN4CIygyMy6UNcl82GCEnAf2N YJAgISC9o0iwjgPYMqNXx7DzB6rwwTr/0Q9WQUJXG0j/EJVSCN/pqOvI0BWzwcYLqvha L95CUgGJO5sJrLLXHJtu5eCy/rYc8eOwMutrXtZoMfU5tgknWaFMzvEJkZrFREHSVkpO hB/xFsfipCiwen7i4sa0BuginR/58UkDlAvYoGb7UV3l7KcV21ST8M7+8ZV0ffz9EtMR BqRfZvUNeB1B/sDmSad5FGSUNB3QbpPe1N48sSe8XglRLPUGaXeWVvakBhLe8Yv+xBpb iF4w== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=Xg+QlW77guSRGBo1llrrSRpHhD09mD6P4cCb7JMxvcA=; b=qT45Ld5HRPGWuvCJib96y4HePNtAaxyB0OIVQhr+5SkB/0LdxRPwyQsDRbf9hkvQd5 gSktksMx42MpRsChGqqXQ9snjuUKgGoa1EyrLN08cM/7OT4jMwx3vkX7rs46RtiKcJME LhrAGXXde8Jf0ilnP9EDT3eQ8rzXMa33VrQ16czcuwHx18ya5WkAGFlXaQprzyyi4NKA eFJeTvywl9ybZ74sWf3EWNKdt7uXE+3DYrvJxlsN5t+p5NUeVKWeHDqJ4efTYM0cFz5w 5OY/88fiKfv9LrEKTEm+aHVs8hZetJbNjSZDVHNAkk9YNNu3UYGW+IKwxlpiHIckHPkC Mwqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=Xg+QlW77guSRGBo1llrrSRpHhD09mD6P4cCb7JMxvcA=; b=M0TROVQ746JColg59S/S01Yl//hH0/iYR1Tw3bGa7Nxb3Fbu4StDDi1k/2vZEUsfFh T3XVdraO3E+a+m34HKfwAT40rNVS5KpGZ8C1JIIh0tsyaIC8aCZOMnbCJ0RBqCsz6Nck 3FirJO28uphamBztqMkBdWefx1BiiTzg5eDltMzInhV5w0wFsTCsiWl1pwW5kDoQdH7p 2RFTGRG7tdXr8WTWyEzcsW7vQ/ABf/KhQO5iIKep3MF81Ke/mkBSHKWGTq04w+Nj8ysP wCKF49+yp9CkSlU8u0S4Q9uFIiXZ+BnTU1PLnv1gAoonBKzBLIM11WUu948AzjwDi5Y2 mUig== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533TIw/7BZExfR/LvMkORQ1RU9ysWNDWmgvNBAiIRLe/eWM7tZYU qxQ3zMD9+zuQ4GjdS5MokoQ= X-Google-Smtp-Source: ABdhPJxVpVw9+C5fOOkrubRRLc/scluZ8lmw3RJNiwY4yYdH0fRwS99x0gtIn3kf6+Rxxkp2d6iVjw== X-Received: by 2002:a19:e054:: with SMTP id g20mr5639400lfj.166.1603721033880; Mon, 26 Oct 2020 07:03:53 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a19:84c1:: with SMTP id g184ls4121742lfd.3.gmail; Mon, 26 Oct 2020 07:03:52 -0700 (PDT) X-Received: by 2002:ac2:42ce:: with SMTP id n14mr5029312lfl.412.1603721032467; Mon, 26 Oct 2020 07:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603721032; cv=none; d=google.com; s=arc-20160816; b=ScKteg545VkBs2hvPTgCmIi7j7tpkDo9M7yRi5akhW1X7H1EFCUeMgzpmBjW2ehwW7 RxsGhMRhiU6gQKclpWGBjKN2d+5PqvMhszYo3yTlCi99enCbh/OffYLxNFApXtHQlPF0 YCFMZQNai+bP+6uR+9jEQ5tQZoQ4xK0FzRjOW/eeT4yR2tMXbVgRxKdi2Hjsun+CHoay Tj4dSfKasBzQ73X8YwsiQ8VgHiMXMNnVrswU0no9ErsW/1UzsIRsjNoPEF9w0eOrmwJq E79sg43Kd68WRyX6Twq8ErOiGS+rzaelaJm5t3zQXt1nWm+GA1vSWXBxRJHcAF7Nt2JA ElBA== 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=iS6Qi8MWEVrAAkFI4wGvNpeFBF/H1FV8MPDrGWVRCtI=; b=K1GgpJesAj63bp1Sq9JrJpKEJ6/vAs1gOYzakTYChfidr6682nijERCAWxVqhz3G6l wUSpV6WcnFaSRuGRhvoPBHq48b5ZcwhdKawTWL/+4j8+tGsZqRiQWdRXpdC3CnvCrNF0 ZHm+LO8MYcYq/klaQzT+BK7UgbLz7PEkhF+R+o+Nfn2mascfMpuTcrYs48jAwTeO5p4a ++orMCPgIxG3k7xh3u9WPhDw657hhGLavxX+xFBDocZ5feIz/r6vyH5PXqpIQWoEZINd GJBDQtYvzT99BT05iGuq8CNrMwrBA0sPH4Qnr2RSiLSCLIATwZoAk9rDtaWWOprBrj02 yF4w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id t20si264952lfk.10.2020.10.26.07.03.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2020 07:03:52 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CKc540HHlz1qt3m; Mon, 26 Oct 2020 15:03:52 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CKc54042yz1qsXD; Mon, 26 Oct 2020 15:03:52 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id D6Jntd_Bf19A; Mon, 26 Oct 2020 15:03:51 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 26 Oct 2020 15:03:51 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 452C24540607; Mon, 26 Oct 2020 15:03:50 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id wLkTJnM0ccpM; Mon, 26 Oct 2020 15:03:47 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id CB7DF454086D; Mon, 26 Oct 2020 15:03:44 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [Patch V2 3/7] Rework emit download progress Date: Mon, 26 Oct 2020 15:03:38 +0100 Message-Id: <20201026140342.147578-3-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026140342.147578-1-sbabic@denx.de> References: <20201026140342.147578-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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: , There is a notification to signal how many bytes are downloaded, but this was later introduced and does not match SWUpdate's design. In fact, because it is not called by the main process, it uses the notifier to send messages to the main process. The notification caused in the past flood of data to the installer, and does not fill the foreseen fields in the progress IPC to forward download statistics. This adds a swupdate_download_update() that can be called by any process. If it is called by the main process, emit a progress message to the listeners, else it prepares a message and sends it as notification to the progress notifier. A new enum for the status (RECOVERY_DWL) is added to let the progress notifier to identify the type of message. Signed-off-by: Stefano Babic --- Changes since V1: use define to allocate info field core/notifier.c | 6 ++++++ core/progress_thread.c | 32 ++++++++++++++++++++++++++++++++ include/progress.h | 11 +++++++++++ include/progress_ipc.h | 1 + include/util.h | 1 + 5 files changed, 51 insertions(+) diff --git a/core/notifier.c b/core/notifier.c index 3b8a432..276e155 100644 --- a/core/notifier.c +++ b/core/notifier.c @@ -345,6 +345,12 @@ static void progress_notifier (RECOVERY_STATUS status, int event, int level, con if (status != PROGRESS) return; + if (event == RECOVERY_DWL) { + struct progress_dwl_data *pdwl = (struct progress_dwl_data *)msg; + swupdate_download_update(pdwl->dwl_percent, pdwl->dwl_bytes); + return; + } + swupdate_progress_info(status, event, msg); } diff --git a/core/progress_thread.c b/core/progress_thread.c index 157498a..81cec22 100644 --- a/core/progress_thread.c +++ b/core/progress_thread.c @@ -25,6 +25,7 @@ #include "swupdate.h" #include #include "util.h" +#include "pctl.h" #include "network_ipc.h" #include "network_interface.h" #include @@ -86,6 +87,18 @@ static void send_progress_msg(void) } } +static void _swupdate_download_update(unsigned int perc, unsigned long long totalbytes) +{ + struct swupdate_progress *prbar = &progress; + pthread_mutex_lock(&prbar->lock); + if (perc != prbar->msg.dwl_percent) { + prbar->msg.dwl_percent = perc; + prbar->msg.dwl_bytes = totalbytes; + send_progress_msg(); + } + pthread_mutex_unlock(&prbar->lock); +} + void swupdate_progress_init(unsigned int nsteps) { struct swupdate_progress *prbar = &progress; pthread_mutex_lock(&prbar->lock); @@ -113,6 +126,25 @@ void swupdate_progress_update(unsigned int perc) pthread_mutex_unlock(&prbar->lock); } +void swupdate_download_update(unsigned int perc, unsigned long long totalbytes) +{ + char info[PRINFOSIZE]; /* info */ + + /* + * Not called by main process, for example by suricatta or Webserver + */ + if (pid == getpid()) { + struct progress_dwl_data *pdwl = (struct progress_dwl_data *)info; + pdwl->dwl_percent = perc; + pdwl->dwl_bytes = totalbytes; + notify(PROGRESS, RECOVERY_DWL, TRACELEVEL, info); + return; + } + + /* Called by main process, emit a progress message */ + _swupdate_download_update(perc, totalbytes); +} + void swupdate_progress_inc_step(char *image, char *handler_name) { struct swupdate_progress *prbar = &progress; diff --git a/include/progress.h b/include/progress.h index b4d09d2..738e59f 100644 --- a/include/progress.h +++ b/include/progress.h @@ -11,6 +11,15 @@ #include #include +/* + * Internal structures to be used to forward progress data + */ + +struct progress_dwl_data { + unsigned int dwl_percent; /* % downloaded data */ + unsigned long long dwl_bytes; /* total of bytes to be downloaded */ +}; + /* * Internal SWUpdate functions to drive the progress * interface. Common progress definitions for internal @@ -24,6 +33,8 @@ void swupdate_progress_end(RECOVERY_STATUS status); void swupdate_progress_done(const char *info); void swupdate_progress_info(RECOVERY_STATUS status, int cause, const char *msg); +void swupdate_download_update(unsigned int perc, unsigned long long totalbytes); + void *progress_bar_thread (void *data); #endif diff --git a/include/progress_ipc.h b/include/progress_ipc.h index f508eda..deba39e 100644 --- a/include/progress_ipc.h +++ b/include/progress_ipc.h @@ -27,6 +27,7 @@ struct progress_msg { unsigned int magic; /* Magic Number */ RECOVERY_STATUS status; /* Update Status (Running, Failure) */ unsigned int dwl_percent; /* % downloaded data */ + unsigned long long dwl_bytes; /* total of bytes to be downloaded */ unsigned int nsteps; /* No. total of steps */ unsigned int cur_step; /* Current step index */ unsigned int cur_percent; /* % in current step */ diff --git a/include/util.h b/include/util.h index bf8d8a0..b6ceee6 100644 --- a/include/util.h +++ b/include/util.h @@ -73,6 +73,7 @@ typedef enum { enum { RECOVERY_NO_ERROR, RECOVERY_ERROR, + RECOVERY_DWL, }; struct installer { From patchwork Mon Oct 26 14:03:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1387767 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::13b; helo=mail-lf1-x13b.google.com; envelope-from=swupdate+bncbcxploxj6ikrbu5o3p6akgqetnpd6ia@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=Kk3MZvcI; dkim-atps=neutral Received: from mail-lf1-x13b.google.com (mail-lf1-x13b.google.com [IPv6:2a00:1450:4864:20::13b]) (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 ozlabs.org (Postfix) with ESMTPS id 4CKc5M5ZDQz9sVS for ; Tue, 27 Oct 2020 01:04:07 +1100 (AEDT) Received: by mail-lf1-x13b.google.com with SMTP id p129sf2753914lfa.10 for ; Mon, 26 Oct 2020 07:04:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1603721044; cv=pass; d=google.com; s=arc-20160816; b=WOs5I/LpVA0nM6bh7EFSJN3J9W7KfUOdvKVUfH16Tj5x+DtBAXqHF2LzSTAklw+/sR Nd1Fy1pHShIZ3YmTpf2cLZBi/b2cMONR3UjJrDeqH4lbFv8UsMI1X6ux84BRXTCilidT /Ky3RrzWlB+lyCkFrm0CUsrofe3Ez2jVaIhuFbWdTt54ceqzab3Gv3y7LkSGe15SlKVH 9xTbH+pGOEO+qV8c5QJpaYcW8QfZRsVCUBqvcM+yTvuDv7dY2urXRQm8Zztg3dQR8PT3 W0hfYj+30OxyXmWHhid8Gl2GJOqvECikT3BtXEYg/RniSj5notTQ26OGv4ScdXgaCdh7 YW6Q== 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=EIR1OqgiWybGX9qP0Tu6lxpQI80PPNs59hm2VGZHc98=; b=oTNXVYcGxbFq1X3fOjwZsrp/WXRkCcr31hgTT/7oO7bR250VpZ6NO/DiQUQNOWaaDM N1H9kfU0EaoXI96HJcFdkAzR0EWD/SkfbmVmgTuhxO+aAfZOT0nEls82gAeOVqnCKGkj /JyxupxeUxdiB/ZyZwnckJo2EZoa3A/JJek1ff1JMBYTWnkOKd4aea3y8l4uHOqwF2fU UYu2gpDgr5jsyGl3RQdbE8Q2+3t+kMFugFqrr/6E3Ydut3l+Pp0rbtWk6S8vB676MdR/ ZJBj0O1gY7xgHU3BxEzdSVUgg9sqBzc5esG/nxuETRqL0L3LHjYKSx2hqD2xjdISS1hJ f7bA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=EIR1OqgiWybGX9qP0Tu6lxpQI80PPNs59hm2VGZHc98=; b=Kk3MZvcIrJHyyrOuhOds13QCxOM8WKhFdDK2VdS43UD39wLF4m6xZhM73WnNMyS4wp qqqtZxdJM0RNGJHNJvxRCjoXGZKYkVrNV29O2YX9I8qQfiMuDsYMA8IuDIa5DB4Lb5Rm a0v3S346/s+rORJEy302jKebiUsgi6icvp0sZyOuvJE44n5hDc+r0wvtgwO1h3YbPcKS Hn6zQMfsUsmn6YOmGYyvCN3QgkdpkVRNM+9JgPa7SzjLDKvmp6a/gLfFNrl8b6iYX3SW 8Tj9jWMHKbVaghpb1hFAb2vDXTkqI2hiRz+NTWzG+UQMjpYpoE4EuA3BCjv/xdXfLxvz EfpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=EIR1OqgiWybGX9qP0Tu6lxpQI80PPNs59hm2VGZHc98=; b=D+M5RNlARWZYagl8YwuGexV8fw7yBg+l517cl7EejQc1hnrEBEKRtO3O092Y0pKvuX Gd4rOxkrWRfSXqDxMeb39eXrwYnB1M4nr0VwBH8p8VxWdDR88IWr9bQ59ibW7Z87fU4y FZJnWm13yc9VLAMJtoAIz2WdQX7PX+xT7t93/3EnoxmJaXg3xpBO+TSv5uTpPQ9//vuJ BUNiILejyL2zoom0qJ1Fx2vt2enyQmcyYPPEJ3v3SHG9mN174hxVWrVfU/DachTFNnq8 c44X9FlaieKMaCGv1SrPU8vr06/Biqwpr5JYR4L44qek+T6RFXqsVb7JlO2PjqoeIBjj 79qw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532KvJUu4GcngKkTF3UhASsgZoDYzT7J7Giul/Ofki3+EpBF80Op 3iC1m1iy+GCU+Kg+Rs176Os= X-Google-Smtp-Source: ABdhPJwlJ83i7gt63ksJQWfz+2sFyRgQTqD+/aFDudmskAfRwcu6gyChsjLHCY/DCCcMwPBvyAKKVw== X-Received: by 2002:a05:651c:2cb:: with SMTP id f11mr6342118ljo.40.1603721044217; Mon, 26 Oct 2020 07:04:04 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:b6d4:: with SMTP id m20ls1473772ljo.1.gmail; Mon, 26 Oct 2020 07:04:03 -0700 (PDT) X-Received: by 2002:a2e:998a:: with SMTP id w10mr6050913lji.137.1603721040286; Mon, 26 Oct 2020 07:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603721040; cv=none; d=google.com; s=arc-20160816; b=V91MW4FMMmpZbYWM6vjopt/b8Sqly09re779R2iRjNHrwHCdZVGtUfELhzccc8UEB2 /wDS3fN/9Y8aOhOJxrhKGm6tYMKnarqS9LP2K/WPJinFanOroQBU8V2EpdBp6AE5JFbh dDNvCY7NIghn1BesvaVg2TCWoCOx1pqF189abn4dJ/JOvReUYc42MYJoZ0+eqV9kAr0h nhRSS+nbJJMjC49RYMH4mkLl/Q6PxivXG9RTsXZjZxij1jkD2YazTdD+BgKGauzyQK9u ZCvuyP3PAGOzA+Attn9D2u5X244+LSggMbqjr5FOGkH/CtyGlfAD7mTa4rOAlh+nnplz 71eQ== 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=uXSnhJDq3PBaqhqnkpMsxxPWptUiepP2twT6kBU0Ilc=; b=I77E+liFnKw9Gh7hF7Coe4MfCo53Su7IPLZWCDFioFd9TAurAoKfMEDwfnlm6Iy/5J LxEyRqU3ZoU3IeyjWQStUHpjeVBKScovbncQwuIm4K8x+hjD8ytjnj7BCz5wRLks8Avf NPOl1RJbLwhQEw+iqqwmigKi67wYwlNTmOFe8FpUQruEI7hIbJJzFLx2dAScs/3l7DPy Ezfbwtx7hAfQL277+8g5OcsIbT8JS/fWU8RsE9hT2Gw+pkaax6FjK7bVfcYYFG1f0qPR vcp0Joxyiu8BxsZel6imAu1NfrouK8NjDMuqYNT+KBWBVr+MTnNx0BOI6zT6aXl3uZMR BPVQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id a17si278375ljj.6.2020.10.26.07.03.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2020 07:04:00 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CKc5C3zTwz1rwml; Mon, 26 Oct 2020 15:03:59 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CKc5C3QNsz1qsXC; Mon, 26 Oct 2020 15:03:59 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id bW8Wy-l0pKQF; Mon, 26 Oct 2020 15:03:57 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 26 Oct 2020 15:03:57 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 39AEF4540607; Mon, 26 Oct 2020 15:03:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id UFvAXvq9rSZI; Mon, 26 Oct 2020 15:03:50 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id ECA4F45408AB; Mon, 26 Oct 2020 15:03:44 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [Patch V2 4/7] Replace prbar name in progress thread Date: Mon, 26 Oct 2020 15:03:39 +0100 Message-Id: <20201026140342.147578-4-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026140342.147578-1-sbabic@denx.de> References: <20201026140342.147578-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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: , prbar is a bad name for internal variable because it has nothing to do with a bar display. Replace it with pprog as pointer to a progress structure. Signed-off-by: Stefano Babic --- Changes since V1: replace prbar with pprog (pointer to progress) core/progress_thread.c | 132 ++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/core/progress_thread.c b/core/progress_thread.c index 81cec22..399a4fa 100644 --- a/core/progress_thread.c +++ b/core/progress_thread.c @@ -63,20 +63,20 @@ static struct swupdate_progress progress; static void send_progress_msg(void) { struct progress_conn *conn, *tmp; - struct swupdate_progress *prbar = &progress; + struct swupdate_progress *pprog = &progress; void *buf; size_t count; ssize_t n; - SIMPLEQ_FOREACH_SAFE(conn, &prbar->conns, next, tmp) { - buf = &prbar->msg; - count = sizeof(prbar->msg); + SIMPLEQ_FOREACH_SAFE(conn, &pprog->conns, next, tmp) { + buf = &pprog->msg; + count = sizeof(pprog->msg); while (count > 0) { n = send(conn->sockfd, buf, count, MSG_NOSIGNAL); if (n <= 0) { TRACE("A progress client disappeared, removing it."); close(conn->sockfd); - SIMPLEQ_REMOVE(&prbar->conns, conn, + SIMPLEQ_REMOVE(&pprog->conns, conn, progress_conn, next); free(conn); break; @@ -89,41 +89,41 @@ static void send_progress_msg(void) static void _swupdate_download_update(unsigned int perc, unsigned long long totalbytes) { - struct swupdate_progress *prbar = &progress; - pthread_mutex_lock(&prbar->lock); - if (perc != prbar->msg.dwl_percent) { - prbar->msg.dwl_percent = perc; - prbar->msg.dwl_bytes = totalbytes; + struct swupdate_progress *pprog = &progress; + pthread_mutex_lock(&pprog->lock); + if (perc != pprog->msg.dwl_percent) { + pprog->msg.dwl_percent = perc; + pprog->msg.dwl_bytes = totalbytes; send_progress_msg(); } - pthread_mutex_unlock(&prbar->lock); + pthread_mutex_unlock(&pprog->lock); } void swupdate_progress_init(unsigned int nsteps) { - struct swupdate_progress *prbar = &progress; - pthread_mutex_lock(&prbar->lock); + struct swupdate_progress *pprog = &progress; + pthread_mutex_lock(&pprog->lock); - prbar->msg.nsteps = nsteps; - prbar->msg.cur_step = 0; - prbar->msg.status = START; - prbar->msg.cur_percent = 0; - prbar->msg.infolen = get_install_info(&prbar->msg.source, prbar->msg.info, - sizeof(prbar->msg.info)); + pprog->msg.nsteps = nsteps; + pprog->msg.cur_step = 0; + pprog->msg.status = START; + pprog->msg.cur_percent = 0; + pprog->msg.infolen = get_install_info(&pprog->msg.source, pprog->msg.info, + sizeof(pprog->msg.info)); send_progress_msg(); /* Info is just an event, reset it after sending */ - prbar->msg.infolen = 0; - pthread_mutex_unlock(&prbar->lock); + pprog->msg.infolen = 0; + pthread_mutex_unlock(&pprog->lock); } void swupdate_progress_update(unsigned int perc) { - struct swupdate_progress *prbar = &progress; - pthread_mutex_lock(&prbar->lock); - if (perc != prbar->msg.cur_percent && prbar->step_running) { - prbar->msg.cur_percent = perc; + struct swupdate_progress *pprog = &progress; + pthread_mutex_lock(&pprog->lock); + if (perc != pprog->msg.cur_percent && pprog->step_running) { + pprog->msg.cur_percent = perc; send_progress_msg(); } - pthread_mutex_unlock(&prbar->lock); + pthread_mutex_unlock(&pprog->lock); } void swupdate_download_update(unsigned int perc, unsigned long long totalbytes) @@ -147,64 +147,64 @@ void swupdate_download_update(unsigned int perc, unsigned long long totalbytes) void swupdate_progress_inc_step(char *image, char *handler_name) { - struct swupdate_progress *prbar = &progress; - pthread_mutex_lock(&prbar->lock); - prbar->msg.cur_step++; - prbar->msg.cur_percent = 0; - strlcpy(prbar->msg.cur_image, image, sizeof(prbar->msg.cur_image)); - strlcpy(prbar->msg.hnd_name, handler_name, sizeof(prbar->msg.hnd_name)); - prbar->step_running = true; - prbar->msg.status = RUN; + struct swupdate_progress *pprog = &progress; + pthread_mutex_lock(&pprog->lock); + pprog->msg.cur_step++; + pprog->msg.cur_percent = 0; + strlcpy(pprog->msg.cur_image, image, sizeof(pprog->msg.cur_image)); + strlcpy(pprog->msg.hnd_name, handler_name, sizeof(pprog->msg.hnd_name)); + pprog->step_running = true; + pprog->msg.status = RUN; send_progress_msg(); - pthread_mutex_unlock(&prbar->lock); + pthread_mutex_unlock(&pprog->lock); } void swupdate_progress_step_completed(void) { - struct swupdate_progress *prbar = &progress; - pthread_mutex_lock(&prbar->lock); - prbar->step_running = false; - prbar->msg.status = IDLE; - pthread_mutex_unlock(&prbar->lock); + struct swupdate_progress *pprog = &progress; + pthread_mutex_lock(&pprog->lock); + pprog->step_running = false; + pprog->msg.status = IDLE; + pthread_mutex_unlock(&pprog->lock); } void swupdate_progress_end(RECOVERY_STATUS status) { - struct swupdate_progress *prbar = &progress; - pthread_mutex_lock(&prbar->lock); - prbar->step_running = false; - prbar->msg.status = status; + struct swupdate_progress *pprog = &progress; + pthread_mutex_lock(&pprog->lock); + pprog->step_running = false; + pprog->msg.status = status; send_progress_msg(); - pthread_mutex_unlock(&prbar->lock); + pthread_mutex_unlock(&pprog->lock); } void swupdate_progress_info(RECOVERY_STATUS status, int cause, const char *info) { - struct swupdate_progress *prbar = &progress; - pthread_mutex_lock(&prbar->lock); - snprintf(prbar->msg.info, sizeof(prbar->msg.info), "{'%d': %s}", + struct swupdate_progress *pprog = &progress; + pthread_mutex_lock(&pprog->lock); + snprintf(pprog->msg.info, sizeof(pprog->msg.info), "{'%d': %s}", cause, info); - prbar->msg.infolen = strlen(prbar->msg.info); - prbar->msg.status = status; + pprog->msg.infolen = strlen(pprog->msg.info); + pprog->msg.status = status; send_progress_msg(); /* Info is just an event, reset it after sending */ - prbar->msg.infolen = 0; - pthread_mutex_unlock(&prbar->lock); + pprog->msg.infolen = 0; + pthread_mutex_unlock(&pprog->lock); } void swupdate_progress_done(const char *info) { - struct swupdate_progress *prbar = &progress; - pthread_mutex_lock(&prbar->lock); + struct swupdate_progress *pprog = &progress; + pthread_mutex_lock(&pprog->lock); if (info != NULL) { - snprintf(prbar->msg.info, sizeof(prbar->msg.info), "%s", info); - prbar->msg.infolen = strlen(prbar->msg.info); + snprintf(pprog->msg.info, sizeof(pprog->msg.info), "%s", info); + pprog->msg.infolen = strlen(pprog->msg.info); } - prbar->step_running = false; - prbar->msg.status = DONE; + pprog->step_running = false; + pprog->msg.status = DONE; send_progress_msg(); - prbar->msg.infolen = 0; - pthread_mutex_unlock(&prbar->lock); + pprog->msg.infolen = 0; + pthread_mutex_unlock(&pprog->lock); } static void unlink_socket(void) @@ -226,11 +226,11 @@ void *progress_bar_thread (void __attribute__ ((__unused__)) *data) int listen, connfd; socklen_t clilen; struct sockaddr_un cliaddr; - struct swupdate_progress *prbar = &progress; + struct swupdate_progress *pprog = &progress; struct progress_conn *conn; - pthread_mutex_init(&prbar->lock, NULL); - SIMPLEQ_INIT(&prbar->conns); + pthread_mutex_init(&pprog->lock, NULL); + SIMPLEQ_INIT(&pprog->conns); /* Initialize and bind to UDS */ listen = listener_create(get_prog_socket(), SOCK_STREAM); @@ -264,8 +264,8 @@ void *progress_bar_thread (void __attribute__ ((__unused__)) *data) continue; } conn->sockfd = connfd; - pthread_mutex_lock(&prbar->lock); - SIMPLEQ_INSERT_TAIL(&prbar->conns, conn, next); - pthread_mutex_unlock(&prbar->lock); + pthread_mutex_lock(&pprog->lock); + SIMPLEQ_INSERT_TAIL(&pprog->conns, conn, next); + pthread_mutex_unlock(&pprog->lock); } while(1); } From patchwork Mon Oct 26 14:03:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1387765 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::137; helo=mail-lf1-x137.google.com; envelope-from=swupdate+bncbcxploxj6ikrbuno3p6akgqejap3rlq@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=k5l+3G2P; dkim-atps=neutral Received: from mail-lf1-x137.google.com (mail-lf1-x137.google.com [IPv6:2a00:1450:4864:20::137]) (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 ozlabs.org (Postfix) with ESMTPS id 4CKc5K4k6bz9sV0 for ; Tue, 27 Oct 2020 01:04:05 +1100 (AEDT) Received: by mail-lf1-x137.google.com with SMTP id k6sf2328942lfg.1 for ; Mon, 26 Oct 2020 07:04:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1603721042; cv=pass; d=google.com; s=arc-20160816; b=CIYd0Ec4GxH9CVP95MyXmB3StqY7wYOojmP8E5GDeYg+bgyr95jt7fgSzOp9FqbJB2 XIA3uflXKjBfjyQIcDW2uN10b1T45Md9L1mXAoS0DiczHmHQYXYvWIJ9//Xc75sll/Uy L2AdKcej8jYYFA0v3o7ggOPhoxeZJUf5/ScoCXMvO01xrJYtCONeJG22n+j+uRoNlamr lWnsJ+a2pkwnTYBfpIZ1LVqFsNixEa5zo2FFVgWA6SDJ3z8z2uJuE5csymK0w0+DRd8v HZAU28FzEJyQSq24MtsG0cFkz+fytAE61rcdXxyk14sBtpgH9OumSQvETnKJreu9PpqG Ew/g== 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=4wJ0hgv29VqG09Jf9+ImKA98MfaXOPH6kYAKTVbICKo=; b=ThyMxqq3j3STQJWww16CwDvWVaqhYKRPu3YRJ3cG+JJ7cq01TMCmN2i1Rh+dBjdKHl llluhJHpCZKX07fNXiJ/zqX1CAKDvgBAJQR/Dc6yVVtmDBlEuX3MzaHHAi/+xLPiohUG Aclo/IdWWPYYkScaj3mpH6fHU1TbNbyzrvCM00MVHMRVnnUcTeBG0teSRCNbVHP8siXs EgFDGwp7pCEj0ZLw6dqK/Xdvke862/KsEZBkwwtUxYgSAe/QI3DlzpXyZabFAQyVmHwX 5wGryYfx+1IqYgC8jny+teWJHyj5BK0OVob8Gv1NgS9e+EF5dSbJ8JPNBB5vd/iV8hIq QxCQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=4wJ0hgv29VqG09Jf9+ImKA98MfaXOPH6kYAKTVbICKo=; b=k5l+3G2PRTIEVHv9ddn/6GLRqlEUD4qALW5UFIqgWDCgYhCYbrgGDbeO4BoBH5kE/j q6qWaachIdeHFnGnl+NUxKKGrZAK9dN+LgOz7Xq2UKEK32ce5o6ZZgjA5gG/1zrnUanh krU/lqgeS2OJLuZzR97I5kZn7Jhc0ArY5Gl0bAfMvaCe9/AP58lD/rvth0mNJvVKR0ft QEIlZ/HRCOLZAvLmkAHtruXjzHv1u6VguOaJdfeFw8Pq0KYW3mLeQP87I9ajUxQYZzyO /pE253wcTIMwq9j4SVceuEXWA29PX0wckjRew8T4VW0BAFCHffDBNRjnsekHteirTUAz trkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=4wJ0hgv29VqG09Jf9+ImKA98MfaXOPH6kYAKTVbICKo=; b=njmAmd60kWPsPH2z33HcJzmnSngH60d8hCgQ/g7lNkba2FtjAgJ3HiT3TtiRu7HeMN bNEiURvQs57Y9Q2ilqeBC+lgPr6fD6PuHh7fo+HbBcB5YYRCaldF0XemJTnbEK7lcr3j d8Xb73cg2hXAZ6M5X1x+kdxgsGLtXJH+5tPGgeqMA8cGhD1o6rWUPEOnFfQEpKECT6mW ZrelhU07Y9d6riOhJEpeocGnCSWOvnRsXJ1UMGOIPS5KqvfTpOjVSOrAoZ8P+yhG8rAt fwh4A4qJ8NwoQVS2kuVFCUJ8sQXbREDR7np1QZYOlD/77Si47dGxzFMESD/gJcy1HjF5 Mj2Q== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530fqnhRqOnc0SxairXweTh8ar+deGaamBmsP12n8YLDdNZHFxNx 1981H7AG4oYeC48L7pvTEeM= X-Google-Smtp-Source: ABdhPJy9eLe+Si8AjfWhjKggBEUWSbKy5L6PSxRw1QjXvZSl+trFrbaIZhFXWDE6TRA5EZpk9t9SzQ== X-Received: by 2002:ac2:43b0:: with SMTP id t16mr5517676lfl.95.1603721041995; Mon, 26 Oct 2020 07:04:01 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:9bc1:: with SMTP id w1ls1461632ljj.4.gmail; Mon, 26 Oct 2020 07:04:00 -0700 (PDT) X-Received: by 2002:a2e:7e03:: with SMTP id z3mr6198917ljc.270.1603721040787; Mon, 26 Oct 2020 07:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603721040; cv=none; d=google.com; s=arc-20160816; b=f+IRe/wvL0XkXtVBMZSAEZ9X2Mj5UoCqVVJAkJQEaxLUdhBijYwyinVnc1BTLgNh7+ VCOmv+BlMmyBm08fnzJh2HNpMQN5y2v4U+LuPqZ22xs1LrIGeiJuKuHwhhmf4p/PiLn2 wTOuDgeT+mTcsxWAE/3a9CE/a3qk08oY3Ehs55z8MV/zapH9tH5ejEDoIXXmrhaPfnU6 /dimH9y6XaDeNwNegF0hIpHnwYblpb9C229V8OQX/gi8Bph6U7zQkFT6ScHj1mpQyXmh zGPF7Nt6lxaVf6sPvrAi+PL1sH6UOXE7+WTkAz/XRKtuna662gKIkmqXMawHYA+siCuY 55lQ== 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=1+dCEqP4xxgKYjjLjciX3/pgNR93CBpcx4sDq+n8fkM=; b=aH4jdnckMyQJUagKfHPxHEiQJwOGy27/UtNkFQv1UXi6jHi8yKT1+k9CdZpPatlnLC kDumXIzM8VLBA39COH75ZVDwwAFoK5YKQggBoQjBJR4q/Ad9RJqENmAU5TuctMAHdRTb PNDycuUT+Y42V0XdHZZx/oGx9Bv7jDAI5KhnIjdu0mM+rC3MUXbM9kP8e0duDVxxB3YY zIG9RGgFngCwYBUOgtQ0hyyuo3AOnEEjUENJRNLwwiBf9onxYNZWtpxVbxOXr0jNz6mi HBSgcOxomzf8BI5t9d4BXW6gn0q9t/P5c+zSzvABbFk27LtEgEHkBC0TjPBu4WQ/ePQe NqrA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id r22si253467lfe.0.2020.10.26.07.04.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2020 07:04:00 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CKc5D27kYz1qt40; Mon, 26 Oct 2020 15:04:00 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CKc5D1qTMz1qsXC; Mon, 26 Oct 2020 15:04:00 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id JriskBpB5Rnk; Mon, 26 Oct 2020 15:03:59 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 26 Oct 2020 15:03:59 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 1F4A1454071D; Mon, 26 Oct 2020 15:03:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tu7Ze7PI-a5m; Mon, 26 Oct 2020 15:03:51 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id 1F15B45408B9; Mon, 26 Oct 2020 15:03:45 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [Patch V2 5/7] Use swupdate_download_update in curl connections Date: Mon, 26 Oct 2020 15:03:40 +0100 Message-Id: <20201026140342.147578-5-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026140342.147578-1-sbabic@denx.de> References: <20201026140342.147578-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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: , This is called to signal the amount of transferred data. Signed-off-by: Stefano Babic --- corelib/channel_curl.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/corelib/channel_curl.c b/corelib/channel_curl.c index a4e9a98..c95b6b3 100644 --- a/corelib/channel_curl.c +++ b/corelib/channel_curl.c @@ -23,6 +23,7 @@ #include "sslapi.h" #include "channel.h" #include "channel_curl.h" +#include "progress.h" #ifdef CONFIG_JSON #include #endif @@ -379,14 +380,7 @@ static int channel_callback_xferinfo(void *p, curl_off_t dltotal, curl_off_t dln return 0; } *last_percent = percent; - char *info; - if (asprintf(&info, - "{\"percent\": %d, \"msg\":\"Received %" CURL_FORMAT_CURL_OFF_T "B " - "of %" CURL_FORMAT_CURL_OFF_T "B\"}", - (int)percent, dlnow, dltotal) != ENOMEM_ASPRINTF) { - notify(PROGRESS, RECOVERY_NO_ERROR, TRACELEVEL, info); - free(info); - } + swupdate_download_update(percent, dltotal); return 0; } From patchwork Mon Oct 26 14:03:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1387766 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::43c; helo=mail-wr1-x43c.google.com; envelope-from=swupdate+bncbcxploxj6ikrbuvo3p6akgqeohmmr3a@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=fpdUPWOf; dkim-atps=neutral Received: from mail-wr1-x43c.google.com (mail-wr1-x43c.google.com [IPv6:2a00:1450:4864:20::43c]) (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 ozlabs.org (Postfix) with ESMTPS id 4CKc5M281wz9sV0 for ; Tue, 27 Oct 2020 01:04:06 +1100 (AEDT) Received: by mail-wr1-x43c.google.com with SMTP id i6sf8464329wrx.11 for ; Mon, 26 Oct 2020 07:04:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1603721043; cv=pass; d=google.com; s=arc-20160816; b=X+Bxg0cO+0PqmUtz7+sFJ7MiERB7yYrApMhctUyomJxfG3RSYOcLXW+S4c+U9RFAvD kp1+lUl4cyRuEa1HGxyReH2HjDSUaQOk/8NIxkLjQaNBBBn/c4CNG9B8uF8rkAPC+44S iNQVRrvqeD128ZJOdehbrJEiUgDjJP2I9UNZy1nI46VpYL6GDKWBeyq1hb3+4uCYDkId HsAXLHKWokMlkRH/pISTwaL5coTmfJ/rzowMV8RYVkM0pyPCFSXjf572GYAbN9iDC61G 6MPpWLLhQAa/rZ0A2zq7a/7DHac9C9NgD5OythAfStkSh2/CVh12/9ul5boteRdQd/pN OctQ== 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=Rui45a3oGTTrjG/LiIfC7TkvHYmx5FCL9yBjIzfl7/A=; b=ulQYQx4+NsR2hwsaRPE5zgXkoYySEqIZqtwdqYnh/jGwtCKuBQBR9y4yEOLR9WuOxB fW95EVkER3Y2QG5lMD6ylkeqRk/tpHusXQyI2zbwj0gTbjD/Cepx6P7BuCXubf8yHRW2 EZLeBwmSicP9P4i5Atl8SywuJhrMPv5+F+5pprC/rvap3BLhyvXkZ5KpnqOpFTRtFbso tLZU7b2CevwSzvQDCfjeXzJe+W9SWrGxXsXnOJUXx1rDbNaHfh/76xPtRD1aVeRnuT7F OkGtUYhHZ0nDB9+5FLpchHzNn/M+Z2LnFKE3qi5BSVkPeP/RWvogjeWcijdBixkvdhHl hNUA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=Rui45a3oGTTrjG/LiIfC7TkvHYmx5FCL9yBjIzfl7/A=; b=fpdUPWOfPmXME7HExwRr2rwHy/+4C1sa1ko7ozAHcBigvK0AZ+vv9Cy4ey+VIduxpI tqwLTJmw5hbcFQqj96wp3wxL21aegzI86N/68nK55W9twYQ/O/QSK115gSpGDUL95SJh qYv8x12gV7+z3kaXYs5Pyetr3ihvY3rDSYMur1bkNK0fx41UXzHK/b9yPXM6XUuJRo4w sLZ3ENIEH/CsYqJkzyHMe17+wI9tZ3Ten06zRiZkV0mI5sW+CKxiF4h1EaODvsRHxNfa ffPALuvRvJ0qw1hTH8F9g2nnI8adf5cxJbpT+ZnJ9Hj5D97PoaMbdW24Bs5ubU100IY9 lMpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=Rui45a3oGTTrjG/LiIfC7TkvHYmx5FCL9yBjIzfl7/A=; b=T1WSnrpEOYJB/IayvbDEWRQTJwIfzm3wvTC6yzrXSPf414sgvRNkl4wsZm6vLcjEJr fTiZ3IjHSqxCmoek8CXg86W9PJk4H1EJehTzsxqH4qAeVqsEZ0XrZMSAtTAB4/4jD9RI FqIOAXbvedyE7IPfRMxBoa90hxURouk6XOz/UlssdV9R0OiDqj2RONZWCodaWd13wxX9 5QoVGf/hxw6EhQmToicfpD6ah83qWdMAt/6Uwqr58cqCWlh5RjtH72AzpGycCIWpqXYp /b0czrjgEs5gqzeohuw8fqUe88GVwjrMyDCxJUG+EgcZiolQhb5/ebeGYQa4gPv7GjiC 97Hg== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530T0T325MQ6/rId7T45dqXRta/zah51DQOS2W/h0ta8GdXBCEra QfyAue9UBuov5Doln4KpsAM= X-Google-Smtp-Source: ABdhPJx2nNRpkiUxCPqAA5v+aBVdw7CuSdVMxA7HXI+pau1+cqgffKXPanAYDZhk+5jk57rqMeZYcg== X-Received: by 2002:a05:6000:1005:: with SMTP id a5mr18923482wrx.360.1603721043331; Mon, 26 Oct 2020 07:04:03 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a5d:4ac3:: with SMTP id y3ls908784wrs.2.gmail; Mon, 26 Oct 2020 07:04:02 -0700 (PDT) X-Received: by 2002:a5d:69ce:: with SMTP id s14mr19356795wrw.39.1603721042296; Mon, 26 Oct 2020 07:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603721042; cv=none; d=google.com; s=arc-20160816; b=BRKkGzuukVRAD9jkuJRx4OIolL20sfQyTNyHXv/xR1wcFnZeiYWQzwTWag5zyZdZfm eUEtu/mXBRT3u6SJ1P4dRIHo4IkJfJPUKpwzU9pNtP0kTseGPTf4gInNCd6OZhGnvSRI xNM97cSq4RieHPGnabIjYxemyBavDvrSr5OgAZ2+/3PD5m/L7IHpJabTGQIjKdsT4zyT qdp4bjeDMlRDjvpdnhDbl2MZReYJQ+yAwKZrvXpDKk9IVTrmlWBujpFxPitzKk1evrIh k0iVO8OunjEVJ7bCVHV0KqRzec4C2MDAJ44hyW2vaairlCPwOCdIfca4wJRDO00Fhddb VIqA== 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=YRwIFhqYyq3iNaAy/DecKeWMtt4uYLeiBSAGIfxCbXo=; b=WiVUTC/SP8aX4w7ckXi3I2d9U9CBUBtMRWPZ6RDOdQgNalXZVWFpkZxsBkXW1xV18V UWAEsL3GHgoMc1pfpcBGXLPXr00ACNdCuDE9D92XdH9zweKSwZlpMN35SovxVLDt0IIF xRAuWD7DrseBq8g7PaaKuL5OkxbZQEu4AC203EstKw16f/w5UMtlQvuS/k6XumZGKgHb qeezdgUuGAEoYeiJJr19EnKT6EOJpVNNQmxkRo6yX7kL81PFTQl0pTFHqrZzOtHCIuzs mvstgVwbneaK9RVOnFWMiwFtGT4zlwM+bny3D8JkxkB71rExeKDrBOJ1Q8Rfs6x+AMVz 8zJA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id o16si312412wrv.1.2020.10.26.07.04.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2020 07:04:02 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CKc5G04XNz1rx8f; Mon, 26 Oct 2020 15:04:02 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CKc5F6qylz1qsXC; Mon, 26 Oct 2020 15:04:01 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id J9gtSYCxqwCk; Mon, 26 Oct 2020 15:04:00 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 26 Oct 2020 15:04:00 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 295A34540607; Mon, 26 Oct 2020 15:04:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id YmzxROQIqy7t; Mon, 26 Oct 2020 15:03:57 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id 5291E45408BC; Mon, 26 Oct 2020 15:03:45 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [Patch V2 6/7] hakbit: missing initialization of msg in postupdate Date: Mon, 26 Oct 2020 15:03:41 +0100 Message-Id: <20201026140342.147578-6-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026140342.147578-1-sbabic@denx.de> References: <20201026140342.147578-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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: , The postupdate command checks if there is an info message and sent it to the progress interface (with a "DONE" status). The missing initialisation causes garbage on the client because a valid info message (length > 0) is detected. Signed-off-by: Stefano Babic --- suricatta/server_hawkbit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index dbe18a0..42e8569 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -1415,6 +1415,7 @@ cleanup: if (result == SERVER_OK) { INFO("Update successful, executing post-update actions."); ipc_message msg; + memset(&msg, 0, sizeof(msg)); if (ipc_postupdate(&msg) != 0) { result = SERVER_EERR; } else { From patchwork Mon Oct 26 14:03:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1387768 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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+bncbcxploxj6ikrbu5o3p6akgqetnpd6ia@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=sSi4cAzw; dkim-atps=neutral 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CKc5N0lSKz9sVW for ; Tue, 27 Oct 2020 01:04:08 +1100 (AEDT) Received: by mail-lj1-x23b.google.com with SMTP id v25sf5063865ljh.4 for ; Mon, 26 Oct 2020 07:04:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1603721044; cv=pass; d=google.com; s=arc-20160816; b=ALUkuEwFOyh/jnb9RQG1GbR58E0oHAuwXPy1Ez71m+Z1vPIA4eF1DBENFvHmsxHi92 dcYfFEYNHLyPAoXesT+BMhDuutl/5/VfysDCufAUoEC7zAgc4FQ73DX8r2lGXw3tGNsI RSqsXHqQ3NoR4xglBcC8jAb+2XiLZeY8VD/W3V0Lt/L5mp+aHuwxxwXBRkBjdttN+iJG 3pM83iEuXy/Ruk7AJd97hDF6ItAvS/NOKhUrNf7gbJ7qzTnVF7YpLbgJjO92STNBc3uZ NK87+ajDNwP4/DwnjGdyo6Q0Ym7au2sy8NcGgkRBtIM+em/JCDqFht0K/TDk3MdJ50XK mVYQ== 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=HcfCqa9WhgRDJl/WJYsL7LiexrEIIEGNaRAreQ8lYBw=; b=tRNLsVVZa9eMZNnjMSazfaRzQbEHeT+xj9O9OBAlf7HI/uWxZhxrRQj8vv/LfKqpKn ePn2sIzW642rqQwNSvWpRuf5UfSUdP0eEFVo7kFyKhBAXur5yQCgmh5U7VYP0IZq6SV+ tRajAXqBSKwYwoAKghu/6tSro7Q0ugD1p0Ip6PRjAUoowRNryFxc3G0lqJk/Mv68Lohu ANs1xhHO0k+eJMfl8JGaXEcDJYw1nwirJhZHrK0eLqvUmQzR8KxxIJiVEaSxkH9h1whM XtpDYP+NWIaaS77K1l+cE9awUoeTJShspVHYjNpC2GvB4uFVKU+n38Tjq8xmVFfi3sLb 6L8w== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=HcfCqa9WhgRDJl/WJYsL7LiexrEIIEGNaRAreQ8lYBw=; b=sSi4cAzwXV5Wciyi7a6srfCjy1faTmOsKWM1TGgzaCf2ueoSNPesFYYrSPDHaYkYf2 /22mWSIVSG0YD438VC7EQ0687EExJORxdPGeqMDp6GAWWhKnfdasa9ugfCCaYBcIH1g7 gFzpW2nsSyqHteyuA+y8oLMSx6Wp62W5wjoh4kzPzsU6mwMKB/JDDIzov8Q8xJ/QeBp7 g91tbKuOXSkiEevNMsZ7ZOGS9Bg0AqWsFpsPNpkXCPaTwAxHyJeNKzwLJhwx7VReQzm4 9ayrWA0D1wAWFIcfypDSDrKiHd/SyikKl9y5KYiRVW61w31oIo7faeTmRg8WicQrsfdD T6Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=HcfCqa9WhgRDJl/WJYsL7LiexrEIIEGNaRAreQ8lYBw=; b=niRYj+GzWfcSgMVt4lZSIfmt5Wdbr42fLtUD14TA2ERlX9vX6dVuYZ8dqk20rnzbd9 EcPTVDYews1ukvIjZ+gGPI2abCUG/DLlumRfi0mU/ut7QIBCegc3WS3rCfMbic5R4KAe LIiU/YxLotrIc8V/7xeXuC4P/pAiYFTNOuB8g7sg4+AlHBkAJXKuWYivABxIgC0Pg0YI QICUGoVPUnPrGcYn6r+9cajus3N6LtiPeRh8NpSomIwHDErJAK3oMTI++xa5S7TXOg1F f6iIq5OG3iy2It8QucWB+oAtqluwMWAVikKSy5KC/5joEeR2AuM/cIvorHX429MJviPD idBA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532Rvw/wTbCHVsRJrGSBGnlSejo+7tva8QahPyG4+E9tvt11ZEzP qWvQnq4MupUqm9Ho05SSTPI= X-Google-Smtp-Source: ABdhPJxJWV4XbZjnvq+N0c9K47baDv7ttnRbL9tCkr6Mtp62PKpOH20yUzmeMb8NnnNqCnDrPJ6W5A== X-Received: by 2002:a19:2d15:: with SMTP id k21mr5625077lfj.276.1603721044338; Mon, 26 Oct 2020 07:04:04 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:9bc1:: with SMTP id w1ls1461694ljj.4.gmail; Mon, 26 Oct 2020 07:04:03 -0700 (PDT) X-Received: by 2002:a2e:8709:: with SMTP id m9mr5587158lji.290.1603721043059; Mon, 26 Oct 2020 07:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603721043; cv=none; d=google.com; s=arc-20160816; b=DKdiI8jV2Hpg8WtwOY9DD0lFzu88rB2EmPoWpCO8hC1YVAxi4wArwPCN6Y8w4x+TNR OaPRs49R1AekjPb4vorfvXPSvfhhw86g7ECUgUZMgw0jNSh80X45DsoRaOOWd7GfdMfh mJVZP+q2JUQ8Kmycqkqzt3n+f6tljL9kto8wiE+97ePwqKsuusRt4mEhg6wYBUZNuoB+ ojwUp5+x39PKW/+YRzXINbg6PKlF8Gtj2lMlWRyKHVHeN5s7R1uSygG3z+oXY8hgXGIw dhdwh4WUt7S/dqrq4jE3zDjt8omiW+M+srfnwR4zqmAwlkc3knQO7L6YMPpNQC0PDEmX edlA== 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=14qfKerGoDmGN4lbkUyV9/kqB3zOcHZ748MU3Mw9hws=; b=up6l15KzmZZUEYC5fZVmf3WtE7UiD41/jvmSrKn8qaB8rVLzKtLR92bCAfxKjGoDOm TmnUz1H5S7pFd4J7R5WYjtwMDfW9gAJPAVoP5RoqSgJw4SbBdqc5KfSKdZDI9kCfkC27 6UNB2RToSyqJG7tnT/oJ/eoimTOCSL2/URHNrrv35+28aBql4QajPPUaqCVjszNNTrS1 IOB65XLhvKo5QmrFrx9Y798ZFxSVSbcdCYBUkIFB4MERU+4JNlOZmbUIfZYIr1clm/T4 /gx3XlmbPb2OLNWgT09FSH0t0qt0CvChbKBNxkCUaGl3SZjVOF0auUSYiethgHRrNPdQ NPwg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id o4si361711lfn.12.2020.10.26.07.04.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2020 07:04:03 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CKc5G4HlFz1qt49; Mon, 26 Oct 2020 15:04:02 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CKc5G3wQvz1qsXC; Mon, 26 Oct 2020 15:04:02 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id BL4M4ZndaxcN; Mon, 26 Oct 2020 15:04:01 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 26 Oct 2020 15:04:01 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 46C60454071D; Mon, 26 Oct 2020 15:04:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WiJz-cc7JwZa; Mon, 26 Oct 2020 15:03:58 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id B343A45408C1; Mon, 26 Oct 2020 15:03:45 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [Patch V2 7/7] Reset progress values after Update is completed Date: Mon, 26 Oct 2020 15:03:42 +0100 Message-Id: <20201026140342.147578-7-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201026140342.147578-1-sbabic@denx.de> References: <20201026140342.147578-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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: Stefano Babic --- core/progress_thread.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/progress_thread.c b/core/progress_thread.c index 399a4fa..a216eaa 100644 --- a/core/progress_thread.c +++ b/core/progress_thread.c @@ -204,6 +204,10 @@ void swupdate_progress_done(const char *info) pprog->msg.status = DONE; send_progress_msg(); pprog->msg.infolen = 0; + pprog->msg.nsteps = 0; + pprog->msg.cur_step = 0; + pprog->msg.cur_percent = 0; + pprog->msg.dwl_percent = 0; pthread_mutex_unlock(&pprog->lock); }