From bc47dd574b4551f9a831e4a1ae18f025706ca693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 22 Jun 2022 14:26:33 +0200 Subject: [PATCH] avoid BLE device names like a123_a123 --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 5efbb841..ffa2c647 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -105,7 +105,7 @@ const char *getDeviceName() static char name[20]; sprintf(name, "%02x%02x", dmac[4], dmac[5]); // if the shortname exists and is NOT the new default of ab3c, use it for BLE name. - if ((owner.short_name != NULL) && (owner.short_name != name)) { + if ((owner.short_name != NULL) && (strcmp(owner.short_name, name) != 0)) { sprintf(name, "%s_%02x%02x", owner.short_name, dmac[4], dmac[5]); } else { sprintf(name, "Meshtastic_%02x%02x", dmac[4], dmac[5]);