VirtualBox

Changeset 33121 in vbox


Ignore:
Timestamp:
Oct 14, 2010 8:54:27 AM (14 years ago)
Author:
vboxsync
Message:

iSCSI: Fix broken disconnect handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/ISCSIHDDCore.cpp

    r32691 r33121  
    33353335                    case ISCSICMDTYPE_REQ:
    33363336                    {
    3337                         rc = iscsiPDUTxPrepare(pImage, pIScsiCmd);
    3338                         AssertRC(rc);
     3337                        /* If there is no connection complete the command with an error. */
     3338                        if (RT_LIKELY(iscsiIsClientConnected(pImage)))
     3339                        {
     3340                            rc = iscsiPDUTxPrepare(pImage, pIScsiCmd);
     3341                            AssertRC(rc);
     3342                        }
     3343                        else
     3344                            iscsiCmdComplete(pImage, pIScsiCmd, VERR_NET_CONNECTION_REFUSED);
    33393345                        break;
    33403346                    }
     
    36943700            pImage->pvRecvPDUBuf = NULL;
    36953701        }
     3702
     3703        pImage->cbRecvPDUResidual = 0;
    36963704    }
    36973705
     
    37203728    fHostIPDef = !!uHostIPTmp;
    37213729
    3722 #if 0
    3723     if (uOpenFlags & VD_OPEN_FLAGS_ASYNC_IO)
    3724         return VERR_NOT_SUPPORTED;
    3725 #endif
    3726 
    37273730    pImage->uOpenFlags      = uOpenFlags;
    37283731
     
    39573960
    39583961    memset(pImage->aCmdsWaiting, 0, sizeof(pImage->aCmdsWaiting));
     3962    pImage->cbRecvPDUResidual = 0;
    39593963
    39603964    /* Create the socket structure. */
     
    45604564    if (RT_FAILURE(rc))
    45614565    {
    4562         AssertMsgFailed(("iscsiCommand(%s, %#llx) -> %Rrc\n", pImage->pszTargetName, uOffset, rc));
     4566        LogFlow(("iscsiCommandSync(%s, %#llx) -> %Rrc\n", pImage->pszTargetName, uOffset, rc));
    45634567        *pcbActuallyRead = 0;
    45644568    }
     
    46644668    if (RT_FAILURE(rc))
    46654669    {
    4666         AssertMsgFailed(("iscsiCommand(%s, %#llx) -> %Rrc\n", pImage->pszTargetName, uOffset, rc));
     4670        LogFlow(("iscsiCommandSync(%s, %#llx) -> %Rrc\n", pImage->pszTargetName, uOffset, rc));
    46674671        *pcbWriteProcess = 0;
    46684672    }
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