summaryrefslogtreecommitdiff
path: root/LayerManagerCommands
diff options
context:
space:
mode:
authorTimo Lotterbach <timo.lotterbach@bmw-carit.de>2012-12-04 05:04:18 -0800
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>2013-01-09 05:34:03 -0800
commit31b0174212839bb9e999cdb0cadaa730632b425d (patch)
tree4bad4d65417c6e7979c8890a63c90bfca3546e64 /LayerManagerCommands
parentd05b57b3a496cca24cd5eaf0be068e13536a5344 (diff)
downloadlayer_management-31b0174212839bb9e999cdb0cadaa730632b425d.tar.gz
LayerManagerService: added support for client specific command queues
all asynchronous commands get enqueued and are executed by the client using the commit command. Now there is a separate command queue for each connected client and a client can only commit commands, that have been sent by this client. Signed-off-by: Timo Lotterbach <timo.lotterbach@bmw-carit.de>
Diffstat (limited to 'LayerManagerCommands')
-rw-r--r--LayerManagerCommands/src/CommitCommand.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/LayerManagerCommands/src/CommitCommand.cpp b/LayerManagerCommands/src/CommitCommand.cpp
index 9532e2c..09bf039 100644
--- a/LayerManagerCommands/src/CommitCommand.cpp
+++ b/LayerManagerCommands/src/CommitCommand.cpp
@@ -26,10 +26,11 @@ ExecutionResult CommitCommand::execute(ICommandExecutor* executor)
bool success = true;
bool redraw = false;
- Scene* scene = (executor->getScene());
+ unsigned int commitCommandPid = getSenderPid();
- CommandListIterator iter = scene->m_toBeCommittedList.begin();
- CommandListIterator iterEnd = scene->m_toBeCommittedList.end();
+ CommandList& clientCommandQueue = executor->getEnqueuedCommands(commitCommandPid);
+ CommandListIterator iter = clientCommandQueue.begin();
+ CommandListIterator iterEnd = clientCommandQueue.end();
for (; iter != iterEnd; ++iter)
{
@@ -57,7 +58,7 @@ ExecutionResult CommitCommand::execute(ICommandExecutor* executor)
delete command;
}
}
- scene->m_toBeCommittedList.clear();
+ clientCommandQueue.clear();
ExecutionResult returnValue = ExecutionFailed;