diff --git a/src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java index a2ef25d97..dc1f1a2b5 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java @@ -430,7 +430,7 @@ public Contact getContact() } /** - * Returns a URL pointing ta a location with call control information for + * Returns a URL pointing to a location with call control information for * this peer or null if no such URL is available for this * call peer. * @@ -1881,6 +1881,6 @@ public void soundLevelChanged(SoundLevelChangeEvent evt) logger.warn("suspicious behavior of the SoundLevelListener " + "for peer " + CallPeerSipImpl.this); } - + } } diff --git a/src/net/java/sip/communicator/impl/protocol/sip/SipStackProperties.java b/src/net/java/sip/communicator/impl/protocol/sip/SipStackProperties.java index 51a3f4df3..d8955e0f4 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/SipStackProperties.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/SipStackProperties.java @@ -50,24 +50,28 @@ public class SipStackProperties /** * The name of the property indicating a custom logger class for the stack */ - private static final String NSPNAME_STACK_LOGGER = "gov.nist.javax.sip.STACK_LOGGER"; + private static final String NSPNAME_STACK_LOGGER + = "gov.nist.javax.sip.STACK_LOGGER"; /** * The value of the property indicating a custom logger class for the stack */ - private static final String NSPVALUE_STACK_LOGGER = "net.java.sip.communicator.impl.protocol.sip.SipLogger"; + private static final String NSPVALUE_STACK_LOGGER + = "net.java.sip.communicator.impl.protocol.sip.SipLogger"; /** * The name of the property indicating a custom logger class * for the server messages */ - private static final String NSPNAME_SERVER_LOGGER = "gov.nist.javax.sip.SERVER_LOGGER"; + private static final String NSPNAME_SERVER_LOGGER + = "gov.nist.javax.sip.SERVER_LOGGER"; /** * The value of the property indicating a custom logger class * for the server messages */ - private static final String NSPVALUE_SERVER_LOGGER = "net.java.sip.communicator.impl.protocol.sip.SipLogger"; + private static final String NSPVALUE_SERVER_LOGGER + = "net.java.sip.communicator.impl.protocol.sip.SipLogger"; /** * The name of the property under which the jain-sip-ri would expect to find @@ -80,8 +84,21 @@ public class SipStackProperties * A string indicating to jain-sip-ri if the debug log file has to be * overwritten when starting. */ - private static final String NSPVALUE_DEBUG_LOG_OVERWRITE - = "true"; + private static final String NSPVALUE_DEBUG_LOG_OVERWRITE = "true"; + + /** + * The name of the property that tells jain-sip whether that we would like + * to receive messages from the stack in a concurrent/reentrant/non-blocking + * manner. + */ + private static final String NSPNAME_REENTRANT_LISTENER + = "gov.nist.javax.sip.DEBUG_LOG_OVERWRITE"; + + /** + * The value of the property that tells jain-sip whether or we would like to + * receive messages from the stack in a concurrent or blocking manner. + */ + private static final String NSPVALUE_REENTRANT_LISTENER = "true"; /** * The name of the property under which the jain-sip-ri would expect to find diff --git a/src/net/java/sip/communicator/impl/protocol/sip/security/SipSecurityManager.java b/src/net/java/sip/communicator/impl/protocol/sip/security/SipSecurityManager.java index d38537ea9..df0fc59b7 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/security/SipSecurityManager.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/security/SipSecurityManager.java @@ -106,7 +106,7 @@ public void setHeaderFactory(HeaderFactory headerFactory) * @throws OperationFailedException if we fail to acquire a password from * our security authority. */ - public ClientTransaction handleChallenge( + public synchronized ClientTransaction handleChallenge( Response challenge, ClientTransaction challengedTransaction, SipProvider transactionCreator) @@ -148,10 +148,10 @@ public ClientTransaction handleChallenge( if(ccEntry == null) { - //we haven't yet authentified this realm since we were started. + //we haven't yet authenticated this realm since we were started. if(storedPassword != null) { - //use the stored password to authenticate + //there's a stored password though so let's try it. ccEntry = createCcEntryWithStoredPassword(storedPassword); logger.trace("seem to have a stored pass! Try with it."); } @@ -160,6 +160,7 @@ public ClientTransaction handleChallenge( //obtain new credentials logger.trace("We don't seem to have a good pass! Get one."); +System.err.println("!!!???!!! - asking for authentication because we don't have a password at all."); ccEntry = createCcEntryWithNewCredentials( realm, SecurityAuthority.AUTHENTICATION_REQUIRED); @@ -171,11 +172,11 @@ public ClientTransaction handleChallenge( } else { - //we have already authentified against this realm since we were + //we have already authenticated against this realm since we were //started. this authentication is either for a different request //or the previous authentication used a wrong pass. - if (ccEntryHasSeenTran) + if (ccEntryHasSeenTran && !authHeader.isStale()) { //this is the transaction that created the cc entry. if we //need to authenticate the same transaction then the @@ -184,6 +185,7 @@ public ClientTransaction handleChallenge( SipActivator.getProtocolProviderFactory().storePassword( accountID, null); +System.err.println("!!!???!!! - asking for authentication because passwd was wrong"); ccEntry = createCcEntryWithNewCredentials( realm, SecurityAuthority.WRONG_PASSWORD); @@ -202,16 +204,6 @@ public ClientTransaction handleChallenge( } } - //get a new pass - if (ccEntry == null // we don't have credentials for the specified - //realm - || ( (ccEntryHasSeenTran // we have already tried with those - && !authHeader.isStale()))) // and this is (!stale) not - // just a request to reencode - { - - } - //if user canceled or sth else went wrong if (ccEntry.userCredentials == null) { @@ -225,8 +217,9 @@ public ClientTransaction handleChallenge( this.createAuthorizationHeader( reoriginatedRequest.getMethod(), reoriginatedRequest.getRequestURI().toString(), - ( reoriginatedRequest.getContent() == null )? "" : - reoriginatedRequest.getContent().toString(), + ( reoriginatedRequest.getContent() == null ) + ? "" + : reoriginatedRequest.getContent().toString(), authHeader, ccEntry.userCredentials);