VirtualBox

Changeset 53539 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 14, 2014 9:49:20 PM (10 years ago)
Author:
vboxsync
Message:

Storage/iSCSI: Fail when a connection attempt takes too long to pause the VM more quickly when the target is not responding

Location:
trunk/src/VBox
Files:
2 edited

Legend:

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

    r53407 r53539  
    728728
    729729/** @copydoc VDINTERFACETCPNET::pfnClientConnect */
    730 static DECLCALLBACK(int) drvvdINIPClientConnect(VDSOCKET Sock, const char *pszAddress, uint32_t uPort)
     730static DECLCALLBACK(int) drvvdINIPClientConnect(VDSOCKET Sock, const char *pszAddress, uint32_t uPort,
     731                                                RTMSINTERVAL cMillies)
    731732{
    732733    int rc = VINF_SUCCESS;
     
    737738    ip6_addr_t ip6;
    738739#endif
     740
     741    NOREF(cMillies); /** LwIP doesn't support connect timeout. */
    739742
    740743    /* Check whether lwIP is set up in this VM instance. */
     
    11671170
    11681171/** @copydoc VDINTERFACETCPNET::pfnClientConnect */
    1169 static DECLCALLBACK(int) drvvdTcpClientConnect(VDSOCKET Sock, const char *pszAddress, uint32_t uPort)
     1172static DECLCALLBACK(int) drvvdTcpClientConnect(VDSOCKET Sock, const char *pszAddress, uint32_t uPort,
     1173                                               RTMSINTERVAL cMillies)
    11701174{
    11711175    int rc = VINF_SUCCESS;
    11721176    PVDSOCKETINT pSockInt = (PVDSOCKETINT)Sock;
    11731177
    1174     rc = RTTcpClientConnect(pszAddress, uPort, &pSockInt->hSocket);
     1178    rc = RTTcpClientConnectEx(pszAddress, uPort, &pSockInt->hSocket, cMillies, NULL);
    11751179    if (RT_SUCCESS(rc))
    11761180    {
  • trunk/src/VBox/Storage/ISCSI.cpp

    r51105 r53539  
    844844        return VERR_NET_DEST_ADDRESS_REQUIRED;
    845845
    846     rc = pImage->pIfNet->pfnClientConnect(pImage->Socket, pImage->pszHostname, pImage->uPort);
     846    rc = pImage->pIfNet->pfnClientConnect(pImage->Socket, pImage->pszHostname, pImage->uPort, pImage->uReadTimeout);
    847847    if (RT_FAILURE(rc))
    848848    {
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