--- parser3/src/targets/apache/mod_parser3_core.C 2017/02/07 22:00:45 1.16 +++ parser3/src/targets/apache/mod_parser3_core.C 2020/08/13 10:52:34 1.20 @@ -5,7 +5,7 @@ Parser: apache 1.3/2.X module, part, com Author: Alexandr Petrosian (http://paf.design.ru) */ -volatile const char * IDENT_MOD_PARSER3_CORE_C="$Id: mod_parser3_core.C,v 1.16 2017/02/07 22:00:45 moko Exp $"; +volatile const char * IDENT_MOD_PARSER3_CORE_C="$Id: mod_parser3_core.C,v 1.20 2020/08/13 10:52:34 moko Exp $"; #include "pa_config_includes.h" @@ -17,9 +17,8 @@ volatile const char * IDENT_MOD_PARSER3_ #include "pa_sapi.h" #include "classes.h" #include "pa_request.h" -#include "pa_socks.h" -#if _MSC_VER && !defined(_DEBUG) +#if defined(_MSC_VER) && !defined(_DEBUG) # include # define PA_SUPPRESS_SYSTEM_EXCEPTION #endif @@ -35,10 +34,7 @@ void pa_setup_module_cells() { /// no trying to __try here [yet] try { - // init socks - pa_socks_init(); - - // init global variables + // init libraries pa_globals_init(); } catch(const Exception& e) { // global problem SAPI::abort("setup_module_cells failed: %s", e.comment()); @@ -50,8 +46,6 @@ void pa_destroy_module_cells() { return; pa_globals_done(); - - pa_socks_done(); } @@ -209,9 +203,6 @@ static void real_parser_handler(SAPI_Inf GC_dont_gc=0; GC_gcollect(); GC_dont_gc=1; -#ifndef _MSC_VER - GC_large_alloc_warn_suppressed=0; -#endif #endif // populate env @@ -246,10 +237,7 @@ static void real_parser_handler(SAPI_Inf } #ifdef PA_SUPPRESS_SYSTEM_EXCEPTION -static const Exception -call_real_parser_handler__do_PEH_return_it( - SAPI_Info& SAPI_info, Parser_module_config *dcfg) -{ +static const Exception call_real_parser_handler__do_PEH_return_it(SAPI_Info& SAPI_info, Parser_module_config *dcfg) { try { real_parser_handler(SAPI_info, dcfg); } catch(const Exception& e) { @@ -258,33 +246,21 @@ call_real_parser_handler__do_PEH_return_ return Exception(); } -static void call_real_parser_handler__supress_system_exception( - SAPI_Info& SAPI_info, Parser_module_config *dcfg) -{ + +static void call_real_parser_handler__supress_system_exception(SAPI_Info& SAPI_info, Parser_module_config *dcfg) { Exception parser_exception; LPEXCEPTION_POINTERS system_exception=0; __try { - parser_exception=call_real_parser_handler__do_PEH_return_it( - SAPI_info, dcfg); - } __except ( - (system_exception=GetExceptionInformation()), - EXCEPTION_EXECUTE_HANDLER) - { - + parser_exception=call_real_parser_handler__do_PEH_return_it(SAPI_info, dcfg); + } __except ( (system_exception=GetExceptionInformation()), EXCEPTION_EXECUTE_HANDLER) { if(system_exception) if(_EXCEPTION_RECORD *er=system_exception->ExceptionRecord) - throw Exception("system", - 0, - "0x%08X at 0x%08X", er->ExceptionCode, er->ExceptionAddress); + throw Exception("system", 0, "0x%08X at 0x%08X", er->ExceptionCode, er->ExceptionAddress); else - throw Exception("system", - 0, - ""); + throw Exception("system", 0, ""); else - throw Exception("system", - 0, - ""); + throw Exception("system", 0, ""); } if(parser_exception)