If the protocol returns an empty string this means the method is not supported
This commit is contained in:
parent
f4a9cc6e83
commit
d71a9fa2f9
1 changed files with 38 additions and 35 deletions
|
@ -127,6 +127,9 @@ int Device::doAction(int action, unsigned char data, Controller *controller) {
|
|||
Protocol *p = this->retrieveProtocol();
|
||||
if(p){
|
||||
std::string code = p->getStringForMethod(action, data, controller);
|
||||
if (code == "") {
|
||||
return TELLSTICK_ERROR_METHOD_NOT_SUPPORTED;
|
||||
}
|
||||
return controller->send(code);
|
||||
}
|
||||
return TELLSTICK_ERROR_UNKNOWN;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue