bluetooth/btstack/secman/secman.cpp
branchRCL_3
changeset 14 9b6d3ca0c601
parent 13 20fda83a6398
child 22 9f17f914e828
--- a/bluetooth/btstack/secman/secman.cpp	Mon Mar 15 12:44:59 2010 +0200
+++ b/bluetooth/btstack/secman/secman.cpp	Wed Mar 31 23:19:43 2010 +0300
@@ -556,7 +556,7 @@
 	__ASSERT_ALWAYS(link, PANIC(KBTSecPanic, EBTSecPhysicalLinkMissing));
 	__ASSERT_DEBUG(!link->InstanceNumericComparator(), PANIC(KBTSecPanic, EBTSecConnectionNumericComparisonTwice));
 	__ASSERT_DEBUG(!link->InstanceUserConfirmer(), PANIC(KBTSecPanic, EBTSecConnectionUserConfirmationTwice));
-	if(link->InstanceNumericComparator())
+	if(link->InstanceNumericComparator() || link->InstanceUserConfirmer())
 		{
 		return;
 		}
@@ -582,7 +582,10 @@
 				}
 			}
 		}
-	else if (!link->IsPairingExpected())
+	else if (!link->IsPairingExpected()
+			|| ((link->AuthenticationRequirement() == EMitmNotReqDedicatedBonding 
+					|| link->AuthenticationRequirement() == EMitmReqDedicatedBonding)
+				&& !IsDedicatedBondingAttempted(aAddr)))
 		{
 		TRAPD(err,link->NewUserConfirmerL(aAddr, *this, ETrue));
 		if(err)