stas 2004/07/09 17:37:06
Modified: t/response/TestAPI aplog.pm t/response/TestCompat apache.pm xs/maps apache_structures.map . Changes Log: Apache::ServerRec accessors changes: - readonly accessors: process, next, is_virtual, module_config, lookup_defaults, addrs and path - readwrite accessors with the exception of threaded mpms, where the accessors are writable only before the child_init phase (i.e. before threads are spawned): server_admin, server_hostname, port, error_fname, error_log, loglevel, timeout, keep_alive_timeout, keep_alive_max, keep_alive, names, wild_names, limit_req_line, limit_req_fieldsize and limit_req_fields Revision Changes Path 1.17 +16 -8 modperl-2.0/t/response/TestAPI/aplog.pm Index: aplog.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/aplog.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -u -u -r1.16 -r1.17 --- aplog.pm 19 Jan 2004 16:25:54 -0000 1.16 +++ aplog.pm 10 Jul 2004 00:37:06 -0000 1.17 @@ -6,8 +6,9 @@ use Apache::Test; use Apache::TestUtil; -use Apache::Log (); use Apache::RequestRec (); +use Apache::Log (); +use Apache::MPM (); use Apache::Const -compile => qw(OK :log); use APR::Const -compile => qw(:error SUCCESS); @@ -62,15 +63,22 @@ t_server_log_error_is_expected(); $s->log_error('$s->log_error test ok'); - $s->loglevel(Apache::LOG_INFO); + # XXX: at the moment we can't change loglevel after server startup + # in a threaded mpm environment + if (!Apache::MPM->is_threaded) { + $s->loglevel(Apache::LOG_INFO); + + if ($s->error_fname) { + #XXX: does not work under t/TEST -ssl + $slog->debug(sub { die "set loglevel no workie" }); + } - if ($s->error_fname) { - #XXX: does not work under t/TEST -ssl - $slog->debug(sub { die "set loglevel no workie" }); + $s->loglevel(Apache::LOG_DEBUG); + $slog->debug(sub { ok 1; "$package test done" }); + } + else { + ok 1; } - - $s->loglevel(Apache::LOG_DEBUG); - $slog->debug(sub { ok 1; "$package test done" }); Apache->warn("Apache->warn test ok"); $s->warn('$s->warn test ok'); 1.14 +1 -1 modperl-2.0/t/response/TestCompat/apache.pm Index: apache.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestCompat/apache.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -u -u -r1.13 -r1.14 --- apache.pm 9 Jul 2004 15:12:56 -0000 1.13 +++ apache.pm 10 Jul 2004 00:37:06 -0000 1.14 @@ -62,7 +62,7 @@ Apache->httpd_conf('ServerAdmin [EMAIL PROTECTED]'); ok t_cmp($r->server->server_admin, '[EMAIL PROTECTED]', 'Apache->httpd_conf'); - $r->server->server_admin($admin); + Apache->httpd_conf("ServerAdmin $admin"); ok t_filepath_cmp(canonpath(Apache::Test::config()->{vars}->{serverroot}), canonpath($Apache::Server::CWD), 1.28 +22 -22 modperl-2.0/xs/maps/apache_structures.map Index: apache_structures.map =================================================================== RCS file: /home/cvs/modperl-2.0/xs/maps/apache_structures.map,v retrieving revision 1.27 retrieving revision 1.28 diff -u -u -r1.27 -r1.28 --- apache_structures.map 4 Jun 2004 03:20:46 -0000 1.27 +++ apache_structures.map 10 Jul 2004 00:37:06 -0000 1.28 @@ -72,31 +72,31 @@ </request_rec> <server_rec> - process - next +< process +< next - defn_name - defn_line_number - server_admin - server_hostname - port - error_fname - error_log - loglevel - is_virtual - module_config - lookup_defaults - addrs - timeout - keep_alive_timeout - keep_alive_max - keep_alive - path +$ server_admin +$ server_hostname +$ port +$ error_fname +$ error_log +$ loglevel +< is_virtual +< module_config +< lookup_defaults +< addrs +$ timeout +$ keep_alive_timeout +$ keep_alive_max +$ keep_alive +< path - pathlen - names - wild_names - limit_req_line - limit_req_fieldsize - limit_req_fields +$ names +$ wild_names +$ limit_req_line +$ limit_req_fieldsize +$ limit_req_fields </server_rec> <conn_rec> 1.407 +19 -0 modperl-2.0/Changes Index: Changes =================================================================== RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.406 retrieving revision 1.407 diff -u -u -r1.406 -r1.407 --- Changes 9 Jul 2004 08:01:19 -0000 1.406 +++ Changes 10 Jul 2004 00:37:06 -0000 1.407 @@ -12,6 +12,25 @@ =item 1.99_15-dev +Apache::ServerRec accessors changes: [Stas] +- readonly accessors: + + process, next, is_virtual, module_config, lookup_defaults, addrs + and path + +- readwrite accessors with the exception of threaded mpms, where the + accessors are writable only before the child_init phase (i.e. before + threads are spawned): + + server_admin, server_hostname, port, error_fname, error_log, + loglevel, timeout, keep_alive_timeout, keep_alive_max, keep_alive, + names, wild_names, limit_req_line, limit_req_fieldsize and + limit_req_fields + +supports a new type of struct accessor, which is just like read/write +one, but doesn't allow write access starting at the ChildInit phase +under threaded mpm (to avoid thread-safely issues) [Stas] + In order to be consistent with Apache::RequestRec, Apache::Server is now Apache::ServerRec and all methods/functions from Apache::Server now live in Apache::ServerRec. [Stas]