VirtualBox

Changeset 90176 in vbox for trunk


Ignore:
Timestamp:
Jul 14, 2021 9:38:43 AM (4 years ago)
Author:
vboxsync
Message:

Audio/ValKit: ATS termination fixes. bugref:10008

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

Legend:

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

    r90048 r90176  
    936936 * @returns VBox status code.
    937937 */
    938 static DECLCALLBACK(int) atsConnectThread(RTTHREAD hThread, void *pvUser)
     938static DECLCALLBACK(int) atsMainThread(RTTHREAD hThread, void *pvUser)
    939939{
    940940    RT_NOREF(hThread);
     
    10901090    {
    10911091        /* Spin off the connection thread. */
    1092         rc = RTThreadCreate(&pThis->hThreadMain, atsConnectThread, pThis, 0, RTTHREADTYPE_DEFAULT, RTTHREADFLAGS_WAITABLE,
     1092        rc = RTThreadCreate(&pThis->hThreadMain, atsMainThread, pThis, 0, RTTHREADTYPE_DEFAULT, RTTHREADFLAGS_WAITABLE,
    10931093                            "AUDTSTSRVM");
    10941094        if (RT_SUCCESS(rc))
     
    11731173    RTPollSetDestroy(pThis->hPollSet);
    11741174    pThis->hPollSet = NIL_RTPOLLSET;
    1175 
    1176     pThis->pTransport = NULL;
    11771175
    11781176    PATSSERVERINST pIt, pItNext;
  • trunk/src/VBox/Devices/Audio/AudioTestServiceTcp.cpp

    r90048 r90176  
    688688    atsTcpConnectWaitOnThreads(pThis, 15000);
    689689
     690    LogFunc(("Done\n"));
     691}
     692
     693/**
     694 * @interface_method_impl{ATSTRANSPORT,pfnCreate}
     695 */
     696static DECLCALLBACK(int) atsTcpCreate(PATSTRANSPORTINST *ppThis)
     697{
     698    PATSTRANSPORTINST pThis = (PATSTRANSPORTINST)RTMemAllocZ(sizeof(ATSTRANSPORTINST));
     699    AssertPtrReturn(pThis, VERR_NO_MEMORY);
     700
     701    *ppThis = pThis;
     702    return VINF_SUCCESS;
     703}
     704
     705/**
     706 * @interface_method_impl{ATSTRANSPORT,pfnDestroy}
     707 */
     708static DECLCALLBACK(int) atsTcpDestroy(PATSTRANSPORTINST pThis)
     709{
    690710    /* Finally, clean up the critical section. */
    691711    if (RTCritSectIsInitialized(&pThis->CritSect))
    692712        RTCritSectDelete(&pThis->CritSect);
    693713
    694     LogFunc(("Done\n"));
    695 }
    696 
    697 /**
    698  * @interface_method_impl{ATSTRANSPORT,pfnCreate}
    699  */
    700 static DECLCALLBACK(int) atsTcpCreate(PATSTRANSPORTINST *ppThis)
    701 {
    702     PATSTRANSPORTINST pThis = (PATSTRANSPORTINST)RTMemAllocZ(sizeof(ATSTRANSPORTINST));
    703     AssertPtrReturn(pThis, VERR_NO_MEMORY);
    704 
    705     *ppThis = pThis;
    706     return VINF_SUCCESS;
    707 }
    708 
    709 /**
    710  * @interface_method_impl{ATSTRANSPORT,pfnDestroy}
    711  */
    712 static DECLCALLBACK(int) atsTcpDestroy(PATSTRANSPORTINST pThis)
    713 {
    714     /** @todo Anything else to do here? */
    715714    RTMemFree(pThis);
    716715
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