Merge "added public mg_is_context_stopped() function #193" adds a function, which will cause a memory use after free during normal operation. See comment https://github.com/civetweb/civetweb/pull/193#issuecomment-131705655
@@ -743,16 +743,6 @@ CIVETWEB_API int mg_get_response(struct mg_connection *conn,
CIVETWEB_API unsigned mg_check_feature(unsigned feature);
-/* Get the stopping status of a given civetweb context.
-
- Return:
- 0: context is running normally
- 1: context is shutting down
- 2: context has stopped
- -1: Invalid context
- */
-CIVETWEB_API int mg_is_ctx_stopped(const struct mg_context *ctx);
#ifdef __cplusplus
}
#endif /* __cplusplus */
@@ -10789,13 +10789,6 @@ struct mg_context *mg_start(const struct mg_callbacks *callbacks,
return ctx;
-int mg_is_ctx_stopped(const struct mg_context *ctx)
-{
- if (!ctx)
- return -1;
- return ctx->stop_flag;
-}
/* Feature check API function */
unsigned mg_check_feature(unsigned feature)