bluetooth/btstack/sdp/sdpclient.cpp
changeset 48 22de2e391156
parent 0 29b1cd4cb562
--- a/bluetooth/btstack/sdp/sdpclient.cpp	Wed Jul 21 15:42:05 2010 +0300
+++ b/bluetooth/btstack/sdp/sdpclient.cpp	Thu Sep 23 17:06:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2000-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -40,6 +40,7 @@
 	{
 	iBoundSAP=iL2CAP.NewSAPL(KSockSeqPacket);
 	iBoundSAP->SetNotify(this);
+	iBoundSAP->SecurityCheck(this);
 	CheckForIdle(KSDPIdleTimeout*4);// No point hanging about if no one connects
 	}
 
@@ -93,6 +94,13 @@
 		{
 		Panic(ESdpErrorSettingAddress);
 		}
+	TPckgBuf<TBool> noSecurityRequired;
+	noSecurityRequired() = ETrue;
+	
+	if(iBoundSAP->SetOption(KSolBtSAPBase, KBTSetNoSecurityRequired, noSecurityRequired)!=KErrNone)
+		{
+		Panic(ESdpAgentErrorSettingNoSecurity);
+		}
 	iBoundSAP->ActiveOpen();  // Signals ConnectComplete eventually!
 	}
 
@@ -650,3 +658,7 @@
 	return FALSE;
 	}
 
+TInt CSdpClient::CheckPolicy(const TSecurityPolicy& /*aPolicy*/, const char* /*aDiagnostic*/)
+	{
+	return KErrNone;
+	}