# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1279209742 -10800 # Node ID 654ed625511dda77675bcc5819ef433b3a0954c8 # Parent 2cdd984ec527866c1c56dfb2aaa88a0adf34ad13 Revision: 201025 Kit: 2010127 diff -r 2cdd984ec527 -r 654ed625511d realtimenetprots/rtp/cfrtp/src/rtpflowfactory.cpp --- a/realtimenetprots/rtp/cfrtp/src/rtpflowfactory.cpp Mon Jun 21 16:03:44 2010 +0300 +++ b/realtimenetprots/rtp/cfrtp/src/rtpflowfactory.cpp Thu Jul 15 19:02:22 2010 +0300 @@ -96,7 +96,7 @@ protocolDescription->iServiceInfo = KSIConnectionLess | KSIDatagram | KSIGracefulClose | KSIPeekData | KSIRequiresOwnerInfo; - protocolDescription->iNamingServices = KNSNameResolution | KNSRequiresConnectionStartup; + protocolDescription->iNamingServices = 0; protocolDescription->iSecurity = KSocketNoSecurity; protocolDescription->iMessageSize = 65536-128; /*KSocketMessageSizeUndefined;*/ protocolDescription->iServiceTypeInfo = ESocketSupport | ETransport | @@ -116,7 +116,7 @@ protocolDescription->iServiceInfo = KSIConnectionLess | KSIDatagram | KSIGracefulClose | KSIPeekData | KSIRequiresOwnerInfo; - protocolDescription->iNamingServices = KNSNameResolution | KNSRequiresConnectionStartup; + protocolDescription->iNamingServices = 0; protocolDescription->iSecurity = KSocketNoSecurity; protocolDescription->iMessageSize = 65536-128; /*KSocketMessageSizeUndefined;*/ protocolDescription->iServiceTypeInfo = ESocketSupport | ETransport | diff -r 2cdd984ec527 -r 654ed625511d realtimenetprots/sipfw/SIP/ConnectionMgr/src/CReceiverTcp.cpp --- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CReceiverTcp.cpp Mon Jun 21 16:03:44 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CReceiverTcp.cpp Thu Jul 15 19:02:22 2010 +0300 @@ -149,8 +149,8 @@ iContext.SocketContainer().CancelRecv(); } else - { - iContext.SocketContainer().Socket().CancelAll(); + { + iContext.SocketContainer().CancelAll(); } RemoveReceived(); } diff -r 2cdd984ec527 -r 654ed625511d realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSecureSocketContainer.cpp --- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSecureSocketContainer.cpp Mon Jun 21 16:03:44 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSecureSocketContainer.cpp Thu Jul 15 19:02:22 2010 +0300 @@ -237,5 +237,21 @@ CSocketContainer( aSocket ) { } - + +// ----------------------------------------------------------------------------- +// CSecureSocketContainer::CancelAll +// ----------------------------------------------------------------------------- +// +void CSecureSocketContainer::CancelAll() + { + if ( HasSecureSocket() ) + { + iSecureSocket->CancelAll(); + } + else + { + CSocketContainer::CancelAll(); + } + } + // End of file diff -r 2cdd984ec527 -r 654ed625511d realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSecureSocketContainer.h --- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSecureSocketContainer.h Mon Jun 21 16:03:44 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSecureSocketContainer.h Thu Jul 15 19:02:22 2010 +0300 @@ -66,6 +66,8 @@ void CancelConnect(); + void CancelAll(); + void RemoteName( TSockAddr& aAddr ); TInt SetOpt( TUint aOptionName, TUint aOptionLevel, const TDesC8& aOption ); diff -r 2cdd984ec527 -r 654ed625511d realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSocketContainer.cpp --- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSocketContainer.cpp Mon Jun 21 16:03:44 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSocketContainer.cpp Thu Jul 15 19:02:22 2010 +0300 @@ -192,5 +192,14 @@ CSocketContainer::CSocketContainer( RSocket& aSocket ) : iSocket( aSocket ) { } - + +// ----------------------------------------------------------------------------- +// CSocketContainer::CancelAll +// ----------------------------------------------------------------------------- +// +void CSocketContainer::CancelAll() + { + iSocket.CancelAll(); + } + // End of file diff -r 2cdd984ec527 -r 654ed625511d realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSocketContainer.h --- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSocketContainer.h Mon Jun 21 16:03:44 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CSocketContainer.h Thu Jul 15 19:02:22 2010 +0300 @@ -72,6 +72,8 @@ virtual void CancelConnect(); + virtual void CancelAll(); + virtual void RemoteName( TSockAddr& aAddr ); virtual TInt SetOpt( TUint aOptionName, diff -r 2cdd984ec527 -r 654ed625511d realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp --- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp Mon Jun 21 16:03:44 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp Thu Jul 15 19:02:22 2010 +0300 @@ -1455,39 +1455,44 @@ RStringF transportParam = uri.SIPURI()->ParamValue( SIPStrings::StringF( SipStrConsts::ETransport ) ); - - if ( Protocol() == KProtocolTls ) + + RStringF tls = SIPStrings::StringF( SipStrConsts::ETLS ); + //If the Contact header has parameter transport=tls, remove it + //as it is deprecated in RFC 3261 + if(transportParam == tls) + { + uri.SIPURI()->DeleteParam(SIPStrings::StringF( SipStrConsts::ETransport )); + } + + //If the message is CSIPRequest, make sure its scheme is as per From Header. + //So if the FROM header is SIPS, Contact header is SIPS, if FROM header is SIP, + //Contact header scheme is sip + if(aMessage->IsRequest()) { - RStringF tls = SIPStrings::StringF( SipStrConsts::ETLS ); - // SIP Scheme in Contact header should be same as From Header - CURIContainer& FromUri = (((aMessage->From())->SIPAddress()).URI()); - if(FromUri.IsSIPURI()) - { - CSIPURI* FromSIPUri =FromUri.SIPURI(); - if(FromSIPUri->IsSIPSURI()) + if ( Protocol() == KProtocolTls ) + { + CURIContainer& FromUri = (((aMessage->From())->SIPAddress()).URI()); + if(FromUri.IsSIPURI()) { - uri.SIPURI()->SetSIPS( ETrue ); - } - else - { - uri.SIPURI()->SetSIPS( EFalse ); + CSIPURI* FromSIPUri =FromUri.SIPURI(); + if(FromSIPUri->IsSIPSURI()) + { + uri.SIPURI()->SetSIPS( ETrue ); + } + else + { + uri.SIPURI()->SetSIPS( EFalse ); + } } - } - if(transportParam == tls) + } + else { - //uri.SIPURI()->SetSIPS(EFalse); - //Delete the param transport=tls from the URI as it is deprecated in RFC 3261 - uri.SIPURI()->DeleteParam(SIPStrings::StringF( SipStrConsts::ETransport )); + uri.SIPURI()->SetSIPS( EFalse ); } - } - else - { - uri.SIPURI()->SetSIPS( EFalse ); - } - } - } - } - + } //end if (aMessage->IsRequest) + } //end if (uri.IsSIPURI()) + } //end if(sipaddr) + } //end while } // -----------------------------------------------------------------------------