X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2FMason.pm;h=24ddf79203d5752f81eafd7685cf015ba0dfc8f8;hb=4314d9e0da1486cead65bc75ee0ab4351d49555e;hp=65b282104c114bf54b3072f357a682f13602f595;hpb=c42f4a94421bf92e81b7935c4385ccf793c8fee0;p=freeside.git diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index 65b282104..24ddf7920 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -131,20 +131,23 @@ if ( -e $addl_handler_use_file ) { use FS::Conf; use FS::CGI qw(header menubar table itable ntable idiot eidiot myexit http_header); - use FS::UI::Web qw(svc_url random_id); + use FS::UI::Web qw(svc_url random_id + get_page_pref set_page_pref); use FS::UI::Web::small_custview qw(small_custview); use FS::UI::bytecount; use FS::UI::REST qw( rest_auth rest_uri_remain encode_rest ); use FS::Msgcat qw(gettext geterror); use FS::Misc qw( send_email send_fax ocr_image states_hash counties cities state_label + card_types ); use FS::Misc::eps2png qw( eps2png ); use FS::Report::FCC_477; use FS::Report::Table; use FS::Report::Table::Monthly; use FS::Report::Table::Daily; - use FS::Report::Tax; + use FS::Report::Tax::ByName; + use FS::Report::Tax::All; use FS::TicketSystem; use FS::NetworkMonitoringSystem; use FS::Tron qw( tron_lint ); @@ -407,6 +410,8 @@ if ( -e $addl_handler_use_file ) { use FS::password_history; use FS::svc_fiber; use FS::fiber_olt; + use FS::olt_site; + use FS::access_user_page_pref; # Sammath Naur if ( $FS::Mason::addl_handler_use ) { @@ -568,7 +573,7 @@ if ( -e $addl_handler_use_file ) { } # end package HTML::Mason::Commands; -=head1 SUBROUTINE +=head1 SUBROUTINES =over 4 @@ -664,6 +669,35 @@ sub mason_interps { } +=item child_init + +Per-process Apache child initialization code. + +Calls srand() to re-seed Perl's PRNG so that multiple children do not generate +the same "random" numbers. + +Works around a Net::SSLeay connection error by creating and deleting an SSL +context, so subsequent connections do not error out with a CTX_new (900 NET OR +SSL ERROR). + +=cut + +sub child_init { + #my ($pool, $server) = @_; #the child process pool (APR::Pool) and the server object (Apache2::ServerRec). + + srand(); + + #{ + use Net::SSLeay; + package Net::SSLeay; + initialize(); + my $bad_ctx = new_x_ctx(); + while ( ERR_get_error() ) {}; #print_errs('CTX_new'); + CTX_free($bad_ctx); + #} + +} + =back =head1 BUGS