Delete SNMP thread in case binding on the SNMP socket fails.

git-svn-id: http://yate.null.ro/svn/yate/trunk@3816 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
oana 2010-11-17 11:30:43 +00:00
parent 2d2fd49921
commit 0aa3a6849a
1 changed files with 3 additions and 1 deletions

View File

@ -1556,8 +1556,10 @@ void SnmpAgent::initialize()
setup();
installRelay(Halt);
m_msgQueue = new SnmpMsgQueue(this,threadPrio,snmpPort);
if (!m_msgQueue->init())
if (!m_msgQueue->init()) {
delete m_msgQueue;
m_msgQueue = 0;
}
if (m_trapHandler)
return;
m_trapHandler = new TrapHandler();