X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=protocols%2Fprotonprotocol.cpp;fp=protocols%2Fprotonprotocol.cpp;h=2f4a2a87c77faaf18fa8bf5bec0c411d73361b20;hb=a755f0efc0ba10848d26e1aed7f9933ccdcbb59e;hp=c1f956be163fdbe4873e96469e53df4bed0af65a;hpb=c368b9d2216660ed7541cad6919338a3538a644b;p=pierogi diff --git a/protocols/protonprotocol.cpp b/protocols/protonprotocol.cpp index c1f956b..2f4a2a8 100644 --- a/protocols/protonprotocol.cpp +++ b/protocols/protonprotocol.cpp @@ -51,8 +51,11 @@ void ProtonProtocol::startSendingCommand( // Do we even have this key defined? if (i == keycodes.end()) { - std::string s = "Tried to send a non-existent command.\n"; - throw PIRException(s); + QMutexLocker cifLocker(&commandIFMutex); + commandInFlight = false; + return; +// std::string s = "Tried to send a non-existent command.\n"; +// throw PIRException(s); } // construct the device: @@ -76,23 +79,26 @@ void ProtonProtocol::startSendingCommand( // Check whether we've been asked to stop: if (checkRepeatFlag()) { + break; +/* QMutexLocker cifLocker(&commandIFMutex); commandInFlight = false; return; +*/ } } ++repeatCount; } + + QMutexLocker cifLocker(&commandIFMutex); + commandInFlight = false; } catch (PIRException e) { // inform the gui: emit commandFailed(e.getError().c_str()); } - - QMutexLocker cifLocker(&commandIFMutex); - commandInFlight = false; }