From cf53f3da4f7e6453516f8ceaff29206fa0d0f994 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Thu, 16 Aug 2012 20:20:18 +0100 Subject: [PATCH] Revert "Added MG_SHUTDOWN event" This reverts commit 15a0d819ede70398db936977ddb0ecf6cf32a195. There is no point in MG_SHUTDOWN. Thread that calls mg_stop() can do the same thing. --- mongoose.c | 1 - mongoose.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/mongoose.c b/mongoose.c index 3b6edd4e..51f5a9f5 100644 --- a/mongoose.c +++ b/mongoose.c @@ -4303,7 +4303,6 @@ static void free_context(struct mg_context *ctx) { } void mg_stop(struct mg_context *ctx) { - call_user(fc(ctx), MG_SHUTDOWN); ctx->stop_flag = 1; // Wait until mg_fini() stops diff --git a/mongoose.h b/mongoose.h index 7ac07faf..c5e6e4ba 100644 --- a/mongoose.h +++ b/mongoose.h @@ -59,8 +59,7 @@ enum mg_event { MG_EVENT_LOG, // Mongoose logs an event, request_info.log_message MG_INIT_SSL, // Mongoose initializes SSL. Instead of mg_connection *, // SSL context is passed to the callback function. - MG_REQUEST_COMPLETE, // Mongoose has finished handling the request - MG_SHUTDOWN // Called when Mongoose stops, request_info is empty. + MG_REQUEST_COMPLETE // Mongoose has finished handling the request }; // Prototype for the user-defined function. Mongoose calls this function