X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=protocols%2Fthomsonprotocol.cpp;h=23a4da8f15c9b060ffb4d524153ca5d15b892d3f;hb=a755f0efc0ba10848d26e1aed7f9933ccdcbb59e;hp=b53075f139f25c8cd881f8001418a447a48faeef;hpb=c368b9d2216660ed7541cad6919338a3538a644b;p=pierogi diff --git a/protocols/thomsonprotocol.cpp b/protocols/thomsonprotocol.cpp index b53075f..23a4da8 100644 --- a/protocols/thomsonprotocol.cpp +++ b/protocols/thomsonprotocol.cpp @@ -51,8 +51,11 @@ void ThomsonProtocol::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,25 +79,28 @@ void ThomsonProtocol::startSendingCommand( // Check whether we've been asked to stop: if (checkRepeatFlag()) { + break; +/* ++keypressCount; QMutexLocker cifLocker(&commandIFMutex); commandInFlight = false; return; +*/ } } ++repeatCount; } + + ++keypressCount; + QMutexLocker cifLocker(&commandIFMutex); + commandInFlight = false; } catch (PIRException e) { // inform the gui: emit commandFailed(e.getError().c_str()); } - - ++keypressCount; - QMutexLocker cifLocker(&commandIFMutex); - commandInFlight = false; }