Browse Source

Merge pull request #2854 from rgetz/rgetz-fix-win-com-port

serialutil: Remove dead code in Windows COM port enumeration
chirpmodem-v8.0.0
Edouard Griffiths 4 months ago committed by GitHub
parent
commit
af3941dd23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      sdrbase/util/serialutil.cpp

7
sdrbase/util/serialutil.cpp

@ -38,7 +38,6 @@ void SerialUtil::getComPorts(std::vector<std::string>& comPorts, const std::stri @@ -38,7 +38,6 @@ void SerialUtil::getComPorts(std::vector<std::string>& comPorts, const std::stri
(void) regexStr;
TCHAR lpTargetPath[5000]; // buffer to store the path of the COMPORTS
DWORD test;
bool gotPort = 0; // in case the port is not found
char portName[100];
@ -53,12 +52,6 @@ void SerialUtil::getComPorts(std::vector<std::string>& comPorts, const std::stri @@ -53,12 +52,6 @@ void SerialUtil::getComPorts(std::vector<std::string>& comPorts, const std::stri
{
comPorts.push_back(std::string(portName));
}
if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{
lpTargetPath[10000]; // in case the buffer got filled, increase size of the buffer.
continue;
}
}
}
#elif defined(__linux__)

Loading…
Cancel
Save