bluetooth/btstack/linkmgr/ProxySAP.cpp
branchRCL_3
changeset 14 f8503e232b0c
parent 0 29b1cd4cb562
child 17 32ba20339036
equal deleted inserted replaced
13:16aa830c86c8 14:f8503e232b0c
   764 			if(iSocket)
   764 			if(iSocket)
   765 				iSocket->Error(rerr, MSocketNotify::EErrorClose);
   765 				iSocket->Error(rerr, MSocketNotify::EErrorClose);
   766 			return;
   766 			return;
   767 			}										
   767 			}										
   768 
   768 
   769 		if (aDisconnectOption == KDisconnectAllPhysicalLinks)
   769 		if (aDisconnectOption == KDisconnectAllPhysicalLinks || aDisconnectOption == KDisconnectAllPhysicalLinksForPowerOff)
   770 			{
   770 			{
   771 			// Disconnecting All BT Physical Links
   771 			// Disconnecting All BT Physical Links
   772 			// Only support link *termination*, this is done as normal cos esock weirdness
   772 			// Only support link *termination*, this is done as normal cos esock weirdness
   773 			__ASSERT_ALWAYS(aCloseType == CServProviderBase::ENormal, Panic(EBTProxySAPInvalidTerminate));
   773 			__ASSERT_ALWAYS(aCloseType == CServProviderBase::ENormal, Panic(EBTProxySAPInvalidTerminate));
   774 			rerr = iLinksMan.TerminateAllPhysicalLinks(this);
   774 			rerr = iLinksMan.TerminateAllPhysicalLinks(this, aDisconnectOption == KDisconnectAllPhysicalLinksForPowerOff ? ERemoteAboutToPowerOff : ERemoteUserEndedConnection);
   775 			LOG2(_L("Proxy SAP 0x%08x -- Terminating all PHY Links, error: %d"), this, rerr);
   775 			LOG2(_L("Proxy SAP 0x%08x -- Terminating all PHY Links, error: %d"), this, rerr);
   776 			
   776 			
   777 			// If there was an error terminating any of the physical links then we can 
   777 			// If there was an error terminating any of the physical links then we can 
   778 			// call CanClose straight away, otherwise this is done when iLinksMan calls
   778 			// call CanClose straight away, otherwise this is done when iLinksMan calls
   779 			// TerminatePhysicalLinksComplete()
   779 			// TerminatePhysicalLinksComplete()