int TopologyWorldState::updateIndirectProbabilities (const char *pszNeighborNodeId, StringHashtable<StringFloatHashtable> *pProbabilitiesTable)
{
    // Updates indirect probabilities after receiving a probabilities message from pszNeighborNodeId
    _m.lock (140);
    ageProbabilities();
    for (StringHashtable<StringFloatHashtable>::Iterator iterator = pProbabilitiesTable->getAllElements(); !iterator.end(); iterator.nextElement()) {
        if ( 0 != stricmp(iterator.getKey(), _pDisService->getNodeId()) ) { // Info are not about localnode
            RemoteNodeInfo *pRNI = (RemoteNodeInfo *) retrieveNodeInfo (iterator.getKey());
            if (pRNI) {
                // Choose the best indirect probability for node pRNI
                StringFloatHashtable *pIndProb = iterator.getValue();
                float fMaxProb = 0.0f;
                for (StringFloatHashtable::Iterator i = pIndProb->getAllElements(); !i.end(); i.nextElement()) {
                    if ( 0 != stricmp (i.getKey(), _pDisService->getNodeId()) ) { // Localnode is not the gateway node
                        if ( *(i.getValue()) > fMaxProb ) { // Prob is higher than maxProb
                            fMaxProb = *(i.getValue());
                        }
                    }
                }
                if (fMaxProb != 0.0f) {
                    pRNI->addIndirectProbability (pszNeighborNodeId, fMaxProb, _fAddParam, _fProbThreshold);
                }
            }
        }
    }
    _m.unlock (140);
    return 0;
}