Added separate mutex for MTP transmit statistics, avoids a deadlock.

git-svn-id: http://yate.null.ro/svn/yate/trunk@4567 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2011-08-25 09:10:14 +00:00
parent eb783b04e6
commit 1548b62566
2 changed files with 4 additions and 3 deletions

View File

@ -323,7 +323,7 @@ SS7Router::SS7Router(const NamedList& params)
: SignallingComponent(params.safe("SS7Router"),&params),
Mutex(true,"SS7Router"),
m_changes(0), m_transfer(false), m_phase2(false), m_started(false),
m_restart(0), m_isolate(0),
m_restart(0), m_isolate(0), m_statsMutex(false,"SS7RouterStats"),
m_trafficOk(0), m_trafficSent(0), m_routeTest(0), m_testRestricted(false),
m_transferSilent(false), m_checkRoutes(false), m_autoAllowed(false),
m_sendUnavail(true), m_sendProhibited(true),
@ -777,13 +777,13 @@ int SS7Router::routeMSU(const SS7MSU& msu, const SS7Label& label, SS7Layer3* net
break;
}
}
lock();
m_statsMutex.lock();
m_txMsu++;
if (network)
m_fwdMsu++;
if (cong)
m_congestions++;
unlock();
m_statsMutex.unlock();
}
return slsTx;
}

View File

@ -6474,6 +6474,7 @@ private:
int routeMSU(const SS7MSU& msu, const SS7Label& label, SS7Layer3* network, int sls, SS7Route::State states);
void buildView(SS7PointCode::Type type, ObjList& view, SS7Layer3* network);
void buildViews();
Mutex m_statsMutex;
SignallingTimer m_trafficOk;
SignallingTimer m_trafficSent;
SignallingTimer m_routeTest;