projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
possibly fix intermittent "could not receive data from server: Bad file
[freeside.git]
/
htetc
/
handler.pl
diff --git
a/htetc/handler.pl
b/htetc/handler.pl
index
b00ab6d
..
cea3661
100644
(file)
--- a/
htetc/handler.pl
+++ b/
htetc/handler.pl
@@
-84,7
+84,7
@@
sub handler
local $SIG{__WARN__};
local $SIG{__DIE__};
local $SIG{__WARN__};
local $SIG{__DIE__};
-
RT::I
nit();
+
my_rt_i
nit();
$ah->interp($rt_interp);
$ah->interp($rt_interp);
@@
-93,7
+93,7
@@
sub handler
local $SIG{__WARN__};
local $SIG{__DIE__};
local $SIG{__WARN__};
local $SIG{__DIE__};
- RT::Init() if $RT::VERSION; #for lack of something else
+ my_rt_init();
#we don't want the RT error handlers under FS
{
#we don't want the RT error handlers under FS
{
@@
-128,4
+128,19
@@
sub handler
$status;
}
$status;
}
+my $rt_initialized = 0;
+
+sub my_rt_init {
+ return unless $RT::VERSION;
+
+ if ( $rt_initialized ) {
+ RT::ConnectToDatabase();
+ RT::InitSignalHandlers();
+ } else {
+ RT::LoadConfig();
+ RT::Init();
+ $rt_initialized++;
+ }
+}
+
1;
1;