From a76b4e952cb52b27aed75908c713a6b13ed87d1c Mon Sep 17 00:00:00 2001 From: Tom Early Date: Thu, 9 Dec 2021 07:04:15 -0700 Subject: [PATCH] forgot to pass maxfd+1 to select --- Controller.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Controller.cpp b/Controller.cpp index 1d0eda9..5ad9c3d 100644 --- a/Controller.cpp +++ b/Controller.cpp @@ -87,8 +87,8 @@ bool CController::InitDevices() // now initialize each device - // the first one will be a dmr device - Encoding type = Encoding::dmr; + // the first one will be a dstar device + Encoding type = Encoding::dstar; for (const auto devpath : deviceset) { // instantiate it @@ -253,7 +253,7 @@ void CController::ReadAmbeDevices() struct timeval tv; tv.tv_sec = 0; tv.tv_usec = 40000; - auto rval = select(maxfd, &FdSet, nullptr, nullptr, &tv); + auto rval = select(maxfd+1, &FdSet, nullptr, nullptr, &tv); if (rval < 0) { std::cerr << "select() ERROR reading AMBE devices: " << strerror(errno) << std::endl;