--- parser3/src/classes/op.C 2003/04/08 12:47:29 1.127.2.22.2.31 +++ parser3/src/classes/op.C 2003/07/24 11:31:20 1.129 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_OP_C="$Date: 2003/04/08 12:47:29 $"; +static const char* IDENT_OP_C="$Date: 2003/07/24 11:31:20 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -298,9 +298,12 @@ r.sql_connect_time+=t[1]-t[0]; // execute body try { r.write_assign_lang(r.process(body_code)); + connection->commit(); + connection->close(); } catch(...) { // process problem - connection->mark_to_rollback(); - rethrow; + connection->rollback(); + connection->close(); + rethrow; } } @@ -432,7 +435,7 @@ const String* locked_process_and_cache_p Value& body_code, Cache_data& data, const String& file_spec) { - Locked_process_and_cache_put_action_info info; + Locked_process_and_cache_put_action_info info={0}; info.r=&r; info.data=&data; info.body_code=&body_code; @@ -449,8 +452,8 @@ const String* locked_process_and_cache_p cache_delete(file_spec); return result; } -const String* cache_get(Charset& charset, const String& file_spec, time_t now) { - File_read_result file=file_read(charset, file_spec, +const String* cache_get(Request_charsets& charsets, const String& file_spec, time_t now) { + File_read_result file=file_read(charsets, file_spec, false/*as_text*/, 0, //no params false/*fail_on_read_problem*/); @@ -535,7 +538,7 @@ static void _cache(Request& r, MethodPar // |lockSH succeeds; ... for(int retry=0; retry<2; retry++) { - if(const String* cached_body=cache_get(r.charsets.source(), file_spec, now)) { // have cached copy? + if(const String* cached_body=cache_get(r.charsets, file_spec, now)) { // have cached copy? // write it out r.write_assign_lang(*cached_body); // happy with it