Skip to content
Snippets Groups Projects
Commit 52459a19 authored by Emmanuel Lepage's avatar Emmanuel Lepage
Browse files

Save history everytime it change, prevent the file never to be saved in some...

Save history everytime it change, prevent the file never to be saved in some senario (SIG, crash, ASSERT, etc)
parent cfe24c2e
No related branches found
No related tags found
No related merge requests found
......@@ -346,6 +346,7 @@ void ManagerImpl::hangupCall(const std::string& callId)
Call * call = SIPVoIPLink::instance()->getCall(callId);
history_.addCall(call, preferences.getHistoryLimit());
SIPVoIPLink::instance()->hangup(callId);
saveHistory();
} catch (const VoipLinkException &e) {
ERROR("%s", e.what());
}
......@@ -356,6 +357,7 @@ void ManagerImpl::hangupCall(const std::string& callId)
history_.addCall(call, preferences.getHistoryLimit());
link->hangup(callId);
removeCallAccount(callId);
saveHistory();
}
getMainBuffer()->stateInfo();
......@@ -1535,6 +1537,7 @@ void ManagerImpl::peerHungupCall(const std::string& call_id)
Call * call = SIPVoIPLink::instance()->getCall(call_id);
history_.addCall(call, preferences.getHistoryLimit());
SIPVoIPLink::instance()->hangup(call_id);
saveHistory();
}
else {
const std::string account_id(getAccountFromCall(call_id));
......@@ -1542,6 +1545,7 @@ void ManagerImpl::peerHungupCall(const std::string& call_id)
Call * call = link->getCall(call_id);
history_.addCall(call, preferences.getHistoryLimit());
link->peerHungup(call_id);
saveHistory();
}
/* Broadcast a signal over DBus */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment