bluetooth/btstack/linkmgr/ProxySAP.cpp
branchRCL_3
changeset 14 f8503e232b0c
parent 0 29b1cd4cb562
child 17 32ba20339036
--- a/bluetooth/btstack/linkmgr/ProxySAP.cpp	Wed Apr 14 17:08:52 2010 +0300
+++ b/bluetooth/btstack/linkmgr/ProxySAP.cpp	Tue Apr 27 17:48:21 2010 +0300
@@ -766,12 +766,12 @@
 			return;
 			}										
 
-		if (aDisconnectOption == KDisconnectAllPhysicalLinks)
+		if (aDisconnectOption == KDisconnectAllPhysicalLinks || aDisconnectOption == KDisconnectAllPhysicalLinksForPowerOff)
 			{
 			// Disconnecting All BT Physical Links
 			// Only support link *termination*, this is done as normal cos esock weirdness
 			__ASSERT_ALWAYS(aCloseType == CServProviderBase::ENormal, Panic(EBTProxySAPInvalidTerminate));
-			rerr = iLinksMan.TerminateAllPhysicalLinks(this);
+			rerr = iLinksMan.TerminateAllPhysicalLinks(this, aDisconnectOption == KDisconnectAllPhysicalLinksForPowerOff ? ERemoteAboutToPowerOff : ERemoteUserEndedConnection);
 			LOG2(_L("Proxy SAP 0x%08x -- Terminating all PHY Links, error: %d"), this, rerr);
 			
 			// If there was an error terminating any of the physical links then we can