X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=protocols%2Fkathreinprotocol.cpp;fp=protocols%2Fkathreinprotocol.cpp;h=35208f310aa9a10308452b0fc421fcd83ef4b575;hb=a755f0efc0ba10848d26e1aed7f9933ccdcbb59e;hp=1d29779d6c20f326a8cd16130235d301b39730a4;hpb=c368b9d2216660ed7541cad6919338a3538a644b;p=pierogi diff --git a/protocols/kathreinprotocol.cpp b/protocols/kathreinprotocol.cpp index 1d29779..35208f3 100644 --- a/protocols/kathreinprotocol.cpp +++ b/protocols/kathreinprotocol.cpp @@ -51,8 +51,11 @@ void KathreinProtocol::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: @@ -83,23 +86,26 @@ void KathreinProtocol::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; }