void NetworkAdapterList::RemoveSubnetListener(TUint aId, MapNetworkAdapter& aMap)
{
    iListenerLock.Wait();
    MapNetworkAdapter::iterator it = aMap.find(aId);
    if (it != aMap.end()) {
        aMap.erase(it);
    }
    iListenerLock.Signal();
}
void NetworkAdapterList::RunSubnetCallbacks(MapNetworkAdapter& aMap, NetworkAdapter& aAdapter)
{
    AutoMutex a(iListenerLock);
    MapNetworkAdapter::iterator it = aMap.begin();
    while (it != aMap.end()) {
        it->second(aAdapter);
        it++;
    }
}
Exemplo n.º 3
0
void NetworkAdapterList::RunSubnetCallbacks(MapNetworkAdapter& aMap, NetworkAdapter& aAdapter)
{
    AutoMutex a(iListenerLock);
    MapNetworkAdapter::iterator it = aMap.begin();
    while (it != aMap.end()) {
        LOG(kAdapterChange, "NetworkAdapterList::RunSubnetCallbacks - client is %s\n", it->second.iId);
        it->second.iFunctor(aAdapter);
        it++;
    }
}