Skip to content

Commit

Permalink
add property for LB's issue usnistgov#59
Browse files Browse the repository at this point in the history
(cherry picked from commit 0f7b4e5e17da71f81f2bd5f49c7e8fd1edf85acc)
  • Loading branch information
knosach authored and Matthieu Casanova committed Jan 15, 2023
1 parent eca1489 commit e03ea69
Show file tree
Hide file tree
Showing 4 changed files with 2,187 additions and 2,168 deletions.
3 changes: 3 additions & 0 deletions src/gov/nist/javax/sip/SipStackImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -1428,6 +1428,9 @@ public SipStackImpl(Properties configurationProperties)
super.setPatchRport(Boolean.parseBoolean(configurationProperties.getProperty(
"gov.nist.javax.sip.ALWAYS_ADD_RPORT", "false")));

super.setPatchReceivedRport(Boolean.parseBoolean(configurationProperties.getProperty(
"gov.nist.javax.sip.NEVER_ADD_RECEIVED_RPORT", "false")));

super.cancelClientTransactionChecked = configurationProperties
.getProperty(
"gov.nist.javax.sip.CANCEL_CLIENT_TRANSACTION_CHECKED",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ public void processMessage(SIPMessage sipMessage) throws Exception {
}
}

if (!sipStack.isPatchReceivedRport()) {
try {
if (mySock != null) { // selfrouting makes socket = null
// https://jain-sip.dev.java.net/issues/show_bug.cgi?id=297
Expand Down Expand Up @@ -374,6 +375,9 @@ public void processMessage(SIPMessage sipMessage) throws Exception {
} catch (java.text.ParseException ex) {
InternalErrorHandler.handleException(ex);
}
} else {
logger.logInfo("We did not use recived and rport");
}
// Use this for outgoing messages as well.
if (!this.isCached && mySock != null) { // self routing makes
// mySock=null
Expand Down
Loading

0 comments on commit e03ea69

Please sign in to comment.