From: erickson Date: Wed, 23 Feb 2005 16:53:22 +0000 (+0000) Subject: added check for settings server, and removed some logging peer connection X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7b89e3d7b597a9a464a884750926e28a2e5d874e;p=opensrf%2Fbjwebb.git added check for settings server, and removed some logging peer connection git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@96 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/OpenSRF/System.pm b/src/perlmods/OpenSRF/System.pm index c01d8ea..6d2c253 100644 --- a/src/perlmods/OpenSRF/System.pm +++ b/src/perlmods/OpenSRF/System.pm @@ -89,6 +89,20 @@ sub _unixserver { sub _listener { my( $app ) = @_; + +=head + my $service = $app; + my $username = $app; + my $password = "jkjkasdf"; + my $jserver = "elroy"; + my $port = "5222"; + my $hostname = "elroy.pls-hq.org"; + my $unix_file = "/pines/var/sock/$app" . "_unix.sock"; + my $router = 'router\@elroy/router'; + return "exec(\"/pines/cvs/ILS/OpenSRF/src/forker/oils_inbound $service $username " . + "$password $jserver $port $hostname $unix_file $router\")"; +=cut + return "OpenSRF::Transport::Listener->new( '$app' )->initialize()->listen()"; } @@ -162,7 +176,12 @@ sub bootstrap { my $server_type = $client->config_value("server_type"); $server_type ||= "basic"; - OpenSRF::Transport::PeerHandle->retrieve->disconnect; + my $con = OpenSRF::Transport::PeerHandle->retrieve; + if($con) { + $con->disconnect; + } + + if( $server_type eq "prefork" ) { $server_type = "Net::Server::PreFork"; @@ -223,10 +242,8 @@ sub bootstrap_client { } sub bootstrap_logger { - $0 = "Log Server"; OpenSRF::Utils::LogServer->serve(); - } @@ -351,6 +368,7 @@ sub launch_listener { my $apname = $app; $apname =~ tr/[a-z]/[A-Z]/; $0 = "Listener ($apname)"; + warn "Launching Listener with command:\n " . _listener($app) . "\n"; eval _listener( $app ); exit; } diff --git a/src/perlmods/OpenSRF/Transport/SlimJabber/PeerConnection.pm b/src/perlmods/OpenSRF/Transport/SlimJabber/PeerConnection.pm index c615205..a44c34d 100644 --- a/src/perlmods/OpenSRF/Transport/SlimJabber/PeerConnection.pm +++ b/src/perlmods/OpenSRF/Transport/SlimJabber/PeerConnection.pm @@ -28,11 +28,11 @@ our $_singleton_connection; sub retrieve { my( $class, $app ) = @_; - my @keys = keys %apps_hash; - OpenSRF::Utils::Logger->transport( - "Requesting peer for $app and we have @keys", INFO ); return $_singleton_connection; - return $apps_hash{$app}; +# my @keys = keys %apps_hash; +#OpenSRF::Utils::Logger->transport( +# "Requesting peer for $app and we have @keys", INFO ); +# return $apps_hash{$app}; }