Message ID | 20211122031619.2202449-2-dominique.martinet@atmark-techno.com |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <swupdate+bncBCWIVBV7SUGRBCMX5SGAMGQEASDDLQY@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=fLOPE1uX; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::73b; helo=mail-qk1-x73b.google.com; envelope-from=swupdate+bncbcwivbv7sugrbcmx5sgamgqeasddlqy@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-qk1-x73b.google.com (mail-qk1-x73b.google.com [IPv6:2607:f8b0:4864:20::73b]) (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 4HyC984b4Dz9t0G for <incoming@patchwork.ozlabs.org>; Mon, 22 Nov 2021 14:16:28 +1100 (AEDT) Received: by mail-qk1-x73b.google.com with SMTP id h8-20020a05620a284800b0045ec745583csf13814061qkp.6 for <incoming@patchwork.ozlabs.org>; Sun, 21 Nov 2021 19:16:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1637550986; cv=pass; d=google.com; s=arc-20160816; b=qBbWui5Nli7GgthGr43D9ifKvkUQOaLuEPp3Rhw8LpxLoD7RYBgQxmGpnp6AtsABFH 8VJtaj4Pjz0EucWIyqHewyCcG6PVrEwWQITCHo1JB23/FqlrJSYVcSx8uEq6FEFloR1f RkFc+UTKN0Pwi2cNOEw0J/Aqptif3UvgEoCtz0AXvoNU2gU4dYcnpPWM4VUJHMblw80Y 5YAcdqJ01Uy7XeOZu93iXfiBrQu1cfrwnJqYF3PCvKWlTonoWPoNkIubcDSga/AQAevT rAgq2eOM58/8S0KHN5tNzw/Sk/9vRnBOFof4kiRSBhrx9b8zzgpKXI7FltdxaqIhDjZ4 md/w== 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=0FEUKYkymnTFZzY9OfeLg+jKW4AbnP2TnUEu2OaCaoc=; b=qYpObzZ3MWFJ9qpbedb1OXPA+CeRkPwIYEfk+vkxUT5dRWu12wXR2OpANnAiA8/p46 G0UN2wJFiq8Yk2rsc4tDPoZM7IYWmLrDHW3uTqqdVxFAjhkzprHkIS2jrLjM0ofZYL+d IKH99jzKjR58eLnhUumXJgiQ3RSyebXYvXRfziJS0jceCR3RuL/aGB/G+/ZcTJW5lcJc THBKBrKh24AmqbhtAn7fjRQy+PJKFf781o2ZMcDq7UVMvZEgQGsgzDxdIjuc1fDr2IPO NLZ5QfOG3VtvikCNsxZ3JGzp3/7aX9yr6EDHyI1KOkpLoZo3JWmfbsQayiNul/d3wc0d CZkw== 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=0FEUKYkymnTFZzY9OfeLg+jKW4AbnP2TnUEu2OaCaoc=; b=fLOPE1uXZNE3UaYUgLvg0AaMkoJc2UuU0XRa/Ro7LUtzAerWCEYYgDjRtguHyLpp1I MqLwM9kTKtyzZMrSvWdlCG3mve/ikznA4Bj7M/dRDIsZHBSnav6HS3rtfpqES/x/YzPM zJFy4i/M7YNFAK5sD/jhuVNvG+p7KhQlNONH//bETRnuWfZCTOIIVLnl6J6oipIYZPon fN7/CRuW93zJfIIoa5Xe4bbYyskO/dztfaO5RuKo+6xo/CX1bYftyVQryoimD6naJH8+ twdGPErhfbvh+jMzItfCcXGfETz0HnVv8rYtgfw/KL2dCSBlobEgNutG9cjX5ZSlT4U+ 5YNQ== 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=0FEUKYkymnTFZzY9OfeLg+jKW4AbnP2TnUEu2OaCaoc=; b=pzKMmQu+0CK8qetFEKd34NkH7T2FXtnhuVlrFqZyVtF3yI5fcXSef5sAViENLpaKrG GlK8rALuvv8iyzWah8Lkn8YbKKZdb9wdkwJxkUq45W4UFcib01192Xcfhwga0Ovw7a+7 ZzztWX/thyspyNYVLOrl7CVbROVinsoUOVUIJ7y8WSuVKwSPG42nvuq8vMZX9hlkNut7 A+LCvamsd3U5sf3dGeJZJfPbXU1ItV9WnMzQERg5MZ5dkiwt8SUlY3hxWN5mkpHFTdzB z7ov1+XT9ek4THfu/cufW4+IYhEBg5rqJe82x0tHwp2uXcXN6JHcT8qTZ+RXjcFG9RyU yV1A== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530aiVhOgMNgknwiuj7bJlyCOmealhj4Qsw4kbkRH47I2i8fVfgN yTsvCgXNrO86hrsQkqxGfxo= X-Google-Smtp-Source: ABdhPJw8qpC3RaRLR/SpgAlXeYWWJwgHs0JKdtV3Pri9QMs5gbr3GoGPVMAruDYuDZgAwvQnB7SHiA== X-Received: by 2002:a05:620a:454d:: with SMTP id u13mr45311654qkp.221.1637550985845; Sun, 21 Nov 2021 19:16:25 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:620a:bca:: with SMTP id s10ls3379128qki.1.gmail; Sun, 21 Nov 2021 19:16:25 -0800 (PST) X-Received: by 2002:a05:620a:1a9d:: with SMTP id bl29mr25618394qkb.55.1637550985525; Sun, 21 Nov 2021 19:16:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637550985; cv=none; d=google.com; s=arc-20160816; b=RjzOjeYifg4EXfuDXcYPailQv/IUSreVIjkAlOZxKKrxO+nO574G2z7tZbp8zqok0G dhpq91fcNqgiYku1prDcRzAbj1DBwDpD9zRqKWHkcx18Ba2BgPvu7rHOO7N2/8bUboUD 74bJ9JyOEq4+fc7YVGcizK8Z+yhUo3C1WQgkdKdmRYtRZuvilfJveLb5KbX5eRx8H729 pTKyfQx0dAosKI5ChN6G8iiui118R55Gu4wwPYR7Tq6KPZlNJVREec3mVd0F7CJ/vfx6 Io2oRI5UGJZv8UgQ3foucsoLYWPkJFC+XtB5HEDFqJZN3fHPXJUU2shPcvJk9J2m92HK z/Xw== 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=MYhcqAlpHigmPPGAq4e29JtAshG2Q1p/J8MCW0JZt/I=; b=owMzcZ+OShBwL2Clc3yZULfuCsLu5XT6qFn2MfhBd069t+GW0gyEN60qCeMIYhokld 4DesgZplCgetcGN/3jbD+NBohwlI4h8mBtYEivZ05/sbmPuNvJt6DtUFv+c8PfAhojCI 51Opz1Helfu3Azxu0xjgow4rRJGfvYQMMvmAFu6tCi+G/IPTJSBie1xdefSHo3LL2/o2 +zRvxuTIKTpgswfePDpDrOnTDsafsrk/9MbV9bbMdGoScoONbJfqyCkwRfz/LuiqD98q OYPuVJVSLglYhunVG8SsMJWRz2Wp0EZhgKcRB1yrorNUWHL/5G+12ShrWWROsh+qo+KD WK4Q== 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 w22si773011qkp.2.2021.11.21.19.16.25 for <swupdate@googlegroups.com>; Sun, 21 Nov 2021 19:16:25 -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 012F020D65 for <swupdate@googlegroups.com>; Mon, 22 Nov 2021 12:16:24 +0900 (JST) Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by gw2.atmark-techno.com (Postfix) with ESMTPS id D30C720D65 for <swupdate@googlegroups.com>; Mon, 22 Nov 2021 12:16:23 +0900 (JST) Received: by mail-pj1-f72.google.com with SMTP id lj10-20020a17090b344a00b001a653d07ad8so11196629pjb.3 for <swupdate@googlegroups.com>; Sun, 21 Nov 2021 19:16:23 -0800 (PST) X-Received: by 2002:a05:6a00:24cd:b0:49f:bf3f:c42c with SMTP id d13-20020a056a0024cd00b0049fbf3fc42cmr41105139pfv.54.1637550982938; Sun, 21 Nov 2021 19:16:22 -0800 (PST) X-Received: by 2002:a05:6a00:24cd:b0:49f:bf3f:c42c with SMTP id d13-20020a056a0024cd00b0049fbf3fc42cmr41105120pfv.54.1637550982722; Sun, 21 Nov 2021 19:16:22 -0800 (PST) Received: from pc-0115 (178.101.200.35.bc.googleusercontent.com. [35.200.101.178]) by smtp.gmail.com with ESMTPSA id e13sm4720510pgi.90.2021.11.21.19.16.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Nov 2021 19:16:22 -0800 (PST) Received: from martinet by pc-0115 with local (Exim 4.94.2) (envelope-from <martinet@pc-0115>) id 1mozob-009EyS-GI; Mon, 22 Nov 2021 12:16:21 +0900 From: Dominique Martinet <dominique.martinet@atmark-techno.com> To: swupdate@googlegroups.com Cc: Dominique Martinet <dominique.martinet@atmark-techno.com> Subject: [swupdate] [PATCH 2/4] ipc_notify_connect: fix return 0 when message was not acked Date: Mon, 22 Nov 2021 12:16:17 +0900 Message-Id: <20211122031619.2202449-2-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211122031619.2202449-1-dominique.martinet@atmark-techno.com> References: <20211122031619.2202449-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 |
[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> --- This is an unrelated fix as I was looking at the code, purely code-inspection level. ipc/network_ipc.c | 2 ++ 1 file changed, 2 insertions(+)