bluetooth/btstack/l2cap/l2capSAPSignalHandler.cpp
changeset 48 22de2e391156
parent 33 4e80e1b997a8
child 56 015fa7494bd2
--- a/bluetooth/btstack/l2cap/l2capSAPSignalHandler.cpp	Wed Jul 21 15:42:05 2010 +0300
+++ b/bluetooth/btstack/l2cap/l2capSAPSignalHandler.cpp	Thu Sep 23 17:06:47 2010 +0300
@@ -813,8 +813,9 @@
 	{
 	LOG_FUNC
 	// The SAP is about to be detached from this signal handler.
-	// Ensure no park overrides are active.
+	// Ensure no overrides are active.
 	UndoOverrideParkMode();
+	UndoOverrideLPM();
 	
 	// Check if this SH has any unsent commands
 	// outstanding.
@@ -916,15 +917,26 @@
 		iSAP->Protocol().ControlPlane().ModifyPhysicalLink(EUndoOverridePark, iSAP->RemoteDev());
 		}
 	}
-	
-void CL2CapSAPSignalHandler::OverrideLPMWithTimeout()
+
+void CL2CapSAPSignalHandler::OverrideLPM()
 	{
 	LOG_FUNC
 	// Temporarily override all low power modes.  A reference to the SAP is required
 	// to get the remote device address.
 	if(iSAP)
 		{
-		iSAP->Protocol().ControlPlane().ModifyPhysicalLink(EOverrideLPMWithTimeout, iSAP->RemoteDev());
+		iSAP->Protocol().ControlPlane().ModifyPhysicalLink(EOverrideLPM, iSAP->RemoteDev());
 		}
 	}
-	
+
+void CL2CapSAPSignalHandler::UndoOverrideLPM()
+	{
+	LOG_FUNC
+	// Remove the temporary override of all low power modes.  A reference to the SAP is 
+	// required to get the remote device address.
+	if(iSAP)
+		{
+		iSAP->Protocol().ControlPlane().ModifyPhysicalLink(EUndoOverrideLPM, iSAP->RemoteDev());
+		}
+	}
+