Attempt to dispatch an incoming SIP message to a TU; return true if a transaction wanted this message. This has to be locked so someone doesnt delete the TU between the time we get its pointer and send it the message.
| 252 | // This has to be locked so someone doesnt delete the TU between the time we get its pointer |
| 253 | // and send it the message. |
| 254 | bool SipTUMap::tuMapDispatch(SipMessage*msg) { |
| 255 | ScopedLock lock(mTUMap.qGetLock()); |
| 256 | string key = tuMakeKey(msg); |
| 257 | SipTransaction *tup = mTUMap.readNoBlock(key); |
| 258 | LOG(DEBUG) <<LOGVAR(msg) <<LOGVAR(tup); |
| 259 | if (! tup) { return false; } // Eventually this will be an error, but not everything is transitioned to use TU yet. |
| 260 | WATCH("SIP recv: Sending message to TU "<< tup->stGetMethodNameV()); |
| 261 | tup->TLWriteHighSide(msg); |
| 262 | return true; |
| 263 | } |
| 264 | |
| 265 | // Look at all the dead dialogs and delete any that can be deleted safely. |
| 266 | // They can be deleted if their SIP timers have expired and no TranEntry still points to them. |
nothing calls this directly
no test coverage detected