From be9eb720dbec1bc66289e9a22144a19bc02e93a1 Mon Sep 17 00:00:00 2001 From: "Carl C. Trieloff" Date: Mon, 28 Apr 2008 01:19:51 +0000 Subject: QPID-918 patch from Senaka git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@652037 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/rubygen/99-0/structs.rb | 10 +++++++++- cpp/rubygen/framing.0-10/structs.rb | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'cpp') diff --git a/cpp/rubygen/99-0/structs.rb b/cpp/rubygen/99-0/structs.rb index b7d230d528..2e3f82fef9 100644 --- a/cpp/rubygen/99-0/structs.rb +++ b/cpp/rubygen/99-0/structs.rb @@ -108,9 +108,17 @@ class StructGen < CppGen end def print_packed_field(s, f, i) + classname = s.cppname + if (s.kind_of? AmqpMethod) + classname = s.body_name + end genl "if (flags & #{flag_mask(s, i)})" indent { - genl "out << \"#{f.name}=\" << #{printable_form(f)} << \"; \";" + unless (classname == "ConnectionStartOkBody" && f.name == "response") + genl "out << \"#{f.name}=\" << #{printable_form(f)} << \"; \";" + else + genl "out << \"response=\" << \"xxxxxx\" << \"; \";" + end } end diff --git a/cpp/rubygen/framing.0-10/structs.rb b/cpp/rubygen/framing.0-10/structs.rb index 35e7717122..e97b6311a2 100644 --- a/cpp/rubygen/framing.0-10/structs.rb +++ b/cpp/rubygen/framing.0-10/structs.rb @@ -107,9 +107,17 @@ class StructGen < CppGen end def print_packed_field(s, f, i) + classname = s.cppname + if (s.kind_of? AmqpMethod) + classname = s.body_name + end genl "if (flags & #{flag_mask(s, i)})" indent { - genl "out << \"#{f.name}=\" << #{printable_form(f)} << \"; \";" + unless (classname == "ConnectionStartOkBody" && f.name == "response") + genl "out << \"#{f.name}=\" << #{printable_form(f)} << \"; \";" + else + genl "out << \"response=\" << \"xxxxxx\" << \"; \";" + end } end -- cgit v1.2.1