From patchwork Tue Jul 9 11:08:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Glembotzki X-Patchwork-Id: 1958326 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=MdYsbVJa; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=butap9Yk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::13c; helo=mail-lf1-x13c.google.com; envelope-from=swupdate+bncbdy5juxlviebbsfxws2amgqe7mxwd7q@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-lf1-x13c.google.com (mail-lf1-x13c.google.com [IPv6:2a00:1450:4864:20::13c]) (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 4WJJLj2LThz1ySg for ; Tue, 9 Jul 2024 21:15:25 +1000 (AEST) Received: by mail-lf1-x13c.google.com with SMTP id 2adb3069b0e04-52e9d04d773sf5345453e87.2 for ; Tue, 09 Jul 2024 04:15:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720523722; cv=pass; d=google.com; s=arc-20160816; b=TSxWvkTvci0tZ9/BHV5bf25kaXcVsXBCkb3x3JaChrVTYjcNA6KVO0LSysBCUVlGxQ xocVwShddfA8n2cgTxNVG52EXkzr0IAiuMa/j8fLByouSWere5kTqyMQYPbUkSigEvPF K4kWOIl+AWJ6zs9rVnAxki2QFq0+VPKZDE9LkrxvlUNNvLxTE7IO+SLAjelEKq2xOL1f 5/c7Xk+TyPNdLex3W9A2YKb4r/hNJyAYsYSng3nBOM2No1WPhVqOhYPF9xgUZhEWyPwE jAVK8TgHXe1F+WkKFC0aoq0eUfiwlt6c+PiB232uebfF+fd7MxjnSJ7M3OUG4UtLqe3K YoWw== 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 :dkim-signature; bh=WIpM6LUeJh7/2iGPKZjVo/+v1Nzy69BLBpTgcOxRb3k=; fh=u1xMA//RIPXHT4ga4otZnYAWJGXbAvGjCf3rq4soYwo=; b=T8DBw943dNa9j7UjIsLtyuwGOkZrV++0VD+0RwMHj9UOg6Cr+7VGP9EHnEgDA0uafQ 1gIZFqIYchFgAa966S2hqu5DO2+rzuKL7+oKRvSJFyoi2Mh4akkcUSLpsAXyh9hCouZI GozkJIV+4lf7YHzgCPrEkv6vur7cRHWi2t6eLYMXSjqDzRozRQh08pe4hgP9BI6ljJbI gXEB/TaNZ//0GrQXy6aYzS7xvG9dDuKWezYe08ScvuT9VusbVLh2MGLzisDG+yTs3Ey0 PPV0bz1z8LFyVzeJ4U4bJzDXX7gqgj7dJJSVS+qEqyJ7WKbnZMn/FVHHyoQNZiExAcrb SzfQ==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="fH/GXSeD"; spf=pass (google.com: domain of m.glembo@gmail.com designates 2a00:1450:4864:20::62e as permitted sender) smtp.mailfrom=m.glembo@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720523722; x=1721128522; 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:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=WIpM6LUeJh7/2iGPKZjVo/+v1Nzy69BLBpTgcOxRb3k=; b=MdYsbVJand5nw+umRkgvIWefS3uc2U23OitZZukk2BtjBCtTJ/HcJ1IIjaOrEzAz9o emAG2qT9VK9auPgSHU28sAt7ZlREHYFtS9ZuR7H+RGlkCzl7n8l5vvwlsJ/hoe3VC/PH OfCXfzLnctvgucYDEV4pMTWDXf8CWWLPIJJzcm4W5IjIwjT6E9u6v5BGeHLPW4WgBf8F zMn+P4QhqlysYS7eRJFiUTAkWwdgPeI47UODUaD/St9jH0xL94eU9IT0Q4XjrYqk1ISH e10nifdKiSGJvjxQRSou9yA1Vj/Hvh+TfQJKcE4LgQg+fFXU6TLc8Regc9U909MxJfYF /5Tg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720523722; x=1721128522; 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:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=WIpM6LUeJh7/2iGPKZjVo/+v1Nzy69BLBpTgcOxRb3k=; b=butap9Yk6A1quhTCAbz8aRRWbIxHAK0oE4m2m7zhnotZMWsyjlK56vAgakbWBu9/hk NfVWVexnWDf9Jj/7GF3O6UD/liTYbJF23bUE66vuT4gdi34s2Y5k5xxuskSLM9GeKXfC v6OiiGvUgU0+PI58QV38icXv7JCYs9wgodzu1t41RTRHjXRe0yuzOeOKIYc9XTfQ3Iq+ ofmwc4kAeop29EFQebA/fs/BxUBaOoJll6lUET8WYRh3XTAAPFkP1FFALOC0imzSMlpZ wn4wePw2rgxHj5VEkQxs0+tB9EQZAkYpAPuQzTkXcJ+w8v0UAZWyioR5pJQnDWFvvPzF tG/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720523722; x=1721128522; 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: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=WIpM6LUeJh7/2iGPKZjVo/+v1Nzy69BLBpTgcOxRb3k=; b=VqBKgme6lUYAyzx+BjFJFrYelY776LkNflm10xMgxbeBPyc4Z5Yel0VS6jlJR4UBgw eYTzB9bPw2EbzjXucoNuy9soxfXDwwaR6uPUx5ejuNPJxie7UxH8iMSFhYvEpazcM2Du BJLvvkN2+upWSLQSmtd6tfo8bZvaW3cajT+xuv8dVSjxy70GOmRu9ZR5AT4DfxPlYGgv 13v+/RC+LnVmYB+z1sM36ha1AozruX6An85UJpU6rdBvlyk0eq3Guj9kYLpUp1Mgjomq hwNOVyv/hcyID3BpG1133ZFIRGoQLwYZOon/0kV5bYS7rT5fLLhyC2t18OwtE2TaHKhd r+EA== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUkfIyzDsA3eDJdYOQ5sPR2pa8zP5EMQI4QUfxjoS/6XUyo6aK7BDbioxZrtLtjOW67FCCqtL0x0ZYfmxROeqM839RVg1jKgCatAgN7aw== X-Gm-Message-State: AOJu0YwkCAysifa97T8DvpKkRCrGRi9LwuJLtWB11rFoegxLOtDeQpYg /PxVjTF3yF0jT+BKbJAnxhohFsghfwzngVo8fw03ZKnMLqUnA8H5 X-Google-Smtp-Source: AGHT+IFnXWDo+vo1PE4T+pQS+Ci6f93wrKbMJi/b2R7+hz4R/F89SCiYS7CNXDxhbw/O6tHVum6F6g== X-Received: by 2002:a05:6512:15a4:b0:52e:9fda:f18a with SMTP id 2adb3069b0e04-52eb99d4bf0mr1505939e87.44.1720523721391; Tue, 09 Jul 2024 04:15:21 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a19:8c41:0:b0:52e:9923:a1c2 with SMTP id 2adb3069b0e04-52e9f2e1b7als2568025e87.1.-pod-prod-03-eu; Tue, 09 Jul 2024 04:15:18 -0700 (PDT) X-Received: by 2002:a05:6512:1319:b0:52c:dbc6:8eb0 with SMTP id 2adb3069b0e04-52eb999783emr1604266e87.21.1720523718255; Tue, 09 Jul 2024 04:15:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720523718; cv=none; d=google.com; s=arc-20160816; b=uk9RAr512fW9dSgEIE6SPck4R5PiX7MXdv1+g4uXWZyHnzSFJaSkjOaD6tUh22uQVT 6UXgqvdyv9+dYRcC2wj5+rp1TKP/AyhSplCQbWaJGJ/VKe0+12vt7vArfvmold8rTOEj yqGkfVd+pQRfd9DGOEno+OcL7u4kXOAAM9RBW2BQVCw421fN4wpivi2u77b/unn0+SFS JTugnHx0VTW4LxnGzSo65t4qtDAtZZqTe5DnYxZZog1fvt3n6aZTa6slKmjG2NVRNVDc EZrBhwmUZyfbhZINuiwjCo/RcqwN0b80Lx0wyi7cuSFYgCX0MKmqtTRhqqMod+dSFHjZ DzBA== 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:dkim-signature; bh=LQzhFe9RJJySfNn6Gvv4JV2o1jUz0uCXmsH0ocHB8VY=; fh=zydHuzCQWrku2OPQyZfraJZFcOpEXLQ/YBcu3QNiBd0=; b=fK3bMGL+ucSFCI/zyHuFOSaaGXx9/ceP7cX1xA1ZcCo2akR+qHdj0tqDnF0yKCq41u Rm/ysnFEDmcv1yIBOwMXfZPqYB3/TLFOYIzjX6GD/4xR3e7KdPnvlIle5wkEo+4EhS22 ywdEikdiUdv5nG8HFk3V46DjTp7p9c3ewESoj3UpNex3KhbsUcYQHaCNC7RGI008dyQ4 EQFHpTR8q2dEQ4D3D/p8MYnJu3igyoASSXgbZ7bk13oGvpfdJ+Ve1pcmgksuZEjlx7oc EntLVojMvyhw+ZCd/c7sDluvQzIOzFN+KT4bQKKzDiOBv+T93f1nRswmy7O1/kva21ja BuNA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="fH/GXSeD"; spf=pass (google.com: domain of m.glembo@gmail.com designates 2a00:1450:4864:20::62e as permitted sender) smtp.mailfrom=m.glembo@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com. [2a00:1450:4864:20::62e]) by gmr-mx.google.com with ESMTPS id 2adb3069b0e04-52eb906596csi37186e87.12.2024.07.09.04.15.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Jul 2024 04:15:18 -0700 (PDT) Received-SPF: pass (google.com: domain of m.glembo@gmail.com designates 2a00:1450:4864:20::62e as permitted sender) client-ip=2a00:1450:4864:20::62e; Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a77c7d3e8bcso496637166b.1 for ; Tue, 09 Jul 2024 04:15:18 -0700 (PDT) X-Received: by 2002:a17:907:c1e:b0:a77:cdaa:88a9 with SMTP id a640c23a62f3a-a780b68a97cmr186539366b.6.1720523717449; Tue, 09 Jul 2024 04:15:17 -0700 (PDT) Received: from PC-2635.irisgmbh.local (dslb-002-203-138-100.002.203.pools.vodafone-ip.de. [2.203.138.100]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a780a6bc8adsm70739166b.14.2024.07.09.04.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jul 2024 04:15:17 -0700 (PDT) From: Michael Glembotzki To: swupdate@googlegroups.com Cc: Michael Glembotzki Subject: [swupdate] [V3][PATCH 08/21] mongoose: Fix mg_event_handler_t interface change Date: Tue, 9 Jul 2024 13:08:44 +0200 Message-ID: <20240709111440.8215-9-Michael.Glembotzki@iris-sensing.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240709111440.8215-1-Michael.Glembotzki@iris-sensing.com> References: <20240709111440.8215-1-Michael.Glembotzki@iris-sensing.com> MIME-Version: 1.0 X-Original-Sender: m.glembo@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="fH/GXSeD"; spf=pass (google.com: domain of m.glembo@gmail.com designates 2a00:1450:4864:20::62e as permitted sender) smtp.mailfrom=m.glembo@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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: , mongoose rev-id: 5826d0e41c83170b824d73f1bee723c1be38b8b4 Signed-off-by: Michael Glembotzki --- mongoose/mongoose_interface.c | 11 +++++------ mongoose/mongoose_multipart.c | 3 +-- mongoose/mongoose_multipart.h | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c index eecaa407..b3ebc62f 100644 --- a/mongoose/mongoose_interface.c +++ b/mongoose/mongoose_interface.c @@ -359,7 +359,7 @@ static void restart_handler(struct mg_connection *nc, void *ev_data) } static void broadcast_callback(struct mg_connection *nc, int ev, - void __attribute__ ((__unused__)) *ev_data, void __attribute__ ((__unused__)) *fn_data) + void __attribute__ ((__unused__)) *ev_data) { static uint64_t last_io_time = 0; if (ev == MG_EV_READ) { @@ -563,8 +563,7 @@ static void timer_ev_handler(void *fn_data) /* * Code common to V1 and V2 */ -static void upload_handler(struct mg_connection *nc, int ev, void *ev_data, - void __attribute__ ((__unused__)) *fn_data) +static void upload_handler(struct mg_connection *nc, int ev, void *ev_data) { struct mg_http_multipart *mp; struct file_upload_state *fus; @@ -685,7 +684,7 @@ static void websocket_handler(struct mg_connection *nc, void *ev_data) mg_ws_upgrade(nc, hm, NULL); } -static void ev_handler(struct mg_connection *nc, int ev, void *ev_data, void *fn_data) +static void ev_handler(struct mg_connection *nc, int ev, void *ev_data) { if (nc->data[0] != 'M' && ev == MG_EV_HTTP_MSG) { struct mg_http_message *hm = (struct mg_http_message *) ev_data; @@ -710,14 +709,14 @@ static void ev_handler(struct mg_connection *nc, int ev, void *ev_data, void *fn } else { nc->pfn = upload_handler; nc->pfn_data = NULL; - multipart_upload_handler(nc, ev, &hm, NULL); + multipart_upload_handler(nc, ev, &hm); } } } } else if (nc->data[0] == 'M' && (ev == MG_EV_READ || ev == MG_EV_POLL || ev == MG_EV_CLOSE)) { if (nc->recv.len >= MG_MAX_RECV_SIZE && ev == MG_EV_READ) nc->is_full = true; - multipart_upload_handler(nc, ev, ev_data, fn_data); + multipart_upload_handler(nc, ev, ev_data); if (nc->recv.len < MG_MAX_RECV_SIZE && ev == MG_EV_POLL) nc->is_full = false; #if MG_ENABLE_SSL diff --git a/mongoose/mongoose_multipart.c b/mongoose/mongoose_multipart.c index a2932356..265c02b9 100644 --- a/mongoose/mongoose_multipart.c +++ b/mongoose/mongoose_multipart.c @@ -315,8 +315,7 @@ static void mg_http_multipart_continue(struct mg_connection *c) { } } -void multipart_upload_handler(struct mg_connection *c, int ev, void *ev_data, - void __attribute__ ((__unused__)) *fn_data) +void multipart_upload_handler(struct mg_connection *c, int ev, void *ev_data) { struct mg_http_message *hm = (struct mg_http_message *) ev_data; struct mg_http_multipart_stream *mp_stream = c->pfn_data; diff --git a/mongoose/mongoose_multipart.h b/mongoose/mongoose_multipart.h index 1d2b7dcf..e0dee845 100644 --- a/mongoose/mongoose_multipart.h +++ b/mongoose/mongoose_multipart.h @@ -43,4 +43,4 @@ struct mg_http_multipart { size_t len; }; -void multipart_upload_handler(struct mg_connection *nc, int ev, void *ev_data, void *fn_data); +void multipart_upload_handler(struct mg_connection *nc, int ev, void *ev_data);