bluetooth/btstack/linkmgr/ProxySAP.cpp
changeset 21 5e5528a288fe
parent 0 29b1cd4cb562
child 23 32ba20339036
child 32 f72906e669b4
equal deleted inserted replaced
19:4b81101308c6 21:5e5528a288fe
   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()