Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for 339 and 340 #341

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public void cancel(String[] protocol, int[] reasonCode, String[] reasonText) {
if(logger.isDebugEnabled()) {
logger.debug("Trying to cancel ProxyBranch for outgoing request " + outgoingRequest);
}
if(lastResponse.getStatus() > Response.OK && !recursedBranches.isEmpty()) {
if(lastResponse.getStatus() > Response.OK && recursedBranches != null && !recursedBranches.isEmpty()) {
// Javadoc says it should throw an java.lang.IllegalStateException if the transaction has already been completed and it has no child branches
if(logger.isDebugEnabled()) {
logger.debug("lastResponse status for this branch is " + lastResponse.getStatus() + " and it has " + recursedBranches.size() + " to cancel");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,13 @@ public void setSupervised(boolean supervised) {
* @see javax.servlet.sip.Proxy#startProxy()
*/
public void startProxy() {
if(finalBranchForSubsequentRequests != null)
{
if(logger.isDebugEnabled()) {
logger.debug("Looks like proxy is started more than once? finalBranchForSubsequentRequests was " + finalBranchForSubsequentRequests + " but is now being set to null");
}
finalBranchForSubsequentRequests = null;
}
if(this.ackReceived)
throw new IllegalStateException("Can't start. ACK has been received.");
if(!this.originalRequest.isInitial())
Expand Down