diff options
author | Gordon Sim <gsim@apache.org> | 2008-04-14 16:56:35 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2008-04-14 16:56:35 +0000 |
commit | 6fde75b10b8d71a06fcf7ae6026473b4693165f5 (patch) | |
tree | eef33ca733d3c5cf0430f5f7fedfe0f59b71aa8d /cpp/src/qpid/broker/SessionAdapter.cpp | |
parent | dcaa8582a323d445fee5fdb46a25f2bcf3f89d58 (diff) | |
download | qpid-python-6fde75b10b8d71a06fcf7ae6026473b4693165f5.tar.gz |
Use the errata file for final 0-10 that has a type code for xids without which dtx.recover can't work.
Return the indoubt xids as an array of struct32s each of which contains an encoded xid.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@647903 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp')
-rw-r--r-- | cpp/src/qpid/broker/SessionAdapter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp index 8093c7c174..b7985e9ed8 100644 --- a/cpp/src/qpid/broker/SessionAdapter.cpp +++ b/cpp/src/qpid/broker/SessionAdapter.cpp @@ -452,12 +452,11 @@ void SessionAdapter::TxHandlerImpl::rollback() std::string SessionAdapter::DtxHandlerImpl::convert(const framing::Xid010& xid) { - std::stringstream out; - out << xid.getFormat() << xid.getGlobalId() << xid.getBranchId(); - return out.str(); + std::string encoded; + encode(xid, encoded); + return encoded; } - void SessionAdapter::DtxHandlerImpl::select() { state.selectDtx(); @@ -543,13 +542,14 @@ Dtx010RecoverResult SessionAdapter::DtxHandlerImpl::recover() { std::set<std::string> xids; getBroker().getStore().collectPreparedXids(xids); - - //TODO: remove the need to copy from one container type to another - std::vector<std::string> data; + /* + * create array of long structs + */ + Array indoubt(0xAB); for (std::set<std::string>::iterator i = xids.begin(); i != xids.end(); i++) { - data.push_back(*i); + boost::shared_ptr<FieldValue> xid(new Struct32Value(*i)); + indoubt.add(xid); } - Array indoubt(data); return Dtx010RecoverResult(indoubt); } |