Commit dbf6d7ac authored by Rafaël Carré's avatar Rafaël Carré
Browse files

removeCall() : simplify , fix leak

parent 5c7c778d
......@@ -181,19 +181,6 @@ IAXVoIPLink::terminateIAXCall()
_callMap.clear();
}
void IAXVoIPLink::terminateCall (const std::string& id)
{
IAXCall* call = getIAXCall (id);
if (call) {
_debug ("IAXVoIPLink: Terminate call");
delete call;
call = 0;
}
}
void
IAXVoIPLink::getEvent()
{
......
......@@ -88,11 +88,6 @@ class IAXVoIPLink : public VoIPLink
*/
virtual void terminate (void);
/**
* Terminate on call
*/
virtual void terminateCall (const std::string& id);
/**
* Send out registration
* @return bool The new registration state (are we registered ?)
......
......@@ -1330,19 +1330,6 @@ SIPVoIPLink::refuse (const std::string& id)
return true;
}
void
SIPVoIPLink::terminateCall (const std::string& id)
{
_debug ("UserAgent: Terminate call %s", id.c_str());
SIPCall *call = getSIPCall (id);
if (call) {
// terminate the sip call
delete call;
}
}
std::string
SIPVoIPLink::getCurrentCodecName(const std::string& id)
{
......
......@@ -212,11 +212,6 @@ class SIPVoIPLink : public VoIPLink
*/
virtual bool refuse (const std::string& id);
/**
* Terminate only one call
*/
virtual void terminateCall (const std::string& id);
/**
* Send DTMF refering to account configuration
* @param id The call identifier
......
......@@ -61,9 +61,8 @@ void VoIPLink::removeCall (const std::string& id)
_debug ("VoipLink: removing call %s from list", id.c_str());
_callMap.erase (id);
terminateCall (id);
delete _callMap[id];
_callMap.erase(id);
}
Call* VoIPLink::getCall (const std::string& id)
......
......@@ -87,12 +87,6 @@ class VoIPLink
*/
virtual void terminate (void) = 0;
/**
* Virtual method
* Delete calls
*/
virtual void terminateCall (const std::string& id) = 0;
/**
* Virtual method
* Build and send account registration request
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment