int DPServer::set_method(vine_dp_method_e method)
{
- if (method < VINE_DP_METHOD_DEFAULT || method >= VINE_DP_METHOD_UNKNOWN)
- return VINE_ERROR_INVALID_PARAMETER;
-
switch (method) {
case VINE_DP_METHOD_DEFAULT:
mMethod = VINE_DATA_PATH_METHOD_LWS;
case VINE_DP_METHOD_BLE_GATT:
mMethod = VINE_DATA_PATH_METHOD_BLE_GATT;
break;
+ case VINE_DP_METHOD_UNKNOWN:
default:
- mMethod = VINE_DATA_PATH_METHOD_LWS;
+ return VINE_ERROR_INVALID_PARAMETER;
}
return VINE_ERROR_NONE;
}
int DPClient::set_method(vine_dp_method_e method)
{
- if (method < VINE_DP_METHOD_DEFAULT || method >= VINE_DP_METHOD_UNKNOWN)
- return VINE_ERROR_INVALID_PARAMETER;
-
switch (method) {
case VINE_DP_METHOD_DEFAULT:
mMethod = VINE_DATA_PATH_METHOD_LWS;
case VINE_DP_METHOD_BLE_GATT:
mMethod = VINE_DATA_PATH_METHOD_BLE_GATT;
break;
+ case VINE_DP_METHOD_UNKNOWN:
default:
- mMethod = VINE_DATA_PATH_METHOD_LWS;
+ return VINE_ERROR_INVALID_PARAMETER;
}
return VINE_ERROR_NONE;
}