diff options
author | Dave Houlton <euclid@lindenlab.com> | 2021-04-29 12:28:26 -0600 |
---|---|---|
committer | Dave Houlton <euclid@lindenlab.com> | 2021-04-29 12:28:26 -0600 |
commit | 59ab227c4020565f85e6fc2edf3e3fcc16abb574 (patch) | |
tree | 94265895fdc0df4d3c38f74288cbd87bc2e01c20 /indra/newview/llvoicevivox.cpp | |
parent | 029f179719907d674f89e39577c37e82e654b59d (diff) | |
parent | ce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff) |
DRTVWR-528 merge up to 6.4.19
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r-- | indra/newview/llvoicevivox.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index e88c05616d..b0f57beff8 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -391,7 +391,7 @@ LLVivoxVoiceClient::~LLVivoxVoiceClient() void LLVivoxVoiceClient::init(LLPumpIO *pump) { // constructor will set up LLVoiceClient::getInstance() - LLVivoxVoiceClient::getInstance()->mPump = pump; + mPump = pump; // LLCoros::instance().launch("LLVivoxVoiceClient::voiceControlCoro", // boost::bind(&LLVivoxVoiceClient::voiceControlCoro, LLVivoxVoiceClient::getInstance())); @@ -419,6 +419,7 @@ void LLVivoxVoiceClient::terminate() } sShuttingDown = true; + mPump = NULL; } //--------------------------------------------------- @@ -953,10 +954,15 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); - while (!mPump) - { // Can't do this until we have the pump available. + while (!mPump && !sShuttingDown) + { // Can't use the pump until we have it available. llcoro::suspend(); } + + if (sShuttingDown) + { + return false; + } // MBW -- Note to self: pumps and pipes examples in // indra/test/io.cpp @@ -969,8 +975,10 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() readChain.push_back(LLIOPipe::ptr_t(new LLIOSocketReader(mSocket))); readChain.push_back(LLIOPipe::ptr_t(new LLVivoxProtocolParser())); + mPump->addChain(readChain, NEVER_CHAIN_EXPIRY_SECS); + //--------------------------------------------------------------------- llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); @@ -993,6 +1001,11 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() // *TODO* Pump a message for wake up. llcoro::suspend(); } + + if (sShuttingDown) + { + return false; + } std::string url = gAgent.getRegionCapability("ProvisionVoiceAccountRequest"); |