Changeset 77324 in vbox
- Timestamp:
- Feb 14, 2019 9:23:14 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/Serial
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Serial/DrvChar.cpp
r76553 r77324 259 259 if (fEvtsRecv & RTPOLL_EVT_WRITE) 260 260 { 261 if (pThis->fAvailWrInt) 261 if ( pThis->fAvailWrInt 262 && pThis->cbTxUsed < RT_ELEMENTS(pThis->abTxBuf)) 262 263 { 263 264 /* Stuff as much data into the TX buffer as we can. */ … … 284 285 { 285 286 pThis->cbTxUsed -= cbProcessed; 286 if (pThis->cbTxUsed) 287 if ( pThis->cbTxUsed 288 && cbProcessed) 287 289 { 288 290 /* Move the data in the TX buffer to the front to fill the end again. */ -
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r76553 r77324 418 418 if (fEvtsRecv & RTSERIALPORT_EVT_F_DATA_TX) 419 419 { 420 if (pThis->fAvailWrInt) 420 if ( pThis->fAvailWrInt 421 && pThis->cbTxUsed < RT_ELEMENTS(pThis->abTxBuf)) 421 422 { 422 423 /* Stuff as much data into the TX buffer as we can. */ … … 443 444 { 444 445 pThis->cbTxUsed -= cbProcessed; 445 if (pThis->cbTxUsed) 446 if ( pThis->cbTxUsed 447 && cbProcessed) 446 448 { 447 449 /* Move the data in the TX buffer to the front to fill the end again. */ 448 memmove(&pThis->abTxBuf[0], &pThis->abTxBuf[cbProcessed], pThis->cbTxUsed); 449 } 450 memmove(&pThis->abTxBuf[0], &pThis->abTxBuf[cbProcessed], pThis->cbTxUsed); } 450 451 else 451 452 pThis->pDrvSerialPort->pfnDataSentNotify(pThis->pDrvSerialPort);
Note:
See TracChangeset
for help on using the changeset viewer.