mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 840294: Check RIL validity before writing to socket; r=tzimmerman
--HG-- extra : rebase_source : 3fd48cad8cd3b06994972f420752c5676b2e68dc
This commit is contained in:
parent
a133579459
commit
2fc57b1b3a
@ -449,7 +449,8 @@ SystemWorkerManager::SendRilRawData(unsigned long aClientId,
|
||||
UnixSocketRawData* aRaw)
|
||||
{
|
||||
if ((gInstance->mRilConsumers.Length() <= aClientId) ||
|
||||
!gInstance->mRilConsumers[aClientId]) {
|
||||
!gInstance->mRilConsumers[aClientId] ||
|
||||
gInstance->mRilConsumers[aClientId]->GetConnectionStatus() != SOCKET_CONNECTED) {
|
||||
// Probably shuting down.
|
||||
delete aRaw;
|
||||
return true;
|
||||
|
@ -115,6 +115,7 @@ public:
|
||||
void SetUpIO()
|
||||
{
|
||||
MOZ_ASSERT(!mIOLoop);
|
||||
MOZ_ASSERT(mFd >= 0);
|
||||
mIOLoop = MessageLoopForIO::current();
|
||||
mIOLoop->WatchFileDescriptor(mFd,
|
||||
true,
|
||||
@ -749,6 +750,7 @@ UnixSocketImpl::OnFileCanWriteWithoutBlocking(int aFd)
|
||||
// within mCurrentRilRawData, and request another write when the
|
||||
// system won't block.
|
||||
//
|
||||
MOZ_ASSERT(aFd >= 0);
|
||||
while (true) {
|
||||
UnixSocketRawData* data;
|
||||
if (mOutgoingQ.IsEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user