(pat added) Add a message to the TranEntry inbox.
| 1325 | |
| 1326 | // (pat added) Add a message to the TranEntry inbox. |
| 1327 | void 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. |
| 1347 | void NewTransactionTable_ttAddMessage(TranEntryId tranid,SIP::DialogMessage *dmsg) |
no test coverage detected