--- parser3/src/main/pa_request.C 2001/04/07 10:34:45 1.101 +++ parser3/src/main/pa_request.C 2001/04/07 13:56:46 1.103 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_request.C,v 1.101 2001/04/07 10:34:45 paf Exp $ + $Id: pa_request.C,v 1.103 2001/04/07 13:56:46 paf Exp $ */ #include "pa_config_includes.h" @@ -55,7 +55,8 @@ Request::Request(Pool& apool, used_files(apool), default_content_type(0), mime_types(0), - connection(0), protocol2library(0) + connection(0), protocol2library(0), + mail(0) { // root superclass, // parent of all classes, @@ -90,7 +91,7 @@ Request::Request(Pool& apool, all located classes become children of one another, composing class we name 'MAIN' - @todo figure out 'setlocale' thread safety + @test get read of setlocale */ void Request::core(const char *root_auto_path, bool root_auto_fail, const char *site_auto_path, bool site_auto_fail, @@ -215,6 +216,14 @@ void Request::core(const char *root_auto "locale is invalid"); } + // $MAIN:MAIL[$SMTP[mail.design.ru]] + if(Value *mail_element=main_class->get_element(*mail_name)) + if(!(mail=mail_element->get_hash())) + THROW(0, 0, + 0, + "$MAIN:MAIL is not hash"); + + // execute @main[] const String *body_string=execute_method(*main_class, *main_method_name); if(!body_string)