diff options
author | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-08-06 06:25:09 (GMT) |
---|---|---|
committer | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-08-06 06:25:09 (GMT) |
commit | 75698ca17add2101fcbeac0e694044307474f924 (patch) | |
tree | cbd14b8ed7670d61cc8cbeecb4d84fde9dea2071 /Swiften/Whiteboard | |
parent | 7709b172620653a15f7358186914d1a2b8a5e9be (diff) | |
download | swift-contrib-75698ca17add2101fcbeac0e694044307474f924.zip swift-contrib-75698ca17add2101fcbeac0e694044307474f924.tar.bz2 |
Blocked onOperationReceived signal on no-ops
Diffstat (limited to 'Swiften/Whiteboard')
-rw-r--r-- | Swiften/Whiteboard/IncomingWhiteboardSession.cpp | 4 | ||||
-rw-r--r-- | Swiften/Whiteboard/OutgoingWhiteboardSession.cpp | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Swiften/Whiteboard/IncomingWhiteboardSession.cpp b/Swiften/Whiteboard/IncomingWhiteboardSession.cpp index d3580e1..de7bd34 100644 --- a/Swiften/Whiteboard/IncomingWhiteboardSession.cpp +++ b/Swiften/Whiteboard/IncomingWhiteboardSession.cpp @@ -31,7 +31,9 @@ namespace Swift { void IncomingWhiteboardSession::handleIncomingOperation(WhiteboardOperation::ref operation) { WhiteboardClient::Result pairResult = client.handleServerOperationReceived(operation); if (pairResult.client) { - onOperationReceived(pairResult.client); + if (pairResult.client->getPos() != -1) { + onOperationReceived(pairResult.client); + } lastOpID = pairResult.client->getID(); } diff --git a/Swiften/Whiteboard/OutgoingWhiteboardSession.cpp b/Swiften/Whiteboard/OutgoingWhiteboardSession.cpp index 63e4476..7debbe0 100644 --- a/Swiften/Whiteboard/OutgoingWhiteboardSession.cpp +++ b/Swiften/Whiteboard/OutgoingWhiteboardSession.cpp @@ -40,8 +40,9 @@ namespace Swift { void OutgoingWhiteboardSession::handleIncomingOperation(WhiteboardOperation::ref operation) { WhiteboardOperation::ref op = server.handleClientOperationReceived(operation); - - onOperationReceived(op); + if (op->getPos() != -1) { + onOperationReceived(op); + } lastOpID = op->getID(); WhiteboardPayload::ref payload = boost::make_shared<WhiteboardPayload>(); |