mirror of
https://github.com/PentHertz/OpenBTS.git
synced 2026-05-02 05:10:07 +00:00
r4164 in private:
Make gTransactionTable.clearDeadEntries() much less agressive. See ticket #1128 for an example of the problem that can cause. Also includes commented-out code for a method on TransactionTable to detect busy users, but we didn't need it. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4175 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
parent
b742914460
commit
559eedfb17
2 changed files with 33 additions and 2 deletions
|
|
@ -239,10 +239,13 @@ bool TransactionEntry::dead() const
|
|||
{
|
||||
ScopedLock lock(mLock);
|
||||
|
||||
// Don't remove anything less than 3 minutes old.
|
||||
if (stateAge() < 180*1000) return false;
|
||||
|
||||
// Null state?
|
||||
if (mGSMState==GSM::NullState && stateAge()>180*1000) return true;
|
||||
if (mGSMState==GSM::NullState) return true;
|
||||
// Stuck in proceeding?
|
||||
if (mSIP.state()==Proceeding && stateAge()>180*1000) return true;
|
||||
if (mSIP.state()==SIP::Proceeding) return true;
|
||||
|
||||
// Paging timed out?
|
||||
if (mGSMState==GSM::Paging) {
|
||||
|
|
@ -627,6 +630,7 @@ TransactionEntry* TransactionTable::find(unsigned key)
|
|||
TransactionMap::iterator itr = mTable.find(key);
|
||||
if (itr==mTable.end()) return NULL;
|
||||
if (itr->second->dead()) {
|
||||
LOG(DEBUG) << "erasing " << itr->first;
|
||||
innerRemove(itr);
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -728,6 +732,29 @@ TransactionEntry* TransactionTable::find(const L3MobileIdentity& mobileID, GSM::
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if 0
|
||||
bool TransactionTable::isBusy(const L3MobileIdentity& mobileID)
|
||||
{
|
||||
LOG(DEBUG) << "id: " << mobileID << "?";
|
||||
|
||||
ScopedLock lock(mLock);
|
||||
|
||||
// Yes, it's linear time.
|
||||
// Since clearDeadEntries is also linear, do that here, too.
|
||||
clearDeadEntries();
|
||||
|
||||
// Brute force search.
|
||||
for (TransactionMap::iterator itr = mTable.begin(); itr!=mTable.end(); ++itr) {
|
||||
GSM::L3CMServiceType service = itr->second->service();
|
||||
if (service==GSM::L3CMServiceType::UndefinedType) continue;
|
||||
if (service==GSM::L3CMServiceType::LocationService) continue;
|
||||
if (service==GSM::L3CMServiceType::ShortMessage) continue;
|
||||
if (service==GSM::L3CMServiceType::MobileTerminatedShortMessage) continue;
|
||||
if (itr->second->subscriber() == mobileID) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
TransactionEntry* TransactionTable::find(const L3MobileIdentity& mobileID, const char* callID)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue