Message ID | 20211011112156.44192-15-sbabic@denx.de |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRB5F4SCFQMGQEKUIZBKA@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=BYLRlwHL; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::53c; helo=mail-ed1-x53c.google.com; envelope-from=swupdate+bncbcxploxj6ikrb5f4scfqmgqekuizbka@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-ed1-x53c.google.com (mail-ed1-x53c.google.com [IPv6:2a00:1450:4864:20::53c]) (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 4HSbxM6k7Lz9sPB for <incoming@patchwork.ozlabs.org>; Mon, 11 Oct 2021 22:22:31 +1100 (AEDT) Received: by mail-ed1-x53c.google.com with SMTP id i7-20020a50d747000000b003db0225d219sf15658367edj.0 for <incoming@patchwork.ozlabs.org>; Mon, 11 Oct 2021 04:22:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1633951348; cv=pass; d=google.com; s=arc-20160816; b=N1hx7KoQ6fewGxYsFDJX9J2I5o0jPFkpvUiFayBOb7xhCp5LzmDSv2C+dGK3jiYdrh Lrw7CExEYhm8KPJx6NMWFaLeiWqxmSXUFZynJ1xbaLk56B0qGfJZKE5pCSwECyNaccnO BVFZycArogCfoRfE0yabYp+/dY/76/bjsd0wBBiA73MjVJ1p/TpsU0dT9xx1ojhWthIK jhgm2plqZl2NjCL9+/p/ikyes9YgmRnhXVoQ40ziehPuxknKf8x9qDOjSEyjSA49GoA5 2F9jOekE86PMjX4BG0vAm3dyKW+VtifMn8gcFT4pjEhbxMf4WVRD3PcIl9E6oG0sG3tL WJ1w== 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=X9k4qZ6t3Lyb6XGPdwwRiZlreY8zf1VGSJ1xu3CLJ14=; b=aMllb5+Bzek5HmtSnJqm7zAaMD9C7nBgDAUfe2Ezcz+NlimF/b+bgpPOCCYBuzMeNQ +7IeZTES2eYNxTs6oAyCDWO6LGdFKSIx3i0bTgP/VyId3tb7Y0FrOO8mGiuLZLDddS3r AhkweVxrDu9jb3vkjoI0JgWNvGFQLmAJfyADZX7mnCeR3fb3wrNoqejJjCHukdjKpNXw XTI9AAOQPl1MGLck+jRIAVTWHMq/pUArETFTx1gsB/B5vfVc7zp7lCX+F/wxYSqr9uW1 ro3qufoBt7v56nguXshvezJGpKcdIXBMYlInLANunGqGi1dY2oIJdIlWZ7l89Sq1O1c2 auZg== 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=X9k4qZ6t3Lyb6XGPdwwRiZlreY8zf1VGSJ1xu3CLJ14=; b=BYLRlwHLjyCAdI0TyChh+7wkGZFqR9tAHivGbH+WYSVz1d+LwWsP/s7w/Uuqb7UWGv r552cgwfLgRdluOKvfptbX3a8Ogr2I3ppOCkivTQtT8RMgFGS7gv0mrEW0E+0iy0loXN g9RcsPjILrzAo9aL8vI/Q/VGPAtVOBOTUPt0JlnMUiGCH23xeyxlLV+fjhGVDs0I8rEN cfk4Afv4EpBRzESKfL+T7rLSIck9vW8Q/bba34OvjpkwRpm25eXc0mYZhrdUqXh+SATA rQMOI1rjksBhxbPAcw+Yl8VDTRRrhzfvXyOcRHQEEgr4+IZr22oKZAXIzIXgNza7hsNy NyyA== 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=X9k4qZ6t3Lyb6XGPdwwRiZlreY8zf1VGSJ1xu3CLJ14=; b=4GHEdWBRCXd1jC3g4moxVPWYxJbuUlC5OmtHDMSGTPGgFKP/xJG2fUIrAJxJdesa57 521Q0VNlqqSrchcNxbMSvfp6dE/OFr7DS9iQqZ8U4rxrA/c8iNwC5kg+hmfLQOcYdJGZ okByyLm+mRtV6D65NsA9AZ2PBEoMMkKDppQG1IiqF9qTGjOaawnwm7pd2r5VyM5sEP6O N2PTFCRLS6PbV8BV08LDY/Vf+Vaw7nQa/RY3myFgBFzjOQvoONNtH7cDlRVAQ98Bg6e3 vLzW822LeUVWUlSz0LIq0iHoUhwJ6e6hebOC96G4p9HJuYl4q53VIdbevZlD9zZfAst6 YfPQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530JOcAMVBnBDrZ9nd9r2USOVhZSvz1njAjEKVw2txmXtM+m1eNp Su0hN57jqpeT/FSXyKjvgc0= X-Google-Smtp-Source: ABdhPJxeHugaLRRMDZ+PKBSK6/ZhsXFVEkntppxb7V6xKLWhjzL7ZCCdcjgswrmSoMQWdkGXSZx6rg== X-Received: by 2002:a17:906:5cf:: with SMTP id t15mr24952222ejt.375.1633951348730; Mon, 11 Oct 2021 04:22:28 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:aa7:d39a:: with SMTP id x26ls3586065edq.2.gmail; Mon, 11 Oct 2021 04:22:28 -0700 (PDT) X-Received: by 2002:a05:6402:4315:: with SMTP id m21mr3833058edc.277.1633951348001; Mon, 11 Oct 2021 04:22:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633951347; cv=none; d=google.com; s=arc-20160816; b=PGdmaWCETa4vxEnZHl3WgEHG+B/Xw6H/JNfKLhtfX3mSq+jrs0e5gH1o2AiFI5MutT cxW1bqGbW1B677D3pDEJb2P+thxcTi6qF8zafHLUxhGJPpXNfpC5fvPFtySLkn2iuSS7 8r1x0GIMREg7oDheSMbiCrR8GF8U93LShOfP5+vYNFeYplCokd2kn2+DE9s39M35iVvq YzUe2rMgE37Eh1otlVH2p160GWvWpjSgn4V9jb+lPrZ0CxmohLl4BTvFD1GREC1bS436 OUEbj72+rAmn+Tnej4vnYOu2Dwaya+QNfXHRMVWwQZl84O5LseIFmpwSgjlpQTEB6u2E A49Q== 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=6Ujpyue4nj25aGfOCR7uCSG147aHOvtpSqVYHaCCyag=; b=Adp78tAPPcnwW6ohfvNY92INXHnkFtVmM1RkF0Sr3vvB2AuZeWGa6QqTywe5ZshK9t w2CnfdgkhYc/ICSi8ueCx8Y41zHA8vD9TB+FWG1Rf6o8uAv/ZbQUpMSKwF/O80cHfQ9L FtpEw/SAwsB8+e6W6bn5HL7E8o9fYwtvJQMS6UumeGpXW7xD2y+xch1Z38l/2knnI94i 436UfX8esYmu5GLLqbfVMpCk3NwT1b1KBs3Cds9jozZNU57EN8aOIssAc3oxq6wblHU+ QaO0bFzLz8+f39MTV6aCoJGvy+Roj1Avyd3UYK3p0OlP1XVGLCJbsGfp6u8eoVFq88AM /1GQ== 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 i5si566452edk.3.2021.10.11.04.22.27 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Oct 2021 04:22:27 -0700 (PDT) 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 4HSbxH5dPrz1qwH2; Mon, 11 Oct 2021 13:22:27 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HSbxH5WXbz1qqkD; Mon, 11 Oct 2021 13:22:27 +0200 (CEST) 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 8Wu3ie4oYIkW; Mon, 11 Oct 2021 13:22:27 +0200 (CEST) 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; Mon, 11 Oct 2021 13:22:27 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 97F9B4541344; Mon, 11 Oct 2021 13:22:26 +0200 (CEST) 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 EuZRAXWVReJB; Mon, 11 Oct 2021 13:22:24 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 5D30C4542693; Mon, 11 Oct 2021 13:22:05 +0200 (CEST) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH 14/29] channel_curl: pass channel_data to headers callback Date: Mon, 11 Oct 2021 13:21:41 +0200 Message-Id: <20211011112156.44192-15-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211011112156.44192-1-sbabic@denx.de> References: <20211011112156.44192-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 be553f0..20323b7 100644 --- a/corelib/channel_curl.c +++ b/corelib/channel_curl.c @@ -450,7 +450,8 @@ static int channel_callback_xferinfo_legacy(void *p, double dltotal, double dlno static size_t channel_callback_headers(char *buffer, size_t size, size_t nitems, void *userdata) { - struct dict *dict = (struct dict *)userdata; + channel_data_t *channel_data = (channel_data_t *)userdata; + struct dict *dict = channel_data->received_headers; char *info = malloc(size * nitems + 1); char *p, *key, *val;
Headers callback collects the headers in a distionary and receive as parameter the pointer to it. The callback can require more information if the headers must be evaluated, then pass the curl's setup (channel_data_t) instead of just the dictionary. Signed-off-by: Stefano Babic <sbabic@denx.de> --- corelib/channel_curl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)