From 39ed4b5ce44947b156871ca5f8ddeafc37c08e3e Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 30 Jan 2026 12:14:42 -0600 Subject: [PATCH] Fix --- Meshtastic/Helpers/TAK/TAKConnection.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Meshtastic/Helpers/TAK/TAKConnection.swift b/Meshtastic/Helpers/TAK/TAKConnection.swift index 52d504e9..ee36c93f 100644 --- a/Meshtastic/Helpers/TAK/TAKConnection.swift +++ b/Meshtastic/Helpers/TAK/TAKConnection.swift @@ -228,7 +228,7 @@ actor TAKConnection { } do { - let cotMessage = try CoTMessage.parse(from: data) + let cotMessage = try CoTMessage.parseData(data) // Handle TAK Protocol control messages if cotMessage.type.hasPrefix("t-x-takp") { @@ -268,7 +268,8 @@ actor TAKConnection { Logger.tak.warning("Failed to parse CoT message: \(error.localizedDescription)") // Log the raw XML for debugging if let xmlString = String(data: data, encoding: .utf8) { - Logger.tak.debug("Failed Raw CoT XML: \(xmlString.prefix(500))") + let snippet = String(xmlString.prefix(500)) + Logger.tak.debug("Failed Raw CoT XML: \(snippet)") } } } @@ -494,3 +495,4 @@ enum TAKConnectionError: LocalizedError { } } } +