From patchwork Thu May 17 15:18:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Satou Kazuyoshi X-Patchwork-Id: 915490 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:400c:c05::237; helo=mail-vk0-x237.google.com; envelope-from=swupdate+bncbcopxhxyzqerbtf263lqkgqesilsuwq@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="lmbPCV6p"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ufK4nlpj"; dkim-atps=neutral Received: from mail-vk0-x237.google.com (mail-vk0-x237.google.com [IPv6:2607:f8b0:400c:c05::237]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40mw1W3fxhz9s3x for ; Fri, 18 May 2018 01:18:38 +1000 (AEST) Received: by mail-vk0-x237.google.com with SMTP id h62-v6sf4054123vke.1 for ; Thu, 17 May 2018 08:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:precedence:mailing-list:list-id:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=j7Gf2vVc+zlDB7pS5G87dIMe65V6mT1g9VsMbr8L0FI=; b=lmbPCV6p53CQPFHuB0/xSUYYF5gLK5xw7Cy6IWK342sfSq5fF5qOtFZ35TzANR6rgl XYJ3+wl1BmGMAGzG3Ncu258SkBRCCc8a/hbJ7QAke1M/uKKPlytLHybvHfEQaCLJ3EtV 6m5OgPsbpdESZ4wvwFhHTw1cotrv4F8OsRVDL9L9WkC5qguPGwUcs5aEA88p8A103vy1 kO6IagRUre34ak2dhWP/gqsJRTaf+FsDUEQ/Al2ls563pJvGKHU7M7uGK1PiCYHwfwpi ppcMLS2e2By3FIL7f5pb7/hlgvT18PtChkGCrMPdJ9XfzRtzFbMuGk8XkOWipzWgW1/O MauA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:subject:mime-version:x-original-sender :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=j7Gf2vVc+zlDB7pS5G87dIMe65V6mT1g9VsMbr8L0FI=; b=ufK4nlpjlLSaKZDVQavRvmfmu1OGyLi5UThyM8gmLVvvU9lccFXpM1K/85aeVs9YdA 0vcq9XRBxC3XRG/J9AnjiJeLLmqURrQomzbLeu7po/MljRy3FPyDMcIMg1XKtXbUh18F WQltSK/OAwtKq4SKof16MO9yAiTtDp6jedCwqwQ8hJbOsx8o+/MlI383ciDhDwcympuV Osnd9jDNwjWuyDK5bLg6E/SFFgecw23TbK2W1M+yHrSwMmLK9N+2NS87cip5fBMhrZqQ mrtD13zI+MPZKLbzYQc06ZdXtHmmsAJN7uCEdRnihtt/wp0pae42b+4XssUvz9YG5Thj Mp/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=j7Gf2vVc+zlDB7pS5G87dIMe65V6mT1g9VsMbr8L0FI=; b=WsGh58wUmNtma+3F5dx8zljTPuQl6RyZfh9gOYLcAojSxyLr17aTCjk/uUTCto77Y3 ALJG72H/a70ndHG8BQnKhUin8P9I50h0tgwGkMyJf9hoSuS8k30dNOz7qsG80sPP4zhP 4ps93/8zIrPhwwh1UztQhTWHtP6gPu3nuHis608CoQzPZV1/v5qvZTNi07BAyuAHDFfQ iwdnNeq8Qzqe9L/Km5scirPOnC2bB7IiEheSRFGAz00XjAHSlyQEftORUYym4DObL6cs v7S+52W9fymns9yvJyWCe1JvlGJJIJJJVXBkG1zV380gHln/KyFRaR5cDrBNTd/rsCGo jrnw== Sender: swupdate@googlegroups.com X-Gm-Message-State: ALKqPwc8kJ1kP9MJ0eaM1hooP2XU5KqJIgiV9x3rWH76gG2o6AnCrCQS PE5rVNYoZf5n35CoF/pgs/E= X-Google-Smtp-Source: AB8JxZr5BZf61XF/ZTWKtn8wFwhus4ELvFsD5H387WhjFrEwmag9VcJEyXdWSYukfXixxHUgrxTbEA== X-Received: by 2002:a1f:9686:: with SMTP id y128-v6mr735777vkd.7.1526570316687; Thu, 17 May 2018 08:18:36 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a1f:aa46:: with SMTP id t67-v6ls3296717vke.11.gmail; Thu, 17 May 2018 08:18:36 -0700 (PDT) X-Received: by 2002:a1f:9686:: with SMTP id y128-v6mr735767vkd.7.1526570316066; Thu, 17 May 2018 08:18:36 -0700 (PDT) Date: Thu, 17 May 2018 08:18:35 -0700 (PDT) From: Satou Kazuyoshi To: swupdate Message-Id: Subject: [swupdate] Issue: swupdate cannot update application in 2nd round MIME-Version: 1.0 X-Original-Sender: satou.kazuyoshi.2212@gmail.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: , I couldn't send the patch file by 'git send-email', so that I create new topic for this. I caught the problem as below: In the 1st round, Hawkbit server inform to swupdate target about the newer version application (ex: version 1.0.1). Swupdate download and install successfully the newer version. But, in the 2nd round, Hawkbit server inform to swupdate target about the newest version application (ex: version 1.0.2). Swupdate download and recognize that update process is unnecessary and do nothing. With my little knowledge about swupdate, I created a patch file and attached in this topic. Please take a look to confirm it. Thanks and best regards Nguyen Duc Hoa From a8d96eb446e6858e7d35c40043c0ad8d09aa40ba Mon Sep 17 00:00:00 2001 From: hoand Date: Thu, 17 May 2018 10:41:10 +0900 Subject: [PATCH 1/2] fix issue swupdate cannot update application in 2nd round Change from: refs/tags/2018.03 Signed-off-by: hoand --- suricatta/server_hawkbit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index 2b06ee5..ef70e4a 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -778,7 +778,7 @@ server_op_res_t server_has_pending_action(int *action_id) INFO("Please restart SWUpdate to report the test results " "upstream."); check_action_changed(*action_id, update_action); - result = SERVER_NO_UPDATE_AVAILABLE; + reset_state((char *)STATE_KEY); } return result; -- 2.16.2.windows.1