wlanutilities/wlansniffer/wlaninfo/src/wsfwlaninfoarray.cpp
branchRCL_3
changeset 18 aaabc7526ded
parent 0 56b72877c1cb
--- a/wlanutilities/wlansniffer/wlaninfo/src/wsfwlaninfoarray.cpp	Tue May 25 13:53:32 2010 +0300
+++ b/wlanutilities/wlansniffer/wlaninfo/src/wsfwlaninfoarray.cpp	Wed Jun 09 10:53:40 2010 +0300
@@ -285,6 +285,7 @@
 EXPORT_C void CWsfWlanInfoArray::MatchL( const TDesC8& aSsid, 
                                          CMManager::TWlanSecMode aSecMode, 
                                          CMManager::TWlanNetMode aNetMode, 
+                                         TBool aUsesPreSharedKey,
                                          const TInt aPriorThis, 
                                          RPointerArray<TWsfWlanInfo>& aMatchArray )
     {
@@ -298,10 +299,33 @@
     for( TInt i = 0; i < count ; i++ )
         {
         temp = ( *iInfoArray )[i]; 
-        if( !temp->iSsid.Compare( aSsid ) && temp->iSecurityMode == aSecMode && temp->iNetMode == aNetMode)
+        if( !temp->iSsid.Compare( aSsid ) && temp->iSecurityMode == aSecMode  
+                && temp->iNetMode == aNetMode )
             {
             aMatchArray.AppendL(temp);
             }
+        else if ( temp->iIapId && !temp->iSsid.Compare( aSsid ) 
+                    && temp->SecurityMode() == CMManager::EWlanSecMode802_1x 
+                    && temp->iNetMode == aNetMode )
+            {
+            if ( aSecMode == CMManager::EWlanSecModeOpen )
+                {
+                aMatchArray.AppendL(temp);
+                }
+            else if ( aSecMode == CMManager::EWlanSecModeWep )
+                {
+                aMatchArray.AppendL(temp);
+                }
+            else if ( aSecMode == CMManager::EWlanSecModeWpa 
+                        && !aUsesPreSharedKey )
+                {
+                aMatchArray.AppendL(temp);
+                }
+            else if ( aSecMode == CMManager::EWlanSecMode802_1x )
+                {
+                aMatchArray.AppendL(temp);
+                }
+            }
         }
     }
 // ---------------------------------------------------------------------------