From 0c6b465280774e4ce2c346809cafb440bee87e65 Mon Sep 17 00:00:00 2001 From: Paulo Dias Date: Thu, 9 Jan 2025 16:33:43 +0000 Subject: [PATCH] comm/iridium/HubIridiumMessenger: Fix to not send IMEI if is empty. --- src/java/pt/lsts/neptus/comm/iridium/HubIridiumMessenger.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/pt/lsts/neptus/comm/iridium/HubIridiumMessenger.java b/src/java/pt/lsts/neptus/comm/iridium/HubIridiumMessenger.java index 752098bdcd..27451d2388 100644 --- a/src/java/pt/lsts/neptus/comm/iridium/HubIridiumMessenger.java +++ b/src/java/pt/lsts/neptus/comm/iridium/HubIridiumMessenger.java @@ -199,7 +199,8 @@ public void sendMessageRaw(String destinationName, String imeiAddr, byte[] data) conn.setRequestProperty( "source", GeneralPreferences.imcCcuName.toLowerCase(Locale.ROOT)); conn.setRequestProperty( "destination", destinationName); - conn.setRequestProperty( "imei", imeiAddr); + if (imeiAddr != null && !imeiAddr.isEmpty()) + conn.setRequestProperty( "imei", imeiAddr); conn.setRequestProperty( "Content-Length", String.valueOf(data.length * 2) );