Fix race between ending and answering a SIP call.

+ Also fix race between ending and changing (holding/unholding) a SIP call.
+ Remove an unused method.

Bug : 3128233

Change-Id: Ie18d8333a88f0d9906d54988243d909b58e07e4b
This commit is contained in:
Hung-ying Tyan
2010-10-25 17:04:36 +08:00
parent d7116ff1f0
commit 06e8cdc0f8

View File

@@ -527,11 +527,14 @@ class SipSessionGroup implements SipListener {
}
public void answerCall(String sessionDescription, int timeout) {
try {
processCommand(new MakeCallCommand(mPeerProfile,
sessionDescription, timeout));
} catch (SipException e) {
onError(e);
synchronized (SipSessionGroup.this) {
if (mPeerProfile == null) return;
try {
processCommand(new MakeCallCommand(mPeerProfile,
sessionDescription, timeout));
} catch (SipException e) {
onError(e);
}
}
}
@@ -540,14 +543,11 @@ class SipSessionGroup implements SipListener {
}
public void changeCall(String sessionDescription, int timeout) {
doCommandAsync(new MakeCallCommand(mPeerProfile, sessionDescription,
timeout));
}
public void changeCallWithTimeout(
String sessionDescription, int timeout) {
doCommandAsync(new MakeCallCommand(mPeerProfile, sessionDescription,
timeout));
synchronized (SipSessionGroup.this) {
if (mPeerProfile == null) return;
doCommandAsync(new MakeCallCommand(mPeerProfile,
sessionDescription, timeout));
}
}
public void register(int duration) {