MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / ttFindByDialog

Method ttFindByDialog

Control/L3TranEntry.cpp:1313–1323  ·  view source on GitHub ↗

(pat added) By design, there is no back pointer from SIP to the TranEntry, so the TranEntry can be deleted independently, so we have to search for the Transaction if we need it.

Source from the content-addressed store, hash-verified

1311// (pat added) By design, there is no back pointer from SIP to the TranEntry, so the TranEntry can be deleted
1312// independently, so we have to search for the Transaction if we need it.
1313TranEntry* NewTransactionTable::ttFindByDialog(SIP::SipDialog *pDialog)
1314{
1315 // Brute force search.
1316 ScopedLock lock(mttLock,__FILE__,__LINE__);
1317 for (NewTransactionMap::iterator itr = mTable.begin(); itr!=mTable.end(); ++itr) {
1318 TranEntry *tran = itr->second;
1319 if (tran->deadOrRemoved()) continue;
1320 if (tran->getDialog() == pDialog) return tran;
1321 }
1322 return NULL;
1323}
1324#endif
1325
1326// (pat added) Add a message to the TranEntry inbox.

Callers

nothing calls this directly

Calls 4

deadOrRemovedMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
getDialogMethod · 0.45

Tested by

no test coverage detected