bluetooth/btstack/secman/secman.cpp
changeset 16 0089b2f7ebd8
parent 0 29b1cd4cb562
child 13 20fda83a6398
child 17 907b2fb7aa8e
--- a/bluetooth/btstack/secman/secman.cpp	Tue Feb 02 01:12:20 2010 +0200
+++ b/bluetooth/btstack/secman/secman.cpp	Fri Mar 19 09:53:48 2010 +0200
@@ -453,34 +453,22 @@
 				oobPresence = EOOBDataPresent;
 				}
 			THCIAuthenticationRequirement authReq = link->AuthenticationRequirement();
-			if(ConnectionsManager().IsAcceptPairedOnlyMode())
+			switch(authReq)
 				{
-				// in paired only mode, only MITM pairings are acceptable.
-				switch(authReq)
-					{
 				case EMitmNotReqNoBonding:
-				case EMitmReqNoBonding:
-					authReq = EMitmReqNoBonding;
-					break;
 				case EMitmNotReqDedicatedBonding:
-				case EMitmReqDedicatedBonding:
-					authReq = EMitmReqDedicatedBonding;
-					break;
 				case EMitmNotReqGeneralBonding:
-				case EMitmReqGeneralBonding:
-					authReq = EMitmReqGeneralBonding;
+					link->SetLocalMITM(EFalse);
 					break;
-	            default:
-	                PANIC(KBTSecPanic, EBTSecUnexpectedIoCapability);
-	                break;
-					}
-				link->SetLocalMITM(ETrue);
+				case EMitmReqNoBonding:
+				case EMitmReqDedicatedBonding:
+				case EMitmReqGeneralBonding:
+					link->SetLocalMITM(ETrue);
+					break;
+				default:
+					PANIC(KBTSecPanic, EBTSecUnexpectedIoCapability);
+					break;    
 				}
-			else
-				{
-				link->SetLocalMITM(EFalse);
-				}
-		
 			TRAP_IGNORE(iCommandController->IOCapabilityRequestReplyL(aAddr, EIOCapsDisplayYesNo, oobPresence, authReq));
 			}
 		else