[Opensrf-commits] r1562 - branches/rel_1_0/src/perl/lib/OpenSRF/Transport/SlimJabber
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Dec 22 15:27:51 EST 2008
Author: erickson
Date: 2008-12-22 15:27:47 -0500 (Mon, 22 Dec 2008)
New Revision: 1562
Modified:
branches/rel_1_0/src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm
Log:
handle the case where only one service is registered for a given router
Modified: branches/rel_1_0/src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm
===================================================================
--- branches/rel_1_0/src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm 2008-12-22 20:27:27 UTC (rev 1561)
+++ branches/rel_1_0/src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm 2008-12-22 20:27:47 UTC (rev 1562)
@@ -97,7 +97,11 @@
for my $router (@$routers) {
if(ref $router) {
- if( !$router->{services} || grep { $_ eq $self->{app} } @{$router->{services}->{service}} ) {
+ if( !$router->{services} ||
+ ( ref($router->{services}) eq 'ARRAY' and
+ grep { $_ eq $self->{app} } @{$router->{services}->{service}} ) ||
+ $router->{services}->{service} eq $self->{app}) {
+
my $name = $router->{name};
my $domain = $router->{domain};
my $target = "$name\@$domain/router";
@@ -114,7 +118,8 @@
}
} catch Error with {
- $logger->transport( $self->{app} . ": No routers defined" , WARN );
+ my $err = shift;
+ $logger->error($self->{app} . ": No routers defined: $err");
# no routers defined
};
More information about the opensrf-commits
mailing list