From 0490bbaef4167e155bace94be6c6bb631d959a19 Mon Sep 17 00:00:00 2001 From: pat Date: Sun, 19 Oct 2014 07:48:46 -0700 Subject: [PATCH] Small fixes for potential bugs in peering that were extremely unlikely ever to occur. --- GSM/GSMChannelHistory.cpp | 2 +- Peering/NeighborTable.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/GSM/GSMChannelHistory.cpp b/GSM/GSMChannelHistory.cpp index ac7482a..e5efbf2 100644 --- a/GSM/GSMChannelHistory.cpp +++ b/GSM/GSMChannelHistory.cpp @@ -198,7 +198,7 @@ bool ChannelHistory::neighborAddMeasurements(SACCHLogicalChannel* SACCH,const L3 int thisBSCI = measurements->BSIC_NCELL(i); int arfcn = gNeighborTable.getARFCN(thisFreq); if (arfcn < 0) { - LOG(INFO) << "Measurement report with invalid freq index:" << thisFreq << " arfcn:" << arfcn; // SVGDBG seeing this error + LOG(INFO) << "Measurement report with invalid freq index:" << thisFreq << " arfcn:" << arfcn; // SVGDBG seeing this error (pat) Maybe fixed 10-17-2014 by ticket #1915 continue; } this->neighborAddMeasurement(sampleTime.FN(),(unsigned)arfcn,thisBSCI,thisRxLevel); diff --git a/Peering/NeighborTable.cpp b/Peering/NeighborTable.cpp index 5b1a09e..c3259d3 100644 --- a/Peering/NeighborTable.cpp +++ b/Peering/NeighborTable.cpp @@ -329,6 +329,7 @@ bool NeighborTable::ntAddInfo(NeighborEntry &newentry) NeighborTableMap::iterator mit = mNeighborMap.find(newentry.mIPAddress); if (mit == mNeighborMap.end()) { LOG(NOTICE) << "Ignoring unsolicited 'RSP NEIGHBOR_PARAMS' from " << newentry.mIPAddress; + return false; // (pat) Added 10-17-2014. Oops. } NeighborEntry &oldentry = mit->second; // (pat) Added test to see if C0 or BCC changed. That would not change the beacon but we need to recheck for conflicts @@ -498,6 +499,7 @@ void NeighborTable::setHoldOff(string ipaddress, unsigned seconds) NeighborTableMap::iterator mit = mNeighborMap.find(ipaddress); if (mit == mNeighborMap.end()) { LOG(NOTICE) << "Can not set holdoff for unknown IP address:"<second; entry.mHoldoff = time(NULL) + seconds;