eapol/eapol_framework/eapol_symbian/am/common/symbian/EapPluginTools.cpp
changeset 52 c23bdf5a328a
parent 39 fe6b6762fccd
--- a/eapol/eapol_framework/eapol_symbian/am/common/symbian/EapPluginTools.cpp	Fri Sep 17 08:30:11 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/EapPluginTools.cpp	Mon Oct 04 00:19:54 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 19 %
+* %version: 21 %
 */
 
 #include <EapTraceSymbian.h>
@@ -85,7 +85,7 @@
 			plugin_type.GetVendorId(),
 			plugin_type.GetVendorType()));
 
-		TBool aNotAllowed(EFalse);
+		TBool aAllowed(ETrue);
 
 		if (aIndexType == ELan
 			&& aTunnelingEapType == (*EapExpandedTypeNone.GetType()))
@@ -98,7 +98,7 @@
 					plugin_type.GetVendorId(),
 					plugin_type.GetVendorType()));
 
-				aNotAllowed = ETrue;
+				aAllowed = EFalse;
 			}
 		}
 		else if (aTunnelingEapType == (*EapExpandedTypePeap.GetType())
@@ -112,7 +112,7 @@
 					plugin_type.GetVendorId(),
 					plugin_type.GetVendorType()));
 
-				aNotAllowed = ETrue;
+				aAllowed = EFalse;
 			}
 		}
 		else if (aTunnelingEapType == (*EapExpandedTypeTtls.GetType()))
@@ -125,11 +125,22 @@
 					plugin_type.GetVendorId(),
 					plugin_type.GetVendorType()));
 
-				aNotAllowed = ETrue;
+				aAllowed = EFalse;
 			}
 		}
+		else if (aTunnelingEapType != (*EapExpandedTypeNone.GetType()))
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::ListAllEapPluginsL(): aEapArray[%d] EAP-type=0xfe%06x%08x is NOT allowed inside EAP-type=0xfe%06x%08x\n"),
+				counter,
+				plugin_type.GetVendorId(),
+				plugin_type.GetVendorType(),
+				aTunnelingEapType.GetVendorId(),
+				aTunnelingEapType.GetVendorType()));
 
-		if (aNotAllowed)
+			aAllowed = EFalse;
+		}
+
+		if (!aAllowed)
 		{
 			EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::ListAllEapPluginsL(): Removes EAP-plugin aEapArray[%d] EAP-type=0xfe%06x%08x\n"),
 				counter,
@@ -254,10 +265,11 @@
 
 	error = aDatabase.Create(aFileServerSession, aPrivateDatabasePathName);
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::CreateDatabaseLC(): - Created private DB for %S. error=%d, (%d is KErrAlreadyExists)\n"),
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::CreateDatabaseLC(): - Created private DB for %S. error=%d, (%d is KErrAlreadyExists, %d is KErrInUse)\n"),
 		&aDatabaseName,
 		error,
-		KErrAlreadyExists));
+		KErrAlreadyExists,
+		KErrInUse));
 }
 
 // ----------------------------------------------------------------------