If the protocol returns an empty string this means the method is not supported

This commit is contained in:
Micke Prag 2010-10-27 12:12:09 +00:00
parent f4a9cc6e83
commit d71a9fa2f9

View file

@ -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;