VirtualBox

Changeset 90887 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Aug 25, 2021 4:20:14 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146523
Message:

Audio/VKAT: More code for TCP/IP connection mode handling; don't do things less implicitly but let the caller (or rather test driver) choose how to connect to the guest/host instead. ​bugref:10008

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/AudioTestServiceClient.cpp

    r90830 r90887  
    513513static int audioTestSvcClientCloseInternal(PATSCLIENT pClient)
    514514{
     515    if (!pClient->pTransportClient) /* Not connected (yet)? Bail out early. */
     516        return VINF_SUCCESS;
     517
    515518    int rc = audioTestSvcClientDoBye(pClient);
    516519    if (RT_SUCCESS(rc))
  • trunk/src/VBox/Devices/Audio/AudioTestServiceTcp.cpp

    r90868 r90887  
    786786            if (RT_FAILURE(rc))
    787787                return RTMsgErrorRc(VERR_INVALID_PARAMETER, "TCP bind address is too long (%Rrc)", rc);
     788            if (!pThis->szBindAddr[0])
     789                return RTMsgErrorRc(VERR_INVALID_PARAMETER, "No TCP bind address specified: %s", pThis->szBindAddr);
    788790            return VINF_SUCCESS;
    789791
    790792        case ATSTCPOPT_BIND_PORT:
    791             pThis->uBindPort = pVal->u16 == 0 ? ATS_TCP_DEF_BIND_PORT_GUEST : pVal->u16;
     793            pThis->uBindPort = pVal->u16;
    792794            return VINF_SUCCESS;
    793795
     
    797799                return RTMsgErrorRc(VERR_INVALID_PARAMETER, "TCP connect address is too long (%Rrc)", rc);
    798800            if (!pThis->szConnectAddr[0])
    799                 strcpy(pThis->szConnectAddr, ATS_TCP_DEF_CONNECT_GUEST_STR);
     801                return RTMsgErrorRc(VERR_INVALID_PARAMETER, "No TCP connect address specified");
    800802            return VINF_SUCCESS;
    801803
    802804        case ATSTCPOPT_CONNECT_PORT:
    803             pThis->uConnectPort = pVal->u16 == 0 ? ATS_TCP_DEF_BIND_PORT_GUEST : pVal->u16;
     805            pThis->uConnectPort = pVal->u16;
    804806            return VINF_SUCCESS;
    805807
Note: See TracChangeset for help on using the changeset viewer.

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