Prevent multiple calls of WaitCommEvent


Commit ac0422e8c9e74f2275129e3c7c69ef64299f07a9 introduced a regression
that QSP::startAsyncCommunication() was called twice when a limited read
buffer is used. In the second call the WaitCommEvent function returned the
ERROR_INVALID_PARAMETER error that lead to a stall of the read sequence.

QSP::startAsyncCommunication() should be called only when the read buffer
has enough space.

Tested on Windows 8 with the virtual com0com ports using Qt5.

Change-Id: Icd6cada7c3acfd4e689ac76ec304416b00f52b50
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
commitcb2ff89d4250fb089d5cf0fb4aeecdc35ae526ac
parent11ed2f6216b89bf1ee52ce99c37822379f764d41
authorDenis Shienkov <denis.shienkov@gmail.com>
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
commit timeThu, 27 Nov 2014 21:31:42 +0100