From patchwork Sat Jun 15 19:11:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Glembotzki X-Patchwork-Id: 1948201 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=pqoVSd4A; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=NGhClTTQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::23b; helo=mail-lj1-x23b.google.com; envelope-from=swupdate+bncbdy5juxlviebb5wsw6zqmgqerop5ywq@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-lj1-x23b.google.com (mail-lj1-x23b.google.com [IPv6:2a00:1450:4864:20::23b]) (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 4W1mFS5pCnz20fR for ; Sun, 16 Jun 2024 05:20:28 +1000 (AEST) Received: by mail-lj1-x23b.google.com with SMTP id 38308e7fff4ca-2ebeddcba43sf22539831fa.2 for ; Sat, 15 Jun 2024 12:20:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718479224; cv=pass; d=google.com; s=arc-20160816; b=xJgnYnbTm/u0+OXXOSfoEPLawMuBJP2Xruh4bSELzlHqL/pztqhvy0FI3gw1m2fLr/ 02Kfx21qr0frA+OScExEgRuH04pPmjaXQY5Bi3tng0+/VWnQTuvEkMctzoQrWDFMr5Hz g5n28wBHaZ/wD2wAGYViOIlk2b/GTScvHXCT+1RU36MSvBRX53QqVfxS28Rb5voRzBQW /QGICyMXnKFBOQgW5kVUXoR4hgDY5WVlVa4GpDXCFPGfVXpnSBeKL/zR2o/d+4XP8e+7 ZDBIkxq43PCOlpiDpQOvxpGF4hIL9RUbYV8SU/juUDaWd3GrBUjQKyO+pHcJziLfF8g4 fWJg== 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=LFy4hjVQ3hSxwZoojySZECFRKb5HPQZaASLPimNxA8s=; fh=708ivVwxd6RpotFnFS2CsohMDWivqbTT+tmyfXlIMIA=; b=F3zoRjFHQysvqrYR7Iaj8gBiT3L7E8EgWDYtPNbiUfaNJTlv6j0c270wJuEhljX3eA XA7J5YWyzumsJmlWyvyZs01wHahZ91xydVYMp3iihgn2zymxUJhVBKN+/N8yXdVFSPWF ch7GW71NNlMxh7VJoPS3FyKKn+dL1yAjpL28MviJr8JbrV02ThrseuCa7kSgt3kBYdMx XacyDp8uSmroARoDejkURVyUmZFWGJmb5iUqHZn7SXmHiNUwhL+Hqag+9FdGH3hwsG// c2t66Zfg9QwVztmAZ0NbM0qG1p0HtFt70n1U7lCrcIMJMFwaBcyPzhv7dON8b7LJ94RA NXkw==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="dt5B0E/H"; spf=pass (google.com: domain of m.glembo@gmail.com designates 2a00:1450:4864:20::52e 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=1718479224; x=1719084024; 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=LFy4hjVQ3hSxwZoojySZECFRKb5HPQZaASLPimNxA8s=; b=pqoVSd4ACfMp9ru1zzpJ0yRJwLAe/kYlY4BKJ0qOUH9V8HlYIsnDQ2XrYntkg3/feG OxANj3+zrsaMBfR6RrUyTO8yWeIky8D1PiDw1A2vp4M9v1tE4CtOzuwPyGx+nmwBOJzE 2lapFtc8r/51NgBtoVjysRXrS+t8GTNrePh+AZXh3jixPswJcS+TGeNucph63txn6laf mUJ4MoXMemZPgiXoWy4snY5mHd6sKvf/IwcH1g8vsH5ADdE0jOla82U2AKnr/Wt0PafH V+/uRbSBDzdbdOWQzqJcnd4K8KzgBnoqWaW2wvfmkPj6WgejIVtsjpIRXjqfg7ilLa8Z UBDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718479224; x=1719084024; 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=LFy4hjVQ3hSxwZoojySZECFRKb5HPQZaASLPimNxA8s=; b=NGhClTTQMf6l72Wz48qDLGohcCivlLT/xUIRwwAAw10OuPvsLWiK2lJFvBHFSAE75Q 0rxhXI95+XE2SYFT7PS+zLRNmCviAIlaiV9jkl9RLtsykUwFnC96Jlz4eL3kd+ZBOZ9h s7LzJ318HrBduxnToO0/cUV4mz4D4di6WyuF3PIg2/Daz5ma4efgWeOyEvfbCA+eKy84 UM4gNevZ/k/AVqHX8rIAuaoSEvAocLcVkBMsvMC0jZY1mHY9GkWUA1goPQTX0qvWPVCG xEo8lmZzi0shLumRlcpdN4mh/3ABdd1NbDjewKMbjM/Iwc3zm2qqdIWvPTKmRslgM/Dz ZtGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718479224; x=1719084024; 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=LFy4hjVQ3hSxwZoojySZECFRKb5HPQZaASLPimNxA8s=; b=QIoYrcFpI8IVIcVLiRGiLM1TfcA6hC1k7AxtzQa1RodnBLveS/zDaZxMrRbAmkUrmZ mtiDB9Zq8fMn0vCbz40EoEEpH1Ub7qqEk8m2GuPl8eedHlkCXmS5rgtU8Ufi0G/Bk9jM P1aGQQJPeQocrFSWCytQskZAeEJxOvwt30yfwVxlfpda/Krbdyv1wjTdjJXjCWXwHCfs hU1OOJsZhoNg7INwbZLzzsS/P4H72KuZWZpjjSeDQwmAYexGdWSBFp/xSpD1NR5DCSdv bNS5c+fqAlC9adQuxP0N2yjUGoiQEFGwjvY4zVehjTZyqpuWBUZCE1gW1seRkRgFi4dg aU0A== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCW+i7N3XdvCoO1Q2IyMFEici3Aj8qy4i8A9Oh45ZM57Y8dkU2ekVpqy2ISnjWjgbTtc7KKF/PdqEx6YDOLaOOGdyahgg8Xpv47qCLVEKA== X-Gm-Message-State: AOJu0YxSgE3eq6F3efkzfEKZfCJYgknm3YM8WmQXvDIC+xtJap73PyX7 hclm9sXE3EUT/5ijCZQt89AwoFNyoIfbGFarjmsL0Dnuzlt/Mk+N X-Google-Smtp-Source: AGHT+IF9hsZN6WCis26pJpC2L0WuarpvWcMI+nqY9LALr9okXjPELKoOzSFkqaiUiEH0noV0ljxuvA== X-Received: by 2002:a2e:86ca:0:b0:2ec:2508:f370 with SMTP id 38308e7fff4ca-2ec2508f404mr7703451fa.51.1718479223123; Sat, 15 Jun 2024 12:20:23 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:651c:237:b0:2eb:e93b:935 with SMTP id 38308e7fff4ca-2ec0284c0bbls15083071fa.0.-pod-prod-06-eu; Sat, 15 Jun 2024 12:20:20 -0700 (PDT) X-Received: by 2002:a2e:8751:0:b0:2ec:174b:75bb with SMTP id 38308e7fff4ca-2ec174b77d9mr30838771fa.28.1718479220154; Sat, 15 Jun 2024 12:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718479220; cv=none; d=google.com; s=arc-20160816; b=tkcLhJU3B3BWR5GXTGFI3kervYe8dC/y1cCMjjfHh+1KNioKtiCwD7IL4ySq5fPLn7 r0rBCoFUHriRL5YwJT2pCbAB+P3l1UvfDgujYfH/716P+hZJ2fZEgw4XLjo4+6wAvYFn 3OjehfBUs9C63UBgs7gL9wmkYf6JWTbDgnIbWVke2x7WRIMdInhdVF/PyiSIgaFiIWBh g7esIh4A2Mj30i+M56Y4xsT2jJYPJbV25uuqSLMpkk/K/oGbVd7nv7NXIyqHPpUdIH7j hV53QNve/8gziM62RaYl13uueJjU0pxbh6+HF12Dba774I/TYrn4QXLtdyTKZePzABdx jU3w== 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=MFw/rdtK8lcMHhSiiz1P3ghiQAWx/SwrHGGAHsBwrZKOXjHRfWkCwCmp4RIR2uJDE3 6ATzQrJekk2jq5KAN3iNUxZ6YEblKxCNG6/csxyPIJWcu1mnul/nSXOKQOraJ3M/0iRg OKImzK8sl41qGopW2TtwreEh0cevXhPmqHCBKuB98D9XZ3mXzfA4u6nVGjXRfzuKK1GO A6INRlr+WibODqTQNOnVsFuP+/kOVuz+TIB8dKXR4/8c5ek/JSD891a639iODQ0oWblW 4rZr73gRnImNfU2trY0TTP1ODMni2lPBs3Wb+Yq30p46bprewKeeon/UDVFukpykva9X W4NA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="dt5B0E/H"; spf=pass (google.com: domain of m.glembo@gmail.com designates 2a00:1450:4864:20::52e as permitted sender) smtp.mailfrom=m.glembo@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com. [2a00:1450:4864:20::52e]) by gmr-mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb743880asi111227a12.3.2024.06.15.12.20.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 15 Jun 2024 12:20:20 -0700 (PDT) Received-SPF: pass (google.com: domain of m.glembo@gmail.com designates 2a00:1450:4864:20::52e as permitted sender) client-ip=2a00:1450:4864:20::52e; Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-57cce3bc8c6so705486a12.3 for ; Sat, 15 Jun 2024 12:20:20 -0700 (PDT) X-Received: by 2002:a17:906:91b:b0:a69:2288:41da with SMTP id a640c23a62f3a-a6f60d1e08bmr370140566b.30.1718479219378; Sat, 15 Jun 2024 12:20:19 -0700 (PDT) Received: from PC-2635.irisgmbh.local ([2a02:8108:96c0:76fc::80bb]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db61e0sm327283766b.49.2024.06.15.12.20.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 12:20:18 -0700 (PDT) From: Michael Glembotzki To: swupdate@googlegroups.com Cc: Michael Glembotzki Subject: [swupdate] [PATCH 08/21] mongoose: Fix mg_event_handler_t interface change Date: Sat, 15 Jun 2024 21:11:21 +0200 Message-ID: <20240615191941.40301-9-Michael.Glembotzki@iris-sensing.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240615191941.40301-1-Michael.Glembotzki@iris-sensing.com> References: <20240615191941.40301-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="dt5B0E/H"; spf=pass (google.com: domain of m.glembo@gmail.com designates 2a00:1450:4864:20::52e 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);