summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/broker/SemanticHandler.cpp10
-rw-r--r--cpp/src/qpid/framing/AMQMethodBody.h2
-rw-r--r--cpp/src/qpid/framing/ModelMethod.h2
3 files changed, 11 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/SemanticHandler.cpp b/cpp/src/qpid/broker/SemanticHandler.cpp
index 0bb813ebfd..048c73c4b0 100644
--- a/cpp/src/qpid/broker/SemanticHandler.cpp
+++ b/cpp/src/qpid/broker/SemanticHandler.cpp
@@ -132,7 +132,10 @@ void SemanticHandler::handleCommand(framing::AMQMethodBody* method)
} else if (v.hasResult()) {
session.getProxy().getExecution().result(id.getValue(), v.getResult());
}
- //TODO: if (method->isSync()) { incoming.synch(id); sendCompletion(); }
+ if (method->isSync()) {
+ incoming.sync(id);
+ sendCompletion();
+ }
//TODO: if window gets too large send unsolicited completion
}
@@ -156,7 +159,10 @@ void SemanticHandler::handleContent(AMQFrame& frame)
state.handle(msg);
msgBuilder.end();
incoming.track(msg);
- //TODO: if (msg.getMethod().isSync()) { incoming.synch(msg.getCommandId()); sendCompletion(); }
+ if (msg->getFrames().getMethod()->isSync()) {
+ incoming.sync(msg->getCommandId());
+ sendCompletion();
+ }
}
}
diff --git a/cpp/src/qpid/framing/AMQMethodBody.h b/cpp/src/qpid/framing/AMQMethodBody.h
index f0043d9d3b..e195142221 100644
--- a/cpp/src/qpid/framing/AMQMethodBody.h
+++ b/cpp/src/qpid/framing/AMQMethodBody.h
@@ -63,6 +63,8 @@ class AMQMethodBody : public AMQBody {
virtual uint32_t size() const = 0;
virtual uint8_t type() const { return METHOD_BODY; }
+ virtual bool isSync() const { return false; /*only ModelMethods can have the sync flag set*/ }
+
AMQMethodBody* getMethod() { return this; }
const AMQMethodBody* getMethod() const { return this; }
void accept(AMQBodyConstVisitor& v) const { v.visit(*this); }
diff --git a/cpp/src/qpid/framing/ModelMethod.h b/cpp/src/qpid/framing/ModelMethod.h
index 6861295194..8e2fafb019 100644
--- a/cpp/src/qpid/framing/ModelMethod.h
+++ b/cpp/src/qpid/framing/ModelMethod.h
@@ -36,7 +36,7 @@ public:
virtual void encode(Buffer& buffer) const { header.encode(buffer); }
virtual void decode(Buffer& buffer, uint32_t size=0) { header.decode(buffer, size); }
virtual uint32_t size() const { return header.size(); }
-
+ virtual bool isSync() const { return header.getSync(); }
ExecutionHeader& getHeader() { return header; }
const ExecutionHeader& getHeader() const { return header; }
};