Diff between 27eeafd652fe9a1b70e6eba25c93d996a2b1aa39 and 36235e21e4a69906283581fbaf32e05a11967156

Changed Files

File Additions Deletions Status
android/adapter.c +20 -0 modified

Full Patch

diff --git a/android/adapter.c b/android/adapter.c
index 685b00d..13cce8f 100644
--- a/android/adapter.c
+++ b/android/adapter.c
@@ -365,6 +365,20 @@ static bool get_property(void *buf, uint16_t len)
 	}
 }
 
+static uint8_t set_property(void *buf, uint16_t len)
+{
+	struct hal_cmd_set_adapter_prop *cmd = buf;
+
+	switch (cmd->type) {
+	case HAL_PROP_ADAPTER_NAME:
+	case HAL_PROP_ADAPTER_SCAN_MODE:
+	case HAL_PROP_ADAPTER_DISC_TIMEOUT:
+	default:
+		DBG("Unhandled property type 0x%x", cmd->type);
+		return HAL_STATUS_FAILED;
+	}
+}
+
 void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf,
 								uint16_t len)
 {
@@ -396,6 +410,12 @@ void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf,
 			goto error;
 
 		break;
+	case HAL_OP_SET_ADAPTER_PROP:
+		status = set_property(buf, len);
+		if (status != HAL_STATUS_SUCCESS)
+			goto error;
+
+		break;
 	default:
 		DBG("Unhandled command, opcode 0x%x", opcode);
 		goto error;