From 24f29f1b9fcfc553a9e48c8b4167672aee8f4d19 Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 11 Aug 2005 20:49:10 +0000 Subject: [PATCH] fixing preconstructed Result test in AppSession git-svn-id: svn://svn.open-ils.org/ILS/trunk@1638 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- OpenSRF/src/perlmods/OpenSRF/AppSession.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/OpenSRF/src/perlmods/OpenSRF/AppSession.pm b/OpenSRF/src/perlmods/OpenSRF/AppSession.pm index 865df94848..679fd16947 100644 --- a/OpenSRF/src/perlmods/OpenSRF/AppSession.pm +++ b/OpenSRF/src/perlmods/OpenSRF/AppSession.pm @@ -752,17 +752,14 @@ sub recv { $avail = @{ $self->{recv_queue} }; } - #$logger->debug( ref($self)." queue after wait: " . $self->_print_queue(), INTERNAL ); - + my @list; while ( my $msg = shift @{ $self->{recv_queue} } ) { push @list, $msg; last if (scalar(@list) >= $args{count}); } -# $self->{recv_queue} = [@unlist, @{ $self->{recv_queue} }]; $logger->debug( "Number of matched responses: " . @list, DEBUG ); - $self->queue_wait(0); # check for statuses return $list[0] unless (wantarray); @@ -948,7 +945,7 @@ sub respond { return unless ($self and $self->session and !$self->complete); my $response; - if (ref($msg) && UNIVERSAL::can($msg, 'getAttribute') && $msg->getAttribute('name') =~ /oilsResult/) { + if (ref($msg) && UNIVERSAL::isa($msg, 'OpenSRF::DomainObject::oilsResult')) { $response = $msg; } else { $response = new OpenSRF::DomainObject::oilsResult; @@ -964,7 +961,7 @@ sub respond_complete { return unless ($self and $self->session and !$self->complete); my $response; - if (ref($msg) && UNIVERSAL::can($msg, 'getAttribute') && $msg->getAttribute('name') =~ /oilsResult/) { + if (ref($msg) && UNIVERSAL::isa($msg, 'OpenSRF::DomainObject::oilsResult')) { $response = $msg; } else { $response = new OpenSRF::DomainObject::oilsResult; -- 2.43.2