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

Method ttAddMessage

Control/L3TranEntry.cpp:1327–1344  ·  view source on GitHub ↗

(pat added) Add a message to the TranEntry inbox.

Source from the content-addressed store, hash-verified

1325
1326// (pat added) Add a message to the TranEntry inbox.
1327void NewTransactionTable::ttAddMessage(TranEntryId tranid,SIP::DialogMessage *dmsg)
1328{
1329 rwLock.rlock();
1330 TranEntry* tran = ttFindById(tranid);
1331 if (tran) {
1332 tran->mTranInbox.write(dmsg);
1333 rwLock.unlock();
1334 } else {
1335 rwLock.unlock(); // don't do the log or delete while locked - reduce the timing window
1336
1337 // This is ok - the SIP dialog and L3 transaction side are completely decoupled so it is quite
1338 // possible that the transaction was deleted (for example, MS signal failure) while
1339 // a SIP dialog is still running.
1340 LOG(DEBUG) << "info: SIP Dialog message to non-existent"<<LOGVAR(tranid);
1341 delete dmsg;
1342 }
1343
1344}
1345
1346// This is an external interface so we dont have to include L3TranEntry.h just to access this function.
1347void NewTransactionTable_ttAddMessage(TranEntryId tranid,SIP::DialogMessage *dmsg)

Callers 2

dialogQueueMessageMethod · 0.80

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected