From f1b81c42c9a6e53e3ce248e40ccc33a5b3ba51bc Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 19 Nov 2012 16:24:30 +0000 Subject: Updated to ensure we read a banner from the remote server - before we test against it. --- lib/custodian/protocol-tests/jabber.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/custodian/protocol-tests/jabber.rb') diff --git a/lib/custodian/protocol-tests/jabber.rb b/lib/custodian/protocol-tests/jabber.rb index 7a0c855..a35ef28 100755 --- a/lib/custodian/protocol-tests/jabber.rb +++ b/lib/custodian/protocol-tests/jabber.rb @@ -82,11 +82,11 @@ class JABBERTest socket.puts( "QUIT") banner = socket.gets(nil) - banner = banner[0,20] + banner = banner[0,20] unless( banner.nil? ) socket.close() - if ( banner =~ /xml version/i ) + if ( ( !banner.nil? ) && ( banner =~ /xml version/i ) ) puts "Jabber alive: #{banner}" if ( @test_data['verbose'] ) return true else -- cgit v1.2.1