From de3ee556236aaa9d46509eb78c9c3f244fc0f90b Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Wed, 26 Nov 2008 20:43:14 +0000 Subject: Added a copy constructor and assignment operator to FieldTable. This was done to solve a library problem with the RHEL4 distribution. The compiler generated the assignment operator in an application using the C++ qpid client libraries. This generated function (referenced by a weak symbol) appeared to be causing problems in the heart of the library (handling of the ConnectionStartBody) with regard to the handling of field tables. The failure mechanism is not fully understood, but this seemingly innocuous change solves the problem. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@720972 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/FieldTable.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cpp/src/qpid/framing/FieldTable.cpp') diff --git a/cpp/src/qpid/framing/FieldTable.cpp b/cpp/src/qpid/framing/FieldTable.cpp index 4da5394479..7ff5a07c9a 100644 --- a/cpp/src/qpid/framing/FieldTable.cpp +++ b/cpp/src/qpid/framing/FieldTable.cpp @@ -30,6 +30,18 @@ namespace qpid { namespace framing { +FieldTable::FieldTable(const FieldTable& ft) +{ + *this = ft; +} + +FieldTable& FieldTable::operator=(const FieldTable& ft) +{ + clear(); + values = ft.values; + return *this; +} + FieldTable::~FieldTable() {} uint32_t FieldTable::encodedSize() const { -- cgit v1.2.1