Message ID | 20231120154731.44988-5-stefano.babic@swupdate.org |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBAABBGH75WVAMGQELEHIFRY@googlegroups.com> 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=Y8Sfb/96; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::140; helo=mail-lf1-x140.google.com; envelope-from=swupdate+bncbaabbgh75wvamgqelehifry@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-lf1-x140.google.com (mail-lf1-x140.google.com [IPv6:2a00:1450:4864:20::140]) (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 4SYsMw6y9mz1ySV for <incoming@patchwork.ozlabs.org>; Tue, 21 Nov 2023 02:47:40 +1100 (AEDT) Received: by mail-lf1-x140.google.com with SMTP id 2adb3069b0e04-50aa9e4f845sf1756842e87.1 for <incoming@patchwork.ozlabs.org>; Mon, 20 Nov 2023 07:47:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700495257; cv=pass; d=google.com; s=arc-20160816; b=i8Vq0qnLqXyXlzOZXdOde34ozd+BFUamDwRcTMNPlCIkFiSaDoytVmSuDU+btfqmOi 1tLMbYSB+DvDatsuDdxqopKMpdkmclkkVFhgJDB2c0Ds8dqZ8CI2d6TNRPDFMCNgW2PN 4LhfcW1zhiVA0DjDjECLCdh5ozgcHWHEGhUzJwrYgxZu4glToiyTOzlSTAjA+Ko/4WRT IhijAYZ7KUB1qN8uPw1WNc1VGERfSwsQYhNRXfOpGXoCfrVfJOm+BwE3RRzM6O1Mha7l 5rJIM8wKlaH9SNPgTGt1sJiOqp5613xOwlKlUVol23kTQK8EjEi7Zk4k/6y7t64FHuNc q8UQ== 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:ui-outboundreport:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=5xAtyqGew7lQbHSLY4pjY0gZPC+51a8QGAGo7QVA0LQ=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=OeJY80k4Wk2GP5EHWz7FhDWdIDrsz0JHG6YhBZ+7l3eBa0vUJnBHh93Wk1zFc+rjOa ueavofF8fJSoYsWoTfPIN/9DzhRLXh9lwZDAApRYi0wjUaRic1KNv1DTTsQIBRqDrEjR LHyYcqrPbQKKGBup1ffd5IHTRHK+EZmeTn2Sgo4pVSXP7MscfmnnEwqRJNYGHv20yEEE tUphOXgVPujjssDpaEAASRQPW/snY1b3aUQfzlTXceWnnVNAfMfSw2ZSLcMjxf1aM8Xg jlCvYlFaXUMLnaoRGatR7dh0rbJ5uvLJBt0GEikTh0fVaM9W33Kxa59QZBP4dLMubpvl ZqkQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.74 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1700495257; x=1701100057; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:ui-outboundreport:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=5xAtyqGew7lQbHSLY4pjY0gZPC+51a8QGAGo7QVA0LQ=; b=Y8Sfb/96Xi0HFrldAKLQrAugWKfWq7Ye7zcGcRu/ji34MsDo7r5dNkKFYsOm0U/qPO KXhWxztflcuEk2rfgWSl/DhtJR6nsi0VAHuAZl1LIK8pHvVZP5wEaW+5tcONPmwIWuhL hzSOyKUrliDpXXuiO9opfmfQsCKvVEmeSQWw7CqA3nftFsXgB0Ux3SJNu5umgE+JFWDj 3QqEd3KBLXf1J0BEqiPFad2xc3K8TWuvMkvEaCgI11qX57YUQdfI32DMRrlIF0f/m+Ji j2aH5rN0EcTopasSrt1VlYOIz0gaYNQG4tEbZoRPgozdqO1g9IITBARBGUlDf3/N7nR5 U0tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700495257; x=1701100057; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :ui-outboundreport:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=5xAtyqGew7lQbHSLY4pjY0gZPC+51a8QGAGo7QVA0LQ=; b=hOt6h2yRF2xoViamoVYmAfEDEBMDPqzEu3yJT3gAOCZtsj4ynCiZcrYx+cD185Ig/T RgOqDji9aMe44vo9rpOw23EVuMITeyJ0/SCKTnuQ0fx0eFH9+dT6ZAlvMApKh3B1K8cD igqEaJ/u29tAb1eR8GWUuhfh/XorxJsiN+06s8k5JIk4JPrxMn8U+MIB6IbClyt3CcU4 lecZjtH5/BV5xzAYJ8CmeyvBJAW5317iizlX0wHZHb8F+hiy97b+XmwTJ5dLJl5kSbdL ddUNnWepivwO5J9I8GXwCx2QE0lB84UHXVB1+G3FqGy50o/dt2EE7MjVVXTZc1R/4UgN 5low== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOJu0YzvPLf95FHu/Mcg7CVwYqUG3vgdPExSUC4hHniCfjGLNJrUxG6V tzlomzQXHKXZRqaPMBeR6lc= X-Google-Smtp-Source: AGHT+IGOj7tEbJAhjD4UjMHRDSalTRlTOpfr9cw8EKmTe29u0liV5KrMiE8z1MhgwM+hwNZuOFADgA== X-Received: by 2002:ac2:5203:0:b0:50a:3c38:6b68 with SMTP id a3-20020ac25203000000b0050a3c386b68mr5313413lfl.24.1700495256644; Mon, 20 Nov 2023 07:47:36 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6402:343:b0:548:b79a:16c with SMTP id r3-20020a056402034300b00548b79a016cls10011edw.1.-pod-prod-02-eu; Mon, 20 Nov 2023 07:47:35 -0800 (PST) X-Received: by 2002:a05:6402:274e:b0:548:8298:dca2 with SMTP id z14-20020a056402274e00b005488298dca2mr5210538edd.39.1700495254732; Mon, 20 Nov 2023 07:47:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700495254; cv=none; d=google.com; s=arc-20160816; b=w4c19Vq0igddBaRvZjk/+TYNsn1KzQ7aSwsBCtSw1wRcqBrTsajT4qQBO+f23U3BUl hdgu32dNHjOFvEDP5qJWXKU5u7iyyQveFoCDKUs9IoffjJtBYg92I+dT+9TzSuDzRY8p Wc3NCrebG/dw3naJ6cTwI+HYsNHm0PQ4MZw2eavdB1YBVSoIczZoHmyUby5LbSjorAOa rs5kJ2etclgROahQ1nSAYDRn+z44Dja09WKW7XypSxw+6vru2GrGHNT0gLJeCjKok7fN q8gU0s7LtN+jdbUg3EbgYwVgArypHyqMQWIrNJMpsPfBQU/qPpgRcpHMgIlaiT3nXgZR WF3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=iyy+wAXDGN8b1jRe5BjqU2KQg9FWbOynAh0popuVv64=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=QgovmLBUXIEJpatuB/nDIFA5UAX57+2AwPk296EJsto1CJMbJ2CpkCvPqEmIphPMU6 w9x6giL0lRYGMjeqcbw+UFRr+eTq9AG9wQnuo8rdRJAwP+bJ0UMMALIf3jkHVngrJjJs lzwZ4yC7FPqqO/9JhEN709EDYE8lv1lKPTLfBItPQNWz3TMQRNwSzacAdo5Ox3Jtp1OT JY738kLVlNrYOpxD8Hm9KNrDbVG4UIhFZCvuG3QNF/hc6HJF98vcSMmfAa0NCxfnTnsU bwsAOzWackU94ksRHBi+cRk2CJQn00+lQh+5hpcO7alZ988cEfbY7eKwuJjfAai+uADH KHxQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.74 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Received: from mout.kundenserver.de (mout.kundenserver.de. [217.72.192.74]) by gmr-mx.google.com with ESMTPS id h21-20020a0564020e9500b0053e90546ff6si313622eda.1.2023.11.20.07.47.34 for <swupdate@googlegroups.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:47:34 -0800 (PST) Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.74 as permitted sender) client-ip=217.72.192.74; Received: from paperino.fritz.box ([88.217.136.221]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1Mgvj1-1rYdHn0FUT-00hMUb; Mon, 20 Nov 2023 16:47:34 +0100 From: Stefano Babic <stefano.babic@swupdate.org> To: swupdate@googlegroups.com Cc: Stefano Babic <stefano.babic@swupdate.org> Subject: [swupdate] [PATCH 04/13] swuforwarder: fix error branch in curl read callback Date: Mon, 20 Nov 2023 16:47:26 +0100 Message-Id: <20231120154731.44988-5-stefano.babic@swupdate.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231120154731.44988-1-stefano.babic@swupdate.org> References: <20231120154731.44988-1-stefano.babic@swupdate.org> MIME-Version: 1.0 X-Provags-ID: V03:K1:QVaaKCDFshXSNUdgFbNbr/z5p71aa9Y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wVl65g8t6FoYOaj5S6oxAL/Sh/NRqZYr8l9RY5zRnQn9mJrqhjGTXkg/FZ7sQP3/tS nWdq2Kl7yhRhxhQ== X-Original-Sender: stefano.babic@swupdate.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 217.72.192.74 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org 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 |
Native Docker Support
|
expand
|
diff --git a/handlers/swuforward_handler.c b/handlers/swuforward_handler.c index 468fbfb1..8e8c757e 100644 --- a/handlers/swuforward_handler.c +++ b/handlers/swuforward_handler.c @@ -70,14 +70,15 @@ static size_t curl_read_data(char *buffer, size_t size, size_t nmemb, void *user nbytes = nmemb * size; nbytes = read(conn->fifo[0], buffer, nbytes); - if (nbytes == -1 && errno == EAGAIN) { - TRACE("No data, try again"); - nbytes = 0; - } if (nbytes < 0) { - ERROR("Cannot read from FIFO"); - return CURL_READFUNC_ABORT; + if (errno == EAGAIN) { + TRACE("No data, try again"); + nbytes = 0; + } else { + ERROR("Cannot read from FIFO"); + return CURL_READFUNC_ABORT; + } } nmemb = nbytes / size;
The error branch is wrongly implemented, fix it. Signed-off-by: Stefano Babic <stefano.babic@swupdate.org> --- handlers/swuforward_handler.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)