Message ID | 20211114172733.71602-22-sbabic@denx.de |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBN4OYWGAMGQEJXGVWVY@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=F9v55GLo; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::53d; helo=mail-ed1-x53d.google.com; envelope-from=swupdate+bncbcxploxj6ikrbn4oywgamgqejxgvwvy@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-ed1-x53d.google.com (mail-ed1-x53d.google.com [IPv6:2a00:1450:4864:20::53d]) (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 4HsfRt6C0pz9sWJ for <incoming@patchwork.ozlabs.org>; Mon, 15 Nov 2021 04:28:26 +1100 (AEDT) Received: by mail-ed1-x53d.google.com with SMTP id m17-20020aa7d351000000b003e7c0bc8523sf383563edr.1 for <incoming@patchwork.ozlabs.org>; Sun, 14 Nov 2021 09:28:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1636910903; cv=pass; d=google.com; s=arc-20160816; b=x1LM4PAUZ+2oJkCy8Suf7rVQ3SJAiBE0vReYMP7Y8vNi4NxKrh0rsFhINLEomK/j+x LZ8HUFh0vddv99GLlcqHqghnG6uM5hsp5jbDeQBufpjvn1RGL1fqOnWbrVCjitku1JaI qpxar2IS01FECC8W+kbfU45xyzrd5/1kzbT1b7Dxzm4mGsnQ852gEAh2foVI3sdXJ5bL hAIGdwTOxR9Ath9EiAHHybt8uXbuYle9qCgJ5h1KfgZCmcIGsVefCiXpI6erA0p0XKK2 lKOGJWriBmIU974ppazFFE4PnDU4GtRjtA5xGrnROt4IFghW4vnYtMQPt6KGyBIItrW2 4PGw== 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=xVI9LDF6KLuZ810x13faimRA2KIX7M+PvLkJ6yjruSI=; b=hV+L3cDHcziOabzgQQLFjKqSdD+FsUJHy5T9jHJptHR9VlwhFCD4RYC/DnewcsbDxv MgfzsG4Ec9uqRG5wIZ6aSzNrjTrLq0Y/ncThgCl8j4AKem/H4FmyroXereDN57yMEN46 YSsY5AU4ozHdsDWo44byJ+ArLrRLU0EiRsckjXtCUDyl5Mlxo3ekHgeYxEo7L2KvtAEZ 7vmyYhvWphNg2dvSIgWix28haud0rpluZxGjK5UVcUkI5twLsnXxctjK4o0Ni6aGa6+N 4FURVJwtSbIy86KtWshlzIVgt7SaJplSYkxx7lTWhju1ZYyvLS+q0MySCG+Ja6LPqIDA y6vw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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=xVI9LDF6KLuZ810x13faimRA2KIX7M+PvLkJ6yjruSI=; b=F9v55GLomLaV8MHAn1SxIKx8CCr7caSLZKuMSgNTSwbnPbe43gP1v6MezF3rCeL8gh 00PwPFoppEdjkj/9a3RclXAN+rlTBAUGPlxUFACkYZU/QPTJWrtoN3r0yw3QFo+lOWYi btuneh21kTRTAKTxfXZTS05XDBA/hh3nYB1ipQKG9xMP6wzR8k/2z9U1HcTKx0aAQltp zA++YOuQc1d38Ki+YfOHNqI0oEST37UaNjX7y8KTOuKMeTLVTeg5zgMoVVgxLrZzz+y6 sS7elfHcnapGRIkSn2VAk9wWfDE3TwHJhMbvXJDocADdKZjPFD6EzSVAo3EoLp6+suf7 CKuA== 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=xVI9LDF6KLuZ810x13faimRA2KIX7M+PvLkJ6yjruSI=; b=ktZYYmQdeA1oRCaMeqw+RlSO9aDazKJrOXPKf8TzO76pVKKbA+nitzHxL5tYK5geh8 KCIpbR0ulZh/ytFmRUqo/3TxDslXKAG+EoJ08A7hYQeY3WTNEweMFiEch7G5cEAyZqZD OWPDW7FO9QZ30szT2FAil5/ETQLi5Vykt6HTABGQKCu8LXtWmRx9NJ5kOCQr2EWmvC7c 5EZDxtjld0A7Znqzz17Br+3fj1WRlRVlYun6dCP2HwO7pqcHqJ1/U9MjqCLDFtFDPE7Z Ich+q5xB27MIlHHaDCPD4DlxsiMvU/xqheCEvdZWZdZr5pq9no8wvWcNUHNRjFqCL2Si pDnA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533EypwrqvRBvL1cG/lXuEAvGkJ78NKUTGCTQbg4I/jLyU1IOhJF Rcej+2Nl/NH0EjoclpoZcWs= X-Google-Smtp-Source: ABdhPJxhVhUF+4O4I0xSUddpNbVs3pvTi0fSpOh7/hxxleGqB8pnIRPBsdDvX2Nd7Hn56iDPcFNj1A== X-Received: by 2002:a17:906:9501:: with SMTP id u1mr40740881ejx.496.1636910903576; Sun, 14 Nov 2021 09:28:23 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:907:7f8e:: with SMTP id qk14ls4641526ejc.3.gmail; Sun, 14 Nov 2021 09:28:22 -0800 (PST) X-Received: by 2002:a17:907:1c15:: with SMTP id nc21mr41806176ejc.510.1636910902770; Sun, 14 Nov 2021 09:28:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636910902; cv=none; d=google.com; s=arc-20160816; b=J4Cpbni1c8/ApMCvBRPjGNnQG2y7H9nJ/WPrpQRpsu/hcJ40J7845miQr4/DrfA0lV 2oz4xLQvfKiZeP4X09vaTu/sMhQHgeVUfgYofTxtgl7BYkw7KsBV06fe11kGzTtuWjOz ftyXOw2LULnjVOhNE6g29ZsTjf3ZmzDvzejE/RS3a6PE7nPtdBfan7tBBOBYZRQiTGqD 23DvF50H+pKsxEZYhnAItqUDv/yXs0XCzb67/7XjpFCWXNEIh9AUiucaVZTZqEKhvtYX o7q+w/Wm0ViCYUf8lOcau51/6sGAwh9bAgsUBYDkH9RGmLqBv993BvSOZ5KtRobZv2J0 5xSg== 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=xGrsaxQ0z57Pf6QKsKD9VKfpk/48gKlurFmKeECH7mQ=; b=c+BEBnWJ9Z3zsVJTiGArO1LIBMJHYjy++54NJwOuMQd3XWUcw+DHnm5vAX6Ujjgbox ncnPIuZs1YP74XYByb8DQfCK5prOy9mAABSkwb2wz94NoskX+FCqzXmkrc6RaCZTt3ah GcYD/z6+Tcw036pC6ITTHp5E8KB+IkHHNFOFqgvaLQF+nnzTGF6ZYvkgUaRYzacMkteQ n5vK4+H8mZJzELJKFAzHsbvBkSdeNpuANPCjBSU/ao32JqiffGH4W3KtgurY1tgb13rB DAu36+/dQWL9Jsl360Gt1CZ8zmf+SrEif09kM56+Wbnjm+uMQoeopRHGxzSvj7AMbnPD X5/A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id bi21si922495edb.0.2021.11.14.09.28.22 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 09:28:22 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4HsfRp3z4nz1qwdZ; Sun, 14 Nov 2021 18:28:22 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HsfRp3tFdz1qqkB; Sun, 14 Nov 2021 18:28:22 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id x6aDtEZOuC3d; Sun, 14 Nov 2021 18:28:21 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Sun, 14 Nov 2021 18:28:21 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 8297545408E4; Sun, 14 Nov 2021 18:28:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HNM1J_l9y1o8; Sun, 14 Nov 2021 18:28:18 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 599F74542782; Sun, 14 Nov 2021 18:27:46 +0100 (CET) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH V2 21/36] channel_curl: add the possibility to request a range Date: Sun, 14 Nov 2021 18:27:18 +0100 Message-Id: <20211114172733.71602-22-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211114172733.71602-1-sbabic@denx.de> References: <20211114172733.71602-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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 |
DELTA Update
|
expand
|
diff --git a/corelib/channel_curl.c b/corelib/channel_curl.c index a916186..39c415d 100644 --- a/corelib/channel_curl.c +++ b/corelib/channel_curl.c @@ -753,6 +753,15 @@ channel_op_res_t channel_set_options(channel_t *this, channel_data_t *channel_da } } + if (channel_data->range) { + if (curl_easy_setopt(channel_curl->handle, CURLOPT_RANGE, + channel_data->range) != CURLE_OK) { + ERROR("Bytes Range could not be set."); + result = CHANNEL_EINIT; + goto cleanup; + } + } + cleanup: return result; } diff --git a/include/channel_curl.h b/include/channel_curl.h index 7d1e892..4409dca 100644 --- a/include/channel_curl.h +++ b/include/channel_curl.h @@ -79,5 +79,6 @@ typedef struct { struct dict *headers_to_send; struct dict *received_headers; unsigned int max_download_speed; + char *range; /* Range request for get_file in any */ void *user; } channel_data_t;
This allow to set a range request for a file to be downloaded. Signed-off-by: Stefano Babic <sbabic@denx.de> --- corelib/channel_curl.c | 9 +++++++++ include/channel_curl.h | 1 + 2 files changed, 10 insertions(+)