--- parser3/src/main/pa_request.C 2003/01/29 15:39:28 1.245.2.2 +++ parser3/src/main/pa_request.C 2003/03/17 14:48:06 1.245.4.1 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_REQUEST_C="$Date: 2003/01/29 15:39:28 $"; +static const char* IDENT_REQUEST_C="$Date: 2003/03/17 14:48:06 $"; #include "pa_sapi.h" #include "pa_common.h" @@ -56,8 +56,8 @@ Request::Request(Pool& apool, fclasses(apool), fdefault_lang(adefault_lang), flang(adefault_lang), info(ainfo), - charsets(UTF8_charset, UTF8_charset, UTF8_charset), post_data(0), post_size(0), + used_files(apool), configure_admin_done(false), default_content_type(0), mime_types(0), @@ -72,8 +72,8 @@ Request::Request(Pool& apool, finterrupted(false) { // default charsets - pool().set_source_charset(UTF8_charset); - pool().set_client_charset(UTF8_charset); + pool().set_source_charset(*utf8_charset); + pool().set_client_charset(*utf8_charset); // maybe expire old caches cache_managers->maybe_expire(); @@ -176,7 +176,7 @@ struct timeval mt[10]; gettimeofday(&mt[0],NULL); #endif try { - char *auto_filespec=(char *)malloc(MAX_STRING); + char *auto_filespec=(char *)malloc_atomic(MAX_STRING); // loading config if(config_filespec) { @@ -392,7 +392,7 @@ t[9]-t[3] const Origin& origin=name->origin(); if(origin.file) { row+=NEW String(pool(), origin.file, 0, true); // file column - char *buf=(char *)malloc(MAX_NUMBER); + char *buf=(char *)malloc_atomic(MAX_NUMBER); size_t buf_size=snprintf(buf, MAX_NUMBER, "%d", 1+origin.line); row+=NEW String(pool(), buf, buf_size, true); // line column } @@ -412,7 +412,7 @@ t[9]-t[3] // doing that ugly // make up result: $origin $source $comment $type $code - char *buf=(char *)malloc(MAX_STRING); + char *buf=(char *)malloc_atomic(MAX_STRING); size_t printed=0; if(const String *problem_source=e.problem_source()) { #ifndef NO_STRING_ORIGIN @@ -455,7 +455,7 @@ VStateless_class *Request::use_file(VSta // cyclic dependence check if(used_files.get(file_name)) return 0; - used_files.put(file_name, true); + used_files.put(file_name, (Hash::Val *)true); const String *file_spec; if(ignore_class_path) // ignore_class_path? @@ -530,7 +530,7 @@ VStateless_class *Request::use_buf(VStat const String& Request::relative(const char *apath, const String& relative_name) { int hpath_buf_size=strlen(apath)+1; - char *hpath=(char *)malloc(hpath_buf_size); + char *hpath=(char *)malloc_atomic(hpath_buf_size); memcpy(hpath, apath, hpath_buf_size); String& result=*NEW String(pool()); if(rsplit(hpath, '/')) // if something/splitted