From beded631cf10374240cb77db45b2971958c700ca Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Tue, 1 Nov 2022 20:50:15 -0400 Subject: [PATCH] correct strangness with queue size errors; --- host/Host.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/host/Host.cpp b/host/Host.cpp index fabdb1a3..737fc6d0 100644 --- a/host/Host.cpp +++ b/host/Host.cpp @@ -1940,7 +1940,7 @@ bool Host::createModem() uint32_t dmrQueueSize = dmrProtocol["queueSize"].as(24U); // clamp queue size to no less then 24 and no greater the 100 - if (dmrQueueSize <= 24U) { + if (dmrQueueSize < 24U) { LogWarning(LOG_HOST, "DMR queue size must be greater then 24 frames, defaulting to 24 frames!"); dmrQueueSize = 24U; } @@ -1958,7 +1958,7 @@ bool Host::createModem() uint32_t p25QueueSize = p25Protocol["queueSize"].as(12U); // clamp queue size to no less then 12 and no greater the 100 frames - if (p25QueueSize <= 12U) { + if (p25QueueSize < 12U) { LogWarning(LOG_HOST, "P25 queue size must be greater then 12 frames, defaulting to 12 frames!"); p25QueueSize = 12U; } @@ -1976,7 +1976,7 @@ bool Host::createModem() uint32_t nxdnQueueSize = nxdnProtocol["queueSize"].as(31U); // clamp queue size to no less then 31 and no greater the 50 frames - if (nxdnQueueSize <= 31U) { + if (nxdnQueueSize < 31U) { LogWarning(LOG_HOST, "NXDN queue size must be greater then 31 frames, defaulting to 31 frames!"); nxdnQueueSize = 31U; } @@ -1984,9 +1984,6 @@ bool Host::createModem() LogWarning(LOG_HOST, "NXDN queue size must be less then 50 frames, defaulting to 50 frames!"); nxdnQueueSize = 50U; } - if (nxdnQueueSize > 30U) { - LogWarning(LOG_HOST, "NXDN queue size is excessive, >30 frames!"); - } m_nxdnQueueSizeBytes = nxdnQueueSize * nxdn::NXDN_FRAME_LENGTH_BYTES; @@ -2118,11 +2115,6 @@ bool Host::createModem() if (portType == PTY_PORT) { #if !defined(_WIN32) && !defined(_WIN64) -/* - modemPort = new port::PseudoPTYPort(uartPort, serialSpeed, true); - LogInfo(" PTY File: %s", uartPort.c_str()); - LogInfo(" PTY Speed: %u", uartSpeed); -*/ modemPort = new port::UARTPort(uartPort, serialSpeed, false); LogInfo(" PTY Port: %s", uartPort.c_str()); LogInfo(" PTY Speed: %u", uartSpeed);