bluetoothengine/btmac/src/btmac/btmsaudio.cpp
branchRCL_3
changeset 64 1934667b0e2b
parent 0 f63038272f30
equal deleted inserted replaced
61:269724087bed 64:1934667b0e2b
     1 /*
     1 /*
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   108     iSco = NULL;
   108     iSco = NULL;
   109     }
   109     }
   110 
   110 
   111 void CBtmsAudio::SyncLinkDisconnectCompleteL(TInt /*aErr*/)
   111 void CBtmsAudio::SyncLinkDisconnectCompleteL(TInt /*aErr*/)
   112     {
   112     {
       
   113     // Need to delete the socket _now_ as the destructor is called from an async
       
   114     // callback and that is too late - the listener RSocket owned by iSco needs
       
   115     // to be shut down before the ChangeStateL() call below because Entry actions
       
   116     // in Ctrl/Sniffm open a new one.
       
   117     delete iSco;
       
   118     iSco = NULL;
       
   119 
   113     CBtmsInuse* next;
   120     CBtmsInuse* next;
   114     if (iRfcomm->IsInSniff())
   121     if (iRfcomm->IsInSniff())
   115         next = CBtmsSniffm::NewL(Parent(), SwapStateRfcommSock(), NULL); 
   122         next = CBtmsSniffm::NewL(Parent(), SwapStateRfcommSock(), NULL); 
   116     else
   123     else
   117         next = CBtmsCtrl::NewL(Parent(), SwapStateRfcommSock(), NULL);
   124         next = CBtmsCtrl::NewL(Parent(), SwapStateRfcommSock(), NULL);