Author: jmhodges
Date: Fri Jun  4 06:41:32 2010
New Revision: 951298

URL: http://svn.apache.org/viewvc?rev=951298&view=rev
Log:
AVRO-562 ruby side had busted client handshaking.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/ruby/lib/avro/ipc.rb

Modified: avro/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=951298&r1=951297&r2=951298&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Fri Jun  4 06:41:32 2010
@@ -75,6 +75,8 @@ Avro 1.4.0 (unreleased)
     AVRO-554 Fixing syncing in ruby data file writing. (Grant Rodgers
     via jmhodges)
 
+    AVRO-562 ruby side had busted client handshaking. (jmhodges)
+
 Avro 1.3.3 (Unreleased)
 
   BUG FIXES

Modified: avro/trunk/lang/ruby/lib/avro/ipc.rb
URL: 
http://svn.apache.org/viewvc/avro/trunk/lang/ruby/lib/avro/ipc.rb?rev=951298&r1=951297&r2=951298&view=diff
==============================================================================
--- avro/trunk/lang/ruby/lib/avro/ipc.rb (original)
+++ avro/trunk/lang/ruby/lib/avro/ipc.rb Fri Jun  4 06:41:32 2010
@@ -161,25 +161,28 @@ module Avro::IPC
 
     def read_handshake_response(decoder)
       handshake_response = HANDSHAKE_REQUESTOR_READER.read(decoder)
-      case match = handshake_response['match']
+      we_have_matching_schema = false
+
+      case handshake_response['match']
       when 'BOTH'
         self.send_protocol = false
-        true
+        we_have_matching_schema = true
       when 'CLIENT'
         raise AvroError.new('Handshake failure. match == CLIENT') if 
send_protocol
         self.remote_protocol = 
Avro::Protocol.parse(handshake_response['serverProtocol'])
         self.remote_hash = handshake_response['serverHash']
         self.send_protocol = false
-        false
+        we_have_matching_schema = true
       when 'NONE'
         raise AvroError.new('Handshake failure. match == NONE') if 
send_protocol
         self.remote_protocol = 
Avro::Protocol.parse(handshake_response['serverProtocol'])
         self.remote_hash = handshake_response['serverHash']
         self.send_protocol = true
-        false
       else
         raise AvroError.new("Unexpected match: #{match}")
       end
+
+      return we_have_matching_schema
     end
 
     def read_call_response(message_name, decoder)


Reply via email to