--- parser3/src/classes/op.C 2002/05/07 07:39:17 1.95 +++ parser3/src/classes/op.C 2002/06/20 14:50:22 1.97 @@ -4,7 +4,7 @@ Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - $Id: op.C,v 1.95 2002/05/07 07:39:17 paf Exp $ + $Id: op.C,v 1.97 2002/06/20 14:50:22 paf Exp $ */ #include "classes.h" @@ -100,6 +100,7 @@ static void _taint(Request& r, const Str } static void _process(Request& r, const String& method_name, MethodParams *params) { + Pool& pool=r.pool(); // calculate pseudo file name of processed chars // would be something like "/some/file(4) process" char local_place[MAX_STRING]; @@ -133,6 +134,7 @@ static void _process(Request& r, const S // maybe-define new @main r.use_buf( source.cstr(String::UL_UNSPECIFIED, r.connection(0)), + *new(pool) String(pool, heap_place, place_size, true /*tainted*/), heap_place, &self_class); @@ -400,7 +402,8 @@ const String *locked_process_and_cache_p "cache_put", locked_process_and_cache_put_action, &info, false/*as_text*/, false/*do_append*/, - false/*block*/) ? info.evaluated_body: 0; + false/*block*/, + false/*fail on lock problem*/) ? info.evaluated_body: 0; if(data.expires==0) cache_delete(file_spec); return result; @@ -629,7 +632,7 @@ static void _throw_operator(Request& r, const char *type=params->as_string(0, "type must be string").cstr(); const String& source=params->as_string(1, "source must be string"); const char *comment=params->size()>2?params->as_string(2, "comment must be string").cstr():0; - throw Exception(type, &source, "%s", comment); + throw Exception(type, &source, "%s", comment?comment:""); } }