VirtualBox

Changeset 57267 in vbox


Ignore:
Timestamp:
Aug 11, 2015 1:27:26 AM (9 years ago)
Author:
vboxsync
Message:

dbgcTcpBackRead: EOF on socket is reported as success by RTTcpRead()
if pcbRead is non-NULL, so check if we successfully read 0 bytes and
return VERR_NET_SHUTDOWN in that case (like RTTcpRead() already does
when pcbRead is NULL).

Makes it possible to disconnect from the debugger without causing a
busy loop in dbgcInputRead().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/DBGCTcp.cpp

    r56296 r57267  
    102102        return VERR_INVALID_HANDLE;
    103103    int rc = RTTcpRead(pDbgcTcp->Sock, pvBuf, cbBuf, pcbRead);
     104    if (RT_SUCCESS(rc) && pcbRead != NULL && *pcbRead == 0)
     105        rc = VERR_NET_SHUTDOWN;
    104106    if (RT_FAILURE(rc))
    105107        pDbgcTcp->fAlive = false;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette