X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=protocols%2Fkaseikyoprotocol.cpp;fp=protocols%2Fkaseikyoprotocol.cpp;h=f1437ca2dffeba2202853ed93aa70628d792f08a;hb=a755f0efc0ba10848d26e1aed7f9933ccdcbb59e;hp=1fe73bb86acb087407ef17f370475037a1724f41;hpb=c368b9d2216660ed7541cad6919338a3538a644b;p=pierogi diff --git a/protocols/kaseikyoprotocol.cpp b/protocols/kaseikyoprotocol.cpp index 1fe73bb..f1437ca 100644 --- a/protocols/kaseikyoprotocol.cpp +++ b/protocols/kaseikyoprotocol.cpp @@ -52,8 +52,11 @@ void KaseikyoProtocol::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: @@ -77,23 +80,26 @@ void KaseikyoProtocol::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; }