Message ID | 20211114172733.71602-21-sbabic@denx.de |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBNUOYWGAMGQE4ZWVQWI@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=MgWKusqy; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::53a; helo=mail-ed1-x53a.google.com; envelope-from=swupdate+bncbcxploxj6ikrbnuoywgamgqe4zwvqwi@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-ed1-x53a.google.com (mail-ed1-x53a.google.com [IPv6:2a00:1450:4864:20::53a]) (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 4HsfRs60P7z9sWJ for <incoming@patchwork.ozlabs.org>; Mon, 15 Nov 2021 04:28:25 +1100 (AEDT) Received: by mail-ed1-x53a.google.com with SMTP id c1-20020aa7c741000000b003e7bf1da4bcsf794781eds.21 for <incoming@patchwork.ozlabs.org>; Sun, 14 Nov 2021 09:28:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1636910903; cv=pass; d=google.com; s=arc-20160816; b=OIzJf+ZRLCPLwUiuGBn+VB0Tr+e0iwCDnpEsaRmLAEwqZKdcHuWVUYve7/TWSXu45w ByHOsMnK9SjqsS7AJDDGDS+ajTy6z6rFarpF7krgl1+gCiycwo0RhPdb72DjuI65TFrc kr8a0YuLdfg2AEcxQYZTOvs4W81hHfxWjVA4DOJosCaCVkP/VmTIUfkN2uJJdpXGLyX7 mZ8N0IV4Yv/Q6tfsaj9dLZvuIn7Fm6E9Jh/YvokijKeLydEmuitq01XH0717NNC0QGlj JFeivXlYjvlz8z7jIz/jqWmKref2kYV2hxeGA+bKLbHmGb6VJwjgoWIdV9/d6lGIemR/ lwMA== 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=qjdA0hIU5Ww1GMV722E0wSePdCrOLOoZtlJjQXw8geA=; b=HMOtDWtIPUzsh9Vy7qnIwzsqxB6NQO2DSQRS5S94Y2PZ2F5tz6sD0NJs9zSvuDlG62 q5Wy3wtEjnjmyLSJD9aFW3HE9o2JblGJddBdjqTUZcwG+jwDFGn8QzEgWjTtnjJyRf2C 6G4OdDuWADaJ8sncKMci35XN8iCyCkLYPcWIZ49zvLHBo47vsH1RMbHLfY28HQYqdGHj bpe5cqJvRFPFFTJpCkI5rCTguwmMRK3JX1FLbw8kELx1vAOTQC+V+e4Yk91IE3YGQUk4 YZPvGtj3j3Xqkx/JDboHMSVsvxkhH58LVzg+qg8A39jGTOgBfd8ouW8fjiFDkis0sicd 3B0A== 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=qjdA0hIU5Ww1GMV722E0wSePdCrOLOoZtlJjQXw8geA=; b=MgWKusqyUlqK4juu9KY0HRjAFd3VfFWSkIkXq7SfziBF4d1cF62dYhTGk00XpYiFuz KDXcaQol4SVWTkcIEvwgDaEqSD2BPoPnAPmIk64QnJh3FFejjqQgFyLR7j/e3f7f3OWS Sfk2rUgbRVYseHr9L4RGB0C/bnXcUFUeLQEkzaOklN70U1guybq4PPr8JWFPvtykQ0ev 12R+XUPo6jDAPu/6cWRhRBZmnv8OZMBgnZP/783tbx4PG5LwwYGUE4p7QlMhtMGVNoA9 CFM4RzwUkActcRBrfNPehRlRCwNv8zBhmda1f0ZvHgH9+5wEoD4ToFb7zVpl4gFwGIm/ ZfFA== 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=qjdA0hIU5Ww1GMV722E0wSePdCrOLOoZtlJjQXw8geA=; b=UTWxYl9M+K9hxhfvWSdabHXx0s/CP1/5RK+GvWsc+iYSLcMpBd/0DJaxfIJoQI4IYz dpH7fbjYz9pkzKEXHrHPDWGpxbX0Xh0G5G6zOaPRj3A4tQFpTw8oJlvjZLIzdSRQ3qVu 8p3bYc+Skab7XwykUCo0CIQ4YYJxI2azKSzslp6bkwfc5uWj4Q9oG0282Vqg0mczkJV7 wkzsHETwXUqTXlhcYIMvPYubaZgytb+LgvW3DKo6tJrG+6PbuUrQgIC9pf6Iz/qVpXlR YuN8sc5pxjJ6HEP2u9UnLVOwgBarqy4e8WPqFq4XY9NjgM10+ACM73DuSHPgETJc7K+D BtWA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532F1xV3XSKCvH/GU+16c2F1YnkwP553ygmODtJhlpNSkUscxkL7 pvt36np/Ex1o5hmptTfecK8= X-Google-Smtp-Source: ABdhPJyPXeGUVorkk+uUMPsXTxBLJxdG3r3tZLjKbp9xuBdcMo3q3dvj5yOhaK38Vs5r13cP90Gtng== X-Received: by 2002:a50:8d47:: with SMTP id t7mr26505941edt.14.1636910903176; Sun, 14 Nov 2021 09:28:23 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a50:8e41:: with SMTP id 1ls3821629edx.0.gmail; Sun, 14 Nov 2021 09:28:22 -0800 (PST) X-Received: by 2002:a05:6402:34c1:: with SMTP id w1mr3351418edc.179.1636910902314; 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=PrKpl3KCIqZjEfusdcoic74Y7F7cygKMQuco7EAhBjI07toFZfbnCoNxOWTDEU8Xke 8zFnwM2Os6cDiI5Z+UOqeFBB/jaXl5XQPpSuol8BBzfH8urIl9187uNfPsgE+AUq211A ZG44EGQ+USA2o+DVXaOdT6IyOJuS2PJB3N71YL1/HMlSSgqHSHTi4Qgdd4ypZkOXsXwC inpiQR5XWY7hDyErVxf6+s0nu6xNI6vtTOLFk+ZeyPBLrleIyCmnvuR/42EEyopq4QZR /eTgpWvBxpsFFC2Z0esnynHA0lIcm/iALkqqPleHqZspVz/v1O9PJQEItOEBAm6rQybS t6yg== 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=w7zFaIVVwHOZkxyLyTFcX+fmHTPJdNOqLruAOyRoz60=; b=ZYIBSaHOTDcK1ZSstEnthp+IsjNybWP6JiaQKJRIfwSq+HT9e1x5y/8WsYsAp4SnMo ESSpnfpdBDpeRpni4o7ZxWJWlJx+C5NRyqL58xiiYP4Uhojc55ri8lTFQ6s4ECGgZJX8 uwgp+zBV2nHxaZgKk7BKWaarvUT4itkNvF5QUyXQy8EZkxNi0lfScTNCsOHrHKS/dTwx VBc1kyAvYp+vzVd9f5mwQ07aKPPALg2I0PcHLV7rgtCXXMOK60+rLXMzPN6oPwT8xfzb plxOWptw/aqRBpeJ9g4eBkKjBMEh6fvZRB3oR7yxEzjMOZxFCKm71VW1PDKuL9xZ5Tnc Cdyw== 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 k2si665127edl.2.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 4HsfRp0kMLz1qwdP; 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 4HsfRp0bkkz1qqkB; 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 qG2uYGLPCclU; 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 193034540853; Sun, 14 Nov 2021 18:28:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id Qz8gfjV88Ebp; 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 3EEF94542776; 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 20/36] channel_curl: pass channel pointer to internal callbacks Date: Sun, 14 Nov 2021 18:27:17 +0100 Message-Id: <20211114172733.71602-21-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 4894c06..a916186 100644 --- a/corelib/channel_curl.c +++ b/corelib/channel_curl.c @@ -53,6 +53,7 @@ typedef struct { channel_data_t *channel_data; int output; output_data_t *outdata; + channel_t *this; } write_callback_t; typedef struct { @@ -936,7 +937,7 @@ static channel_op_res_t channel_post_method(channel_t *this, void *data, int met channel_op_res_t result = CHANNEL_OK; channel_data_t *channel_data = (channel_data_t *)data; output_data_t outdata = {}; - write_callback_t wrdata = { .channel_data = channel_data, .outdata = &outdata }; + write_callback_t wrdata = { .this = this, .channel_data = channel_data, .outdata = &outdata }; if ((result = channel_set_content_type(this, channel_data)) != CHANNEL_OK) { @@ -1149,7 +1150,7 @@ channel_op_res_t channel_get_file(channel_t *this, void *data) goto cleanup_header; } - write_callback_t wrdata; + write_callback_t wrdata = { .this = this }; wrdata.channel_data = channel_data; if (!channel_data->noipc) { swupdate_prepare_req(&req); @@ -1346,7 +1347,7 @@ channel_op_res_t channel_get(channel_t *this, void *data) channel_data_t *channel_data = (channel_data_t *)data; channel_data->http_response_code = 0; output_data_t outdata = {}; - write_callback_t wrdata = { .channel_data = channel_data, .outdata = &outdata }; + write_callback_t wrdata = { .this = this, .channel_data = channel_data, .outdata = &outdata }; if ((result = channel_set_content_type(this, channel_data)) != CHANNEL_OK) {
Channel can be used by the callbacks to call curl functions that can be evaluated later. Signed-off-by: Stefano Babic <sbabic@denx.de> --- corelib/channel_curl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)