make config parsing more tolerant
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 25 Jan 2009 20:16:17 +0000 (20:16 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 25 Jan 2009 20:16:17 +0000 (20:16 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1639 9efc2488-bf62-4759-914b-345cdb29e865

src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm

index 89d087b..5b72fe5 100644 (file)
@@ -98,9 +98,11 @@ sub listen {
         for my $router (@$routers) {
             if(ref $router) {
                 if( !$router->{services} || 
         for my $router (@$routers) {
             if(ref $router) {
                 if( !$router->{services} || 
-                        ( ref($router->{services}) eq 'HASH' and 
-                            grep { $_ eq $self->{app} } @{$router->{services}->{service}} )  ||
-                        $router->{services}->{service} eq $self->{app}) {
+                    !$router->{services}->{service} || 
+                    ( 
+                        ref($router->{services}->{service}) 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 $name = $router->{name};
                     my $domain = $router->{domain};