Browse Source

Roll back merge #193

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
bel2125 10 years ago
parent
commit
c1832493a4
2 changed files with 0 additions and 17 deletions
  1. 0 10
      include/civetweb.h
  2. 0 7
      src/civetweb.c

+ 0 - 10
include/civetweb.h

@@ -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 */

+ 0 - 7
src/civetweb.c

@@ -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)