bearermanagement/mpm/src/mpmserver.cpp
branchRCL_3
changeset 19 22c3c67e5001
parent 17 c14618f9de99
child 26 0a9e01492035
equal deleted inserted replaced
17:c14618f9de99 19:22c3c67e5001
   431     TConnectionInfo connInfo;
   431     TConnectionInfo connInfo;
   432     connInfo.iConnId = aConnId;
   432     connInfo.iConnId = aConnId;
   433     connInfo.iSnap   = aSnap;
   433     connInfo.iSnap   = aSnap;
   434     connInfo.iIapId  = aIapId;
   434     connInfo.iIapId  = aIapId;
   435     connInfo.iState  = aState;
   435     connInfo.iState  = aState;
       
   436     connInfo.iAppUid = aSession.AppUid();
   436 
   437 
   437     // Package into TActiveBMConn //TODO Redundant.. remove the other one.
   438     // Package into TActiveBMConn //TODO Redundant.. remove the other one.
   438     // 
   439     // 
   439     TActiveBMConn conn;
   440     TActiveBMConn conn;
   440     conn.iConnInfo          = connInfo;
   441     conn.iConnInfo          = connInfo;
  1107     if ( found )
  1108     if ( found )
  1108         {
  1109         {
  1109         // found blacklisted Connection Id
  1110         // found blacklisted Connection Id
  1110         TMPMBlackListConnId connIdInfo = iBlackListIdList[i];
  1111         TMPMBlackListConnId connIdInfo = iBlackListIdList[i];
  1111         iBlackListIdList.Remove( i ); // remove from the list 
  1112         iBlackListIdList.Remove( i ); // remove from the list 
       
  1113         
       
  1114         MPMLOGSTRING2( "CMPMServer::HandleServerUnblackListIap - \
       
  1115 connIdInfo count: %d", connIdInfo.Count() )
  1112 
  1116 
  1113         if ( aIapId == 0 )
  1117         if ( aIapId == 0 )
  1114             { // 0 will reset Connection Id blacklisted iap list 
  1118             { // 0 will reset Connection Id blacklisted iap list 
       
  1119             MPMLOGSTRING( "CMPMServer::HandleServerUnblackListIap - \
       
  1120 reset Connection Id blacklisted iap list" )
       
  1121 
  1115             connIdInfo.Close();
  1122             connIdInfo.Close();
  1116             return KErrNone;
  1123             return KErrNone;
  1117             }
  1124             }
  1118 
  1125         
  1119         found = EFalse;
  1126         found = EFalse;
  1120         for (TInt j = 0; j < connIdInfo.Count(); j++)
  1127         for (TInt j = 0; j < connIdInfo.Count(); j++)
  1121             {
  1128             {
  1122             if ( connIdInfo.Iap( j ) == aIapId )
  1129             if ( connIdInfo.Iap( j ) == aIapId )
  1123                 {
  1130                 {
  1124                 // found and remove blacklisted iap
  1131                 // found and remove blacklisted iap
  1125                 connIdInfo.Remove( j ); 
  1132                 connIdInfo.Remove( j ); 
       
  1133                 MPMLOGSTRING2( "CMPMServer::HandleServerUnblackListIap - \
       
  1134 removed blacklisted iap in index = %d", j )
       
  1135                 
  1126                 if ( connIdInfo.Count() == 0 )
  1136                 if ( connIdInfo.Count() == 0 )
  1127                     {
  1137                     {
  1128                     return KErrNone;
  1138                     return KErrNone;
  1129                     }
  1139                     }
  1130 
  1140 
  1138         iBlackListIdList.Insert( connIdInfo, 0 ); 
  1148         iBlackListIdList.Insert( connIdInfo, 0 ); 
  1139         return KErrNotFound;
  1149         return KErrNotFound;
  1140         }
  1150         }
  1141     else
  1151     else
  1142         {
  1152         {
       
  1153         MPMLOGSTRING( "CMPMServer::HandleServerUnblackListIap - \
       
  1154 not found blacklisted Connection Id" )
  1143         return KErrNotFound;
  1155         return KErrNotFound;
  1144         }
  1156         }
  1145     }
  1157     }
  1146 
  1158 
  1147 // -----------------------------------------------------------------------------
  1159 // -----------------------------------------------------------------------------
  1149 // -----------------------------------------------------------------------------
  1161 // -----------------------------------------------------------------------------
  1150 //
  1162 //
  1151 void CMPMServer::HandleServerUnblackListIap( 
  1163 void CMPMServer::HandleServerUnblackListIap( 
  1152     TBlacklistCategory  aCategory )
  1164     TBlacklistCategory  aCategory )
  1153     {
  1165     {
  1154     MPMLOGSTRING2( "CMPMServer::HandleServerUnblackListIap -\
  1166     MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap -\
  1155  aCategory = %i", aCategory )
  1167 aCategory = %i blacklisted Id count = %d", 
       
  1168                    aCategory, iBlackListIdList.Count() )
  1156 
  1169 
  1157     for( TInt i( 0 ); i < iBlackListIdList.Count(); i++ )
  1170     for( TInt i( 0 ); i < iBlackListIdList.Count(); i++ )
  1158         {
  1171         {
  1159         // found blacklisted Connection Id
  1172         // found blacklisted Connection Id
  1160         TMPMBlackListConnId connIdInfo = iBlackListIdList[i];
  1173         TMPMBlackListConnId connIdInfo = iBlackListIdList[i];
  1161         iBlackListIdList.Remove( i ); // remove from the list 
  1174         iBlackListIdList.Remove( i ); // remove from the list 
  1162 
  1175 
       
  1176         MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap - \
       
  1177 aConnId = 0x%x, blacklisted IapId count = %d", connIdInfo.iConnId, 
       
  1178         connIdInfo.Count() )
       
  1179         
  1163         for (TInt j = 0; j < connIdInfo.Count(); j++)
  1180         for (TInt j = 0; j < connIdInfo.Count(); j++)
  1164             {
  1181             {
  1165             if ( connIdInfo.Category( j ) == aCategory ) 
  1182             if ( connIdInfo.Category( j ) == aCategory ) 
  1166                 {
  1183                 {
  1167                 // found and remove blacklisted iap
  1184                 // found and remove blacklisted iap
       
  1185                 MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap - \
       
  1186 removed blacklisted iap id %i in index: %d", connIdInfo.Iap( j ), j )
  1168                 connIdInfo.Remove( j ); 
  1187                 connIdInfo.Remove( j ); 
  1169                 }
  1188                 }
  1170             }
  1189             }
  1171         // If any blacklisted iaps remain reinsert at the 
  1190         // If any blacklisted iaps remain reinsert at the 
  1172         // beginning connIdInfo to reflect activeness
  1191         // beginning connIdInfo to reflect activeness
  1173         //
  1192         //
  1174         if( connIdInfo.Count() > 0 )
  1193         if( connIdInfo.Count() > 0 )
  1175             {
  1194             {
       
  1195             MPMLOGSTRING( "reinsert connIdInfo to reflect activeness" )
  1176             iBlackListIdList.Insert( connIdInfo, 0 );             
  1196             iBlackListIdList.Insert( connIdInfo, 0 );             
  1177             }
  1197             }
  1178         }
  1198         }
  1179     }
  1199     }
  1180 
  1200