VirtualBox

Changeset 24770 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Nov 18, 2009 6:16:21 PM (15 years ago)
Author:
vboxsync
Message:

Main: fixed teleportation cancellation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImplTeleporter.cpp

    r24617 r24770  
    283283    AssertReturn(pState->mfIsSource, VERR_INVALID_HANDLE);
    284284
     285    /* Poll for incoming NACKs and errors from the other side */
     286    int rc = RTTcpSelectOne(pState->mhSocket, 0);
     287    if (rc != VERR_TIMEOUT)
     288    {
     289        if (RT_SUCCESS(rc))
     290        {
     291            LogRel(("Teleporter/TCP: Incoming data found before write, assuming it's a cancel.\n"));
     292            rc = VERR_SSM_CANCELLED;
     293        }
     294        else
     295            LogRel(("Teleporter/TCP: RTTcpSelectOne -> %Rrc before write.\n", rc));
     296        return rc;
     297    }
     298
    285299    for (;;)
    286300    {
     
    289303        Hdr.u32Magic = TELEPORTERTCPHDR_MAGIC;
    290304        Hdr.cb       = RT_MIN((uint32_t)cbToWrite, TELEPORTERTCPHDR_MAX_SIZE);
    291         int rc = RTTcpWrite(pState->mhSocket, &Hdr, sizeof(Hdr));
     305        rc = RTTcpWrite(pState->mhSocket, &Hdr, sizeof(Hdr));
    292306        if (RT_FAILURE(rc))
    293307        {
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