diff mbox series

[09/23] mongoose: Replace deprecated event MG_EV_HTTP_CHUNK

Message ID 20240612144010.470339-10-Michael.Glembotzki@iris-sensing.com
State Changes Requested
Headers show
Series Update Mongoose Version to 7.14 | expand

Commit Message

Michael Glembotzki June 12, 2024, 2:36 p.m. UTC
mongoose rev-id: 736e7a2cf96b4768e2c5c32985becad839750947

Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>
---
 mongoose/mongoose_interface.c | 2 +-
 mongoose/mongoose_multipart.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c
index 86459c33..2ccf4414 100644
--- a/mongoose/mongoose_interface.c
+++ b/mongoose/mongoose_interface.c
@@ -714,7 +714,7 @@  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, MG_EV_HTTP_CHUNK, &hm, NULL);
+					multipart_upload_handler(nc, ev, &hm, NULL);
 				}
 			}
 		}
diff --git a/mongoose/mongoose_multipart.c b/mongoose/mongoose_multipart.c
index 3361169c..a2932356 100644
--- a/mongoose/mongoose_multipart.c
+++ b/mongoose/mongoose_multipart.c
@@ -336,7 +336,7 @@  void multipart_upload_handler(struct mg_connection *c, int ev, void *ev_data,
 		return;
 	}
 
-	if (ev == MG_EV_HTTP_CHUNK) {
+	if (ev == MG_EV_READ) {
 		if(mg_vcasecmp(&hm->method, "POST") != 0) {
 			mg_http_reply(c, 405, "", "%s", "Method Not Allowed\n");
 			c->is_draining = 1;