bluetoothmgmt/bluetoothclientlib/btlib/btbaseband.cpp
branchRCL_3
changeset 14 f8503e232b0c
parent 0 29b1cd4cb562
child 23 5b153be919d4
--- a/bluetoothmgmt/bluetoothclientlib/btlib/btbaseband.cpp	Wed Apr 14 17:08:52 2010 +0300
+++ b/bluetoothmgmt/bluetoothclientlib/btlib/btbaseband.cpp	Tue Apr 27 17:48:21 2010 +0300
@@ -529,14 +529,7 @@
 		}	
 	}
 
-void RBTBaseband::TerminateAllPhysicalLinks(TInt aReason)
-	{
-	TRequestStatus stat;
-	TerminateAllPhysicalLinks(aReason, stat);
-	User::WaitForRequest(stat);
-	}
-
-void RBTBaseband::TerminateAllPhysicalLinks(TInt /*aReason*/, TRequestStatus& aStatus)
+void RBTBaseband::TerminateAllPhysicalLinks(TRequestStatus& aStatus)
 	{
 	if (!SubSessionHandle())
 		{
@@ -549,6 +542,20 @@
 		}
 	}
 
+void RBTBaseband::TerminateAllPhysicalLinksForPowerOff(TRequestStatus& aStatus)
+	{
+	if (!SubSessionHandle())
+		{
+		LocalComplete(aStatus, KErrNotReady);
+		}
+	else
+		{
+		TBuf8<1> dummy;
+		iSocket.Shutdown(RSocket::ENormal, KDisconnectAllPhysicalLinksForPowerOff, dummy, aStatus); // this *means* detach now
+		}
+	}
+
+
 TInt RBTBaseband::Enumerate(RBTDevAddrArray& aBTDevAddrArray, TUint aMaxNumber)
 	{
 	if (!SubSessionHandle())