Skip to content

Commit

Permalink
Merge 8df4a91 into 582c533
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster authored Oct 30, 2020
2 parents 582c533 + 8df4a91 commit 484872c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tinyphone/phone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,17 @@ namespace tp {
}

void TinyPhone::Logout(SIPAccount* acc) throw(pj::Error) {
try {
acc->UnRegister();
}
catch (Error& err) {
PJ_LOG(1, (__FILENAME__, "Logout Account UnRegister Error %s", err.reason.c_str()));
synchronized(add_acc_mutex) {
try {
acc->UnRegister();
}
catch (Error& err) {
PJ_LOG(1, (__FILENAME__, "Logout Account UnRegister Error %s", err.reason.c_str()));
}
accounts.erase(acc->Name());
delete (acc);
SaveAccounts();
}
delete (acc);
accounts.erase(acc->Name());
SaveAccounts();
}

int TinyPhone::Logout() throw(pj::Error) {
Expand Down

0 comments on commit 484872c

Please sign in to comment.