} # end package HTML::Mason::Commands;
-=head1 SUBROUTINE
+=head1 SUBROUTINES
=over 4
}
+=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
'uncancel_svcnum' => $svc_x->get('_h_svc_x')->svcnum,
};
$svc_x->pkgnum($self->pkgnum); # provisioning services on a canceled package, will be rolled back
- if ($opt{'no_test_reprovision'} or $svc_x->insert) {
+ my $insert_error;
+ unless ($opt{'no_test_reprovision'}) {
+ # avoid possibly fatal errors from missing linked records
+ eval { $insert_error = $svc_x->insert };
+ $insert_error ||= $@;
+ }
+ if ($opt{'no_test_reprovision'} or $insert_error) {
# avoid possibly fatal errors from missing linked records
eval { $out->{'label'} = $svc_x->label };
eval { $out->{'label'} = $svc_x->get('_h_svc_x')->label } unless defined($out->{'label'});
sub svc_domain {
my $self = shift;
local($FS::Record::qsearch_qualify_columns) = 0;
+ $_[0] ||= $self->history_date;
qsearchs( 'h_svc_domain',
{ 'svcnum' => $self->domsvc },
FS::h_svc_domain->sql_h_searchs(@_),
local($FS::Record::qsearch_qualify_columns) = 0;
+ $_[0] ||= $self->history_date;
my $h_svc_acct = qsearchs(
'h_svc_acct',
{ 'svcnum' => $self->srcsvc },
local($FS::Record::qsearch_qualify_columns) = 0;
+ $_[0] ||= $self->history_date;
my $h_svc_acct = qsearchs(
'h_svc_acct',
{ 'svcnum' => $self->dstsvc },
carp 'Called FS::h_svc_www->domain_record on svcnum ' . $self->svcnum if $DEBUG;
local($FS::Record::qsearch_qualify_columns) = 0;
+ $_[0] ||= $self->history_date;
my $domain_record = qsearchs(
'h_domain_record',
{ 'recnum' => $self->recnum },
PerlSetVar MasonArgsMethod CGI
PerlModule HTML::Mason::ApacheHandler
-PerlChildInitHandler "sub { srand }"
-
PerlRequire "%%%MASON_HANDLER%%%"
+PerlChildInitHandler FS::Mason::child_init
+
#Locale::SubCountry
-#
AddDefaultCharset UTF-8
PerlModule FS::AuthCookieHandler24
PerlSetVar MasonArgsMethod CGI
PerlModule HTML::Mason::ApacheHandler
-PerlChildInitHandler "sub { srand }"
-
PerlRequire "%%%MASON_HANDLER%%%"
+PerlChildInitHandler FS::Mason::child_init
+
#Locale::SubCountry
-#
AddDefaultCharset UTF-8
PerlModule FS::AuthCookieHandler