X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=protocols%2Fsharpprotocol.cpp;fp=protocols%2Fsharpprotocol.cpp;h=52ace578e46b175fea6889e1cd851c6a284ec4fb;hb=a755f0efc0ba10848d26e1aed7f9933ccdcbb59e;hp=20eddf36229d1c14392f98661e9a8e64f916a2ea;hpb=c368b9d2216660ed7541cad6919338a3538a644b;p=pierogi diff --git a/protocols/sharpprotocol.cpp b/protocols/sharpprotocol.cpp index 20eddf3..52ace57 100644 --- a/protocols/sharpprotocol.cpp +++ b/protocols/sharpprotocol.cpp @@ -58,8 +58,11 @@ void SharpProtocol::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: @@ -92,23 +95,26 @@ void SharpProtocol::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; }