Diff between 797466d189f4a9cd6fab0f608c8ebd695f5897e0 and 897025255d622d8f20381021fbd3c2c86b34d9c8

Changed Files

File Additions Deletions Status
android/gatt.c +5 -5 modified

Full Patch

diff --git a/android/gatt.c b/android/gatt.c
index 8007dc5..f42a6f3 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -3061,12 +3061,12 @@ static void handle_client_write_characteristic(const void *buf, uint16_t len)
 	case GATT_WRITE_TYPE_SIGNED:
 		if (get_sec_level(conn->device) != BT_SECURITY_LOW) {
 			error("gatt: Cannot write signed on encrypted link");
-			res = HAL_STATUS_FAILED;
-		} else {
-			res = signed_write_cmd(conn->device,
-							ch->ch.value_handle,
-							cmd->value, cmd->len);
+			status = HAL_STATUS_FAILED;
+			goto failed;
 		}
+
+		res = signed_write_cmd(conn->device, ch->ch.value_handle,
+							cmd->value, cmd->len);
 		break;
 	default:
 		error("gatt: Write type %d unsupported", cmd->write_type);