Message ID | 20211209010659.724523-2-dominique.martinet@atmark-techno.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCWIVBV7SUGRBPNNYWGQMGQEJ22ARBI@googlegroups.com> 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=j6o+93fm; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::738; helo=mail-qk1-x738.google.com; envelope-from=swupdate+bncbcwivbv7sugrbpnnywgqmgqej22arbi@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-qk1-x738.google.com (mail-qk1-x738.google.com [IPv6:2607:f8b0:4864:20::738]) (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 4J8bV84Lsbz9t4b for <incoming@patchwork.ozlabs.org>; Thu, 9 Dec 2021 12:07:12 +1100 (AEDT) Received: by mail-qk1-x738.google.com with SMTP id x5-20020a05620a0b4500b004679442640asf5201278qkg.20 for <incoming@patchwork.ozlabs.org>; Wed, 08 Dec 2021 17:07:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639012029; cv=pass; d=google.com; s=arc-20160816; b=tck7FmWUK9QnCgw7ZXiz7L84+O/fwWwRHfZDq+Cysl9y0y0QvGTE9EDXoIS0nCI4Vk qpkFmf2Xe7SBLiA0MZRNnbXXxuhpqeLeZe38rhaTIJg3EryIcbBuLH7Vmd/2tmC1yLDZ 790d24SpPKvWHT2OaK+uVlG40eTx22Gjvu5gO6DZHj+cbcNe6fNV2Lt7inhKinvn94pX 0EfM8xpJ3nBaQ2phTjgHGUJvjI9BO6jCjCsvI1/by3UCJfX56bBqVnUNVNt2VJUqSBM0 +gXgKqTATPM3sFQi/vxvPYIvyoFVcZNpDcMyXSW7KVFmQQl+y+IAL3plGTcnmgXS6dd4 3qrA== 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=FuwrLaWQ92IPA8L0u+sYtWHJocOsAUybmts44edDsLI=; b=h5Zn4iQmPDlmAgciE1DekqiURm/BlM99GI7cdv9knMSduu8CW+OxeHMNCy4ofraRxe iOF/7PhKG/sj8PHcj4Y8/u20EkTuc2BUiw+99P55Q3ye58hTRgaWQYzGfTHCberuxx+O GBp+Ncid+K1ofAGp5mKt44J/dXspG9d1kTj513vTI3PjnWukYhKCfMrOQkOyMMVCNyTv kDo5lNxsQ4rQfeBCgvvBtaDCfUz/nQQ5/Ot2yXsgs69jGWlvKm3zHNXISfvC9z2PR6fB AsJWh+21M3uIsOJLwg1v60zsxjO/iX3c1c0PWcbPvZEir1G87KB2Tk2BUvYKyh0L1/9x /Cmg== 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=FuwrLaWQ92IPA8L0u+sYtWHJocOsAUybmts44edDsLI=; b=j6o+93fmPVCxI+il90CGvYVOmdR8TfjF9d/XgidkQwS2DlCMx63vaAAoLjhc3IVuup ZLxwgM3HDBQBsg9xMQ9HKE8XvQLC63j9GR37ZBsbSkbIpcEapnWXKyXfyJ2oL97BjqY2 nJ80AE9Qzi8BRJAqupxILfpDHwKkOIvBtJe2Devn9iQ8yFtyqraeCW75cfLuHQf7Y9FP lQa3pDP9gOYuD/MMHYFJ2guEktMhFDF0/i+e6uTNXPdBhJy6ENecG3fHqcvbBDuwuhRn 5awt9jSsCV0YZXUpC1VtRlswhq0t09yL8kBrFl8y8UuoCnhcOFVdI2ywSIsf240zM7pg zHEg== 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=FuwrLaWQ92IPA8L0u+sYtWHJocOsAUybmts44edDsLI=; b=4kE2RvbM3D/JOdzA1Z9tazgdWJdRO/kCFg7m5RiNfqiZlZEtDRMB6q0UDq6u0+0PBA AksGSAdZ1SBv4zLznoNP8tt3on+CEvioJ7buNCROz8+o4ILHmkNJcZuonWfjKf+EqTsb 1ktsXPa8c9pubvDMBQfgYLTIXUwlvx8vjRYcXqatZrzT+ZjFtl+x6LLvShaX0Gl4bbAZ seDqHDAYx29p1zdnB9g1DhCPSke8PCBiz+y/PbyHsTsErDtEdqdYTtpYiujj5nsKQkrO sz0e1HuddzyXhNce63LptuUzOYCvHfP6GXf1FOPOoZtsYYhhbUrWwld0NOm2xJ5Y/X3f CnWQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM5322BntcSFQEP0c4odNLkiCCrYzZ5S++1rYZq9B6EUCgsB/c5+nD QL4+ALGxl4gxbyGbE+9Lgho= X-Google-Smtp-Source: ABdhPJwDvpULPytS7EN7DI3CjvHlKWjMBRHHSi/5Y2ZW2NB4RZh9VXQwdQjmueLEUuB+TR3mIwXq8A== X-Received: by 2002:a05:620a:1468:: with SMTP id j8mr10558791qkl.170.1639012029540; Wed, 08 Dec 2021 17:07:09 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6214:1a10:: with SMTP id fh16ls2161228qvb.0.gmail; Wed, 08 Dec 2021 17:07:09 -0800 (PST) X-Received: by 2002:a05:6214:1231:: with SMTP id p17mr12486188qvv.106.1639012028959; Wed, 08 Dec 2021 17:07:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639012028; cv=none; d=google.com; s=arc-20160816; b=GJyW29eXsLHUapoVimJC9Q3MMCrVDLRIxvREmwpDWLQ8/e0ea+7/INSwhKD4j0tky1 Ad9DGsj65hqUCduFORYpjenCigzaC46vpHNfOORqjWlVh+eG+3sPasMVihJ1wwdKKtnx K6puRhNLMHd6XK6Bq85yR7WbmbfxRF7ihvuJ54IDaHMR9TTEFTNQ6TVPVQGeeWjrU9Ia zcjzwIA/meZm7ayh+cINAtv5IjNQpmQ+5QbKbH4yBTjVdtfIQrs7+p+xLOmG9A+Itu+c 4PZOiC/TalJlcvO3/vH7wF4g4OmOsLPb0xP4tsze4Ju8G1i50uqx6gYc7qNf5ZEJtDfn DadQ== 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=8KGB/1QKAhEzRuhwDL4lbEdRO6pie8LSO5bM+MR9rMg=; b=erlkUAQaxQyOUU5gHOlhN7JvZa/HDJEW9jiLATHkibIvRk2LWpisNb96JDfAjRsv+G nwkzyl7+BjFty55Zri/9DAjj+6D29n6Ebho5ulmfhbpOWImXGl3bNIe0mVwz/45EUu2n WlpqCmOT/kXM5NnhQWLqQQkqt7e2nM6UOhGeURJoikQlwh0H7lcI2gvfnfrrTww+koOW 2vncoE8NQunK3P2cwahyw4MEvop+kbH6Lvpw42DiVBpGtEQ43XDUtbcA23u4I6kKage9 fC4IBno6hc+BjI25APb/+lZXqWcfx2kG3AEpNd5REjF7V6KKgbeubdd9KkC19GbE2MAU 2+lA== 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 s4si997578qtc.4.2021.12.08.17.07.08 for <swupdate@googlegroups.com>; Wed, 08 Dec 2021 17:07:08 -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 2855120D3C for <swupdate@googlegroups.com>; Thu, 9 Dec 2021 10:07:07 +0900 (JST) Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by gw2.atmark-techno.com (Postfix) with ESMTPS id BB34320D3C for <swupdate@googlegroups.com>; Thu, 9 Dec 2021 10:07:06 +0900 (JST) Received: by mail-pf1-f198.google.com with SMTP id w2-20020a627b02000000b0049fa951281fso2566309pfc.9 for <swupdate@googlegroups.com>; Wed, 08 Dec 2021 17:07:06 -0800 (PST) X-Received: by 2002:a17:90b:3144:: with SMTP id ip4mr11731439pjb.153.1639012025825; Wed, 08 Dec 2021 17:07:05 -0800 (PST) X-Received: by 2002:a17:90b:3144:: with SMTP id ip4mr11731420pjb.153.1639012025633; Wed, 08 Dec 2021 17:07:05 -0800 (PST) Received: from pc-0115 (35.112.198.104.bc.googleusercontent.com. [104.198.112.35]) by smtp.gmail.com with ESMTPSA id l186sm3406510pga.24.2021.12.08.17.07.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Dec 2021 17:07:05 -0800 (PST) Received: from martinet by pc-0115 with local (Exim 4.95) (envelope-from <martinet@pc-0115>) id 1mv7tn-0032Ui-Vw; Thu, 09 Dec 2021 10:07:03 +0900 From: Dominique Martinet <dominique.martinet@atmark-techno.com> To: swupdate@googlegroups.com Cc: Dominique Martinet <dominique.martinet@atmark-techno.com> Subject: [swupdate] [PATCH v2 2/4] ipc_notify_connect: fix return 0 when message was not acked Date: Thu, 9 Dec 2021 10:06:57 +0900 Message-Id: <20211209010659.724523-2-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211209010659.724523-1-dominique.martinet@atmark-techno.com> References: <20211209010659.724523-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 Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
[v2,1/4] ipc_notify_receive: add timeout_ms argument
|
expand
|
diff --git a/ipc/network_ipc.c b/ipc/network_ipc.c index 39ca695ec75f..886af0ac2916 100644 --- a/ipc/network_ipc.c +++ b/ipc/network_ipc.c @@ -202,6 +202,8 @@ int ipc_notify_connect(void) if (ret || msg.type != ACK) { fprintf(stdout, "Notify connection handshake failed..\n"); close(connfd); + if (ret >= 0) + ret = -EIO; return ret; }
It's possible to return 'ret' if ret == 0 and msg.type != ACK, but that is an error as ret >= 0 values could be a valid connfd (note ret > 0 is not possible in the current code, but it doesn't hurt to check >= 0 instead of == 0) Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> --- v2: trivial rebase on master ipc/network_ipc.c | 2 ++ 1 file changed, 2 insertions(+)