X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FMason.pm;h=1008fd5d819426d989900dd975e8a88da0f82dd7;hp=65b282104c114bf54b3072f357a682f13602f595;hb=dbf521cf2f1f1a05f4722006f339b2595c8ee70f;hpb=c42f4a94421bf92e81b7935c4385ccf793c8fee0 diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index 65b282104..1008fd5d8 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -91,7 +91,7 @@ if ( -e $addl_handler_use_file ) { use Excel::Writer::XLSX; #use Excel::Writer::XLSX::Utility; #redundant with above - use Business::CreditCard 0.30; #for mask-aware cardtype() + use Business::CreditCard 0.36; #for best-effort cardtype() (60xx as Discover) use NetAddr::IP; use Net::MAC::Vendor; use Net::Ping; @@ -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,9 @@ 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; + use FS::part_svc_msgcat; # Sammath Naur if ( $FS::Mason::addl_handler_use ) { @@ -568,7 +574,7 @@ if ( -e $addl_handler_use_file ) { } # end package HTML::Mason::Commands; -=head1 SUBROUTINE +=head1 SUBROUTINES =over 4 @@ -664,6 +670,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). See http://bugs.debian.org/830152 + +=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