hfp_hf: return ERROR_CODE_COMMAND_DISALLOWED if indicator is not enabled

This commit is contained in:
Milanka Ringwald 2025-01-14 13:47:17 +01:00
parent 430f70c6d9
commit d18fc62ae6
2 changed files with 6 additions and 1 deletions

View File

@ -2313,6 +2313,9 @@ uint8_t hfp_hf_set_hf_indicator(hci_con_handle_t acl_handle, int assigned_number
// send update
hfp_hf_run_for_context(hfp_connection);
break;
} else {
// return command disallowed as indicator disabled
return ERROR_CODE_COMMAND_DISALLOWED;
}
}
}

View File

@ -536,7 +536,9 @@ uint8_t hfp_hf_query_subscriber_number(hci_con_handle_t acl_handle);
* @param acl_handle
* @param assigned_number
* @param value
* @return status ERROR_CODE_SUCCESS if successful, otherwise ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist
* @return status ERROR_CODE_SUCCESS if successful, otherwise:
* - ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if connection does not exist, or
* - ERROR_CODE_COMMAND_DISALLOWED if indicator is either not found or not enabled
*/
uint8_t hfp_hf_set_hf_indicator(hci_con_handle_t acl_handle, int assigned_number, int value);