| 129 | } |
| 130 | |
| 131 | void LCDClient::sendCommand(const std::string &cmd, const std::string ¶meters) |
| 132 | { |
| 133 | if (!cmd.empty()) |
| 134 | { |
| 135 | const LCDLock l(&_sendMutex); |
| 136 | |
| 137 | const string command = cmd + " " + parameters; |
| 138 | |
| 139 | _serverConnection << command; |
| 140 | |
| 141 | if (_sync) { |
| 142 | while (_answer.empty()) |
| 143 | { |
| 144 | ::pthread_cond_wait(&_gotAnswer, &_sendMutex); |
| 145 | } |
| 146 | |
| 147 | if (0 == _answer.find("huh?")) |
| 148 | { |
| 149 | throw LCDException(_answer.substr(5)); |
| 150 | } |
| 151 | _answer.clear(); |
| 152 | } |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | void LCDClient::disableSync() |
| 157 | { |
nothing calls this directly
no test coverage detected