Skip to content

Commit 6f8fc11

Browse files
committed
Fix TIOCMIWAIT ioctl call
This issue was reported in wjwwood/serial#224.
1 parent 7dd4a89 commit 6f8fc11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/impl/impl_unix.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,9 +840,9 @@ bool Serial::SerialImpl::waitForChange() const {
840840
#else
841841
int command = (TIOCM_CD | TIOCM_DSR | TIOCM_RI | TIOCM_CTS);
842842

843-
if (-1 == ioctl(fd_, TIOCMIWAIT, &command)) {
843+
if (-1 == ioctl(fd_, TIOCMIWAIT, command)) {
844844
std::stringstream ss;
845-
ss << "waitForDSR failed on a call to ioctl(TIOCMIWAIT): " << errno << " " << strerror(errno);
845+
ss << "waitForChange failed on a call to ioctl(TIOCMIWAIT): " << errno << " " << strerror(errno);
846846
throw (SerialException(ss.str().c_str()));
847847
}
848848
return true;

0 commit comments

Comments
 (0)