Commit add7ab0f authored by Pavel Vainerman's avatar Pavel Vainerman

(ComPort): fix reopen bug (cleanup internal buffer)

parent 0014433d
......@@ -103,6 +103,11 @@ void ComPort::reopen()
tcgetattr(fd, &options);
tcsetattr(fd, TCSAFLUSH, &oldTermios);
close(fd);
curSym = 0;
bufLength = 0;
memset(buf,0,sizeof(buf));
openPort();
if( fd > 0 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment