From patchwork Tue Oct 8 12:48:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "fhoerni.opensource" X-Patchwork-Id: 1994236 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=TCIa469s; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::103d; helo=mail-pj1-x103d.google.com; envelope-from=swupdate+bncbclmhafq4qcrbd6uss4amgqe3zcgcly@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-pj1-x103d.google.com (mail-pj1-x103d.google.com [IPv6:2607:f8b0:4864:20::103d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XNG5v1snsz1xvB for ; Tue, 8 Oct 2024 23:48:19 +1100 (AEDT) Received: by mail-pj1-x103d.google.com with SMTP id 98e67ed59e1d1-2e148d4550bsf5453794a91.1 for ; Tue, 08 Oct 2024 05:48:19 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1728391696; cv=pass; d=google.com; s=arc-20240605; b=LXhO5FexEJCNS86/pa0AnK9rYUbaeXMBzZWOG8CKgK2fs3RC2bGlS0J8UpGZzFFIHA DmYsVyKsfJ+AF8BVGtXVs+uYgErFPLSx7MhLW4SaySjxrha+gRLCBdxR400x+XiHwjmO MPM7M4Q85/5hERp70vr0CFiJS90Hf6Bgi8PyyChDVWXUTzRN0S8CLnyrLEmPc1seeNaH fvIoPdluPYKsiFKghUHdhoQWgWduRZ01uFE7P2lRCZdb4Nm8hNC+QStoa6ib4Q0hemVF 5qUqT05pczsM8Q0G3Xyqny1bXznhl7z8XGe1QlPQOZbXjLo2iRmmo1Uw8Hm8pzhWUyjw RdMQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:in-reply-to :organization:from:content-language:references:to:subject:user-agent :date:message-id:dkim-signature; bh=XO5zxcKA1g65+oWpOeh70B3Ve8pLiHY0DLBJ0qfXjmg=; fh=6LMNKYWrZgKiqEdj0vN1a/m8IftVYs2KStMnXOkUCIk=; b=C0YZY3+RlF6b9LtlULFmYtYCCDr1KslLABXmzAv8zuh/zC6cYKXOTmwGVGpJRPjQ3n UCOyeOtMvvd27b+mNYYxTHSeYO7QnyoQbsU9W7+KcgIVWtfSUzaB8ilelf2uu5ihjIkx wMaWN0Z7L52PFU7KSWZkD81y+UxDBb9FJ6kMIk5bbIfCR81VofxRTEwL6omHQEy6oEAe XJH2Lr38zOFQEkLK4n/oiZraQt+M+WlN3yeTvRD7fNLcrDJH+Oc5N3LjdZ81ujEBqQ5D gBHQln9uHfmuepnhLRicW/Rl/hfNcLZdHj9ogAz8E/lRPiQ4sYE9HIMa1qoE5yNzv6Jy xsKg==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@witekio.com header.s=selector2 header.b=KWNlnNs0; arc=pass (i=1 spf=pass spfdomain=witekio.com dkim=pass dkdomain=witekio.com dmarc=pass fromdomain=witekio.com); spf=pass (google.com: domain of fhoerni@witekio.com designates 2a01:111:f403:260c::713 as permitted sender) smtp.mailfrom=fhoerni@witekio.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=witekio.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1728391696; x=1728996496; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :in-reply-to:organization:from:content-language:references:to :subject:user-agent:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=XO5zxcKA1g65+oWpOeh70B3Ve8pLiHY0DLBJ0qfXjmg=; b=TCIa469suuS1OwigGuTqxmoZqS+nHdMr9k7p97BhaYT2A1fzmbX0HfX5YXB4Fw7AWk ZVLFoZpIwkg4eMi5BOZpy5rKRUsOv45ETOW8dioNFT0/WG5ap3lHPGm1cwmPb8RPJYdV itDFvn3s7iClHNq7G3NoCXwQ3Xiy+T0/oir+hvEYd48wSc+EcPbxe5nbo8yWWZGAXoRC KGvabgHuPdbP88GidMkYPorUVACbDc97na1U/RQSANYu3BRbxKK5e5FSLKlB4RgWS68Q QZNA3YUZYUumIcRoxl7aadCD5hraDra/TvHSWgbGXO1VpzI4hwjZR7xTwRfq+Chg5xp0 17lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728391696; x=1728996496; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :in-reply-to:organization:from:content-language:references:to :subject:user-agent:date:message-id:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=XO5zxcKA1g65+oWpOeh70B3Ve8pLiHY0DLBJ0qfXjmg=; b=iuC/ppiRtxruVsOklC6y9+idEVGUydqXnb4fPEcjxqh0fqIiY5Fu4UDD2RhVAfh8Rt oFklp5KHCuZKir4gMI+DRa7dRkgsS3WL19d1idbsgBWf3CzTGVrJ5d1UkYmLG7GuVk/V fgjNaNjQgpr+R/qw624vtx/7jebKBT6pkgQ3Jg1XXAlg4XrT9z9RQ+J0sN5rgrUGT8sN Q1ttvJ7XUHlDC7qdzKmAPy79tLMIyWFTMCtw8wH+wje49cUll49/oB5wzWjd49TWIf5T X1GMy2Ti1WYXVu3q9752nq8x3iyO/HmWQw8vplWCEvQa2W7uGqAKCs6ouZUFK9FqA/iB E+kg== X-Forwarded-Encrypted: i=3; AJvYcCVK3dahkjq9ZpWEMmsF4/0Bb43xDUvL311rO1fG5HmallXAV/580h4GxnxusrfNaXinDW7zdADPrQ==@patchwork.ozlabs.org X-Gm-Message-State: AOJu0YxkXQKU29QgepJmHTA5GSmdPPzGJkuOj1IPEMO4ES69POY3wtrQ i6RIK46h+1bQ2HtHpzcA1d8l9Lwy0uXaB0EMj3QrBWoLzS+2dfR4 X-Google-Smtp-Source: AGHT+IFVNSUkRQq4IJpy3VqNm4XMSadTjaFAIu1QLxCScbKc+elqRqPgCILzMGC4Rv/41lmBncGNrQ== X-Received: by 2002:a17:90a:c242:b0:2d8:f11e:f7e with SMTP id 98e67ed59e1d1-2e1e6221a7emr16995962a91.12.1728391696254; Tue, 08 Oct 2024 05:48:16 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:90a:a888:b0:2e0:79a0:bd97 with SMTP id 98e67ed59e1d1-2e1b36a332bls3620574a91.0.-pod-prod-01-us; Tue, 08 Oct 2024 05:48:14 -0700 (PDT) X-Received: by 2002:a17:90b:3806:b0:2e0:80e8:a31a with SMTP id 98e67ed59e1d1-2e1e636f5c3mr16048677a91.35.1728391694572; Tue, 08 Oct 2024 05:48:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728391694; cv=pass; d=google.com; s=arc-20240605; b=bmIWXSEUSm0hq517L7nrFmED5n0YULba3QWHkU5u2asP8yFigNd3SdegcdixjiHir3 Z0/uGosN5SaK8U1QDe4so+1VuIWHGbtMSPlvaJEsOHd6frJA+c5n/+1TrQmhiEJxJLTD w+01AUEBTYIWA0TnlV/EYPmzpLZVcixc4nuCWJdBgZ2X55U++wRkxtGivs2TaGBdXX/e hSvvuOD6A2okSDoqXokzwUjOwceRPWUkQAyi7lPyNOnbht+1GG6vN6vL55Zx+V7VnuQE Uz2FE4dCcxfOXX0VoOAFHHpT6J1ygcZyjGbIJ6qgLRAPSttz91CklPDF975alq6WLhul g+XQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=mime-version:content-transfer-encoding:in-reply-to:organization :from:content-language:references:to:subject:user-agent:date :message-id:dkim-signature; bh=mFFL8TcPsqW/R7mMlSjv7LwNaM4/MFkrwIUYt60/pUw=; fh=ZnR/GV7fAozRX3tpIO3vp/Jbul8ISZhdVjghlw9eWq0=; b=EiI/IjuD7yFlhl0vDTftnk2spR2+s5y+X2zUzhBu2VpuC0Eb9aPeAF2HXlZUtAaQ7v +VseFmK8cwWmvbF3IkMlw5CSsWx1QdHmrfadixyN+gOJeibqvhdufTATRXWlH0b31hnx hapgoWUfpyh7cQEMkSL4RkY8NPPwJ5KFIf/1R8tX4isNyEqMHHjqQ0sYAY2OGoEErZVm AkH6VdGvh2g0PS65u8cRYxiV2iGqLpgnpHAzhdgnFGBV4sejn0/pFTA/OzH3uX1qqGLn lJ5gMfXpuNmqo4N9rrKFj0Qv4fTZSyd2zaMEHf7d4tPkxgOo+giSZQbBoMWFmRRZbSzF YvsQ==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@witekio.com header.s=selector2 header.b=KWNlnNs0; arc=pass (i=1 spf=pass spfdomain=witekio.com dkim=pass dkdomain=witekio.com dmarc=pass fromdomain=witekio.com); spf=pass (google.com: domain of fhoerni@witekio.com designates 2a01:111:f403:260c::713 as permitted sender) smtp.mailfrom=fhoerni@witekio.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=witekio.com Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on20713.outbound.protection.outlook.com. [2a01:111:f403:260c::713]) by gmr-mx.google.com with ESMTPS id 98e67ed59e1d1-2e1e83ca39fsi363066a91.1.2024.10.08.05.48.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Oct 2024 05:48:14 -0700 (PDT) Received-SPF: pass (google.com: domain of fhoerni@witekio.com designates 2a01:111:f403:260c::713 as permitted sender) client-ip=2a01:111:f403:260c::713; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ha8NgWZq1T6NTNWzn9+503EwDgL/RiA0/wpq9JHZqWugKR5b5ZVAeHF3JbrcFg3wSXqBYRQjUTPn3KH9pIAgTOFcSUZul5NnshHKtKwkN0cXte3dmP3hCvrESlE9OLXrABh9sMYk43W2TpMTtFSs6o4mnYqqmDhKO+QVl92TM6qdfjEocIqZl6ha6P+Ubo8eD/Z1A6kn4HU6HWReRWrioXpzhEb3gz1Rb76VL6FmRFEEu0cf89EfYYOlWHuY13nBYLFSI3m3qLTv7sEgsGZkWUjcgf8NSZHSDWmvlvnzTGQdt6I/RILtKnGuqEDv9xn6feQWy52dKZXdAIo5dioecw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mFFL8TcPsqW/R7mMlSjv7LwNaM4/MFkrwIUYt60/pUw=; b=Fa6TGrWbOQV7ttEs4/1CWhK6avYLYu0yxbp5GkxIRGNTOtyPNBOTJcizTeSaMkGC22gKpnrJ6Ahhf8yMEYxN5bFzBoj09GFFCPqalwZhxnDA4zaguqdvJWXJ5jIBuLQn5EU2TiOnNLegnXGf7QdwMyCi3yu1myOkFhZEEDZZdtYq1r24nu+unLqU+1o1Xaece01MeWwlR4SpHhu/qBWoT7wKPKkHjDnR/SjEJCrezAhrUoc5A/Yq/s3ezFaMkAYomYIjDsGafxSMf9rTJ0cJr49yxsII3kRfXgQRbLJz+m9EpZyZtuhr1YBvYVAinoJ7JNIP4jtl/SUVZo7YP5tQZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=witekio.com; dmarc=pass action=none header.from=witekio.com; dkim=pass header.d=witekio.com; arc=none Received: from PAWP192MB2225.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:359::22) by DU0P192MB1498.EURP192.PROD.OUTLOOK.COM (2603:10a6:10:346::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.20; Tue, 8 Oct 2024 12:48:10 +0000 Received: from PAWP192MB2225.EURP192.PROD.OUTLOOK.COM ([fe80::8a5a:c9f5:c976:7b14]) by PAWP192MB2225.EURP192.PROD.OUTLOOK.COM ([fe80::8a5a:c9f5:c976:7b14%3]) with mapi id 15.20.8026.020; Tue, 8 Oct 2024 12:48:10 +0000 Message-ID: <11522297-c793-4c7a-8a90-214a82f3a97b@witekio.com> Date: Tue, 8 Oct 2024 14:48:09 +0200 User-Agent: Mozilla Thunderbird Subject: [swupdate] [PATCH 1/3] progress: acknowledge client registration To: swupdate References: <20241008123845.32785-1-fhoerni@free.fr> <97f79916-508f-41e4-893f-ef575c135c8c@witekio.com> Content-Language: en-US X-Patchwork-Original-From: "'Frederic Hoerni' via swupdate" From: "fhoerni.opensource" Organization: Witekio In-Reply-To: <97f79916-508f-41e4-893f-ef575c135c8c@witekio.com> X-ClientProxiedBy: PR1P264CA0138.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2ce::17) To PAWP192MB2225.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:359::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAWP192MB2225:EE_|DU0P192MB1498:EE_ X-MS-Office365-Filtering-Correlation-Id: 4aba88c4-cbeb-4124-6ad8-08dce7977716 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =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htYIGl5sNLwxjRUrQgGjUPjGpFksk4620UwAbRb?= =?utf-8?q?pxeelDOi7JWD5gOgm4nZaTuFK3CkmW5Sqi6Uj6aJ9/jeFYSBojZUm2vQN1cJczO+U?= =?utf-8?q?EMcaactwWlhRpGM5NFhA+n0mKTtZHQ29fcrxhVfiNV+n1hG7n7rZk7H9YMuXsbPcK?= =?utf-8?q?nCqSw9aQKOmUl6mqCwc7NSoI8/Mn4jy0/pcY8S98YZfyIAgFjjG6VhfHpFOlWcFTT?= =?utf-8?q?XxFJBbTklG99lw8VxPFh9Gr42NRLtNYEgVHLtZKmjOlQ4ixlBM2yB5+02SZAkTDte?= =?utf-8?q?t7+2EskIBWa/YoDE2osOcirJBe/NaQkjBrE1jLZV6zC5BtEw14N+yIaOiPaKETuq+?= =?utf-8?q?ZEWyXRHdZ7mWhBG2JOPtXlH01Xa7/03qvKtQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAWP192MB2225.EURP192.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?V3BiwVqFhVHmzf7bX4iBcq88Lw0L?= =?utf-8?q?8ma3+g8HaCoOSoX56t4ATTDdoEpGSQB5K+0YbBJ356OBX/u8pidR/a6XLApy1DHDs?= =?utf-8?q?h36ne9JbZkxF0EEqOeVXcnBCNSYhum413++bC6rS91AdhgkI7ySI1VHxHuUAUKjlL?= =?utf-8?q?niXNBUwiZ5iUucmWtEJlhtB1FyAg+VnuVUsPUM1IvjC9B2c2nC/6xv900OOi7vuDU?= =?utf-8?q?3PrkoSxinigpMi+HbPDH7QnEO/0SmD2LgWku5uACpRm/wGiS5tbpkCYmcyavQuYJ+?= =?utf-8?q?zf8gGLJBCoLTqJbKCSk7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N8IkuQ5Q9JKQj18G2WB7ufTBCozGW2v?= =?utf-8?q?ukUSZ0VlyvOmN2Nr9EGOrtvA1Sj2UqtI6kjhArHI5vt6ApJbjE7gAm3Wm2TgDFP/K?= =?utf-8?q?lvoV8fNsivP2TRLNyVop1wFIl8deUIPGNvaU1eEyyGclE4SlbVFoMOkGcBr82SbkZ?= =?utf-8?q?sOG4xV13CRGkeGoj0blvjTZTaOQQyxUdsIZ4lxygT6Eau6VsRiQXn8qjtjx5AuIbC?= =?utf-8?q?3awt2KSEDTfTE+O/j3TrEtU34lSM3izj9dAS9+m0pgCRJ0+VAYNXhTqMGGdZETc3Q?= =?utf-8?q?MC1qYGBlfNoKPYJiZeLMOnyoLWvvbCNBwRa6H5ej6KyWux5/Kn/iNbAV5cIyXhTCK?= =?utf-8?q?ltbGgziF52ug?= X-OriginatorOrg: witekio.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4aba88c4-cbeb-4124-6ad8-08dce7977716 X-MS-Exchange-CrossTenant-AuthSource: PAWP192MB2225.EURP192.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2024 12:48:10.4930 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 317e086a-301a-49af-9ea4-48a1c458b903 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UmHj0PNPcWkc3ZedwYzM3R18IavybAyuj5O9CY6pE8xoACG4p3SFVbM/Y6MPJ1UTOr8wlB7BquKBeyHANdWwNw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0P192MB1498 X-Original-Sender: fhoerni.opensource@witekio.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@witekio.com header.s=selector2 header.b=KWNlnNs0; arc=pass (i=1 spf=pass spfdomain=witekio.com dkim=pass dkdomain=witekio.com dmarc=pass fromdomain=witekio.com); spf=pass (google.com: domain of fhoerni@witekio.com designates 2a01:111:f403:260c::713 as permitted sender) smtp.mailfrom=fhoerni@witekio.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=witekio.com X-Original-From: Frederic Hoerni Reply-To: Frederic Hoerni 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: , From: Frederic Hoerni The client that connected to the progress socket had no clear confirmation that the daemon was ready to send progress events. This patch makes the daemon send an acknowledgement when the subscription is duly registered. On the client side, the function progress_ipc_connect() waits for the acknowledgement before returning. Signed-off-by: Frederic Hoerni --- core/progress_thread.c | 18 +++++++ include/progress_ipc.h | 13 ++++- ipc/progress_ipc.c | 120 ++++++++++++++++++++++++++++++++++++++++- 3 files changed, 149 insertions(+), 2 deletions(-) diff --git a/core/progress_thread.c b/core/progress_thread.c index e17d931c..8d700db6 100644 --- a/core/progress_thread.c +++ b/core/progress_thread.c @@ -253,6 +253,22 @@ void swupdate_progress_done(const char *info) pthread_mutex_unlock(&pprog->lock); } +static void progress_send_connect_ack(int connfd) +{ + int n; + struct progress_connect_ack ack; + memset(&ack, 0, sizeof(ack)); + ack.apiversion = PROGRESS_API_VERSION; + strncpy(ack.magic, PROGRESS_CONNECT_ACK_MAGIC, strlen(PROGRESS_CONNECT_ACK_MAGIC)); + do { + n = send(connfd, &ack, sizeof(ack), MSG_NOSIGNAL | MSG_DONTWAIT); + } while (n == -1 && errno == EINTR); + + if (n != sizeof(ack)) { + fprintf(stderr, "progress_send_connect_ack error: n=%d, errno=%d\n", n, errno); + } +} + void *progress_bar_thread (void __attribute__ ((__unused__)) *data) { int listen, connfd; @@ -297,6 +313,8 @@ void *progress_bar_thread (void __attribute__ ((__unused__)) *data) conn->sockfd = connfd; pthread_mutex_lock(&pprog->lock); SIMPLEQ_INSERT_TAIL(&pprog->conns, conn, next); + /* Send an ACK to the client to indicate that it is duly registered */ + progress_send_connect_ack(connfd); pthread_mutex_unlock(&pprog->lock); } while(1); } diff --git a/include/progress_ipc.h b/include/progress_ipc.h index f0b4b816..e79d476d 100644 --- a/include/progress_ipc.h +++ b/include/progress_ipc.h @@ -38,13 +38,18 @@ extern char* SOCKET_PROGRESS_PATH; * - changes in major mean an incompatibility and clients do not work anymore */ -#define PROGRESS_API_MAJOR 1 +#define PROGRESS_API_MAJOR 2 #define PROGRESS_API_MINOR 0 #define PROGRESS_API_PATCH 0 #define PROGRESS_API_VERSION ((PROGRESS_API_MAJOR & 0xFFFF) << 16 | \ (PROGRESS_API_MINOR & 0xFF) << 8 | \ (PROGRESS_API_PATCH & 0xFF)) + +inline int progress_is_major_version_compatible(int other_version) +{ + return PROGRESS_API_MAJOR == ((other_version >> 16) & 0xFFFF); +} /* * Message sent via progress socket. * Data is sent in LE if required. @@ -64,6 +69,12 @@ struct progress_msg { char info[PRINFOSIZE]; /* additional information about install */ }; +#define PROGRESS_CONNECT_ACK_MAGIC "ACK" +struct progress_connect_ack { + unsigned int apiversion; /* API Version for compatibility check */ + char magic[4]; /* null-terminated string */ +}; + char *get_prog_socket(void); /* Standard function to connect to progress interface */ diff --git a/ipc/progress_ipc.c b/ipc/progress_ipc.c index c5ac9b95..815e1601 100644 --- a/ipc/progress_ipc.c +++ b/ipc/progress_ipc.c @@ -8,12 +8,13 @@ #include #include #include +#include #include #include #include +#include #include #include - #include #ifdef CONFIG_SOCKET_PROGRESS_PATH @@ -40,10 +41,120 @@ char *get_prog_socket(void) { return SOCKET_PROGRESS_PATH; } +/* Decrease timeout depending on elapsed time */ +static int update_timeout(const struct timespec *initial_time, int *timeout_ms) +{ + struct timespec current_time; + int diff_timeout_ms; + struct timespec elapsed; + int err = clock_gettime(CLOCK_MONOTONIC, ¤t_time); + if (err) { + perror("progress_ipc_recv_ack: clock_gettime"); + return -1; + } + elapsed.tv_sec = current_time.tv_sec - initial_time->tv_sec; + elapsed.tv_nsec = current_time.tv_nsec - initial_time->tv_nsec; + + diff_timeout_ms = *timeout_ms - (elapsed.tv_sec*1000 + elapsed.tv_nsec/1E6); + + *timeout_ms = diff_timeout_ms; + return 0; +} + +static int progress_ipc_recv_ack(int fd, struct progress_connect_ack *ack) +{ + struct timespec initial_time; + int err; + int timeout_ms = 5000; /* 5 s should be enough in most cases as the socket is local */ + err = clock_gettime(CLOCK_MONOTONIC, &initial_time); + if (err) { + perror("progress_ipc_recv_ack: clock_gettime"); + return -1; + } + + unsigned int size_to_read = sizeof(struct progress_connect_ack); + unsigned int offset = 0; + + while (size_to_read > 0) { + int err_poll; + struct pollfd pfds[1]; + pfds[0].fd = fd; + pfds[0].events = POLLIN; + do { + err_poll = poll(pfds, 1, timeout_ms); + int err_update_timeout = update_timeout(&initial_time, &timeout_ms); + if (err_update_timeout) return -1; + } while (err_poll < 0 && errno == EINTR); + + if (err_poll == -1) { + fprintf(stderr, "progress_ipc_receive_nb: poll error\n"); + break; + } else if (err_poll == 0) { + /* Timeout */ + fprintf(stderr, "progress_ipc_wait_for_ack error: timeout\n"); + break; + } else if (pfds[0].revents & POLLHUP) { + /* The peer closed its end of the channel */ + /* (note that some operating systems also set POLLIN in this case) */ + fprintf(stderr, "progress_ipc_wait_for_ack error: peer closed\n"); + break; + } else if (pfds[0].revents & POLLIN) { + /* There is a message to read */ + int n = read(fd, (void*)ack + offset, size_to_read); + if (n == -1 && errno == EINTR) { + continue; /* redo poll() and timeout management */ + } else if (n <= 0) { + /* read error, as at least 1 byte should be pending */ + fprintf(stderr, "progress_ipc_recv_ack: read error: n=%d, errno=%d\n", n, errno); + break; + } + size_to_read -= n; + offset += n; + + } else { + /* unexpected error */ + fprintf(stderr, "poll returned %d with revents=0x%x\n", err_poll, pfds[0].revents); + } + } + if (size_to_read == 0) { + /* The expected number of bytes was received */ + return 0; + } else { + return -1; + } +} + +/* Wait for the daemon to send an ACK + * + * Returns: + * -1 error (timeout, peer closed, invalid ACK, ...) + * 0 success + */ +static int progress_ipc_wait_for_ack(int fd) +{ + struct progress_connect_ack ack; + int err = progress_ipc_recv_ack(fd, &ack); + if (err) { + return -1; + } + if (! progress_is_major_version_compatible(ack.apiversion)) { + fprintf(stderr, "progress_ipc_wait_for_ack: recv incompatible version: %x\n", + ack.apiversion); + return -1; + } + if (0 != strcmp(ack.magic, PROGRESS_CONNECT_ACK_MAGIC)) { + fprintf(stderr, "progress_ipc_wait_for_ack: recv invalid magic: %s (expected %s)\n", + ack.magic, PROGRESS_CONNECT_ACK_MAGIC); + return -1; + } + return 0; +} + static int _progress_ipc_connect(const char *socketpath, bool reconnect) { struct sockaddr_un servaddr; int fd = socket(AF_LOCAL, SOCK_STREAM, 0); + int ret; bzero(&servaddr, sizeof(servaddr)); servaddr.sun_family = AF_LOCAL; strncpy(servaddr.sun_path, socketpath, sizeof(servaddr.sun_path) - 1); @@ -67,6 +178,13 @@ static int _progress_ipc_connect(const char *socketpath, bool reconnect) usleep(10000); } while (true); + /* Connected. Wait for ACK */ + ret = progress_ipc_wait_for_ack(fd); + if (ret == -1) { + close(fd); + return -1; + } + return fd; }