Fixed bug: properly destroy (deref) udp listener when removed from config file.

git-svn-id: http://yate.null.ro/svn/yate/trunk@6312 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2018-04-23 09:31:16 +00:00
parent 243909bd44
commit 26be68ef18
1 changed files with 2 additions and 3 deletions

View File

@ -4966,10 +4966,8 @@ bool YateSIPEndPoint::setupUdpTransport(const String& name, bool enabled,
reason = "Disabled";
if (!reason)
rd->init(params,defs,false);
else {
else
removeUdpTransport(name,reason);
rd->deref();
}
TelEngine::destruct(rd);
if (!(enabled && reason))
return true;
@ -5020,6 +5018,7 @@ bool YateSIPEndPoint::removeUdpTransport(const String& name, const char* reason)
name.c_str());
}
rd->terminate(reason);
rd->deref();
TelEngine::destruct(rd);
return true;
}