Use an ephemeral port for the API server

This commit is contained in:
Eric Severance 2025-01-10 15:38:14 -08:00
parent 005166d956
commit bd32ecbc71
No known key found for this signature in database
GPG Key ID: F19AABB5E1EA1B5F

View File

@ -137,8 +137,8 @@ int LLVMFuzzerInitialize(int *argc, char ***argv)
meshtasticThread = std::thread([program = *argv[0]]() { meshtasticThread = std::thread([program = *argv[0]]() {
char nodeIdStr[12]; char nodeIdStr[12];
strcpy(nodeIdStr, std::to_string(nodeId).c_str()); strcpy(nodeIdStr, std::to_string(nodeId).c_str());
int argc = 5; int argc = 7;
char *argv[] = {program, "-d", "/tmp/meshtastic", "-h", nodeIdStr, nullptr}; char *argv[] = {program, "-d", "/tmp/meshtastic", "-h", nodeIdStr, "-p", "0", nullptr};
try { try {
portduino_main(argc, argv); portduino_main(argc, argv);
} catch (const ShouldExitException &) { } catch (const ShouldExitException &) {