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

Method tuMapDispatch

SIP/SIP2Interface.cpp:254–263  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
254bool 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.

Callers

nothing calls this directly

Calls 2

TLWriteHighSideMethod · 0.80
stGetMethodNameVMethod · 0.45

Tested by

no test coverage detected