servd: default Enabled() to false when LIBICSNEO_USE_SERVD is unset

Previously, Servd::Enabled() returned true by default when the
LIBICSNEO_USE_SERVD environment variable was not set. This caused
DeviceFinder::FindAll() to take the Servd::Find() path and skip all
direct transport discovery (CDCACM, DXX, PCAP, etc.) even when no
servd daemon is running, silently returning zero devices.

The intended behavior is opt-in: users who want to use servd should
explicitly set LIBICSNEO_USE_SERVD=1. Change the default to false so
direct device discovery works out of the box.

LIBICSNEO_USE_SERVD=1 continues to enable servd as before.
pull/87/head
Gowtham Nanjukutty (XC-CP/ECC2.3) 2026-05-22 09:13:41 -04:00
parent 49e578a657
commit 1e7dfa7a71
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ bool Servd::Enabled() {
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(pop) #pragma warning(pop)
#endif #endif
return enabled ? enabled[0] == '1' : true; return enabled ? enabled[0] == '1' : false;
} }
std::vector<std::string> split(const std::string_view& str, char delim = ' ') { std::vector<std::string> split(const std::string_view& str, char delim = ' ') {