From b232d3d162162349b89a9c98c94e60e2bd98e678 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 19 Dec 2012 12:07:35 +0000 Subject: [PATCH] Fix handling of piggybacking errors not to break on success! --- lib/ZOOM/IRSpy/Test/Record/PiggyBack.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ZOOM/IRSpy/Test/Record/PiggyBack.pm b/lib/ZOOM/IRSpy/Test/Record/PiggyBack.pm index 9b62142..47a3f08 100644 --- a/lib/ZOOM/IRSpy/Test/Record/PiggyBack.pm +++ b/lib/ZOOM/IRSpy/Test/Record/PiggyBack.pm @@ -44,7 +44,10 @@ sub start { sub completed_search { my($conn, $task, $udata, $event) = @_; - if ($event->isa("ZOOM::Exception") && $event->code() == 1005) { + # $event can be a ZOOM::Event::* number or a ZOOM::Exception object + if (ref $event && + $event->isa("ZOOM::Exception") && + $event->code() == 1005) { $conn->log("irspy_test", "Piggyback searching not supported"); $conn->record()->store_result('piggyback', 'ok' => 0); return ZOOM::IRSpy::Status::TEST_BAD; -- 1.7.10.4