From 641f048cb8b86be0304441a6227759d7ad420ff3 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Thu, 11 Jun 2009 15:54:37 +0000 Subject: QPID-1786 - Committed qmf patches from Bryan Kearney Additionally updated existing qmf and Qman to be compatible. The magic number for qmf messages has been incremented. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@783818 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/ruby/lib/qpid/qmf.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'qpid/ruby') diff --git a/qpid/ruby/lib/qpid/qmf.rb b/qpid/ruby/lib/qpid/qmf.rb index b7309155c3..56037fff62 100644 --- a/qpid/ruby/lib/qpid/qmf.rb +++ b/qpid/ruby/lib/qpid/qmf.rb @@ -773,10 +773,16 @@ module Qpid::Qmf @methods = [] @arguments = [] + has_supertype = codec.read_uint8 if @kind == CLASS_KIND_TABLE prop_count = codec.read_uint16 stat_count = codec.read_uint16 method_count = codec.read_uint16 + if has_supertype == 1 + codec.read_str8 + codec.read_str8 + codec.read_bin128 + end prop_count.times { |idx| @properties << SchemaProperty.new(codec) } stat_count.times { |idx| @@ -1111,13 +1117,11 @@ module Qpid::Qmf def invoke(method, name, args) kwargs = args[args.size - 1] sync = true - timeout = nil + timeout = DEFAULT_METHOD_WAIT_TIME if kwargs.class == Hash if kwargs.include?(:timeout) timeout = kwargs[:timeout] - else - timeout = DEFAULT_METHOD_WAIT_TIME end if kwargs.include?(:async) @@ -1343,7 +1347,7 @@ module Qpid::Qmf def set_header(codec, opcode, seq=0) codec.write_uint8(?A) codec.write_uint8(?M) - codec.write_uint8(?2) + codec.write_uint8(?3) codec.write_uint8(opcode) codec.write_uint32(seq) end @@ -1508,7 +1512,7 @@ module Qpid::Qmf begin return [nil, nil] unless codec.read_uint8 == ?A return [nil, nil] unless codec.read_uint8 == ?M - return [nil, nil] unless codec.read_uint8 == ?2 + return [nil, nil] unless codec.read_uint8 == ?3 opcode = codec.read_uint8 seq = codec.read_uint32 return [opcode, seq] -- cgit v1.2.1