# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1276256578 -10800 # Node ID a1df79fa35b402f89c987ff3473946ddb69c31ba # Parent abb636afedf74f4298eb75b5db8c5fe8d476228c Revision: 201021 Kit: 2010123 diff -r abb636afedf7 -r a1df79fa35b4 webservices/idwsfplugin/group/senidwsfplugin.mmp --- a/webservices/idwsfplugin/group/senidwsfplugin.mmp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/idwsfplugin/group/senidwsfplugin.mmp Fri Jun 11 14:42:58 2010 +0300 @@ -35,7 +35,8 @@ UID 0x10009D8D 0x101F972F #endif -paged +PAGEDDATA +PAGEDCODE //For enabling bytepair compression for code paging #ifdef EKA2 diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsconnection/src/rsenserviceconnection.cpp --- a/webservices/wsconnection/src/rsenserviceconnection.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsconnection/src/rsenserviceconnection.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -103,7 +103,8 @@ void CSenConnAgentSync::Start() { - SetActive(); + if(!IsActive()) + SetActive(); } RSenServiceConnection::RSenServiceConnection(RFileLogger* aLog) @@ -498,7 +499,8 @@ iFirst = resHandler; CActiveScheduler::Add(resHandler); - resHandler->SetActive(); + if(!resHandler->IsActive()) + resHandler->SetActive(); resHandler->iStatus = KRequestPending; TIpcArgs args(&resHandler->iProgressData, resHandler->iSoapOrCid); diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsconnection/src/senregistrationtimer.cpp --- a/webservices/wsconnection/src/senregistrationtimer.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsconnection/src/senregistrationtimer.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -74,7 +74,8 @@ if (!IsActive()) { iTimer.After( iStatus, interval ); - SetActive(); + if(!IsActive()) + SetActive(); } } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsconnection/src/senserviceconnectionimpl.cpp --- a/webservices/wsconnection/src/senserviceconnectionimpl.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsconnection/src/senserviceconnectionimpl.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -45,9 +45,9 @@ #include "senservicemanagerdefines.h" #include "SenBaseAttribute.h" -#include -#include -#include +#include +#include +#include #include "senconnagentserver.h" #include "senxmldebug.h" #include "senatomentry.h" @@ -192,7 +192,7 @@ void CSenServiceConnectionImpl::ConstructL(MSenServiceDescription& aSD) { - + TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::ConstructL(aSD)"); CSenElement& sdAsElement = ((CSenXmlServiceDescription&)aSD).AsElement(); // Check if this is an internal service connection: @@ -247,7 +247,8 @@ #ifndef RD_SEN_SC_PROXY_ENABLED_BY_DEFAULT ConnectL(); // #else // ConnectL occurs on "proxy" / factory -level -#endif +#endif + TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::ConstructL(aSD) Completed"); } @@ -343,12 +344,14 @@ void CSenServiceConnectionImpl::SetConsumer( MSenServiceConsumer& aConsumer, MSenExtendedConsumerInterface* apExtConsumer ) { + TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::SetConsumer"); iObserver = &aConsumer; ipExtendedConsumerInterface = apExtConsumer; } void CSenServiceConnectionImpl::Consumer( MSenServiceConsumer*& aConsumer, MSenExtendedConsumerInterface*& apExtConsumer ) { + TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::Consumer"); aConsumer = iObserver; apExtConsumer = ipExtendedConsumerInterface; } @@ -451,6 +454,7 @@ { iChunkMap->Reset(); delete iChunkMap; + iChunkMap = NULL; } delete iInBuf; @@ -478,6 +482,7 @@ TPtrC CSenServiceConnectionImpl::SessionID() { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SessionID()"))); if(ipSessionId) { return *ipSessionId; @@ -644,6 +649,7 @@ TInt CSenServiceConnectionImpl::ResponseFromChunk(CSenChunk& aClientOp, HBufC8*& aResponseTo) { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ResponseFromChunk()"))); TInt leaveCode(KErrNone); // handle OOM case: // Read response message, SOAP fault OR error TPtrC8 response; @@ -659,7 +665,7 @@ // OOM occured retVal = leaveCode; } - + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ResponseFromChunk() Completed"))); return retVal; } @@ -875,7 +881,7 @@ } else if (!IsActive()) { - SetActive(); + SetActive(); iStatus = KRequestPending; } TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::CheckConnection Completed"))); @@ -916,7 +922,7 @@ TInt appendRetVal(KErrNone); appendRetVal = ChunkMapL().Append( pTxnId, apClientOp ); - TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KNormalLogLevel , _L8("- ChunkMapL().Append(%d, %d) returned: %d"), *pTxnId, apClientOp->Chunk().Handle(), appendRetVal)); + TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("- ChunkMapL().Append(%d, %d) returned: %d"), *pTxnId, apClientOp->Chunk().Handle(), appendRetVal)); if( appendRetVal == KErrNone ) { TMessage msg; @@ -1301,11 +1307,12 @@ TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("MSenServiceConsumer::HandleErrorL leaved: %d"), leaveCode )); } } - + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::InitializeL() Completed"))); } TPtrC CSenServiceConnectionImpl::NextChunkName() { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NextChunkName()"))); if(ipChunkName) { iChunkNameNumber++; @@ -1332,6 +1339,7 @@ } else { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NextChunkName() returns KNullDesC()"))); return KNullDesC(); } } @@ -1934,6 +1942,7 @@ break ; } } + TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::HandleMessageFromChildAOL Completed"); } // Helper function, which delivers response to Service Consumer @@ -1976,7 +1985,7 @@ if( statusCode == KErrNone ) { // STANDARD, "OK" RESPONSE - TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KNormalLogLevel , _L8("- response, (%d bytes):"), response.Length())); + TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("- response, (%d bytes):"), response.Length())); TLSLOG_ALL(KSenServiceConnectionLogChannelBase+iConnectionID, KMaxLogLevel ,(response)); TRAPD( err, iObserver->HandleMessageL( response ); ) if(err) @@ -1991,8 +2000,8 @@ TInt error = statusCode; // SOAP FAULT - TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KNormalLogLevel , _L8("- SOAP fault (%d bytes):"), response.Length())); - TLSLOG_ALL(KSenServiceConnectionLogChannelBase+iConnectionID, KMaxLogLevel ,(response)); + TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("- SOAP fault (%d bytes):"), response.Length())); + TLSLOG_ALL(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,(response)); if ( error == KErrSenSoapFault && !iInitialized ) // China DC { @@ -2024,6 +2033,7 @@ CleanupStack::PopAndDestroy( pMessage ); } iTransactionIdKnown = EFalse; + TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::DeliverResponseL Completed"); } void CSenServiceConnectionImpl::DoCancel() @@ -2290,6 +2300,7 @@ const TDesC8& CSenServiceConnectionImpl::LocalName() const { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::LocalName()"))); if(iFragment) return iFragment->LocalName(); else @@ -2298,6 +2309,7 @@ const TDesC8& CSenServiceConnectionImpl::NsUri() const { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NsUri()"))); if(iFragment) return iFragment->NsUri(); else @@ -2306,6 +2318,7 @@ const TDesC8& CSenServiceConnectionImpl::NsPrefix() const { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NsPrefix()"))); if(iFragment) return iFragment->NsPrefix(); else @@ -2314,6 +2327,7 @@ void CSenServiceConnectionImpl::WriteAsXMLToL(RWriteStream& aWriteStream) { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::WriteAsXMLToL()"))); if(iFragment) { iFragment->WriteAsXMLToL(aWriteStream); @@ -2322,6 +2336,7 @@ HBufC* CSenServiceConnectionImpl::AsXmlUnicodeL() { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AsXmlUnicodeL()"))); if(iFragment) { return iFragment->AsXmlUnicodeL(); @@ -2334,6 +2349,7 @@ HBufC8* CSenServiceConnectionImpl::AsXmlL() { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AsXmlL()"))); if(iFragment) { return iFragment->AsXmlL(); @@ -2384,6 +2400,7 @@ TBool CSenServiceConnectionImpl::ConsistsOfL(MSenFragment& aCandidate) { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ConsistsOfL()"))); if (iFragment) { return iFragment->ConsistsOfL(aCandidate); @@ -2424,6 +2441,7 @@ TInt CSenServiceConnectionImpl::TxnId() { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::TxnId()"))); if( iTransactionIdKnown ) { if( iTxnId>KErrNone ) @@ -2481,6 +2499,7 @@ TInt CSenServiceConnectionImpl::CancelTransaction(TInt aTransactionID) { + TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::CancelTransaction"); TInt retVal(0); if ( iDispatcherEnabled ) // DISPATCHER IS ENABLED { @@ -2511,6 +2530,7 @@ TRAP(retVal, DeliverResponseL(KErrSenCancelled,NULL)); if( retVal != KErrNone) { + TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::CancelTransaction returns [%d]" ), retVal )); return retVal; } } @@ -2519,6 +2539,7 @@ { iConnection.CancelRequest(aTransactionID); } + TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::CancelTransaction returns [%d]" ), KErrNone )); return KErrNone; } @@ -2554,6 +2575,7 @@ RChunkMap& CSenServiceConnectionImpl::ChunkMapL() { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::ChunkMapL()"))); if(!iChunkMap) { iChunkMap = new (ELeave) RChunkMap(ETrue, ETrue); @@ -2563,6 +2585,7 @@ RPointerArray& CSenServiceConnectionImpl::AsyncOpsArrayL() //codescannerwarnings { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AsyncOpsArrayL()"))); if(!iAsyncOpsArray) { iAsyncOpsArray = new (ELeave) RPointerArray; @@ -2833,6 +2856,7 @@ CSenSoapEnvelope& aMessage, const TDesC8& aProperties) //codescannerwarnings { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::AssignPropertiesToChunkL()"))); TInt retVal(KErrNone); if ( aMessage.SoapAction2().Length() > 0 ) @@ -2869,7 +2893,7 @@ } delete pSoapMsg; } - + TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::AssignPropertiesToChunkL returns [%d]" ), retVal )); return retVal; } @@ -2998,7 +3022,7 @@ CleanupStack::PopAndDestroy(pSerializer); CleanupStack::PopAndDestroy(&buffer); CleanupStack::PopAndDestroy(pPropsAsXml); - + TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::AssignMessageToChunkL returns [%d]" ), retVal )); return retVal; } @@ -3006,6 +3030,7 @@ // plus multiple BLOBs PER ONE MESSAGE AND multiple simultaneous transfers TInt CSenServiceConnectionImpl::MoveBinaryContainersToServer( CSenConnectionChunk& aOperation, RArray& aList ) { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MoveBinaryContainersToServer()"))); TInt retVal(KErrNone); TPtrC8 cid8; @@ -3100,12 +3125,14 @@ } } } - } + } + TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::MoveBinaryContainersToServer returns [%d]" ), retVal )); return retVal; } TInt CSenServiceConnectionImpl::MoveFileChunkHandleToServer(CSenConnectionChunk& aOperation) { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MoveFileChunkHandleToServer()"))); TInt retVal(KErrNone); retVal = iConnection.SendFileHandle(aOperation,iSharedFileHandle); return retVal; @@ -3170,6 +3197,7 @@ TInt CSenServiceConnectionImpl::SendL( MSenMessage& aMessage ) { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MoveFileChunkHandleToServer(aMessage)"))); if ( aMessage.IsSafeToCast( MSenMessage::ESoapEnvelope2 ) ) { CSenSoapEnvelope2& message = (CSenSoapEnvelope2&)aMessage; @@ -3269,6 +3297,7 @@ TInt CSenServiceConnectionImpl::SubmitL( MSenMessage& aMessage, CSenSoapEnvelope2*& aResponseTo ) { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SubmitL(aMessage, aResponseTo)"))); if ( aMessage.IsSafeToCast( MSenMessage::ESoapEnvelope2) ) { CSenSoapEnvelope2& message = (CSenSoapEnvelope2&)aMessage; @@ -3440,6 +3469,7 @@ void CSenServiceConnectionImpl::MigrateToPrefferedCarrierL(TBool &aUserChoice) { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MigrateToPrefferedCarrierL()"))); if (iMobiltyObserver) { User::LeaveIfError(iConnection.MigrateToPrefferedCarrierL(aUserChoice)); @@ -3448,10 +3478,12 @@ { User::Leave(KErrNotFound); } + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::MigrateToPrefferedCarrierL() Completed"))); } void CSenServiceConnectionImpl::NewCarrierAcceptedL(TBool &aUserChoice) { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NewCarrierAcceptedL()"))); if (iMobiltyObserver) { User::LeaveIfError(iConnection.NewCarrierAcceptedL(aUserChoice)); @@ -3459,7 +3491,8 @@ else { User::Leave(KErrNotFound); - } + } + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::NewCarrierAcceptedL() Completed"))); } #endif @@ -3468,6 +3501,7 @@ TBool aIncoming, const TDesC8& aMessage, const TDesC8& aCid, TInt aProgress) { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SendProgressToHostlet()"))); TBool isSoap = (aMessage != KNullDesC8); TPtrC8 ptr; if (isSoap) @@ -3500,6 +3534,7 @@ TLSLOG_FORMAT(( iTlsLogStatusChannel, KSenServiceConnectionStatusLogLevel, _L("Fatal(!) -- CSenServiceConnectionImpl::DeliverStatus(): MSenServiceConsumer::SetStatus - leaves with %d"), leaveCode)); leaveCode = KErrNone; } + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::DeliverStatus() Completed"))); } @@ -3564,7 +3599,8 @@ } TInt CSenServiceConnectionImpl::SearchIdentityProviderL( CSenIdentityProvider*& apIdentityProvider, const TDesC8& aProviderId ) - { + { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::SearchIdentityProviderL()"))); TInt retVal(KErrNone); CSenChunk* pSenChunk = CSenChunk::NewLC(NextChunkName()); @@ -3603,7 +3639,7 @@ } } CleanupStack::PopAndDestroy(pSenChunk); - + TLSLOG_FORMAT((KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::SearchIdentityProviderL returns [%d]" ), retVal )); return retVal; } @@ -3654,6 +3690,7 @@ TBool CSenServiceConnectionImpl::HasConnectionAgentCallbackInitialized() { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::HasConnectionAgentCallbackInitialized()"))); #ifdef __ENABLE_ALR__ if((ipAuthProvider || iFilesObserver || iMobiltyObserver || ipCoBrandingObserver) && iConnectionAgentCallbackInitialized) #else @@ -3754,6 +3791,7 @@ void CSenServiceConnectionImpl::DataTrafficDetails(TSenDataTrafficDetails& aDetails, TSenDataTrafficOperations& aOperations) { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::DataTrafficDetails()"))); iConnection.DataTrafficDetails(aDetails, aOperations); } @@ -3782,6 +3820,7 @@ TInt CSenServiceConnectionImpl::PendingTrasanctionsCount() { + TLSLOG(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel,(_L("CSenServiceConnectionImpl::PendingTrasanctionsCount()"))); return iAsyncOpsArray->Count(); } @@ -3822,7 +3861,8 @@ sizeof(TInt), sizeof(TInt)); - SetActive(); + if(!IsActive()) + SetActive(); iStatus = KRequestPending; #ifdef EKA2 iActive->AsyncOpsArrayL().AppendL(this); //codescannerwarnings @@ -3918,7 +3958,8 @@ CActiveScheduler::Add(this); // Initial subscription iConnectionStatusProperty.Subscribe(iStatus); - SetActive(); + if(!IsActive()) + SetActive(); iStatus = KRequestPending; } @@ -3942,7 +3983,8 @@ TLSLOG_L( KSenServiceConnectionStatusLogChannelBase+iConnectionID, KSenServiceConnectionStatusLogLevel, "CSenConnectionStatusObserver::RunL" ); iConnectionStatusProperty.Subscribe(iStatus); - SetActive(); + if(!IsActive()) + SetActive(); iStatus = KRequestPending; TInt propertyValue(KErrNotFound); @@ -4020,7 +4062,8 @@ CActiveScheduler::Add(this); // Initial subscription iFileProgressProperty.Subscribe(iStatus); - SetActive(); + if(!IsActive()) + SetActive(); iStatus = KRequestPending; } @@ -4042,7 +4085,8 @@ { // Resubscribe before processing new value to prevent missing updates(!): iFileProgressProperty.Subscribe(iStatus); - SetActive(); + if(!IsActive()) + SetActive(); iStatus = KRequestPending; TLSLOG_L( KSenServiceConnectionStatusLogChannelBase+iConnectionID, KSenServiceConnectionStatusLogLevel, "CSenFileProgressObserver::RunL" ); diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsconnection/src/senservicedispatcher.cpp --- a/webservices/wsconnection/src/senservicedispatcher.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsconnection/src/senservicedispatcher.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -156,7 +156,9 @@ for(;;) { + TLSLOG_L(KSenDispatcherLogChannel, KSenDispatcherLogLevel, "CSenServiceDispatcher::ExecuteL Before User::WaitForAnyRequest()"); User::WaitForAnyRequest(); + TLSLOG_L(KSenDispatcherLogChannel, KSenDispatcherLogLevel, "CSenServiceDispatcher::ExecuteL After User::WaitForAnyRequest()"); //If iDispatchMessages = FALSE then stop dispacthing messages. //Is called from the destructor and thread will end in cleaner way @@ -312,6 +314,7 @@ } TBool CSenServiceDispatcher::RemoveFromQueue(TInt aTransactionID) { + TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::RemoveFromQueue - VrtlTxnID (%d)"), aTransactionID)); //This method gets called from two places 1)main thread from //CancelTransaction(aTransactionID) method and 2)child thread from //ExecuteL method once message has been dispacthed. @@ -368,6 +371,7 @@ TInt CSenServiceDispatcher::AddToTheTransMap(TInt* pVrtlaTxnId,TInt* pActlTxnId) { + TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::AddToTheTransMap - VrtlTxnID [%d], ActlTxnId [%d]"), pVrtlaTxnId, pActlTxnId)); TInt returnValue = KErrNone; //Wait on transaction map critical section if it is locked, and then add to //the map. @@ -382,6 +386,7 @@ TInt CSenServiceDispatcher::RemoveFromTransMap(TInt* pVrtlaTxnId) { + TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::RemoveFromTransMap - VrtlTxnID [%d]"), pVrtlaTxnId)); TInt returnValue = KErrNone; //Is called from the main thread after we recieve the response. returnValue = TransactionMap().Find(*pVrtlaTxnId); @@ -396,6 +401,7 @@ TInt CSenServiceDispatcher::UpdateTransMap(TInt* pVrtlaTxnId,TInt* pActlTxnId) { + TLSLOG_FORMAT((KSenDispatcherLogChannel, KSenDispatcherLogLevel, _L("CSenServiceDispatcher::UpdateTransMap - VrtlTxnID [%d], ActlTxnId [%d]"), pVrtlaTxnId, pActlTxnId)); TInt returnValue = KErrNone; //Is called from the main thread from HandleMessageChildAOL method. //Typically gets called when ESenReAuthAndResendNeeded and ESenResendNeeded diff -r abb636afedf7 -r a1df79fa35b4 webservices/wscore/group/sencore.mmp --- a/webservices/wscore/group/sencore.mmp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wscore/group/sencore.mmp Fri Jun 11 14:42:58 2010 +0300 @@ -85,7 +85,6 @@ SYSTEMINCLUDE /epoc32/include/libc MW_LAYER_SYSTEMINCLUDE -APP_LAYER_SYSTEMINCLUDE LIBRARY ecom.lib LIBRARY euser.lib @@ -93,13 +92,15 @@ LIBRARY estor.lib LIBRARY flogger.lib LIBRARY bafl.lib -LIBRARY imut.lib // imcvcodc.h - base64 encode and decode +LIBRARY inetprotutil.lib // for base64 encoding LIBRARY sysutil.lib // sysutil.h LIBRARY etel.lib etelmm.lib // IMSI retrieving #ifdef __ENABLE_ALR__ LIBRARY esock.lib //MOBILITY LIBRARY commdb.lib //MOBILITY LIBRARY netmeta.lib +LIBRARY platformver.lib //extendedconnpref.h +LIBRARY extendedconnpref.lib //extendedconnpref.h #endif #ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES LIBRARY senlogger.lib // for TLS based logging diff -r abb636afedf7 -r a1df79fa35b4 webservices/wscore/inc/sencoreservicemanager.h --- a/webservices/wscore/inc/sencoreservicemanager.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wscore/inc/sencoreservicemanager.h Fri Jun 11 14:42:58 2010 +0300 @@ -32,10 +32,9 @@ #include #include #include -#include // for base64 codec #include #include - +#include #include #include "senservicemanagerdefines.h" @@ -412,7 +411,7 @@ // New functions MSIF* Framework(const TDesC8& aFrameworkID); - TImCodecB64& Base64Codec(); + TBase64& Base64Codec(); // RPointerArray& ActiveHostletEndpointsL(); @@ -436,7 +435,7 @@ TInt iConnectionCount; CSenGuidGen* iGuidGenerator; // owned CSenXmlReader* iReader; // owned - TImCodecB64 iBase64Codec; + TBase64 iBase64Codec; RStringPool iStringPool; // owned // RPointerArray* ipActiveHostletEndpoints; // owned diff -r abb636afedf7 -r a1df79fa35b4 webservices/wscore/inc/senmobilityobserver.h --- a/webservices/wscore/inc/senmobilityobserver.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wscore/inc/senmobilityobserver.h Fri Jun 11 14:42:58 2010 +0300 @@ -22,13 +22,10 @@ #define M_SEN_MOBILITY_OBSERVER_H // INCLUDES -#include #include #include #include -#include #include -#include #include "SenXmlReader.h" #include "MSenTransport.h" #include "SenWSDescription.h" @@ -76,7 +73,6 @@ TUint32 GetActiveIap() ; HBufC8* GetNewIapAsTransportPropertyL() ; TUint32 GetActiveSnap() ; - void SetDialogPref(TBool aDialogPref) ; TInt OpenConnectionL(TDesC8& aAppTransportProperties, MSenTransport &aTransport, CSenWSDescription& aInitializer, @@ -92,6 +88,9 @@ TInt StartConnection(TUint32& aId, TBool aIsSnapId) ; TInt OpenSocketSever() ; void RefreshAvailabilityL() ; + TInt SetID(TUint32 aId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP); + TBool IsOCCImplementedSDK(); + TInt GetS60PlatformVersion(TUint& aMajor, TUint& aMinor); /** * By default Symbian OS constructor is private. @@ -104,10 +103,9 @@ TUint32 iIapId; TUint32 iNewIapId; TUint32 iSnapId; - TCommDbConnPref iPrefs; - TConnSnapPref iSNAPPrefs; - CSenXmlReader &iReader ; - private: // Data + CSenXmlReader &iReader ; + TBool iOCCenabled; + private: // Data }; #endif /*M_SEN_MOBILITY_OBSERVER_H */ diff -r abb636afedf7 -r a1df79fa35b4 webservices/wscore/src/senclientsession.cpp --- a/webservices/wscore/src/senclientsession.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wscore/src/senclientsession.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include "senclientsession.h" @@ -59,9 +59,9 @@ #include "SenSoapEnvelope2.h" #include "sensoapmessagedom2.h" -#include "xmlengchunkcontainer.h" -#include "xmlengfilecontainer.h" -#include "xmlengdeserializer.h" +#include +#include +#include #include "SenParser.h" #include "seninternalcredential.h" #include "senservercontext.h" @@ -168,7 +168,8 @@ iFirst = resHandler; CActiveScheduler::Add(resHandler); - resHandler->SetActive(); + if(!resHandler->IsActive()) + resHandler->SetActive(); resHandler->iStatus = KRequestPending; TIpcArgs args(&resHandler->iProgressData, resHandler->iSoapOrCid); @@ -224,6 +225,7 @@ CSenMessageResourceHandler* tmp = resHandler; resHandler = resHandler->iNext; delete tmp; + tmp = NULL; } RSessionBase::Close(); } @@ -260,6 +262,7 @@ SendReceive(ESenCliServPrefferedCarrierAvailable, args, caSync->iStatus); retVal = caSync->iStatus.Int(); delete caSync; + caSync = NULL; } return retVal; @@ -279,6 +282,7 @@ SendReceive(ESenCliServNewCarrierActive, args, caSync->iStatus); retVal = caSync->iStatus.Int(); delete caSync; + caSync = NULL; } return retVal; } @@ -294,6 +298,7 @@ SendReceive(ESenCliServMobilityError, args, caSync->iStatus); retVal = caSync->iStatus.Int(); delete caSync; + caSync = NULL; } return retVal; } @@ -328,6 +333,7 @@ asWait.Start(); retVal = caSync->iStatus.Int(); delete caSync; + caSync = NULL; } return retVal; } @@ -356,7 +362,8 @@ void CSenConnAgentSync::Start() { - SetActive(); + if(!IsActive()) + SetActive(); } CSenClientSession* CSenClientSession::NewL(MSenServiceManager& aServer, CSenServerContext& aCtx) @@ -991,6 +998,7 @@ { CSLOG_L(iConnectionID,KMinLogLevel ,"ESenServGetIdentityProviders"); IdentityProviders(aMessage); + CSLOG_L(iConnectionID,KMinLogLevel ,"ESenServGetIdentityProviders Completed"); break; } default: @@ -1500,7 +1508,7 @@ const TDesC8& aRequest, CSenAtomEntry& aAtomEntry) { - CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL"); + CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL(aTransactionId, aRequest, aAtomEntry)"); CSenParser* pParser = CSenParser::NewLC(); pParser->EnableFeature(EReportNamespaceMapping); pParser->ParseL(aRequest, aAtomEntry); @@ -1551,13 +1559,14 @@ } CleanupStack::PopAndDestroy(pParser); + CSLOG_L(iConnectionID, KMinLogLevel ,"CSenClientSession::ParseMessageL(aTransactionId, aRequest, aAtomEntry) Completed"); return KErrNone; } TInt CSenClientSession::ParseMessageL(TInt aTransactionId, const TDesC8& aRequest, CSenSoapEnvelope2& aSoapEnvelope) { - CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL"); + CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL(aTransactionId, aRequest, aSoapEnvelope)"); CSenParser* pParser = CSenParser::NewLC(); pParser->EnableFeature(EReportNamespaceMapping); pParser->ParseL(aRequest, aSoapEnvelope); @@ -1651,7 +1660,7 @@ } } CleanupStack::PopAndDestroy(pParser); - + CSLOG_L(iConnectionID, KMinLogLevel , "CSenClientSession::ParseMessageL(aTransactionId, aRequest, aSoapEnvelope) Completed"); return retVal; } @@ -1943,7 +1952,7 @@ CleanupStack::PushL( pErrorMsg ); } aSenChunk.ChunkHeader().SetContextId(transactionId); // temporary - CSLOG_FORMAT((iConnectionID, KNormalLogLevel , _L8("SendMsgL - SetContextId: %d"), transactionId)); + CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("SendMsgL - SetContextId: %d"), transactionId)); } else { @@ -3739,6 +3748,7 @@ } void CSenClientSession::AddCredentialL( const RMessage2& aMessage ) { + CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL()"))); TInt retVal(KErrNone); CSenChunk* pSenChunk = NULL; @@ -3851,14 +3861,27 @@ iManager.AddCredentialL(pIdP, pCredential, retVal); RWSDescriptionArray aMatches; - iManager.ServiceDescriptionsL(aMatches,*pSD); - CleanupClosePushL(aMatches); - - for(TInt i = 0; i < aMatches.Count(); i++) - { - ((CSenWebServiceSession*)aMatches[i])->AddCredentialObserverL(*pCredential); - } - + iManager.ServiceDescriptionsL(aMatches,*pSD); + CleanupClosePushL(aMatches); + + for(TInt i = 0; i < aMatches.Count(); i++) + { + if(((CSenWebServiceSession*)aMatches[i]) && pCredential) + { + CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("SD Type is = %d"), aMatches[i]->DescriptionClassType())); + if( aMatches[i]->HasSuperClass( MSenServiceDescription::EServiceSession ) ) + { + CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - Calling AddCredentialObserverL()"))); + ((CSenWebServiceSession*)aMatches[i])->AddCredentialObserverL(*pCredential); + CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - Completed AddCredentialObserverL()"))); + } + else + { + CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() - SD is not the session object !!! "))); + } + } + } + CleanupStack::PopAndDestroy(&aMatches); CleanupStack::Pop(pCredential); @@ -3873,6 +3896,7 @@ CleanupStack::PopAndDestroy(pSenChunk); aMessage.Complete(retVal); + CSLOG(iConnectionID, KMinLogLevel ,(_L("CSenClientSession::AddCredentialL() Completed"))); } void CSenClientSession::CredentialsL( const RMessage2& aMessage ) @@ -4243,6 +4267,7 @@ TInt cancelledTxnId(*pTxnId); txnIds.Remove(i); delete pTxnId; + pTxnId = NULL; CSLOG_FORMAT((iConnectionID, KNormalLogLevel , _L8("- Now processing txn with id %d"), cancelledTxnId)); @@ -5544,6 +5569,7 @@ const RPointerArray pIdps = ((MSenCoreServiceManager&)iManager).IdentityProvidersL(); const TInt count = pIdps.Count(); + CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("- TOTAL IDP Found: %d"), count)); // Calculate required heap allocation size: TInt size(0); @@ -5658,11 +5684,12 @@ } CSLOG_L(iConnectionID,KMaxLogLevel ,"- Requested descriptions:"); CSLOG_ALL(iConnectionID,KMaxLogLevel ,(*pIdPrs)); + CSLOG_L(iConnectionID,KMinLogLevel ,"CSenClientSession::IdentityProviders completed"); } #ifdef _SENDEBUG else { - CSLOG_FORMAT((iConnectionID, KNormalLogLevel , _L8("- AllocDescToRMsgL failed: %d"), retVal)); + CSLOG_FORMAT((iConnectionID, KMinLogLevel , _L8("- AllocDescToRMsgL failed: %d"), retVal)); } #endif // _SENDEBUG diff -r abb636afedf7 -r a1df79fa35b4 webservices/wscore/src/sencoreservicemanager.cpp --- a/webservices/wscore/src/sencoreservicemanager.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wscore/src/sencoreservicemanager.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -379,7 +379,7 @@ error = additions; additions = 0; } - CSLOG_FORMAT((aConsumer.ConnectionId(), KNormalLogLevel , _L8(" - Just added %d service description(s)."), additions)); + CSLOG_FORMAT((aConsumer.ConnectionId(), KMinLogLevel , _L8(" - Just added %d service description(s)."), additions)); if ( error ) { retVal = error; @@ -973,9 +973,8 @@ } // private getter, which always initializes the base64codec -TImCodecB64& CSenCoreServiceManager::Base64Codec() +TBase64& CSenCoreServiceManager::Base64Codec() { - iBase64Codec.Initialise(); return iBase64Codec; } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wscore/src/senmobilityobserver.cpp --- a/webservices/wscore/src/senmobilityobserver.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wscore/src/senmobilityobserver.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -18,14 +18,17 @@ // INCLUDE FILES - +#include +#include #include "senmobilityobserver.h" -#include -#include "SenWSPattern.h" -#include "MSenProperties.h" -#include "SenLayeredTransportProperties.h" -#include "SenLogger.h" -#include "SenServiceManagerDefines.h" +#include "sentransportproperties.h" +#include "senwspattern.h" +#include "msenproperties.h" +#include "senlayeredtransportproperties.h" +#include "senlogger.h" +#include "senservicemanagerdefines.h" +#include // VersionInfo +#include // ----------------------------------------------------------------------------- // CALRObserver::NewL @@ -64,6 +67,7 @@ #endif User::LeaveIfError( iSocketServer.Connect()); TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "CALRObserver::ConstructL()"); + IsOCCImplementedSDK(); } // ----------------------------------------------------------------------------- @@ -76,7 +80,8 @@ iIapId(0), iNewIapId(0), iSnapId(0), - iReader(aReader) + iReader(aReader), + iOCCenabled(EFalse) { CActiveScheduler::Add( this ); } @@ -139,8 +144,59 @@ //RunL status error: " ) ); User::Leave(iStatus.Int()) ; } - } - + } + +// On return, aMajor and aMinor contain the version information +TBool CALRObserver::IsOCCImplementedSDK() + { + TBool occ = EFalse; + // Obtain the version number + TUint major; + TUint minor; + TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("CSenHttpChannelImpl::IsOCCImplementedSDK()"))); + TInt ret = GetS60PlatformVersion(major, minor); + if (ret == KErrNone) + { + if(major == 5 && minor == 2) + { + occ = ETrue; + iOCCenabled = ETrue; + TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("---- IsOCCImplementedSDK() returns TRUE"))); + } + else + { + TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("---- IsOCCImplementedSDK() returns False"))); + } + } + return occ; + } + +// On return, aMajor and aMinor contain the version information +TInt CALRObserver::GetS60PlatformVersion(TUint& aMajor, TUint& aMinor) + { + TInt ret = KErrNone; + // Connect to the file server session + RFs fsSession; + TLSLOG(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel,(_L("CSenHttpChannelImpl::GetS60PlatformVersion()"))); + ret = fsSession.Connect(); + if(ret == KErrNone) + { + CleanupClosePushL(fsSession); // Obtain the version numberTUint major; + VersionInfo::TPlatformVersion platformVersion; + TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "--- GetS60PlatformVersion getting Version info"); + ret = VersionInfo::GetVersion(platformVersion, fsSession); + CleanupStack::PopAndDestroy(); // fsSession + if (ret == KErrNone) + { + aMajor = platformVersion.iMajorVersion; + aMinor = platformVersion.iMinorVersion; + TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("--- GetS60PlatformVersion Version: Major [%d], Minor[%d]"), aMajor, aMinor)); + } + } + TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("--- GetS60PlatformVersion returns [%d]"), ret)); + return ret; + } + // ----------------------------------------------------------------------------- // CALRObserver::RunError // ----------------------------------------------------------------------------- @@ -362,7 +418,7 @@ TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get SNAPID from pTransportProperties "); TInt error = pTransportProperties->SnapIdL(id) ; - if(error || id >= (TUint)KErrNotFound) // + if(error || id >= (TUint)KErrNotFound) //SNAP not found { TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get IAPID from pTransportProperties "); error = pTransportProperties->IapIdL(id); @@ -372,7 +428,7 @@ isSnap = ETrue ; } - if(error || id >= (TUint)KErrNotFound) + if(error || id >= (TUint)KErrNotFound) //IAP also not found { //Application Did not provide IAP ID through transport properties //Now we need to check consumer and provider policy of service description @@ -384,7 +440,7 @@ CSenWSPattern* pConsumerPolicy = (CSenWSPattern*)&aInitializer; TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get SNAPID from pConsumerPolicy "); error = pConsumerPolicy->ConsumerSnapId( id ); - if(error || id >= (TUint)KErrNotFound) + if(error || id >= (TUint)KErrNotFound) //SNAP not found { TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- trying to get IAPID from pConsumerPolicy "); error = pConsumerPolicy->ConsumerIapId( id ); @@ -444,6 +500,11 @@ { //check with first Snapid isStartConnectionRequired = ETrue ; + if(iOCCenabled != EFalse) + { + isSnap = ETrue; //We must start with SNAP for OCC + TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- isSnap Modified for OCC Support "); + } TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- StartConnection required as (iIapId == 0 && iSnapId == 0) openId = %d, isSnap = %d, iIapId = %d and iSnapId = %d "), openId, isSnap, iIapId, iSnapId)); } else if(isSnap != EFalse && openId != iSnapId) @@ -494,6 +555,146 @@ TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- CALRObserver::OpenConnectionL returnd %d "), error)); return error ; } + +TInt CALRObserver::SetID(TUint32 aId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP) + { + /* + * Single click connectivity feature has been implemented by CSock (RConnection class). + * According to this client no need to set the IAP ID. + * Automatically RConnection will use the suitable IAP + */ + TInt retVal = KErrNone; + TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("CSenHttpChannelImpl called with ID [%d]"), aId)); + + if (iOCCenabled == EFalse) + { + if(aSNAP != EFalse && aId) + { + TConnSnapPref SNAPPrefs; + iSnapId = aId ; + SNAPPrefs.SetSnap( aId ); + // Start connecting with Snap + retVal = iConnection.Start(SNAPPrefs); + TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection iConnection Started with SNAP"); + } + else //default is iap + { + if( aId ) + { + TCommDbConnPref iapPrefs ; + iapPrefs.SetIapId( aId ); + iapPrefs.SetDialogPreference( ECommDbDialogPrefDoNotPrompt ); + TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::SetDialogPref is FALSE"); + //iapPrefs.SetDialogPreference( ECommDbDialogPrefPrompt ); + // Start connecting with IAP + retVal = iConnection.Start(iapPrefs); + TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- CALRObserver::StartConnection connection started with iapid %d and preference"), aId)); + } + else + { + if (iIapId != 0) + { + //OpenSocketSever is already called for this iIapId When multiple + //sendL are calld for the same IAPId StartConnection may be called + //unintentionaly and may create crash + //strange case StartConnection must not be called in this case + TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection StartConnection must not be called as aId == 0 and iIapId != 0"); + } + else + { + //Using Default Connection + TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection started Using Default Connection"); + retVal = iConnection.Start(); + } + } + } + } + else + { + if (aSNAP == EFalse) + { + /* If IAP id is zero, it is interpreted as + * client's request for not requesting any specific IAP. + * Default value is 0. + * + * If IAP id is set, SNAP id shall be zero. + * If IAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown. + * If IAP id is set, Connection selection dialog shall be disabled. + * If IAP id is set, bearer set shall be EExtendedConnBearerUnknown. + * If IAP id is set, forced roaming is disabled automatically. + * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection + * selection dialog shall be enabled. + */ + + TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC with IAP Settings"); + TConnPrefList prefList; + TExtendedConnPref extPrefs; + //extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown); + //TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC Silent Connection"); + //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent); + //extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown); + extPrefs.SetIapId(aId); + extPrefs.SetSnapId(0); + prefList.AppendL(&extPrefs); + retVal = aConnection.Start(prefList); + if(retVal == KErrNone) + { + iIapId = aId; + } + else + { + TLSLOG_FORMAT((KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, _L8("IAP ->Start retVal [%d]"), retVal)); + } + } + else + { + /** + * Sets SNAP id. If SNAP id is zero, it is interpreted as + * client's request for not requesting any specific SNAP. + * Default value is 0. + * + * If SNAP id is set, IAP id shall be zero. + * If SNAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown. + * If SNAP id is set, Connection selection dialog shall be disabled. + * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection + * selection dialog shall be enabled. + */ + TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC with SNAP Settings"); + TConnPrefList prefList; + TExtendedConnPref extPrefs; + //extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown); + //TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting up OCC Silent Connection"); + //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent); + //extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown); + if(aId == 0) + { + TLSLOG_L(KSenSenMobilityLogChannelBase , KSenSenMobilityLogLevel, "- Setting SnapPurpose Internet"); + if(aDialogPref) //If it fails because of unavailibility of access points + { + extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown); + extPrefs.SetConnSelectionDialog(ETrue); + } + else + { + extPrefs.SetSnapPurpose(CMManager::ESnapPurposeInternet); + //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent); + } + } + else + { + extPrefs.SetSnapId(aId); + extPrefs.SetIapId(0); + extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown); + extPrefs.SetConnSelectionDialog(EFalse); + } + prefList.AppendL(&extPrefs); + retVal = aConnection.Start(prefList); + } + } + + return retVal; + } + // ----------------------------------------------------------------------------- // CALRObserver::StartConnection // ----------------------------------------------------------------------------- @@ -529,45 +730,13 @@ TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection iConnection closed as new SNAPID for the same connection"); } } - errRet = OpenSocketSever(); + + errRet = OpenSocketSever(); + if (!errRet) { - if(aIsSnapId != EFalse && aId) - { - iSnapId = aId ; - iSNAPPrefs.SetSnap( aId ); - // Start connecting with Snap - errRet = iConnection.Start(iSNAPPrefs); - TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection iConnection Started with SNAP"); - } - else //default is iap - { - if( aId ) - { - iPrefs.SetIapId( aId ); - SetDialogPref(EFalse) ; - // Start connecting with IAP - errRet = iConnection.Start(iPrefs); - TLSLOG_FORMAT((KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , _L8("- CALRObserver::StartConnection connection started with iapid %d and preference"), aId)); - } - else - { - if (iIapId != 0) - { - //OpenSocketSever is already called for this iIapId When multiple - //sendL are calld for the same IAPId StartConnection may be called - //unintentionaly and may create crash - //strange case StartConnection must not be called in this case - TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection StartConnection must not be called as aId == 0 and iIapId != 0"); - } - else - { - //Using Default Connection - TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::StartConnection connection started Using Default Connection"); - errRet = iConnection.Start(); - } - } - } + errRet = SetID(aId, EFalse, iConnection, iSocketServer, aIsSnapId); + if (errRet == KErrNone) { //iConnection.GetIntSetting( _L( "IAP\\Id" ), aId ); @@ -586,20 +755,6 @@ return errRet; } -void CALRObserver::SetDialogPref(TBool aDialogPref) - { - if (aDialogPref == EFalse) - { - TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel , "- CALRObserver::SetDialogPref is FALSE"); - iPrefs.SetDialogPreference( ECommDbDialogPrefDoNotPrompt ); - } - else - { - TLSLOG_L(KSenSenMobilityLogChannelBase, KSenSenMobilityLogLevel ,"- CALRObserver::SetDialogPref is TRUE"); - iPrefs.SetDialogPreference( ECommDbDialogPrefPrompt ); - } - } - // ----------------------------------------------------------------------------- // CALRObserver::RefreshAvailability // ----------------------------------------------------------------------------- diff -r abb636afedf7 -r a1df79fa35b4 webservices/wscore/src/senxmldao.cpp --- a/webservices/wscore/src/senxmldao.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wscore/src/senxmldao.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -1253,7 +1253,7 @@ } } } - TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KNormalLogLevel, _L8(" - total of %d matches found."), + TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8(" - total of %d matches found."), aMatches.Count())); return retVal; // last error from Append() is returned atm @@ -1604,7 +1604,7 @@ // This method needs to be wrapped inside critical section // NOTE: do *NOT* file log before this line(!): - TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMaxLogLevel,"CSenXMLDAO::LookupHostletForL:"); + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CSenXMLDAO::LookupHostletForL:"); TLSLOG(KSenCoreServiceManagerLogChannelBase , KMaxLogLevel,(aReqThreadId)); TLSLOG(KSenCoreServiceManagerLogChannelBase , KMaxLogLevel,(aReqConsumerId)); @@ -1624,7 +1624,7 @@ { if(pHostlet->Endpoint()==aHostletEndpoint) { - TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMaxLogLevel, _L8("- Matching sharable hostlet found from cache: 0x%X"), &pHostlet)); + TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("- Matching sharable hostlet found from cache: 0x%X"), &pHostlet)); return *pHostlet; } } @@ -1652,11 +1652,11 @@ // Next line is critical; when count goes to zero, // provider can be de-allocated from memory! pLookupInfo->IncrementLookupCount(); - TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMaxLogLevel, _L8("- A non-threadsafe, unsharable local provider (hostlet) was found: 0x%X - lookup info: 0x%X, lookup count: %d"), pHostlet, pLookupInfo, pLookupInfo->LookupCount())); + TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("- A non-threadsafe, unsharable local provider (hostlet) was found: 0x%X - lookup info: 0x%X, lookup count: %d"), pHostlet, pLookupInfo, pLookupInfo->LookupCount())); if(pHostlet->Reinitializable()) { pHostlet->ReinitL(); - TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMaxLogLevel,"- Provider was also reinitialized."); + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"- Provider was also reinitialized."); } return *pHostlet; } @@ -1693,7 +1693,7 @@ append = iSharableProviders.Append(pHostlet); if(append==KErrNone) { - TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMaxLogLevel, _L8("- Loaded new sharable hostlet instance: 0x%X"), &pHostlet)); + TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("- Loaded new sharable hostlet instance: 0x%X"), &pHostlet)); CleanupStack::Pop(); // pHostlet } else @@ -1740,6 +1740,7 @@ } } User::LeaveIfError(append); // KErrNoMemory + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CSenXMLDAO::LookupHostletForL: Completed"); return *pHostlet; } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wscredentialmanager/src/sencredentialmanager.cpp --- a/webservices/wscredentialmanager/src/sencredentialmanager.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wscredentialmanager/src/sencredentialmanager.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -47,7 +47,7 @@ #include "senwebservicesession.h" #include // KErrSenNoPermission ( -30315 ) -#include +#include #include #include @@ -1336,6 +1336,7 @@ RSenCredentialPtr CSenCredentialManager::CredentialL( TInt aInternalCredentialId, TInt& aErrorTo ) { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CSenCredentialManager::CredentialL()"); TInt count = iCredentialArray.Count(); for (TInt i=0; i +#include using namespace Xml; namespace diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsdescription/src/sencredential2.cpp --- a/webservices/wsdescription/src/sencredential2.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsdescription/src/sencredential2.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -279,7 +279,10 @@ EXPORT_C CSenCredential2::~CSenCredential2() { - delete iId; + if(iId) + { + delete iId; + } } EXPORT_C void CSenCredential2::SetIdL(const TDesC8& aNewId) diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsdescription/src/senservicepolicy.cpp --- a/webservices/wsdescription/src/senservicepolicy.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsdescription/src/senservicepolicy.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -16,12 +16,6 @@ */ - - - - - - // INCLUDE FILES #include #include @@ -159,7 +153,8 @@ } } } - delete copy; + delete copy; + copy = NULL; return retVal; } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsfragment/inc/wslibxml2utils.h --- a/webservices/wsfragment/inc/wslibxml2utils.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsfragment/inc/wslibxml2utils.h Fri Jun 11 14:42:58 2010 +0300 @@ -26,7 +26,7 @@ #define WS_LIBXML2_UTILS_H_INCLUDED #include -#include "xmlengelement.h" +#include class WsXmlUtils { diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsfragment/src/rsendocument.cpp --- a/webservices/wsfragment/src/rsendocument.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsfragment/src/rsendocument.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -21,8 +21,8 @@ #include "RSenDocument.h" -#include -#include +#include +#include LOCAL_C void CleanupRSenDocument(TAny* aDocumentData) { diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsfragment/src/sendomfragmentbase.cpp --- a/webservices/wsfragment/src/sendomfragmentbase.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsfragment/src/sendomfragmentbase.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -24,7 +24,7 @@ // INCLUDE FILES #include "SenDomFragmentBase.h" -#include // needed for TSerializationOptions +#include // needed for TSerializationOptions EXPORT_C CSenDomFragmentBase* CSenDomFragmentBase::NewL() diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsfragment/src/senfragmentbase.cpp --- a/webservices/wsfragment/src/senfragmentbase.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsfragment/src/senfragmentbase.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -34,9 +34,9 @@ #include // needed for RAttributeArray #include // for TParserFeature enumeration -#include // for TSerializationOptions -#include -#include +#include // for TSerializationOptions +#include +#include typedef unsigned char xmlChar; // from "libxml/Libxml2_xmlstring.h" diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsfragment/src/wslibxml2utils.cpp --- a/webservices/wsfragment/src/wslibxml2utils.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsfragment/src/wslibxml2utils.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -24,10 +24,10 @@ #include "wslibxml2utils.h" -#include -#include -#include -#include +#include +#include +#include +#include #define INTERNAL_NODEPTR(aNodeObject) (*reinterpret_cast(&(aNodeObject))) #define INTERNAL_NSPTR(aNsDefObject) (*reinterpret_cast(&(aNsDefObject))) diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsframework/group/senframework.mmp --- a/webservices/wsframework/group/senframework.mmp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsframework/group/senframework.mmp Fri Jun 11 14:42:58 2010 +0300 @@ -88,7 +88,6 @@ SYSTEMINCLUDE ../../inc SYSTEMINCLUDE /epoc32/include/libc MW_LAYER_SYSTEMINCLUDE -APP_LAYER_SYSTEMINCLUDE // System libs LIBRARY euser.lib @@ -96,7 +95,8 @@ LIBRARY estor.lib LIBRARY ecom.lib LIBRARY efsrv.lib -LIBRARY imut.lib +LIBRARY inetprotutil.lib // for base64 encoding + #ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES // Serene libs diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsframework/inc/senmtomutils.h --- a/webservices/wsframework/inc/senmtomutils.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsframework/inc/senmtomutils.h Fri Jun 11 14:42:58 2010 +0300 @@ -22,16 +22,16 @@ #define SEN_MTOM_UTILS_H #include -#include + #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // CONSTANTS _LIT(KMtomNoRequestSoapEnvelopePanicText, "NULL MTOM request soap envelope"); diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsframework/inc/senmultipartutils.h --- a/webservices/wsframework/inc/senmultipartutils.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsframework/inc/senmultipartutils.h Fri Jun 11 14:42:58 2010 +0300 @@ -32,11 +32,11 @@ #include "senatomentry.h" #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // CONSTANTS _LIT(KMultiPartNoRequestMessagePanicText, "NULL MultiPart request message"); diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsframework/src/saslmechanism.cpp --- a/webservices/wsframework/src/saslmechanism.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsframework/src/saslmechanism.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -124,6 +124,11 @@ EXPORT_C void CSaslMechanism::SetTransforms( RPointerArray aList) { + //deallocate the original objects and the array itself which were owned + if(iTransforms.Count()) + { + iTransforms.ResetAndDestroy(); + } iTransforms = aList; } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsframework/src/senservicesession.cpp --- a/webservices/wsframework/src/senservicesession.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsframework/src/senservicesession.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -50,10 +50,12 @@ iFramework(aFramework), ipTransport(NULL) { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel ,"CSenServiceSession::CSenServiceSession()"); } EXPORT_C CSenServiceSession::~CSenServiceSession() { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel ,"CSenServiceSession::~CSenServiceSession()"); // The REMOTE consumers are also sessions which are // owned by XMLDAO or ClientSession iConsumerList.Reset(); @@ -562,6 +564,7 @@ { if(!(thisFrameworkId.Length()>0 && patternFrameworkId == thisFrameworkId)) { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CSenServiceSession::Matches() - Framework Id not same returning EFalse"); return EFalse; } } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsframework/src/sensyncrequester.cpp --- a/webservices/wsframework/src/sensyncrequester.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsframework/src/sensyncrequester.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -148,7 +148,11 @@ MSenProperties* /*aResponseTransportProperties*/) { // NONE of the errors between transport and session are handled in this level: - delete apError; + if(apError) + { + delete apError; + apError = NULL; + } return aErrorCode; // simply bounce the error back to the caller } @@ -176,7 +180,8 @@ } // Now stop the SYNC wait in the SubmitL, so that the main thread // of the Serene Core Active Scheduler can continue it's execution - iSchedulerWait.AsyncStop(); + if(iSchedulerWait.IsStarted()) + iSchedulerWait.AsyncStop(); return aTxnId; } @@ -195,7 +200,8 @@ } // Now stop the SYNC wait in the SubmitL, so that the main thread // of the Serene Core Active Scheduler can continue it's execution - iSchedulerWait.AsyncStop(); + if(iSchedulerWait.IsStarted()) + iSchedulerWait.AsyncStop(); return aTxnId; } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsframework/src/senwebservicesession.cpp --- a/webservices/wsframework/src/senwebservicesession.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsframework/src/senwebservicesession.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -39,7 +39,7 @@ #include "senservicepolicy.h" #include "seninternalcredential.h" #include "sensaxutils.h" -#include +#include #include #include "senlogger.h" #include @@ -91,7 +91,7 @@ EXPORT_C void CSenWebServiceSession::ConstructL() { - + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,_L("CSenWebServiceSession::ConstructL()")); // Sets the local name to "ServiceDescription" // and initiates the inner ipElement CSenServiceSession::BaseConstructL(); @@ -103,6 +103,7 @@ EXPORT_C CSenWebServiceSession::~CSenWebServiceSession() { + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,_L("CSenWebServiceSession::~CSenWebServiceSession()")); delete iSecurity; delete iContract; delete iEndpoint; @@ -631,6 +632,7 @@ MSenRemoteServiceConsumer& aConsumer, MSenProperties* aResponseTransportProperties ) { + CSLOG_FORMAT((aConsumer.ConnectionId() , KMinLogLevel, _L8("CSenWebServiceSession::SendErrorToConsumerL - aErrorCode [%d]"), aErrorCode)); CleanupStack::PushL(apError); TInt retVal(KErrNone); @@ -2120,6 +2122,7 @@ EXPORT_C TInt CSenWebServiceSession::AddCredentialObserverL(CSenInternalCredential& aCredential) { + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,_L("CSenWebServiceSession::AddCredentialObserverL()")); TInt error(KErrNone); RSenCredentialPtr credentialPtr = ((MSenServiceManager&)iFramework.Manager()).CredentialL( @@ -2151,7 +2154,7 @@ } CredentialChanged(MSenCredentialObserver::EAdded, NULL); SetStatusL(); - + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,_L("CSenWebServiceSession::AddCredentialObserverL() Completed")); return KErrNone; } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wshostletconnection/src/senhostletconnectionimpl.cpp --- a/webservices/wshostletconnection/src/senhostletconnectionimpl.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wshostletconnection/src/senhostletconnectionimpl.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -763,8 +763,8 @@ iTxnIdBuffer.Set(reinterpret_cast(&iTxnId), sizeof(TInt), sizeof(TInt)); - - SetActive(); + if(!IsActive()) + SetActive(); #ifdef EKA2 iActive->AsyncOpsArrayL().AppendL(this); #else @@ -939,7 +939,8 @@ CActiveScheduler::Add(this); // Initial subscription iFileProgressProperty.Subscribe(iStatus); - SetActive(); + if(!IsActive()) + SetActive(); iStatus = KRequestPending; } @@ -961,7 +962,8 @@ { // Resubscribe before processing new value to prevent missing updates(!): iFileProgressProperty.Subscribe( iStatus ); - SetActive(); + if(!IsActive()) + SetActive(); iStatus = KRequestPending; TLSLOG_L( KSenHostletConnectionLogChannelBase + iConnectionID, KSenServiceConnectionStatusLogLevel, "CSenFileProgressObserver::RunL" ); diff -r abb636afedf7 -r a1df79fa35b4 webservices/wshostletconnection/src/senregistrationtimer.cpp --- a/webservices/wshostletconnection/src/senregistrationtimer.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wshostletconnection/src/senregistrationtimer.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -74,7 +74,8 @@ if (!IsActive()) { iTimer.After( iStatus, interval ); - SetActive(); + if(!IsActive()) + SetActive(); } } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wshttpchanneltransportplugin/group/senhttpchanneltransportplugin.mmp --- a/webservices/wshttpchanneltransportplugin/group/senhttpchanneltransportplugin.mmp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wshttpchanneltransportplugin/group/senhttpchanneltransportplugin.mmp Fri Jun 11 14:42:58 2010 +0300 @@ -115,6 +115,11 @@ LIBRARY HttpFilterCommon.lib LIBRARY netmeta.lib +#ifndef __ENABLE_ALR__ +LIBRARY platformver.lib //extendedconnpref.h +LIBRARY extendedconnpref.lib //extendedconnpref.h +#endif + #ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES // WSF libraries: LIBRARY SenServDesc.lib diff -r abb636afedf7 -r a1df79fa35b4 webservices/wshttpchanneltransportplugin/inc/senhttpchannel.h --- a/webservices/wshttpchanneltransportplugin/inc/senhttpchannel.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wshttpchanneltransportplugin/inc/senhttpchannel.h Fri Jun 11 14:42:58 2010 +0300 @@ -158,7 +158,9 @@ virtual void EnableTimeOutL(TInt aTxnId, TInt aTimeOutSec) = 0; virtual void DisableTimeOutL(TInt aTxnId) = 0; virtual TInt32 UsedIap() = 0; - + virtual void ResetIapId() = 0; + virtual void ResetUsedIapId() = 0; + virtual void SetExplicitIapDefined(TBool aExplicitIapDefined) = 0; }; #endif // SEN_HTTP_CHANNEL_H diff -r abb636afedf7 -r a1df79fa35b4 webservices/wshttpchanneltransportplugin/inc/senhttpchannelimpl.h --- a/webservices/wshttpchanneltransportplugin/inc/senhttpchannelimpl.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wshttpchanneltransportplugin/inc/senhttpchannelimpl.h Fri Jun 11 14:42:58 2010 +0300 @@ -107,7 +107,7 @@ TInt CancelTransaction(const TInt aTxnId); void CancelAllTransactions(); - void SetExplicitIapDefined(TBool aExplicitIapDefined); + virtual void SetExplicitIapDefined(TBool aExplicitIapDefined); /* * Getter for currently effective IAP ID * @param aIapId will be assigned to hold @@ -131,6 +131,8 @@ void EnableTimeOutL(TInt aTxnId, TInt aTimeOutSec); void DisableTimeOutL(TInt aTxnId); virtual TInt32 UsedIap(); + virtual void ResetIapId(); + virtual void ResetUsedIapId(); protected: CSenHttpChannelImpl(MSenIdentityManager& aManager); @@ -160,8 +162,10 @@ private: // New functions - - + + TInt SetID(TUint32 aIapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP = EFalse); + TInt GetS60PlatformVersion(TUint& aMajor, TUint& aMinor); + TBool IsOCCImplementedSDK(); TPtrC8 SoapActionL(MSenElement& aSoapEnvelope); TInt SubmitRequestL(MSenResponseObserver& aObserver, const TDesC8& aUri, @@ -210,6 +214,9 @@ TBool iHasHttpContentType; SenMultiPartUtils::TMultiPartContentType iMultiPartContentType; // content type of MultiPart response RHTTPTransaction iHttpTransaction ; +#ifndef __ENABLE_ALR__ + TBool iOCCenabled ; +#endif }; #endif //SEN_HTTP_CHANNEL_IMPL_H diff -r abb636afedf7 -r a1df79fa35b4 webservices/wshttpchanneltransportplugin/inc/senhttpchanneltransportplugin.h --- a/webservices/wshttpchanneltransportplugin/inc/senhttpchanneltransportplugin.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wshttpchanneltransportplugin/inc/senhttpchanneltransportplugin.h Fri Jun 11 14:42:58 2010 +0300 @@ -303,6 +303,7 @@ //RFileLogger iLogger; TInt iStatusCode; // containts latest error or zero TSenDataTrafficDetails iDetails; + TBool iIsConnectionFailed; }; #endif // SEN_HTTP_CHANNEL_TRANSPORT_PLUGIN_H diff -r abb636afedf7 -r a1df79fa35b4 webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp --- a/webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -16,25 +16,16 @@ */ - - - - - - - - - #include #include #include #include #include "sendebug.h" // filelogging and debugging MACROS -#include // KErrSenNoHttpResponseBody -#include -#include -#include +#include "SenServiceConnection.h" // KErrSenNoHttpResponseBody +#include "SenElement.h" +#include "SenXmlUtils.h" +#include "SenHttpTransportProperties.h" #include "senhttpchannelimpl.h" #include "senhttpeventhandler.h" #include "sentxnstate.h" @@ -47,10 +38,15 @@ #include "senhttpchanneltransportplugin.h" //For HTTPProxyFilter -#include -#include -#include -#include +#include +#include +#include +#include + +#ifndef __ENABLE_ALR__ +#include // VersionInfo +#include +#endif // CONSTANTS namespace @@ -85,7 +81,11 @@ iProxyHostPort(NULL), iXopResponse(EFalse), iHasHttpContentType(ETrue) +#ifndef __ENABLE_ALR__ + , iOCCenabled(EFalse) +#endif { +// IsOCCImplementedSDK(); } CSenHttpChannelImpl* CSenHttpChannelImpl::NewL(MSenIdentityManager& aManager) @@ -120,41 +120,94 @@ return pNew; } +#ifndef __ENABLE_ALR__ +// On return, aMajor and aMinor contain the version information +TInt CSenHttpChannelImpl::GetS60PlatformVersion(TUint& aMajor, TUint& aMinor) + { + TInt ret = KErrNone; + // Connect to the file server session + RFs fsSession; + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::GetS60PlatformVersion()"))); + ret = fsSession.Connect(); + if(ret == KErrNone) + { + CleanupClosePushL(fsSession); // Obtain the version numberTUint major; + VersionInfo::TPlatformVersion platformVersion; + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "--- GetS60PlatformVersion getting Version info"); + ret = VersionInfo::GetVersion(platformVersion, fsSession); + CleanupStack::PopAndDestroy(); // fsSession + if (ret == KErrNone) + { + aMajor = platformVersion.iMajorVersion; + aMinor = platformVersion.iMinorVersion; + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("--- GetS60PlatformVersion Version: Major [%d], Minor[%d]"), aMajor, aMinor)); + } + } + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("--- GetS60PlatformVersion returns [%d]"), ret)); + return ret; + } + +// On return, aMajor and aMinor contain the version information +TBool CSenHttpChannelImpl::IsOCCImplementedSDK() + { + TBool occ = EFalse; + // Obtain the version number + TUint major; + TUint minor; + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::IsOCCImplementedSDK()"))); + TInt ret = GetS60PlatformVersion(major, minor); + if (ret == KErrNone) + { + if(major == 5 && minor == 2) + { + occ = ETrue; + iOCCenabled = ETrue; + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("---- IsOCCImplementedSDK() returns TRUE"))); + } + else + { + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("---- IsOCCImplementedSDK() returns False"))); + } + } + return occ; + } +#endif + // Ask IAP from user void CSenHttpChannelImpl::ConstructL() { - // Open connection to the file logger server - TLSLOG_OPEN(KSenHttpChannelLogChannelBase, KSenHttpChannelLogLevel, KSenHttpChannelLogDir, KSenHttpChannelLogFile); - TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL - Log file opened"))); - + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL()"))); + // Open the RHTTPSession - TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("- Opening HTTP/TCP session."))); + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Opening HTTP/TCP session."))); iSess.OpenL(); // Store the string pool for this HTTP session iStringPool = iSess.StringPool(); - + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Calling InstallAuthenticationL()"))); // Install this class as the callback for authentication requests InstallAuthenticationL( iSess ); + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Completed InstallAuthenticationL()"))); //Install Proxy Filter iDeflateFilter = EFalse; #ifdef EKA2 //#ifndef _DEBUG + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Installing HTTPProxyFilter for EKA2 build."))); CHttpFilterProxyInterface::InstallFilterL( iSess ); + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - HTTPProxyFilter installed for EKA2 build."))); iSess.StringPool().OpenL(HttpFilterCommonStringsExt::GetLanguageTable()); iSess.StringPool().OpenL(HttpFilterCommonStringsExt::GetTable()); - - CHttpFilterAcceptHeaderInterface::InstallFilterL(iSess); - TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPProxyFilter installed for EKA2 build."); - TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPAcceptFilter installed for EKA2 build."); + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Installing HTTPAcceptProxyFilter for EKA2 build."))); + //CHttpFilterAcceptHeaderInterface::InstallFilterL(iSess); //There is issue with installing this filter. so disabling it temporarly + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - HTTPAcceptProxyFilter installed for EKA2 build."))); //#else // LOG_WRITE_L("HTTPProxyFilter is NOT in use with EKA2 debug builds."); //#endif #else // __INSTALL_HTTP_PROXY_FILTER__ is not defined by macro in .mmp - TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPProxyFilter is NOT in use with EKA1."); - TLSLOG_L(KSenHttpChannelLogChannelBase , KNormalLogLevel,"HTTPAcceptProxyFilter is NOT in use with EKA1."); + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"HTTPProxyFilter is NOT in use with EKA1."); + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"HTTPAcceptProxyFilter is NOT in use with EKA1."); #endif // __INSTALL_HTTP_PROXY_FILTER__ iTransObs = CSenHttpEventHandler::NewL(this);//, &iLog); @@ -162,10 +215,15 @@ new (ELeave) CArrayPtrFlat(KMinimumArrayGranularity); iBasicConnectionTries = 0; + +#ifndef __ENABLE_ALR__ + IsOCCImplementedSDK(); +#endif #ifdef _SENDEBUG ListFilters(); #endif // _SENDEBUG + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() Completed"))); } // Forces preselected IAP to be used! @@ -183,10 +241,14 @@ // Use local variable (new RSocketServer each time; handle is given to RHTTPSession via RConnectionInfo..) // RSocketServ server; // with "anon" (local) socket servers, should we keep array of open ones in case of pending txns? // SetIapPrefsL(aIapId, iConnection, server); - - const TInt result = SetIapPrefsL(aIapId, ETrue, iConnection, iSockServ); - User::LeaveIfError( result ); - +#ifndef __ENABLE_ALR__ + IsOCCImplementedSDK(); +#endif + if(aIapId > 0) + { + const TInt result = SetIapPrefsL(aIapId, ETrue, iConnection, iSockServ); + User::LeaveIfError( result ); + } } CSenHttpChannelImpl::~CSenHttpChannelImpl() @@ -223,137 +285,55 @@ iConnection.Close(); iSockServ.Close(); - - // Close the log file and the connection to the server. - TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("Log file closed."))); - TLSLOG_CLOSE(KSenHttpChannelLogChannelBase); + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::~CSenHttpChannelImpl() Completed"); } -// This function expects that RConnection has been connected -// and that RConnection has already been opened! -/* -void CSenHttpChannelImpl::SetIapPrefsL(TUint32 aIapId, - RConnection& aConnection, - RSocketServ& aSocketServer) - { +TInt CSenHttpChannelImpl::SetIapPrefsL( TUint32 aIapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer ) + { + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- SetIapPrefsL , aIapId (%d)"), aIapId)); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- SetIapPrefsL , iIapId (%d)"), iIapId)); + // Check whether IAP ID is not equal with the one that is currently in effect: - if(iExplicitIapDefined && iIapId == aIapId ) + if(iExplicitIapDefined || iIapId == aIapId && iIapId > 0) { - return; // nothing to do + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id is same as currently in effect"); + return KErrNone; } - - LOG_WRITEFORMAT((_L8("- SetIapPrefsL: Re-setting IAP ID (%d)"), aIapId)); + else + { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id different with the currently in effect"); + } + // Check if socket server (connection) is already open.. if( iExplicitIapDefined ) { // Socket server opened once before for some other IAP - LOG_WRITE_L("- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop"); + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop"); aConnection.Stop(); } else { - aConnection.Stop(); // prompted from user - iSess.DisconnectL(); - iSess.ConnectL(); - - // Connect to a socket server - LOG_WRITE_L("- SetIapPrefsL: Connecting to new socket server"); - User::LeaveIfError(aSocketServer.Connect()); - - // Open new connection - LOG_WRITE_L("- SetIapPrefsL: Opening new RConnection using the socket server."); - User::LeaveIfError(aConnection.Open(aSocketServer)); + if(aConnection.SubSessionHandle()) + { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Re-using existing RConnection => calling RConnection::Stop"); + aConnection.Stop(); + } + else + { + // Connect to a socket server + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Connecting to new socket server"); + User::LeaveIfError( aSocketServer.Connect() ); + + // Open new connection + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Opening new RConnection using the socket server."); + User::LeaveIfError( aConnection.Open(aSocketServer) ); + } } - // Set the IAP selection preferences (IAP ID, do not prompt) - TCommDbConnPref pref; - pref.SetIapId( aIapId ); - - TCommDbDialogPref dialogPref; - dialogPref = ECommDbDialogPrefDoNotPrompt; - pref.SetDialogPreference(dialogPref); - - // Start the connection with the new preferences - LOG_WRITE_L("- SetIapPrefsL: Calling RConnection::Start with new IAP prefs"); - aConnection.Start(pref); - - // Get the connection "handle" from the HTTP session - RHTTPConnectionInfo connInfo = iSess.ConnectionInfo(); - - // Attach socket server - connInfo.SetPropertyL(iStringPool.StringF( HTTP::EHttpSocketServ, - RHTTPSession::GetTable()), - THTTPHdrVal(aSocketServer.Handle())); - - // Attach connection - TInt connPtr = REINTERPRET_CAST(TInt, &aConnection); - connInfo.SetPropertyL(iStringPool.StringF( HTTP::EHttpSocketConnection, - RHTTPSession::GetTable()), - THTTPHdrVal(connPtr)); - - // Remember the IAP id that is being set; there is - // no direct API to query effective IAP ID from CommsDB. - iExplicitIapDefined = ETrue; - iIapId = aIapId; - } -*/ - - -/* -void CSenHttpChannelImpl::SetupConnectionWithIapPrefsL( TUint32 aIapId, - RConnection& aConnection, - RSocketServ& aSocketServer ) - { - // Check whether IAP ID is not equal with the one that is currently in effect: - if(iExplicitIapDefined && iIapId == aIapId ) - { - return; // nothing to do - } - - LOG_WRITEFORMAT((_L8("- SetIapPrefsL, IAP ID (%d)"), aIapId)); - - // Check if socket server (connection) is already open.. - if( iExplicitIapDefined ) - { - // Socket server opened once before for some other IAP - LOG_WRITE_L("- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop"); - aConnection.Stop(); - } - else - { - // Connect to a socket server - LOG_WRITE_L("- SetIapPrefsL: Connecting to new socket server"); - User::LeaveIfError( aSocketServer.Connect() ); - - // Open new connection - LOG_WRITE_L("- SetIapPrefsL: Opening new RConnection using the socket server."); - User::LeaveIfError( aConnection.Open(aSocketServer) ); - } - - // Set the IAP selection preferences (IAP ID, do not prompt) - TCommDbConnPref pref; - pref.SetIapId( aIapId ); - - TCommDbDialogPref dialogPref; - dialogPref = ECommDbDialogPrefDoNotPrompt; - pref.SetDialogPreference(dialogPref); - - // Start the connection with the new preferences - LOG_WRITE_L("- SetIapPrefsL: Calling RConnection::Start with new IAP prefs"); - aConnection.Start(pref); - } - - -void CSenHttpChannelImpl::AttachSocketServerAndConnectionWithHttpSession( TUint32 aIapId, - RConnection& aConnection, - RSocketServ& aSocketServer ) - { - if(iExplicitIapDefined && iIapId == aIapId ) - { - return; // nothing to do - } - + // Set the IAP selection preferences (IAP ID, do not prompt) + TInt retVal = SetID(aIapId, aDialogPref, aConnection, aSocketServer); + // Get the connection "handle" from the HTTP session RHTTPConnectionInfo connInfo = iSess.ConnectionInfo(); @@ -366,134 +346,198 @@ TInt connPtr = REINTERPRET_CAST(TInt, &aConnection); connInfo.SetPropertyL(iStringPool.StringF( HTTP::EHttpSocketConnection, RHTTPSession::GetTable()), - THTTPHdrVal(connPtr)); - - // Remember the IAP id that is being set, because *at the moment*, - // there is NO direct API to query effective IAP ID from CommsDB. - iExplicitIapDefined = ETrue; - iIapId = aIapId; - } - - -void CSenHttpChannelImpl::SetIapPrefsL( TUint32 aIapId, RConnection& aConnection, RSocketServ& aSocketServer ) - { - SetupConnectionWithIapPrefsL( aIapId, aConnection, aSocketServer ); - AttachSocketServerAndConnectionWithHttpSession( aIapId, aConnection, aSocketServer ); - } -*/ - - -TInt CSenHttpChannelImpl::SetIapPrefsL( TUint32 aIapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer ) - { - TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KNormalLogLevel, _L8("- SetIapPrefsL, IAP ID (%d)"), aIapId)); - - // Check whether IAP ID is not equal with the one that is currently in effect: - if(iExplicitIapDefined && iIapId == aIapId ) - { - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id is same as currently in effect"); - return KErrNone; - } - else - { - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Iap Id different with the currently in effect"); - } - - - // Check if socket server (connection) is already open.. - if( iExplicitIapDefined ) - { - // Socket server opened once before for some other IAP - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Re-using existing RConnection => calling RConnection::Stop"); - aConnection.Stop(); - } - else - { - // Connect to a socket server - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Connecting to new socket server"); - User::LeaveIfError( aSocketServer.Connect() ); - - // Open new connection - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Opening new RConnection using the socket server."); - User::LeaveIfError( aConnection.Open(aSocketServer) ); - } - - // Set the IAP selection preferences (IAP ID, do not prompt) - /* - *Single click connectivity feature has been implemented by CSock (RConnection class). - *According to this client no need to set the IAP ID. - *Automatically RConnection will use the suitable IAP - */ - - - TCommDbConnPref pref; - #ifndef __SINGLE_CLICK_CONNECTIVITY_ENABLED__ - pref.SetIapId( aIapId ); - #else - pref.SetIapId( 0 ); //By default IAP ID is "0". IAP selection will take care by RConnection - #endif //__SINGLE_CLICK_CONNECTIVITY_ENABLED__ - TCommDbDialogPref dialogPref; - - if (aDialogPref) - { - dialogPref = ECommDbDialogPrefDoNotPrompt; - } - else - { - dialogPref = ECommDbDialogPrefPrompt; - } - pref.SetDialogPreference(dialogPref); - - // Start the connection with the new preferences - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetIapPrefsL: Calling RConnection::Start with new IAP prefs"); - - TInt retVal =aConnection.Start(pref); - - TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("RConnection->Start retVal [%d]"), retVal)); - - // Get the connection "handle" from the HTTP session - RHTTPConnectionInfo connInfo = iSess.ConnectionInfo(); - - // Attach socket server - connInfo.SetPropertyL(iStringPool.StringF( HTTP::EHttpSocketServ, - RHTTPSession::GetTable()), - THTTPHdrVal(aSocketServer.Handle())); - - // Attach connection - TInt connPtr = REINTERPRET_CAST(TInt, &aConnection); - connInfo.SetPropertyL(iStringPool.StringF( HTTP::EHttpSocketConnection, - RHTTPSession::GetTable()), - THTTPHdrVal(connPtr)); - - // Remember the IAP id that is being set, because *at the moment*, - // there is NO direct API to query effective IAP ID from CommsDB. - if (!retVal) - { - #ifdef __SINGLE_CLICK_CONNECTIVITY_ENABLED__ - //Since we are using by default setIapId "0". - //There won't be any explicitly defined Iap Id - iExplicitIapDefined = EFalse; - iIapId = 0; - #else - iExplicitIapDefined = ETrue; - iIapId = aIapId; - #endif //__SINGLE_CLICK_CONNECTIVITY_ENABLED__ - } + THTTPHdrVal(connPtr)); return retVal; } + +TInt CSenHttpChannelImpl::SetID(TUint32 aId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer, TBool aSNAP) +{ + /* + * Single click connectivity feature has been implemented by CSock (RConnection class). + * According to this client no need to set the IAP ID. + * Automatically RConnection will use the suitable IAP + */ + TInt retVal = KErrNone; + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl called with ID [%d]"), aId)); + +#ifndef __ENABLE_ALR__ + if (iOCCenabled == EFalse) + { +#endif + if (aSNAP == EFalse) + { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- SetIAPID"); + TCommDbConnPref pref; + pref.SetIapId( aId ); + TCommDbDialogPref dialogPref; + if (aDialogPref) + { + dialogPref = ECommDbDialogPrefDoNotPrompt; + } + else + { + dialogPref = ECommDbDialogPrefPrompt; + } + pref.SetDialogPreference(dialogPref); + retVal = aConnection.Start(pref); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("RConnection->Start retVal [%d]"), retVal)); + } + else + { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- SetSNAPID"); + // Set the SNAP selection preferences (SNAP ID) + TConnSnapPref pref; + pref.SetSnap(aId); + // Start the connection with the new preferences + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Calling RConnection::Start with new SNAP prefs"); + TInt retVal = aConnection.Start(pref); + } +#ifndef __ENABLE_ALR__ + } + else + { + if (aSNAP == EFalse) + { + /* If IAP id is zero, it is interpreted as + * client's request for not requesting any specific IAP. + * Default value is 0. + * + * If IAP id is set, SNAP id shall be zero. + * If IAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown. + * If IAP id is set, Connection selection dialog shall be disabled. + * If IAP id is set, bearer set shall be EExtendedConnBearerUnknown. + * If IAP id is set, forced roaming is disabled automatically. + * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection + * selection dialog shall be enabled. + */ + + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC with IAP Settings"); + TConnPrefList prefList; + TExtendedConnPref extPrefs; + //extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown); + //TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC Silent Connection"); + //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent); + //extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown); + if(aId != 0) + { + extPrefs.SetIapId(aId); + extPrefs.SetSnapId(0); + } + else + { + extPrefs.SetSnapPurpose(CMManager::ESnapPurposeInternet); + extPrefs.SetConnSelectionDialog(ETrue); + } + prefList.AppendL(&extPrefs); + retVal = aConnection.Start(prefList); + if(retVal == KErrNone) + { + if(aId == 0) + { + aConnection.GetIntSetting( _L("IAP\\Id"), iIapId); + TName name; + retVal = aConnection.Name(name); + if(retVal == KErrNone) + { + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP Name [%S]"), &name)); + } + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("GetIntSetting returned IAP [%d]"), iIapId)); + } + else + { + iIapId = aId; + } + } + else + { + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP ->Start retVal [%d]"), retVal)); + } + } + else + { + /** + * Sets SNAP id. If SNAP id is zero, it is interpreted as + * client's request for not requesting any specific SNAP. + * Default value is 0. + * + * If SNAP id is set, IAP id shall be zero. + * If SNAP id is set, SNAP purpose shall be CMManager::ESnapPurposeUnknown. + * If SNAP id is set, Connection selection dialog shall be disabled. + * Either SNAP purpose, SNAP id, or IAP id shall be given, or Connection + * selection dialog shall be enabled. + */ + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC with SNAP Settings"); + TConnPrefList prefList; + TExtendedConnPref extPrefs; + //extPrefs.SetSnapPurpose( CMManager::ESnapPurposeUnknown); + //TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting up OCC Silent Connection"); + //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent); + //extPrefs.SetBearerSet(TExtendedConnBearer::EExtendedConnBearerUnknown); + if(aId == 0) + { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Setting SnapPurpose Internet"); + if(aDialogPref) //If it fails because of unavailibility of access points + { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "- Fails because of unavailibility of access points"); + extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown); + extPrefs.SetConnSelectionDialog(ETrue); + } + else + { + extPrefs.SetSnapPurpose(CMManager::ESnapPurposeInternet); + //extPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent); + } + } + else + { + extPrefs.SetSnapId(aId); + extPrefs.SetIapId(0); + extPrefs.SetSnapPurpose(CMManager::ESnapPurposeUnknown); + extPrefs.SetConnSelectionDialog(EFalse); + } + prefList.AppendL(&extPrefs); + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel, "SetID: RConnection Start"); + retVal = aConnection.Start(prefList); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("RConnection Start retval[%d]"), retVal)); + if(retVal == KErrNone) + { + aConnection.GetIntSetting( _L("IAP\\Id"), iIapId); + TName name; + retVal = aConnection.Name(name); + if(retVal == KErrNone) + { + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP Name [%S]"), &name)); + } + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("GetIntSetting returned IAP [%d]"), iIapId)); + } + else + { + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("SNAP ->Start retVal [%d]"), retVal)); + } + } + } +#endif + if (!retVal && !aSNAP) + { + iExplicitIapDefined = ETrue; + } + return retVal; +} + TInt CSenHttpChannelImpl::SetSnapPrefsL( TUint32 aSnapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer ) { TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- CSenHttpChannelImpl::SetSnapPrefsL, SNAP ID (%d)"), aSnapId)); // Check whether SNAP ID is not equal with the one that is currently in effect: - if(iExplicitIapDefined && iSnapId == aSnapId ) + if(iExplicitIapDefined && iSnapId == aSnapId) { TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Sanp is same as currently in effect"); return KErrNone; } - else - { - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Sanp is different with currently in effect"); - } - + else + { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Sanp is different with currently in effect"); + } + // Check if socket server (connection) is already open.. if( iExplicitIapDefined ) { @@ -503,22 +547,27 @@ } else { - // Connect to a socket server - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Connecting to new socket server"); - User::LeaveIfError( aSocketServer.Connect() ); - - // Open new connection - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Opening new RConnection using the socket server."); - User::LeaveIfError( aConnection.Open(aSocketServer) ); + if(aConnection.SubSessionHandle()) + { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Re-using existing RConnection => calling RConnection::Stop"); + aConnection.Stop(); + } + else + { + // Connect to a socket server + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Connecting to new socket server"); + User::LeaveIfError( aSocketServer.Connect() ); + + // Open new connection + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Opening new RConnection using the socket server."); + User::LeaveIfError( aConnection.Open(aSocketServer) ); + } } - // Set the SNAP selection preferences (SNAP ID) - TConnSnapPref pref; - pref.SetSnap(aSnapId); + + // Set the SNAP selection preferences (SNAP ID, do not prompt) + TInt retVal = SetID(aSnapId, aDialogPref, aConnection, aSocketServer, ETrue); - // Start the connection with the new preferences - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"- SetSnapPrefsL: Calling RConnection::Start with new SNAP prefs"); - TInt retVal = aConnection.Start(pref); TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- SetSnapPrefsL, RConnection::Start returned: (%d)"), retVal)); // Get the connection "handle" from the HTTP session @@ -539,7 +588,7 @@ // there is NO direct API to query effective SNAP ID from CommsDB. if (!retVal) { - iExplicitIapDefined = ETrue; + //iExplicitIapDefined = ETrue; iSnapId = aSnapId; } return retVal; @@ -669,42 +718,64 @@ RStringF method; TPtrC8 deflate; // Set IAP preferences, if such exist in properties (and not already in effect): - TUint32 iapId(KErrNone); - TBool doNotPrompt(ETrue); + TUint32 id(KErrNone); + TBool prompt(ETrue); - TInt retVal = aProps.IAPDialogL( doNotPrompt ); + TInt retVal = aProps.IAPDialogL( prompt ); if ( retVal != KErrNone ) { // by default, do not prompt (even if property does not exist!) // => only if property is set, and has value "FALSE", show PROMPT - doNotPrompt = ETrue; + prompt = ETrue; } - + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::InvokeHttpMethodL - iIapId [%d]"), iIapId)); +#ifndef __ENABLE_ALR__ + TInt propRetVal = aProps.IapIdL(id); // Independent of dialog preference (property's existance), if IAP was predefined, it must be set - if(((aProps.IapIdL(iapId)) == KErrNone)) + if(propRetVal == KErrNone) { - retVal = SetIapPrefsL(iapId, doNotPrompt, iConnection, iSockServ); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::InvokeHttpMethodL SetIapPrefs - id [%d]"), id)); + retVal = SetIapPrefsL(id, prompt, iConnection, iSockServ); } - else if(((aProps.SnapIdL(iapId)) == KErrNone)) + else if(iIapId > 0) { - retVal = SetSnapPrefsL(iapId, doNotPrompt, iConnection, iSockServ); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::InvokeHttpMethodL SetIapPrefs - iIapId [%d]"), iIapId)); + retVal = SetIapPrefsL(iIapId, prompt, iConnection, iSockServ); + } + else if(((aProps.SnapIdL(id)) == KErrNone)) + { + retVal = SetSnapPrefsL(id, prompt, iConnection, iSockServ); } else//to better control RConnection, we have to call Start by ourselve { retVal = SetSnapPrefsL(0, EFalse, iConnection, iSockServ); if(retVal == KErrNotFound) { - retVal = SetIapPrefsL(0, EFalse, iConnection, iSockServ); + if(iOCCenabled == EFalse) + { + retVal = SetIapPrefsL(0, EFalse, iConnection, iSockServ); + } + else + { + retVal = SetSnapPrefsL(0, prompt, iConnection, iSockServ); + } } } TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Set Snap/IAP prefs retVal [%d]"), retVal)); User::LeaveIfError(retVal); TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::InvokeHttpMethodL After User::Leave"); - TInt ret=iConnection.GetIntSetting(_L("IAP\\Id"), iUsedIapId); + //TInt ret= iConnection.GetIntSetting(_L("IAP\\Id"), iUsedIapId); + iUsedIapId = iIapId; // Check transport properties + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP/SNAP %d"), id)); +#else + retVal = SetIapPrefsL(id, prompt, iConnection, iSockServ); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP/SNAP %d"), id)); + iUsedIapId = id; +#endif + CSenLayeredHttpTransportProperties::TSenHttpMethod httpMethod; - TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("IAP %d"), iapId)); - TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("DONT PROMPT %d"), doNotPrompt)); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("PROMPT %d"), prompt)); TInt retValHttpMethod = aProps.HttpMethodL(httpMethod); @@ -1014,11 +1085,13 @@ // It is MANDATORY, that at least one Accept header TOKEN exists: if ( tokens.Count()==0 ) { + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::AddRequestHeadersL Default Token"))); TPtrC8* pDefaultToken = new (ELeave) TPtrC8( KSenHttpChannelAcceptHeaderDefault ); TInt error = tokens.Append( pDefaultToken ); if ( error ) { delete pDefaultToken; + pDefaultToken = NULL; } } // Http headers @@ -1050,8 +1123,7 @@ } TPtrC8 value = property->Value(); - TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- Adding HTTP HEADER, name: (%S), value: (%S)"), - &name, &value)); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("- Adding HTTP HEADER, name: (%S), value: (%S)"), &name, &value)); // Open stringpool strings RStringF headerName = iStringPool.OpenFStringL(name); @@ -1064,8 +1136,7 @@ // Check if the header field value already exists TBool fieldValueExists = EFalse; TInt fieldCount = aHeaders.FieldPartsL(headerName); - TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Header < %S > field count: %d"), &name, - fieldCount)); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Header < %S > field count: %d"), &name, fieldCount)); for(TInt j=0; j added"), - &name, &value)); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Header < %S: %S > added"),&name, &value)); } // Close stringpool strings @@ -1143,8 +1213,7 @@ { #ifdef _SENDEBUG const TDesC8& hValStr = hVal.StrF().DesC(); - TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Accept: %S"), - &hValStr)); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("Accept: %S"), &hValStr)); #endif // _SENDEBUG if(hVal == headerFieldVal) { @@ -1558,6 +1627,7 @@ void CSenHttpChannelImpl::HandleRunErrorL(RHTTPTransaction aTransaction, TInt aError) { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMaxLogLevel,"CSenHttpChannelImpl::HandleRunErrorL()"); TInt txnId = aTransaction.Id(); TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::HandleRunErrorL( %d ): %d"),txnId, aError)); CSenTxnState* pTxnState = FindTxnState(txnId); @@ -1568,6 +1638,7 @@ pTxnState->ResponseErrorL(aError); DeleteTxnState(txnId); aTransaction.Close(); + TLSLOG_L(KSenHttpChannelLogChannelBase , KMaxLogLevel,"CSenHttpChannelImpl::HandleRunErrorL() Completed"); } void CSenHttpChannelImpl::HandleRedirectRequiresConfirmationL( @@ -1875,19 +1946,25 @@ TBool CSenHttpChannelImpl::EffectiveIapId( TUint32 &aIapId ) { - TInt handle = iConnection.SubSessionHandle(); + /* + TInt handle = iConnection.SubSessionHandle(); if (handle>0) - { + { + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId(): Current RConnection's subsession handle(%d)"), handle )); TUint connEnum(0); TInt err = iConnection.EnumerateConnections(connEnum); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId - EnumerateConnections retVal [%d]"), err )); if (!err && !connEnum) { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::EffectiveIapId returns"); return EFalse; } - } - - TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId(): Current RConnection's subsession handle(%d)"), iIapId )); -#ifdef _SENDEBUG + } + else + { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel," -> RConnection has not been initialized."); + } + */ if( iExplicitIapDefined ) { TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8(" - IAP ID is known: %d"), iIapId )); @@ -1896,31 +1973,26 @@ { TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel," - IAP ID is not known."); } - - if( handle < KErrNone ) - { - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel," -> RConnection has not been initialized."); - } -#endif // _SENDEBUG - - if( handle && !iExplicitIapDefined ) - { + + if(/* handle && */!iExplicitIapDefined ) + { // Eventhough IAP was not explicitely set (through Serene API), this // code can check what IAP end-user provided via IAP selection dialog: TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::EffectiveIapId: about to call RConnection::GetIntSetting()"); - _LIT( KIapIdKey, "IAP\\Id" ); - iConnection.GetIntSetting( KIapIdKey, iIapId); - if ( iIapId > 0 ) - { - TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId(): end-user provided IAP(%d)"), iIapId )); - // Treat the end-user selection as "explicit" definition as well(!): - iExplicitIapDefined = ETrue; - } - } - if( iExplicitIapDefined ) - { - aIapId = iIapId; - } + //_LIT( KIapIdKey, "IAP\\Id" ); + //iConnection.GetIntSetting( KIapIdKey, iIapId); + if ( iIapId > 0 ) + { + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("---- GetIntSetting(): retuens IAP(%d)"), iIapId )); + // Treat the end-user selection as "explicit" definition as well(!): + iExplicitIapDefined = ETrue; + } + } + if( iExplicitIapDefined ) + { + aIapId = iIapId; + } + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpChannelImpl::EffectiveIapId() returns(%d)"), iExplicitIapDefined )); return iExplicitIapDefined; } @@ -1941,6 +2013,17 @@ { return iUsedIapId; } + +void CSenHttpChannelImpl::ResetIapId() + { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::ResetIapId()"); + iIapId = 0; //Reset to Zero in case of errors to enable other IAP + } + +void CSenHttpChannelImpl::ResetUsedIapId() + { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"CSenHttpChannelImpl::ResetUsedIapId()"); + iUsedIapId = 0; //Reset to Zero in case of errors to enable other IAP + } + // END OF FILE - - diff -r abb636afedf7 -r a1df79fa35b4 webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp --- a/webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -26,7 +26,7 @@ // INCLUDE FILES -#include +#include "SenServiceConnection.h" #include "senhttpchanneltransportplugin.h" #include "senhttpchannelimpl.h" #include "senhttpsyncrequester.h" @@ -48,9 +48,9 @@ #include "senservicesession.h" #include "senlogger.h" #include "senclientsession.h" -#include -#include -#include +#include +#include +#include @@ -104,7 +104,8 @@ iProperties(NULL), iConsumerMap(EFalse, ETrue), iSessionMap(EFalse, EFalse), // iConsumerMap deletes the txnIds (using same "new reserved" TInt here!) - iStatusCode(0) + iStatusCode(0), + iIsConnectionFailed(EFalse) { } @@ -115,12 +116,19 @@ iSessionMap.Reset(); delete iHttpChannel; + iHttpChannel = NULL; delete iRequester; + iRequester = NULL; delete iProperties; + iProperties = NULL; delete ipCtx; ipCtx = NULL; + // Close the log file and the connection to the server. + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("SenHttpChannel - Log file closed."))); + TLSLOG_CLOSE(KSenHttpChannelLogChannelBase); + TLSLOG(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,(_L("Got last data chunk."))); TLSLOG_CLOSE(KSenHttpChannelObserverLogChannelBase); } @@ -132,6 +140,10 @@ TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ConstructL(): log file opened."); TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ConstructL - Version 2 [2006-05-09]"); + // Open connection to the file logger server + TLSLOG_OPEN(KSenHttpChannelLogChannelBase, KSenHttpChannelLogLevel, KSenHttpChannelLogDir, KSenHttpChannelLogFile); + TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("SenHttpChannel - Log file opened"))); + if( ipCtx ) { // Attempt to find pre-defined IAP ID from transport context @@ -452,10 +464,29 @@ // Method to catch async error responses from httpchannel void CSenHttpChannelTransportPlugin::ResponseErrorL(TInt aRequestId, TInt aErrorCode, HBufC8* apErrorBody,CSenHttpTransportProperties* aHttpProperties) { + TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("CSenHttpChannelTransportPlugin::ResponseErrorL() - aErrorCode [%d]"), aErrorCode)); CleanupStack::PushL(apErrorBody); - iHttpChannel->DisableTimeOutL(aRequestId); + if( (aErrorCode < KErrNone) && (apErrorBody == NULL) || aErrorCode == KErrAbort) + { + TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResponseErrorL() Set iIsConnectionFailed True"); + iHttpChannel->ResetIapId(); + iHttpChannel->ResetUsedIapId(); + iHttpChannel->SetExplicitIapDefined(EFalse); + iIsConnectionFailed = ETrue; + TUint32 zeroIap = 0; + TBuf8<128> buf; + buf.AppendFormat(_L8("%u"), zeroIap); + LayeredPropertiesL().SetPropertyL(KIapIdLocalName, buf); //Reset the layered properties in case of wrong IAP + } + else + { + iHttpChannel->SetExplicitIapDefined(ETrue); + } + if(iHttpChannel) + { + iHttpChannel->DisableTimeOutL(aRequestId); + } #ifdef _SENDEBUG - TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResponseErrorL:"); TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KNormalLogLevel, _L8("- Request's txnID: %d"), aRequestId)); if ( apErrorBody ) { @@ -555,11 +586,12 @@ // ALWAYS HANDLE IAP ID FIRST, SINCE IT *CAN RESET* HTTPCHANNEL! TUint32 iapId(KErrNone); - retVal = LayeredPropertiesL().IapIdL(iapId); - if(retVal==KErrNone) + TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- CSenHttpChannelTransportPlugin::ApplyPropertiesL() - iapId [%d]"), iapId)); + TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- LayeredPropertiesL() retVal [%d]"), retVal)); + if(iIsConnectionFailed) { - TInt resetPerformed = ResetHttpChannelByIapIdL(iapId); + TInt resetPerformed = ResetHttpChannelByIapIdL(0); //Incase of connection error set Iap ID 0 #ifdef _SENDEBUG if(resetPerformed == KErrNone) { @@ -567,6 +599,16 @@ } #endif // _SENDEBUG } + else if(retVal==KErrNone) + { + TInt resetPerformed = ResetHttpChannelByIapIdL(iapId); +#ifdef _SENDEBUG + if(resetPerformed == KErrNone) + { + TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KNormalLogLevel, _L8("- IAP re-set performed: (%d)"), 0)); + } +#endif // _SENDEBUG + } // Handle ProxyHost and ProxyPort TPtrC8 proxyHost; @@ -608,6 +650,7 @@ TInt CSenHttpChannelTransportPlugin::ResetHttpChannelByIapIdL(TUint32 aIapId) { + TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResetHttpChannelByIapIdL()"); TUint32 effectiveIapId(KErrNone); TBool explicitIapIdDefined(EFalse); if(iHttpChannel) @@ -616,15 +659,16 @@ } TInt retVal(KErrNone); - if(!explicitIapIdDefined || explicitIapIdDefined && effectiveIapId != aIapId) + TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- explicitIapIdDefined[%d], effectiveIapId[%d], aIapId[%d]"), explicitIapIdDefined, effectiveIapId, aIapId)); + if(!explicitIapIdDefined || (explicitIapIdDefined && (effectiveIapId != aIapId) ) || iIsConnectionFailed) { TLSLOG_L(KSenHttpChannelObserverLogChannelBase,KMinLogLevel,"CSenHttpChannelTransportPlugin::ResetHttpChannel():"); - + iIsConnectionFailed = EFalse; delete iHttpChannel; iHttpChannel = NULL; delete iRequester; iRequester = NULL; - TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KNormalLogLevel, _L8("- New IAP ID: %d"), aIapId)); + TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("- New IAP ID: %d"), aIapId)); CSenHttpChannel* pHttpChannel = CSenHttpChannelImpl::NewL(iServiceManager, aIapId); CleanupStack::PushL(pHttpChannel); @@ -640,6 +684,7 @@ { retVal = KErrAlreadyExists; } + TLSLOG_FORMAT((KSenHttpChannelObserverLogChannelBase,KMinLogLevel, _L8("CSenHttpChannelTransportPlugin::ResetHttpChannelByIapIdL() - returns [%d]"), retVal)); return retVal; } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp --- a/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -90,7 +90,7 @@ { delete iContentType; delete iContent; - if (!isStopped) + if (!isStopped && iSchedulerWait.IsStarted()) { iSchedulerWait.AsyncStop(); } @@ -104,7 +104,10 @@ if (!isStopped) { iStatusCode = KErrTimedOut; - iSchedulerWait.AsyncStop(); + if (iSchedulerWait.IsStarted()) + { + iSchedulerWait.AsyncStop(); + } } isStopped = ETrue; } @@ -112,8 +115,11 @@ { if (!isStopped) { - iStatusCode = aError; - iSchedulerWait.AsyncStop(); + iStatusCode = aError; + if (iSchedulerWait.IsStarted()) + { + iSchedulerWait.AsyncStop(); + } } isStopped = ETrue; return aError; @@ -182,7 +188,7 @@ { iContent = apContent; // transfers ownership of content into _this_ class iContentType = ((HBufC8*)aContentType)->AllocL(); - if (!isStopped) + if (!isStopped && iSchedulerWait.IsStarted()) { iSchedulerWait.AsyncStop(); } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wshttpchanneltransportplugin/src/sentxnstate.cpp --- a/webservices/wshttpchanneltransportplugin/src/sentxnstate.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wshttpchanneltransportplugin/src/sentxnstate.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -163,10 +163,10 @@ TInt CSenTxnState::Cancel() { - if (iTimeOut) - iTimeOut->Cancel(); - ipTransaction.Cancel(); - return KErrNone; + if (iTimeOut) + iTimeOut->Cancel(); + ipTransaction.Cancel(); + return KErrNone; } void CSenTxnState::SetSession(RHTTPSession aSession) { diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsidentitymanager/src/sensecuritymechanismobserver.cpp --- a/webservices/wsidentitymanager/src/sensecuritymechanismobserver.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsidentitymanager/src/sensecuritymechanismobserver.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -83,7 +83,8 @@ TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"..calling IdentityManager.ReloadSenSecurityMechanismsL"); iOwner.ReloadSenSecurityMechanismsL(); iEcomSession.NotifyOnChange(iStatus); - SetActive(); + if(!IsActive()) + SetActive(); } } TInt CSenSenSecurityMechanismObserver::RunError(TInt /* aError */) @@ -100,7 +101,8 @@ void CSenSenSecurityMechanismObserver::Start() { - SetActive(); + if(!IsActive()) + SetActive(); iEcomSession.NotifyOnChange(iStatus); } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wslocaltransportplugin/src/senlocaltransportplugin.cpp --- a/webservices/wslocaltransportplugin/src/senlocaltransportplugin.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wslocaltransportplugin/src/senlocaltransportplugin.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -249,7 +249,8 @@ if(!pRequest->IsActive()) { TLSLOG_L(KSenLocalTransportLogChannelBase,KNormalLogLevel,"- Activating request / async call to the provider."); - pRequest->SetActive(); + if(!pRequest->IsActive()) + pRequest->SetActive(); } pRequest->iStatus = KRequestPending; TRequestStatus* status = &pRequest->iStatus; @@ -426,7 +427,8 @@ } iStatus = KRequestPending; - SetActive(); + if(!IsActive()) + SetActive(); } const TThreadId CSenLocalRequest::OwnerThreadId() const diff -r abb636afedf7 -r a1df79fa35b4 webservices/wslogger/group/senlogger.mmp --- a/webservices/wslogger/group/senlogger.mmp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wslogger/group/senlogger.mmp Fri Jun 11 14:42:58 2010 +0300 @@ -56,7 +56,6 @@ SYSTEMINCLUDE ../../inc MW_LAYER_SYSTEMINCLUDE -APP_LAYER_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY flogger.lib diff -r abb636afedf7 -r a1df79fa35b4 webservices/wslogger/src/senlogger.cpp --- a/webservices/wslogger/src/senlogger.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wslogger/src/senlogger.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -25,10 +25,8 @@ #include "senlogger.h" -//#include #include #include -#include namespace { @@ -49,7 +47,6 @@ EXPORT_C TInt CSenLogger::CreateL(TInt aChannel, TInt aLevel, const TDesC& aLogDir, const TDesC& aLogFileName, TFileLoggingMode aMode) { TInt index(KErrNotFound); - // CSenLogger* pSenLogger = (CSenLogger*)Dll::Tls(); CSenLogger* pSenLogger = NULL; TWsTls* tls = (TWsTls*)Dll::Tls(); if( !tls ) @@ -65,12 +62,11 @@ pSenLogger = new (ELeave) CSenLogger(); if ( pSenLogger ) { - // Dll::SetTls(pSenLogger); tls->iLogger = pSenLogger; pSenLogger->iCount = 0; //reading the configuration file for the logging levels!!! - /*the file has the following format + /*the file has the following format (IN ANSI) * ============================================================================== * LogChannel LogLevel 1000 0 @@ -92,74 +88,56 @@ RFs fs; res=fs.Connect(); if(res==KErrNone) + { + RFileReadStream readStream; + res=readStream.Open(fs, KPath, EFileRead|EFileStreamText); + if(res == KErrNone) { - - RFileReadStream readStream; - res=readStream.Open(fs,KPath,EFileRead|EFileStreamText); - if(res==KErrNone) - { - TInt error; - TBool result; - TInt retVal; - - CLineReader *readLine = CLineReader::NewL(readStream); - CleanupStack::PushL(readLine); - - do - { - result=readLine->ReadLineL(0,error); - - if(result==CLineReader::ELineHasContent) - { - - TInt *key = new (ELeave) TInt; - - - TLex8 lexBuf(readLine->iBufPtr); - retVal = lexBuf.Val(*key); - - if(retVal!=0) - { - delete key; - - continue; - } - else - { - TInt *value = new (ELeave) TInt; - - - lexBuf.SkipSpace(); - retVal=lexBuf.Val(*value); - if(retVal==0) - { - retVal = pSenLogger->iMap.Append(key,value); - if(retVal != KErrNone) - { - delete key; - delete value; - - } - - } - else - { - delete key; - delete value; - - } - - } - } - - }while(error!=KErrEof); - - CleanupStack::PopAndDestroy(readLine); - readStream.Close(); - } - - fs.Close(); - } + TInt error; + TInt retVal; + do + { + TBuf8<128> readLineBuf; + TRAP(error, readStream.ReadL(readLineBuf, (TChar)'\n')); + if(error == KErrNone) + { + TInt32 length(0); + length = readLineBuf.Length() ; + TInt *key = new (ELeave) TInt; + TLex8 lexBuf(readLineBuf); + retVal = lexBuf.Val(*key); + + if(retVal!=0) + { + delete key; + continue; + } + else + { + TInt *value = new (ELeave) TInt; + lexBuf.SkipSpace(); + retVal=lexBuf.Val(*value); + if(retVal==0) + { + retVal = pSenLogger->iMap.Append(key,value); + if(retVal != KErrNone) + { + delete key; + delete value; + } + } + else + { + delete key; + delete value; + } + } + } + }while(error == KErrNone); + readStream.Close(); + } + fs.Close(); + } } else { diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsmanager/src/rsenservicemanager.cpp --- a/webservices/wsmanager/src/rsenservicemanager.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsmanager/src/rsenservicemanager.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -272,7 +272,7 @@ TInt RSenServiceManager::IdentityProvidersL(CSenChunk& aSenChunk) { - TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::IdentityProvidersL"); + TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::IdentityProvidersL()"); TIpcArgs args; aSenChunk.ChunkToArgs(args, 0); @@ -284,7 +284,7 @@ TInt RSenServiceManager::ServiceDescriptionsByPatternL(CSenChunk& aSenChunk) { - TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern"); + TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::ServiceDescriptionsByPatternL()"); TIpcArgs args; aSenChunk.ChunkToArgs(args, 0); @@ -296,7 +296,7 @@ TInt RSenServiceManager::CredentialsL(CSenChunk& aSenChunk) { - TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern"); + TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::CredentialsL"); TIpcArgs args; aSenChunk.ChunkToArgs(args, 0); @@ -308,7 +308,7 @@ TInt RSenServiceManager::AddCredentialL(CSenChunk& aSenChunk) { - TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern"); + TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::AddCredentialL()"); TIpcArgs args; aSenChunk.ChunkToArgs(args, 0); @@ -320,7 +320,7 @@ TInt RSenServiceManager::RemoveCredentialsL(CSenChunk& aSenChunk) { - TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::GetServiceDescriptionsByPattern"); + TLSLOG_L(iTLSLogChannel, KMinLogLevel,"RSenServiceManager::RemoveCredentialsL()"); TIpcArgs args; aSenChunk.ChunkToArgs(args, 0); diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsmanager/src/senservicemanagerimpl.cpp --- a/webservices/wsmanager/src/senservicemanagerimpl.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsmanager/src/senservicemanagerimpl.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -180,6 +180,7 @@ */ TPtrC CSenServiceManagerImpl::NextChunkNameL() //Codescannerwarnings { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::NextChunkNameL"); if(ipChunkName) { iChunkNameNumber++; @@ -204,7 +205,6 @@ pos = chunkname.Find(KDash); } TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KNormalLogLevel , _L("CSenServiceManagerImpl::NextChunkNameL(): %S"), &chunkname)); - return chunkname; } else @@ -219,6 +219,7 @@ TInt CSenServiceManagerImpl::ServiceDescriptionsL(const TDesC8& aUri, RServiceDescriptionArray& aList) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ServiceDescriptionsL(aUri, aList)"); TInt retVal(KErrNone); TPtrC8 descriptions; @@ -242,12 +243,14 @@ } } CleanupStack::PopAndDestroy(pSenChunk); // Close chunk + TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::ServiceDescriptionsL(aUri, aList) returns [%d]"), retVal)); return retVal; } TInt CSenServiceManagerImpl::ServiceDescriptionsL(MSenServiceDescription& aSD, RServiceDescriptionArray& aList) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ServiceDescriptionsL(aSD, aList)"); TInt retVal(KErrNone); HBufC8* pPattern = aSD.AsXmlL(); @@ -278,12 +281,13 @@ // In any case, destroy the pattern as XML buffer: CleanupStack::PopAndDestroy(); // pPattern - + TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::ServiceDescriptionsL(aSD, aList) returns [%d]"), retVal)); return retVal; } TInt CSenServiceManagerImpl::RegisterServiceDescriptionL(MSenServiceDescription& aSD) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterServiceDescriptionL(aSD)"); // do not register if both endpoint and contract are // missing if(aSD.Endpoint().Length()==0 && aSD.Contract().Length()==0) @@ -323,7 +327,7 @@ // now register the XML string (descriptor) to WSF Symbian server: TInt retVal(iConnection.RegisterServiceDescription(ptr)); CleanupStack::PopAndDestroy(); // pAsXml - + TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::RegisterServiceDescriptionL(aSD) returns [%d]"), retVal)); return retVal; } } @@ -331,6 +335,7 @@ TInt CSenServiceManagerImpl::UnregisterServiceDescriptionL( MSenServiceDescription& aSD) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::UnregisterServiceDescriptionL(aSD)"); // do not unregister if both endpoint and contract are // missing if(aSD.Endpoint().Length()==0 && aSD.Contract().Length()==0) @@ -371,6 +376,7 @@ TPtr8 ptr = pAsXml->Des(); TInt retVal(iConnection.UnregisterServiceDescription(ptr)); CleanupStack::PopAndDestroy(); // pAsXml + TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::UnregisterServiceDescriptionL(aSD) returns [%d]"), retVal)); return retVal; } } @@ -378,16 +384,20 @@ TInt CSenServiceManagerImpl::RegisterIdentityProviderL( CSenIdentityProvider& aProvider) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterIdentityProviderL(aProvider)"); HBufC8* provider = aProvider.AsXmlL(); TPtr8 ptr = provider->Des(); TInt retVal = iConnection.RegisterIdentityProvider(ptr); delete provider; + provider = NULL; + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RegisterIdentityProviderL(aProvider) Completed"); return retVal; } TInt CSenServiceManagerImpl::UnregisterIdentityProviderL( CSenIdentityProvider& aProvider) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::UnregisterIdentityProviderL(aProvider)"); HBufC8* provider = aProvider.AsXmlL(); TPtr8 ptr = provider->Des(); TInt retVal(iConnection.UnregisterIdentityProvider(ptr)); @@ -398,6 +408,7 @@ TInt CSenServiceManagerImpl::AssociateServiceL(const TDesC8& aServiceID, const TDesC8& aProviderID) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AssociateServiceL(aServiceID, aProviderID)"); if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0) { return KErrArgument; @@ -411,6 +422,7 @@ TInt CSenServiceManagerImpl::DissociateServiceL(const TDesC8& aServiceID, const TDesC8& aProviderID) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::DissociateServiceL(aServiceID, aProviderID)"); if (aServiceID.Length() <= 0 || aProviderID.Length() <= 0) { return KErrArgument; @@ -668,6 +680,7 @@ RCredentialArray& aCredentials, RCredentialPropertiesArray& aCredentialProperties) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aCredentials, aCredentialProperties)"); TInt retVal(KErrNone); CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); @@ -685,6 +698,7 @@ RCredentialArray& aCredentials, RCredentialPropertiesArray& aCredentialProperties) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aIdP, aCredentials, aCredentialProperties)"); TInt retVal(KErrNone); TPtrC8 credentials; @@ -734,6 +748,7 @@ RCredentialArray& aCredentials, RCredentialPropertiesArray& aCredentialProperties) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aEndpoint, aUserName, aPassword, aCredentials, aCredentialProperties)"); TInt retVal(KErrNone); TPtrC8 credentials; @@ -780,6 +795,7 @@ RCredentialArray& aCredentials, RCredentialPropertiesArray& aCredentialProperties) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aCredentials, aCredentialProperties)"); TInt retVal(KErrNone); TPtrC8 credentials; @@ -870,6 +886,7 @@ RCredentialArray& aCredentials, RCredentialPropertiesArray& aCredentialProperties) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aIdP, aCredentials, aCredentialProperties)"); TInt retVal(KErrNone); TPtrC8 credentials; @@ -916,6 +933,7 @@ RCredentialArray& aCredentials, RCredentialPropertiesArray& aCredentialProperties) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::CredentialsL(aPattern, aUserName, aPassword, aCredentials, aCredentialProperties)"); TInt retVal(KErrNone); TPtrC8 credentials; @@ -963,6 +981,7 @@ const CSenIdentityProvider& aIdP, const CSenCredential2& aCredential) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aPattern, aIdP, aCredentials)"); TInt retVal(KErrNone); if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL) @@ -1004,6 +1023,7 @@ const CSenIdentityProvider& aIdP, const CSenCredential2& aCredential) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aEndpoint, aIdP, aCredentials)"); CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); pServDesc->SetEndPointL(aEndpoint); @@ -1019,6 +1039,7 @@ const CSenCredential2& aCredential, const CSenXmlProperties& aCredentialProperties) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aPattern, aIdP, aCredentials, aCredentialProperties)"); TInt retVal(KErrNone); if(&aPattern == NULL || &aIdP == NULL || &aCredential== NULL || &aCredentialProperties == NULL ) @@ -1067,6 +1088,7 @@ const CSenCredential2& aCredential, const CSenXmlProperties& aCredentialProperties) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::AddCredentialL(aEndpoint, aIdP, aCredentials, aCredentialProperties)"); CSenXmlServiceDescription* pServDesc = CSenXmlServiceDescription::NewLC(); pServDesc->SetEndPointL(aEndpoint); @@ -1079,10 +1101,12 @@ TInt CSenServiceManagerImpl::RemoveCredentialsL(const CSenIdentityProvider& aIdP) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aIdp)"); TInt retVal(KErrNone); if(&aIdP == NULL) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aIdp) returns KErrArgument"); return KErrArgument; } @@ -1104,12 +1128,13 @@ CleanupStack::PopAndDestroy(pIdPAsXml); + TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceManagerImpl::RemoveCredentialsL(aIdp) returns [%d]"), retVal)); return retVal; - } TInt CSenServiceManagerImpl::RemoveCredentialsL(const MSenServiceDescription& aPattern, const CSenIdentityProvider& aIdP) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aPattern, aIdP)"); TInt retVal(KErrNone); if(&aPattern == NULL || &aIdP == NULL) @@ -1146,6 +1171,7 @@ const TDesC8& aUserName, const TDesC8& aPassword) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::RemoveCredentialsL(aPattern, aUserName, aPassword)"); CSenIdentityProvider* pIdP = CSenIdentityProvider::NewLC(KIdentityProviderName); pIdP->SetUserInfoL(aUserName, aUserName, aPassword); @@ -1159,6 +1185,7 @@ TInt CSenServiceManagerImpl::IdentityProvidersL( RIdentityProviderArray& aList ) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::IdentityProvidersL(aList)"); TInt retVal(KErrNone); TPtrC8 descriptions; @@ -1173,6 +1200,7 @@ if(retVal == KErrNone) { retVal = ExtractIdentiyProvidersL(descriptions, aList); + TLSLOG_FORMAT((KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel , _L8("-ExtractIdentiyProvidersL returned [%d]"), retVal)); } } } @@ -1182,7 +1210,7 @@ TInt CSenServiceManagerImpl::ExtractIdentiyProvidersL(TPtrC8& aIdPs, RIdentityProviderArray& aList) { - TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL"); + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL(aIdPs, aList)"); TInt retVal(KErrNotFound); @@ -1276,10 +1304,15 @@ } } // END OF: if idp.Length() > 0 + else + { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::ExtractIdentiyProvidersL aIdPs(aIdPs, aList) aIdPs = 0 length"); + } return retVal; } TAny* CSenServiceManagerImpl::InterfaceByUid( TUid aUID ) { + TLSLOG_L(KSenServiceManagerLogChannelBase+iConnectionID, KMinLogLevel,"CSenServiceManagerImpl::InterfaceByUid(aUID)"); if ( aUID == KSenInterfaceUidInternalServiceManager ) { TLSLOG_FORMAT(( KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel , _L8("CSenServiceConnectionImpl::InterfaceByUid(%d) == KSenInterfaceUidInternalServiceManager" ), aUID.iUid )); diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsmessages/src/senatomentry.cpp --- a/webservices/wsmessages/src/senatomentry.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsmessages/src/senatomentry.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -27,7 +27,7 @@ #include #include -#include +#include #include "senatomentry.h" diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsmessages/src/senatomfeed.cpp --- a/webservices/wsmessages/src/senatomfeed.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsmessages/src/senatomfeed.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -25,7 +25,7 @@ #include #include -#include +#include #include "senatomfeed.h" #include "senatomentry.h" diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsmessages/src/senatommessage.cpp --- a/webservices/wsmessages/src/senatommessage.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsmessages/src/senatommessage.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -32,7 +32,7 @@ #include "sendebug.h" #include "senlogger.h" -#include +#include CSenAtomMessage::CSenAtomMessage() //:iTitle(NULL), iId(NULL), iUpdated(NULL), iPublished(NULL) diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsmessages/src/sensoapenvelope2.cpp --- a/webservices/wsmessages/src/sensoapenvelope2.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsmessages/src/sensoapenvelope2.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -27,7 +27,7 @@ #include #include -#include +#include #include "SenSoapEnvelope2.h" diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsmessages/src/sensoapfault2.cpp --- a/webservices/wsmessages/src/sensoapfault2.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsmessages/src/sensoapfault2.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -95,7 +95,7 @@ #include "SenSoapFault2.h" #include "SenSoapEnvelope2.h" -#include +#include EXPORT_C CSenSoapFault2* CSenSoapFault2::NewL( const TDesC8& aNsUri, diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsmessages/src/sensoapmessage2.cpp --- a/webservices/wsmessages/src/sensoapmessage2.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsmessages/src/sensoapmessage2.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -23,7 +23,7 @@ // INCLUDE FILES -#include +#include #include #include #include diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsmessages/src/sensoapmessagedom2.cpp --- a/webservices/wsmessages/src/sensoapmessagedom2.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsmessages/src/sensoapmessagedom2.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "SenWsSecurityHeader2.h" #include "sensoapmessagedom2.h" diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsmessages/src/senwssecurityheader2.cpp --- a/webservices/wsmessages/src/senwssecurityheader2.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsmessages/src/senwssecurityheader2.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -24,7 +24,7 @@ // INCLUDE FILES #include -#include +#include #include "SenWsSecurityHeader2.h" #include "sendebug.h" diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsnotifierplugins/group/sennotifierplugin.mmp --- a/webservices/wsnotifierplugins/group/sennotifierplugin.mmp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsnotifierplugins/group/sennotifierplugin.mmp Fri Jun 11 14:42:58 2010 +0300 @@ -118,7 +118,7 @@ SYSTEMINCLUDE ../../inc SYSTEMINCLUDE /epoc32/include/libc -SYSTEMINCLUDE /epoc32/include/uikon +//SYSTEMINCLUDE /epoc32/include/uikon SYSTEMINCLUDE /epoc32/include/ecom LIBRARY avkon.lib diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsnotifierplugins/src/sennotplugindlgimpl.cpp --- a/webservices/wsnotifierplugins/src/sennotplugindlgimpl.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsnotifierplugins/src/sennotplugindlgimpl.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -348,7 +348,8 @@ iStatus = KRequestPending; TRequestStatus* status = &iStatus; - SetActive(); + if(!IsActive()) + SetActive(); User::RequestComplete(status, KErrNone); DOLOG(_L("[ CSenNotPluginDlgImpl::StartL(aBuffer, aReturnVal, aMessage): Done ]")); diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsoviplugin/inc/wsovicons.h --- a/webservices/wsoviplugin/inc/wsovicons.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsoviplugin/inc/wsovicons.h Fri Jun 11 14:42:58 2010 +0300 @@ -164,6 +164,7 @@ _LIT8(KTTL,"TTL"); _LIT8(KTokenCreationTime,"TokenCreationTime"); + _LIT8(KTokenValidUntilTime,"TokenValidUntil"); _LIT8( KTokenSecret, "TokenSecret"); _LIT8( KToken, "Token"); _LIT8(KOnlySharing, "OnlySharing"); @@ -191,16 +192,18 @@ _LIT8(KTokenCreationResponseLocalName, "tokenCreationResponse"); _LIT8(KTokenSecretLocalName, "tokenSecret"); _LIT8(KTTLLocalName, "ttl"); + _LIT8(KExpiresLocalName, "expires"); _LIT8(KTokenInfoLocalName,"tokenInfo"); _LIT8(KErrorNode, "error"); _LIT8(KErrorCode, "errorCode"); _LIT8(KErrorText, "errorText"); _LIT8(KErrorCodeInvalidAccessToken, "invalidAccessToken"); _LIT8(KErrorCodeUnauthorized, "notAuthorized"); - _LIT8(KUserInfoLocalName,"userInfo"); _LIT8(KUserNameLocalName,"username"); - + _LIT8( KMobileUsed1, "Mobile number" ); + _LIT8( KMobileUsed2, "already used today" ); + _LIT8(KEmailUsed, "You have already a Nokia account associated with this mobile number or email address."); } #endif // CONSPLUGIN_H diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsoviplugin/inc/wsoviservicesession.h --- a/webservices/wsoviplugin/inc/wsoviservicesession.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsoviplugin/inc/wsoviservicesession.h Fri Jun 11 14:42:58 2010 +0300 @@ -32,9 +32,9 @@ #include "wsoviplugin.h" #include "senwebservicesession.h" #include "wsovisessionconsumer.h" -#include -#include -#include +#include +#include +#include class CWSOviCredentialObserver; class CSenHttpTransportProperties; @@ -50,6 +50,9 @@ _LIT8(KTokenCreationTimeTag, ""); _LIT8(KTokenCreationTimeEndTag, ""); _LIT8(KTokenCreationTimeLocalName, "TokenCreationTime"); + _LIT8(KTokenValidUntilTimeTag, ""); + _LIT8(KTokenValidUntilTimeEndTag, ""); + _LIT8(KTokenValidUntilTimeLocalName, "ValidUntil"); _LIT8(KTTLTag, ""); _LIT8(KTTLEndTag, ""); _LIT8(KTTLLocalName, "TTL"); diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsoviplugin/inc/wsovitokencreationresponse.h --- a/webservices/wsoviplugin/inc/wsovitokencreationresponse.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsoviplugin/inc/wsovitokencreationresponse.h Fri Jun 11 14:42:58 2010 +0300 @@ -74,6 +74,12 @@ TPtrC8 TTL(); /** +* Getter for validUntil +* @return validUntil +*/ +TPtrC8 ValidUntil(); + +/** * Getter for username * @return username */ @@ -104,7 +110,7 @@ HBufC8* iTTL; HBufC8* iUsername; TBool iIsTokenUpdate; - + HBufC8* iValidUntil; }; #endif /*WSOVITOKENCREATIONRESPONSE_H_*/ diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsoviplugin/src/wsovihandlercontext.cpp --- a/webservices/wsoviplugin/src/wsovihandlercontext.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsoviplugin/src/wsovihandlercontext.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -153,7 +153,10 @@ { if (aKey == HandlerContextKey::KSIF()) { - iWSOviPlugin = (CWSOviPlugin*)aValue; + if(aValue) + { + iWSOviPlugin = (CWSOviPlugin*)aValue; + } return KErrNone; } else if (aKey == HandlerContextKey::KLogger()) diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsoviplugin/src/wsovioauthclient.cpp --- a/webservices/wsoviplugin/src/wsovioauthclient.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsoviplugin/src/wsovioauthclient.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -40,6 +40,7 @@ #include "wsovitokencreationresponse.h" #include "sencryptoutils.h" #include "wsoviutils.h" +#include namespace { @@ -100,7 +101,7 @@ // CWSOviOAuthClient::~CWSOviOAuthClient() { - TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviOAuthClient::~CWSOviTrustClient"); + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviOAuthClient::~CWSOviOAuthClient"); delete iAuthSession; delete iBody; } @@ -530,7 +531,22 @@ else { iWSOviServiceSession->SetTrustAnchorL(iIdentityProvider->ProviderID()); - TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviOAuthClient::ValidateL - set ctx basing on response"); + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviOAuthClient::ValidateL - set ctx basing on response"); + + TPtrC8 validUntil = responseFragment->ValidUntil(); + if (validUntil.Length()) + { + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,validUntil); + User::LeaveIfError(iWSOviServiceSession->SessionContext()->Update(WSOviContextKeys::KTokenValidUntilTime,validUntil)); + } + else + { + TTime tmpValidUntil = Time::MaxTTime(); + TBuf8 pValidUntil; + SenDateUtils::ToXmlDateTimeUtf8L(pValidUntil, tmpValidUntil); + User::LeaveIfError(iWSOviServiceSession->SessionContext()->Update(WSOviContextKeys::KTokenValidUntilTime,pValidUntil)); + } + retVal = iWSOviServiceSession->SessionContext()->SetTokenKeysL(token); if (retVal) { @@ -719,6 +735,10 @@ void CWSOviOAuthClient::CreateBodyL(const TDesC8& aXmlNs, const TDesC8& aUsername, const TDesC8& aPassword, const TDesC8& aCreated) { + if(aPassword == KNullDesC8()) + { + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviOAuthClient::CreateBodyL() - aPassword == KNullDesC8"))); + } delete iBody; iBody = NULL; HBufC8* nonce = SenCryptoUtils::GetRandomNonceL(); diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsoviplugin/src/wsoviplugin.cpp --- a/webservices/wsoviplugin/src/wsoviplugin.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsoviplugin/src/wsoviplugin.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -76,12 +76,13 @@ // CWSOviPlugin::~CWSOviPlugin() { + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::~CWSOviPlugin()"))); iMsgHandlers.ResetAndDestroy(); iSessionHandlers.ResetAndDestroy(); iHandlerContexts.ResetAndDestroy(); iVersions.Reset(); iIMSI.Close(); - TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::~CWSOviPlugin()"))); + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::~CWSOviPlugin() Completed"))); } // --------------------------------------------------------------------------- @@ -90,7 +91,7 @@ // void CWSOviPlugin::ConstructL() { - TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::ConstructL"))); + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::ConstructL()"))); BaseConstructL(KFrameworkXMLNS, KFrameworkLocalName); //load default setup of handlers @@ -102,6 +103,7 @@ AddHandlerL(KSecurityValue, KNullDesC8, SenHandler::EMessageHandler); AddHandlerL(KEncoderValue, KNullDesC8, SenHandler::EMessageHandler); AddHandlerL(KServiceUpdateValue, KNullDesC8, SenHandler::ESessionHandler); + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviPlugin::ConstructL() Completed"))); } //======================================================== diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsoviplugin/src/wsoviregisterhandler.cpp --- a/webservices/wsoviplugin/src/wsoviregisterhandler.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsoviplugin/src/wsoviregisterhandler.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -51,15 +51,18 @@ // Destructor CWSOviRegisterHandler::~CWSOviRegisterHandler() { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviRegisterHandler::~CWSOviRegisterHandler()"); } // Second phase construction. void CWSOviRegisterHandler::ConstructL() { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviRegisterHandler::ConstructL()"); } TInt CWSOviRegisterHandler::InvokeL(MSenSessionContext& aCtx) { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviRegisterHandler::InvokeL()"); MSenServiceDescription& pServiceDescription = *(MSenServiceDescription*)aCtx.GetSenWSDescriptionL(WSOviContextKeys::KServiceDescription()); const TDesC8* action = aCtx.GetDesC8L(WSOviContextKeys::KRegisterAction()); TInt result(KErrNone); @@ -148,6 +151,7 @@ TInt CWSOviRegisterHandler::UnregisterServiceDescriptionL( MSenServiceDescription& aServiceDescription) { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviRegisterHandler::UnregisterServiceDescriptionL()"); TInt retval(KErrNone); CWSOviServiceSession *pSession = NULL; TPtrC8 contract = aServiceDescription.Contract(); @@ -268,13 +272,13 @@ if(aServiceDescription->DescriptionClassType() == MSenServiceDescription::EOviOAuthClient) { - TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviRegisterHandler::CWSOviRegisterHandler - This ServiceDescription is already an NAUTH Client"))); + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviRegisterHandler::UnRegisterAuthClientL - This ServiceDescription is already an NAUTH Client"))); pAuthClient = (CWSOviOAuthClient*)aServiceDescription; retval = iHandlerContext.GetSenCoreServiceManager()->RemoveServiceDescriptionL(*pAuthClient); } else { - + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSOviRegisterHandler::UnRegisterAuthClientL - This ServiceDescription is not NAUTH Client"))); pSession = CWSOviServiceSession::NewLC(*(CSIF*)iHandlerContext.GetAnyL(HandlerContextKey::KSIF())); retval = pSession->InitializeFromL(*aServiceDescription); if(retval != KErrNone) diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsoviplugin/src/wsoviservicesession.cpp --- a/webservices/wsoviplugin/src/wsoviservicesession.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsoviplugin/src/wsoviservicesession.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -30,7 +30,7 @@ #include "sendebug.h" #include "senwspattern.h" #include "SenXmlUtils.h" -#include +#include #include #include #include "wsovicredentialobserver.h" @@ -63,6 +63,7 @@ CWSOviServiceSession::~CWSOviServiceSession() { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::~CWSOviServiceSession()"); delete iSessionContext; delete iProviderID; delete iTrustAnchor; @@ -90,6 +91,7 @@ void CWSOviServiceSession::ConstructL() { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::ConstructL()"); CSenWebServiceSession::ConstructL(); iTokenObs = CWSOviCredentialObserver::NewL(this,iFramework.Manager().Log()); } @@ -263,8 +265,9 @@ TPtrC8 thisProviderID = ProviderID(); if(patternProviderID.Length()>0) { - if(!(thisProviderID.Length()>0 && patternProviderID == thisProviderID)) + if( !(thisProviderID.Length()>0 && patternProviderID == thisProviderID) ) { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::Matches() - Provider Id not same returning EFalse"); return EFalse; } } @@ -550,12 +553,27 @@ const TDesC8* message = iOutContext->GetDesC8L(WSOviContextKeys::KMessageBody); if (message) { + TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("CWSOviServiceSession::SubmitL() - Request")); + TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************")); + TLSLOG_ALL(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMaxLogLevel , *message); + TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************")); + retVal = transport.SubmitL(Endpoint(), *message, *utfTP, aResponse, aConsumer); } else { + TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("CWSOviServiceSession::SubmitL() - Request")); + TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************")); + TLSLOG_ALL(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMaxLogLevel , aMessage); + TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************")); + retVal = transport.SubmitL(Endpoint(), aMessage, *utfTP, aResponse, aConsumer); - } + } + + TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("CWSOviServiceSession::SubmitL() - Response")); + TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************")); + TLSLOG_ALL(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMaxLogLevel , *aResponse); + TLSLOG(KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel, _L8("********************************************")); MSenProperties& prop = transport.PropertiesL(); ((CWSOviPlugin&)iFramework).ProcessInboundDispatchL(this, retVal, aResponse, &prop ); @@ -588,6 +606,7 @@ void CWSOviServiceSession::AdaptEndpointL(TBool aToOrginal) { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase,KMinLogLevel ,"CWSOviServiceSession::AdaptEndpointL"); TPtrC8 oldEndpoint = Endpoint(); if (aToOrginal) { @@ -633,11 +652,16 @@ +oldEndpoint.Length()); TPtr8 ptrNewEp = newEp->Des(); ptrNewEp.Append(oldEndpoint); - ptrNewEp.Append(suffixEndpoint); + TInt retVal = oldEndpoint.Find(suffixEndpoint); + if(retVal == KErrNotFound) + { + ptrNewEp.Append(suffixEndpoint); + } SetEndPointL(*newEp); CleanupStack::PopAndDestroy(newEp); } } + TLSLOG_L(KSenCoreServiceManagerLogChannelBase,KMinLogLevel ,"CWSOviServiceSession::AdaptEndpointL Completed"); } CSenIdentityProvider* CWSOviServiceSession::IdentityProviderFromCoreL( const TDesC8& aProviderID) @@ -695,11 +719,12 @@ MSenRemoteServiceConsumer& aConsumer, MSenProperties* aResponseTransportProperties) { + TLSLOG_L(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMinLogLevel,"CWSOviServiceSession::SendToConsumerL()"); ((CWSOviPlugin&)iFramework).ProcessInboundDispatchL(this, KErrNone, aMessage, aResponseTransportProperties); - TLSLOG_L(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMinLogLevel,"CWSOviServiceSession::ParseMessageL(CSenSoapMessage& )"); iRenewCounter = 0; iRetryCounter = 0; - return aConsumer.HandleMessageL( aMessage, aTxnId, aResponseTransportProperties ); + TInt retVal = aConsumer.HandleMessageL( aMessage, aTxnId, aResponseTransportProperties ); + return retVal; } TInt CWSOviServiceSession::SendErrorToConsumerL( const TInt aErrorCode, @@ -709,7 +734,7 @@ MSenProperties* aResponseTransportProperties ) { TLSLOG_L(KSenClientSessionLogChannelBase+aConsumer.ConnectionId() , KMinLogLevel,"CWSOviServiceSession::SendErrorToConsumerL"); - TLSLOG_FORMAT((KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KNormalLogLevel , _L8("- ErrorCode: %d"), aErrorCode )); + TLSLOG_FORMAT((KSenClientSessionLogChannelBase+aConsumer.ConnectionId(), KMinLogLevel , _L8("- ErrorCode: %d"), aErrorCode )); ((CWSOviPlugin&)iFramework).ProcessInboundDispatchL(this, aErrorCode, apError, aResponseTransportProperties); TInt answer = CanHandleErrorL(); if (answer) @@ -841,6 +866,11 @@ { User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenCreationTime, pElement->Content())); } + pElement = xmlSdAsElement.Element(WSOviSession::KTokenValidUntilTimeLocalName); + if(pElement) + { + User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenValidUntilTime, pElement->Content())); + } pElement = xmlSdAsElement.Element(WSOviSession::KTTLLocalName); if(pElement) { @@ -877,6 +907,11 @@ { User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenCreationTime, value)); } + retVal = properties.PropertyL(WSOviSession::KTokenValidUntilTimeLocalName, value); + if ( retVal == KErrNone ) + { + User::LeaveIfError(iSessionContext->Add(WSOviContextKeys::KTokenValidUntilTime, value)); + } retVal = properties.PropertyL(WSOviSession::KTTLLocalName, value); if ( retVal == KErrNone ) { @@ -914,7 +949,12 @@ if ( pValue ) { properties.SetPropertyL(WSOviSession::KTokenCreationTimeLocalName(), *pValue); - } + } + pValue = iSessionContext->GetDesC8L(WSOviContextKeys::KTokenValidUntilTime); + if ( pValue ) + { + properties.SetPropertyL(WSOviSession::KTokenValidUntilTimeLocalName(), *pValue); + } pValue = iSessionContext->GetDesC8L(WSOviContextKeys::KTTL); if ( pValue ) { @@ -961,6 +1001,13 @@ aWriteStream.WriteL(*value); aWriteStream.WriteL(WSOviSession::KTokenCreationTimeEndTag); } + value = iSessionContext->GetDesC8L(WSOviContextKeys::KTokenValidUntilTime); + if (value) + { + aWriteStream.WriteL(WSOviSession::KTokenValidUntilTimeTag); + aWriteStream.WriteL(*value); + aWriteStream.WriteL(WSOviSession::KTokenValidUntilTimeEndTag); + } value = iSessionContext->GetDesC8L(WSOviContextKeys::KTTL); if (value) { @@ -1157,6 +1204,7 @@ TInt CWSOviServiceSession::ShareTokenWithL( CWSOviServiceSession* aWSOviSessionDst) { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::ShareTokenWithL()"); TInt error(KErrNone); if ( !HasSecurity() ) { @@ -1176,22 +1224,27 @@ } else { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::ShareTokenWithL() returning KErrNotFound"); return KErrNotFound; } } void CWSOviServiceSession::AddCredentialL( const TDesC8& aSecurity, TTime aValidUntil ) { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aSecurity, aValidUntil)"); iValidUntil = aValidUntil; SetSecurityL(aSecurity); SetStatusL(); + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aSecurity, aValidUntil) Completed"); } void CWSOviServiceSession::AddCredentialL(RSenCredentialPtr aCredentialPtr, TTime aValidUntil) { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aCredentialPtr, aValidUntil)"); iValidUntil = aValidUntil; SetCredentialPtrL(aCredentialPtr); // Share same Credential between multiple Sessions //codescannerwarnings SetStatusL(); + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CWSOviServiceSession::AddCredentialL(aCredentialPtr, aValidUntil) Completed"); } TBool CWSOviServiceSession::AmIHostletSession() @@ -1358,6 +1411,7 @@ { iSessionContext->Remove(WSOviContextKeys::KToken); iSessionContext->Remove(WSOviContextKeys::KTokenCreationTime); + iSessionContext->Remove(WSOviContextKeys::KTokenValidUntilTime); iSessionContext->Remove(WSOviContextKeys::KTTL); iSessionContext->Remove(WSOviContextKeys::KTokenSecret); } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsoviplugin/src/wsoviserviceupdatehandler.cpp --- a/webservices/wsoviplugin/src/wsoviserviceupdatehandler.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsoviplugin/src/wsoviserviceupdatehandler.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -32,6 +32,8 @@ #include #include #include "senlayeredhttptransportproperties.h" +#include + using namespace OAuth; @@ -139,7 +141,17 @@ { pCtx.Add(WSOviContextKeys::KServiceSession, *(MSenRemoteServiceSession*)remoteServiceSession); } - pCtx.Update(WSOviContextKeys::KReAuthNeeded, ETrue); + if( ! errFragment->Text().Compare(WSOviResponse::KEmailUsed()) || + (errFragment->Text().Compare(WSOviResponse::KMobileUsed1)!= KErrNotFound && + errFragment->Text().Compare(WSOviResponse::KMobileUsed2) != KErrNotFound ) + ) + { + pCtx.Update(WSOviContextKeys::KRetryNeeded, EFalse); + } + else + { + pCtx.Update(WSOviContextKeys::KReAuthNeeded, ETrue); + } oviServiceSession->ClearCredentialL(); oviServiceSession->SetStatusL();//in order to compute state } @@ -206,6 +218,20 @@ } else { + TPtrC8 validUntil = responseFragment->ValidUntil(); + if (validUntil.Length()) + { + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,validUntil); + User::LeaveIfError(pCtx.Update(WSOviContextKeys::KTokenValidUntilTime,validUntil)); + } + else + { + TTime tmpValidUntil = Time::MaxTTime(); + TBuf8 pValidUntil; + SenDateUtils::ToXmlDateTimeUtf8L(pValidUntil, tmpValidUntil); + User::LeaveIfError(pCtx.Update(WSOviContextKeys::KTokenValidUntilTime,pValidUntil)); + } + pCtx.SetTokenKeysL(token); } } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsoviplugin/src/wsovisessioncontext.cpp --- a/webservices/wsoviplugin/src/wsovisessioncontext.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsoviplugin/src/wsovisessioncontext.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -379,6 +379,12 @@ error = aWSOviSessionCtxDst->Update(KTokenCreationTime, *desc); if (error) return error; } + desc = GetDesC8L(KTokenValidUntilTime); + if (desc) + { + error = aWSOviSessionCtxDst->Update(KTokenValidUntilTime, *desc); + if (error) return error; + } desc = GetDesC8L(KTTL); if (desc) { diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsoviplugin/src/wsovitokencreationresponse.cpp --- a/webservices/wsoviplugin/src/wsovitokencreationresponse.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsoviplugin/src/wsovitokencreationresponse.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -45,8 +45,7 @@ // Second phase construction. void CWSOviTokenCreationResponse::ConstructL() { - CSenBaseFragment::BaseConstructL(TPtrC8(NULL,0), - KTokenCreationResponseLocalName); + CSenBaseFragment::BaseConstructL(TPtrC8(NULL,0), KTokenCreationResponseLocalName); } void CWSOviTokenCreationResponse::StartElementL(const TDesC8& /*aNsUri*/, @@ -78,14 +77,18 @@ { iState = KStateSave; } - else if (aLocalName == KTokenLocalName) - { - iState = KStateSave; - } - else if (aLocalName == KTTLLocalName) - { - iState = KStateSave; - } + else if (aLocalName == KTokenLocalName) + { + iState = KStateSave; + } + else if (aLocalName == KTTLLocalName) + { + iState = KStateSave; + } + else if (aLocalName == KExpiresLocalName) + { + iState = KStateSave; + } break; } case KStateParsingUserInfo: @@ -154,6 +157,21 @@ ResetContentL(); iState = KStateParsingTokenInfo; } + else if (aLocalName == KExpiresLocalName) + { + if(iValidUntil) + { + delete iValidUntil; + iValidUntil = NULL; + } + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"WSOviTokenCreationResponse::expires parsing"); + TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("iValidUntil : %S"), &content)); + + iValidUntil = content.AllocL(); + + ResetContentL(); + iState = KStateParsingTokenInfo; + } else if ( aLocalName == KUserNameLocalName) { if (iUsername) @@ -202,6 +220,7 @@ delete iTokenSecret; delete iTTL; delete iUsername; + delete iValidUntil; } TPtrC8 CWSOviTokenCreationResponse::Token() @@ -240,6 +259,18 @@ } } +TPtrC8 CWSOviTokenCreationResponse::ValidUntil() + { + if (iValidUntil) + { + return *iValidUntil; + } + else + { + return KNullDesC8(); + } + } + TPtrC8 CWSOviTokenCreationResponse::Username() { if (iUsername) diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsstar/wsstarmessagehandlers/src/wsstarmessageutils.cpp --- a/webservices/wsstar/wsstarmessagehandlers/src/wsstarmessageutils.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsstar/wsstarmessagehandlers/src/wsstarmessageutils.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -25,7 +25,7 @@ #include "wsstarmessageutils.h" -#include +#include CSenElement* CWSStarMessageUtils::GetMarkedElementL(CSenElement& aParent, const TDesC8& aValue, TBool aAttribute) diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsstar/wsstarplugin/inc/wsstarservicesession.h --- a/webservices/wsstar/wsstarplugin/inc/wsstarservicesession.h Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsstar/wsstarplugin/inc/wsstarservicesession.h Fri Jun 11 14:42:58 2010 +0300 @@ -35,9 +35,9 @@ #include "wsstarplugin.h" #include "senwebservicesession.h" #include "wsstarsessionconsumer.h" -#include -#include -#include +#include +#include +#include #include "sensoapmessagedom2.h" class CWSStarCredentialObserver; diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsstar/wsstarplugin/src/wsstarplugin.cpp --- a/webservices/wsstar/wsstarplugin/src/wsstarplugin.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsstar/wsstarplugin/src/wsstarplugin.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -754,7 +754,7 @@ TInt count = iMsgHandlers.Count(); for(TInt i=0;iName() == aCue) + if( iMsgHandlers[i] && (iMsgHandlers[i]->Name() == aCue) ) { delete iMsgHandlers[i]; iMsgHandlers.Remove(i); @@ -764,7 +764,7 @@ count = iSessionHandlers.Count(); for(TInt i=0;iName() == aCue) + if( iSessionHandlers[i] && (iSessionHandlers[i]->Name() == aCue) ) { delete iSessionHandlers[i]; iSessionHandlers.Remove(i); @@ -789,13 +789,15 @@ { CWSStarPolicyHandler* policyHandler = (CWSStarPolicyHandler*)Handler(WSStarConfig::KPolicyValue); pSessionValidateCtx = CWSStarSessionContext::NewLC(Manager().XMLReader(), &aPattern, policyHandler); - pSessionValidateCtx->Add(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession); + if(pSessionValidateCtx) + pSessionValidateCtx->Add(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession); ((CWSStarServiceSession*)aRemoteServiceSession)->SetSessionContext(pSessionValidateCtx); CleanupStack::Pop(pSessionValidateCtx); } else { - pSessionValidateCtx->Update(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession); + if(pSessionValidateCtx) + pSessionValidateCtx->Update(WSStarContextKeys::KServiceSession(), *(MSenRemoteServiceSession*)aRemoteServiceSession); } TInt error(KErrNone); TRAPD(errorL, error = pSTShandler->InvokeL(*pSessionValidateCtx)); @@ -841,9 +843,7 @@ aErrorMessage = pNotOwnedErrorMsg->AllocL(); } } - - - + if (cberrorL!=KErrNone) { TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("CWSStarPlugin::ProcessOutboundValidationL() !!!!leave from validate handler"))); @@ -1051,7 +1051,8 @@ CSenGuidGen* pGuidGenerator = CSenGuidGen::NewLC(); delete iDeviceId; iDeviceId = NULL; - iDeviceId = pGuidGenerator->GetRandomGuid8LC(); + if(pGuidGenerator) + iDeviceId = pGuidGenerator->GetRandomGuid8LC(); TPtr8 deviceIdDes = iDeviceId->Des(); deviceIdDes.LowerCase(); CleanupStack::Pop(iDeviceId); diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsstar/wsstarplugin/src/wsstarservicesession.cpp --- a/webservices/wsstar/wsstarplugin/src/wsstarservicesession.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsstar/wsstarplugin/src/wsstarservicesession.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -33,7 +33,7 @@ #include "sencryptoutils.h" #include "senwspattern.h" #include "SenXmlUtils.h" -#include +#include #include #include "wsstarcredentialobserver.h" diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsstar/wsstarpolicy/src/seninternalwspolicy.cpp --- a/webservices/wsstar/wsstarpolicy/src/seninternalwspolicy.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsstar/wsstarpolicy/src/seninternalwspolicy.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -40,7 +40,7 @@ //#include "Attribute.h" #endif -#include +#include using namespace Xml; using namespace SenWSInternalPolicy; namespace diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsstar/wsstarpolicy/src/senwspolicymanager.cpp --- a/webservices/wsstar/wsstarpolicy/src/senwspolicymanager.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsstar/wsstarpolicy/src/senwspolicymanager.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -46,7 +46,7 @@ #include -#include +#include using namespace WSPolicy; using namespace SenWSInternalPolicy; namespace diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsstar/wsstarpolicy/src/wspolicy.cpp --- a/webservices/wsstar/wsstarpolicy/src/wspolicy.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsstar/wsstarpolicy/src/wspolicy.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -25,7 +25,7 @@ // INCLUDE FILES #include "wspolicy.h" #include -#include +#include #include #include "senguidgen.h" #include "SenXmlElement.h" diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsutils/group/senutils.mmp --- a/webservices/wsutils/group/senutils.mmp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsutils/group/senutils.mmp Fri Jun 11 14:42:58 2010 +0300 @@ -79,10 +79,7 @@ USERINCLUDE ../../wsdescription/inc // removes warning.. USERINCLUDE ../../wsxml/inc //senxmldebug.h -//SYSTEMINCLUDE ../../wsServiceDescription/inc // removes warning.. - MW_LAYER_SYSTEMINCLUDE -APP_LAYER_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY hash.lib @@ -90,7 +87,8 @@ LIBRARY efsrv.lib // TVolumeInfo => hostid for CMD5 based UUID (URN) generation LIBRARY flogger.lib LIBRARY bafl.lib // RStringbase -LIBRARY imut.lib // for base64 encoding +LIBRARY inetprotutil.lib // for base64 encoding + // WSF libraries #ifndef RD_SEN_COMPILE_SIS_PACKAGE_FILES LIBRARY SenLogger.lib // for TLS based logging diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsutils/src/sencryptoutils.cpp --- a/webservices/wsutils/src/sencryptoutils.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsutils/src/sencryptoutils.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -22,16 +22,13 @@ - - +#include +#include #include "sencryptoutils.h" -#include #include "senguidgen.h" -#include -#include -#include +#include "SenDomFragment.h" +#include "SenNameSpace.h" #include "SenWsSecurityHeader.h" -//#include "senxmldebug.h" namespace { @@ -90,57 +87,46 @@ { return NULL; } - - TInt remainder = aData.Length() % KToBase64CoefficientNominative; - TInt length = aData.Length() * KToBase64CoefficientNumerator; - length /= KToBase64CoefficientNominative; - if (remainder) - { - length++; - length += KToBase64CoefficientNominative - remainder; - } - - HBufC8* buffer = HBufC8::NewLC(length); - - - TImCodecB64 base64Codec; - base64Codec.Initialise(); - TPtr8 des = buffer->Des(); // don't blame me, it's the compiler's fault - base64Codec.Encode(aData, des); - - CleanupStack::Pop(buffer); + TInt length = aData.Length(); + TInt destLen = (length + 1 ) * 2; + HBufC8* buffer = HBufC8::NewMaxL(destLen); + TInt test = buffer->Des().Length(); + TPtr8 encodedPtr(buffer->Des()); + TBase64 base64Codec; + TInt error = base64Codec.Encode(aData, encodedPtr); + if(error > 1) //There is a problem in encoding always returns 1 + { + delete buffer; + buffer = NULL; + } + else + { + //Successful encoding + } return buffer; } EXPORT_C HBufC8* SenCryptoUtils::DecodeBase64L(const TDesC8& aData) { - const TUint8 KBase64Fill = '='; - - TInt length = aData.Length(); - if (aData[length-1] == KBase64Fill) - { - length--; - if (aData[length-2] == KBase64Fill) - { - length--; - } - } - length *= KToBase64CoefficientNominative; - length /= KToBase64CoefficientNumerator; - if (length <= 0) - { - return NULL; - } - - HBufC8* buffer = HBufC8::NewLC(length); - - TImCodecB64 base64Codec; - base64Codec.Initialise(); - TPtr8 des = buffer->Des(); // don't blame me, it's the compiler's fault - - base64Codec.Decode(aData, des); - - CleanupStack::Pop(buffer); + TInt data_len = aData.Length(); + HBufC8* buffer = NULL; + if (data_len > 0) + { + buffer = aData.AllocL(); + buffer->Des().Zero(); //added + TPtr8 des( buffer->Des() ); + TBase64 base64Codec; +// if (base64Codec.Decode(aData,des) != EFalse) +// { +// //Successful decoding +// } +// else +// { +// delete buffer; +// buffer = NULL; +// } + base64Codec.Decode(aData, des); + } return buffer; } diff -r abb636afedf7 -r a1df79fa35b4 webservices/wsutils/src/senxmlproperties.cpp --- a/webservices/wsutils/src/senxmlproperties.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/webservices/wsutils/src/senxmlproperties.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -339,8 +339,14 @@ CSenXmlProperties::~CSenXmlProperties() { - delete ipReader; - delete ipFragment; + if(ipReader) + { + delete ipReader; + } + if(ipFragment) + { + delete ipFragment; + } } void CSenXmlProperties::BaseConstructL(const TDesC8& aLocalname, @@ -348,7 +354,7 @@ CSenXmlReader* aParser) { ipFragment = CSenPropertiesFragment::NewL(aLocalname); - if ( aParser && aXml != KNullDesC8 ) + if ( aParser && &aXml && (aXml != KNullDesC8()) ) { // Do parsing ipFragment->ParseWithL(*aParser); diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/src/hostletconnectioncases.cpp --- a/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/src/hostletconnectioncases.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/hostlet_connection_api/tsrc/bc/hostconn/src/hostletconnectioncases.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -2821,7 +2821,6 @@ // is KSenConnectionStatusReady LOCAL_ASSERT( ipConsumer->iConnectionStatus == KSenConnectionStatusCreateFailed); -/* // Check that NO HandleErrorL callback was received: LOCAL_ASSERT( ipConsumer->iErrorCode == KErrNone ); diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_connection_api/tsrc/SenConnectionTimeoutsTester/src/SenConnectionTimeoutsTesterBlocks.cpp --- a/websrv_pub/web_service_connection_api/tsrc/SenConnectionTimeoutsTester/src/SenConnectionTimeoutsTesterBlocks.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_connection_api/tsrc/SenConnectionTimeoutsTester/src/SenConnectionTimeoutsTesterBlocks.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -44,9 +44,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include // for CActive #include diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_connection_api/tsrc/bc/connection/group/senserviceconnection.mmp --- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/senserviceconnection.mmp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/group/senserviceconnection.mmp Fri Jun 11 14:42:58 2010 +0300 @@ -70,7 +70,6 @@ LIBRARY eikctl.lib LIBRARY egul.lib LIBRARY fbscli.lib -LIBRARY PBKENG.LIB LIBRARY cntmodel.lib LIBRARY aknskins.lib //for skin sbackground LIBRARY gdi.lib diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_connection_api/tsrc/bc/connection/inc/TestConnection.h --- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/inc/TestConnection.h Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/inc/TestConnection.h Fri Jun 11 14:42:58 2010 +0300 @@ -68,7 +68,7 @@ //MSENFRAGMENT - CSenElement& AsElement() ; +// CSenElement& AsElement() ; CSenElement* ExtractElement() ; void SetReader(CSenXmlReader& aReader) ; CSenXmlReader* Reader() ; diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_connection_api/tsrc/bc/connection/src/TestConnection.cpp --- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/TestConnection.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/TestConnection.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -176,7 +176,7 @@ } MSenMessage* CTestConnection::Response() { - TInt retval(0); + //TInt retval(0); // TRAP(retval, iConn->Response()); return NULL; } @@ -205,13 +205,12 @@ //MSenFragment -CSenElement& CTestConnection::AsElement() +/*CSenElement& CTestConnection::AsElement() { - -} +}*/ CSenElement* CTestConnection::ExtractElement() { - + return NULL; } void CTestConnection::SetReader(CSenXmlReader& aReader) { @@ -219,7 +218,7 @@ } CSenXmlReader* CTestConnection::Reader() { - + return NULL; } void CTestConnection::ParseL(const TDesC8& aBuf) { @@ -227,7 +226,7 @@ } TInt CTestConnection::BuildFrom(const TDesC8& aBuf) { - + return NULL; } void CTestConnection::DelegateParsingL(MSenFragment& aDelegate) { @@ -277,17 +276,17 @@ const TDesC8& CTestConnection::LocalName() const { - + return KNullDesC8(); } const TDesC8& CTestConnection::NsUri() const { - + return KNullDesC8(); } const TDesC8& CTestConnection::NsPrefix() const { - + return KNullDesC8(); } void CTestConnection::WriteAsXMLToL(RWriteStream& aWriteStream) @@ -297,16 +296,16 @@ HBufC* CTestConnection::AsXmlUnicodeL() { - + return NULL; } HBufC8* CTestConnection::AsXmlL() { - + return NULL; } TBool CTestConnection::ConsistsOfL(MSenFragment& aCandidate) { - + return NULL; } //CACTIVE diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_connection_api/tsrc/bc/connection/src/senserviceconnectioncases.cpp --- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/senserviceconnectioncases.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/senserviceconnectioncases.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -46,9 +46,9 @@ //#include #include "testproperty.h" -#include -#include -//#include +#include +#include +//#include #include // for CActive #include @@ -83,11 +83,11 @@ _LIT8(KTestPassword, "012345678901234"); #elif VALIMO_ADDRESSBOOK_SERVICE // Addressbook service hosted inside Nokia intra by ASP / testing team - _LIT8(KWSPContract, "urn:nokia:test:addrbook:2004-09"); +// _LIT8(KWSPContract, "urn:nokia:test:addrbook:2004-09"); _LIT8(KAuthServEndpoint, "http://10.21.32.110/tfs/IDPSSO_IDWSF10"); - _LIT8(KASProviderID, "provider01"); - _LIT8(KTestAuthzID, "john"); - _LIT8(KTestPassword, "password"); +// _LIT8(KASProviderID, "provider01"); +// _LIT8(KTestAuthzID, "john"); +// _LIT8(KTestPassword, "password"); #elif SYSOPENDIGIA_ADDRESSBOOK_SERVICE _LIT8(KWSPContract, "urn:nokia:test:addrbook:2004-09"); _LIT8(KAuthServEndpoint, "http://ys01liw022.partner.yomi.com:9080/tfs/IDPSSO_IDWSF"); @@ -104,8 +104,8 @@ #endif // FN_ADDRESSBOOK_SERVICE - _LIT8(KASContract, "urn:liberty:as:2004-04"); - _LIT8(KHttpsEndPoint, "https://10.21.32.110/sereneHardCoded/WS_WSI_R9980_001" ); +// _LIT8(KASContract, "urn:liberty:as:2004-04"); +// _LIT8(KHttpsEndPoint, "https://10.21.32.110/sereneHardCoded/WS_WSI_R9980_001" ); _LIT8(KWSIFrameworkID, "WS-I"); _LIT8(KIDWSFFrameworkID, "ID-WSF"); @@ -133,21 +133,21 @@ // ARMv5 _LIT(KIAPName, "Internet"); #endif - _LIT8(KLoggerFileNameProperty, "HttpLoggerFileName"); - - _LIT(KFileToRead, "c:\\Logs\\LoggingHttpFilter\\httptrace.xml"); - _LIT8(KFileName, "httptrace.xml"); - - _LIT8(KHTTPMethodGet, "GET"); - _LIT8(KHTTPMethodPost, "POST"); +// _LIT8(KLoggerFileNameProperty, "HttpLoggerFileName"); + +// _LIT(KFileToRead, "c:\\Logs\\LoggingHttpFilter\\httptrace.xml"); +// _LIT8(KFileName, "httptrace.xml"); + +// _LIT8(KHTTPMethodGet, "GET"); +// _LIT8(KHTTPMethodPost, "POST"); // const TBool MultipleSimultanousRHttpSessionsSupported = EFalse; // If IAP changes all previously sent messages will be canceled. //_LIT8(KProxyHost, "esprx00.nokia.com"); - _LIT8(KProxyHost, "172.19.160.50"); // IP address to: bsprx01.americas.nokia.com - const TInt KProxyPort = 8080; +// _LIT8(KProxyHost, "172.19.160.50"); // IP address to: bsprx01.americas.nokia.com +// const TInt KProxyPort = 8080; //MSN Constants : //--------------- @@ -155,7 +155,7 @@ _LIT8(KPassportPass, "M1nkk1s"); _LIT8(KStsEndpoint, "https://login.live.com/rst2.srf"); - _LIT8(KMSNProxy, "tcp.mws.mobile.live.com"); +// _LIT8(KMSNProxy, "tcp.mws.mobile.live.com"); //_LIT8(KMetadataEndpoint, "http://10.132.11.31/WSStar/secpolicy/secpol.xml"); _LIT8(KMetadataEndpoint, "https://http.mws.mobile.live.com/2006/10/MWP2007_02/SecurityPolicy/Default.aspx"); @@ -597,6 +597,7 @@ CleanupStack::PopAndDestroy(pattern); CleanupStack::PopAndDestroy(manager); + return error; } TInt CSenServiceConnectionBCTest::RegisterSTSInvalidPasswordL() @@ -630,6 +631,7 @@ CleanupStack::PopAndDestroy(pattern); CleanupStack::PopAndDestroy(manager); + return error; } TInt CSenServiceConnectionBCTest::UnregisterSTSL() @@ -663,6 +665,7 @@ CleanupStack::PopAndDestroy(pattern); CleanupStack::PopAndDestroy(manager); + return error; } TInt CSenServiceConnectionBCTest::SetPolicyL( CSenXmlServiceDescription* pServDesc, @@ -677,11 +680,13 @@ if(pValue==KNullDesC8()) { - clientPolicy->AddElementL(pName); + TRAPD(err, clientPolicy->AddElementL(pName)); + return err; } else { - clientPolicy->AddElementL(pName).SetContentL(pValue); + TRAPD(err1, clientPolicy->AddElementL(pName).SetContentL(pValue)); + return err1; } } @@ -701,6 +706,7 @@ // create connection iServiceConnection = CSenServiceConnection::NewL(*this, *pServiceDesc, *this); CleanupStack::PopAndDestroy(pServiceDesc); + return KErrNone; } TInt CSenServiceConnectionBCTest::CreateConnectionToMessengerServiceWithoutCallbackL() @@ -720,6 +726,7 @@ // create connection iServiceConnection = CSenServiceConnection::NewL(*this, *pServiceDesc); CleanupStack::PopAndDestroy(pServiceDesc); + return KErrNone; } TInt CSenServiceConnectionBCTest::AddDeviceOptionsHeader2L(CSenSoapMessage2& aMessage) @@ -748,6 +755,8 @@ TXmlEngElement child1_3_2 = child1_3.AddNewElementSameNsL(_L8("Version")); child1_3_2.AddTextL(_L8("NO_Version")); + + return KErrNone; } TInt CSenServiceConnectionBCTest::AddApplicationHeader2L(CSenSoapMessage2& aMessage) @@ -764,12 +773,15 @@ TXmlEngElement child2 = application.AddNewElementSameNsL(_L8("Version")); child2.AddTextL(_L8("NO_VERSION")); + + return KErrNone; } TInt CSenServiceConnectionBCTest::StartActiveScheduler(TInt aNumberOfPendingOps) { iNumberOfPendingOps = aNumberOfPendingOps; CActiveScheduler::Start(); + return KErrNone; } TInt CSenServiceConnectionBCTest::StopActiveScheduler() @@ -779,6 +791,7 @@ { CActiveScheduler::Stop(); } + return KErrNone; } const CSenIdentityProvider* CSenServiceConnectionBCTest::IdentityProviderL() const @@ -824,8 +837,8 @@ TSenDataTrafficDetails details; TSenDataTrafficOperations operations; iServiceConnection->DataTrafficDetails(details,operations); - TInt BytesSent = details.iTotalBytesSent; - TInt BytesRecieved = details.iTotalBytesRecieved; + //TInt BytesSent = details.iTotalBytesSent; + //TInt BytesRecieved = details.iTotalBytesRecieved; } StopActiveScheduler(); @@ -1672,7 +1685,10 @@ User::LeaveIfError(this->iFsSessionHandle.ShareProtected()); retVal=iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\WS_IPCImpBigRequest"), EFileStream|EFileRead); - + if(retVal != KErrNone) + { + return retVal; + } CleanupClosePushL(iRFileHandle); TInt transactionIdOrError = iServiceConnection->SendL(iRFileHandle); //LOCAL_ASSERT(transactionIdOrError2 > KErrNone); @@ -1710,7 +1726,11 @@ User::LeaveIfError(this->iFsSessionHandle.ShareProtected()); retVal=iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\WS_IPCImpBigRequest"), EFileStream|EFileRead); - + if(retVal != KErrNone) + { + return retVal; + } + CleanupClosePushL(iRFileHandle); HBufC8 *pMsgBuf = NULL;// Buffer to get response TInt transactionIdOrError = iServiceConnection->SubmitL(iRFileHandle, pMsgBuf); @@ -1752,7 +1772,11 @@ User::LeaveIfError(this->iFsSessionHandle.ShareProtected()); retVal=iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\testPic9.jpg"), EFileStream|EFileRead); - + if(retVal != KErrNone) + { + return retVal; + } + CleanupClosePushL(iRFileHandle); HBufC8 *pMsgBuf = NULL;// Buffer to get response TInt transactionIdOrError = iServiceConnection->SubmitL(iRFileHandle, pMsgBuf); @@ -1797,7 +1821,7 @@ TInt CSenServiceConnectionBCTest::UT_CSenServiceConnection_SubmitL_RFileL( TTestResult& aResult ) { SetupL() ; - TInt retVal(KErrNone); + //TInt retVal(KErrNone); iSenXmlServiceDescription = CSenXmlServiceDescription::NewL(); iSenXmlServiceDescription->SetFrameworkIdL(KIDWSFFrameworkID); iSenXmlServiceDescription->SetEndPointL(KAddressBookServiceId); @@ -1812,6 +1836,11 @@ User::LeaveIfError(this->iFsSessionHandle.Connect());//anil User::LeaveIfError(this->iFsSessionHandle.ShareProtected()); err = iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\Test.txt"), EFileStream|EFileRead); + if(err != KErrNone) + { + return err; + } + CleanupClosePushL(iRFileHandle); HBufC8 *pMsgBuf = NULL; TInt transactionIdOrError = iServiceConnection->SubmitL(iRFileHandle, pMsgBuf); @@ -1844,7 +1873,7 @@ TInt CSenServiceConnectionBCTest::UT_CSenServiceConnection_SendL_RFileL( TTestResult& aResult ) { SetupL() ; - TInt retVal(KErrNone); + //TInt retVal(KErrNone); iSenXmlServiceDescription = CSenXmlServiceDescription::NewL(); iSenXmlServiceDescription->SetFrameworkIdL(KIDWSFFrameworkID); iSenXmlServiceDescription->SetEndPointL(KAddressBookServiceId); @@ -1870,6 +1899,11 @@ User::LeaveIfError(this->iFsSessionHandle.Connect());//anil User::LeaveIfError(this->iFsSessionHandle.ShareProtected()); err = iRFileHandle.Open(iFsSessionHandle, _L("c:\\private\\101FB3E7\\Test.txt"), EFileStream|EFileRead); + if(err != KErrNone) + { + return err; + } + CleanupClosePushL(iRFileHandle); TInt transactionIdOrError = iServiceConnection->SendL(iRFileHandle); if (transactionIdOrError == KErrNone) @@ -6546,7 +6580,7 @@ TInt CSenServiceConnectionBCTest::Response( TTestResult& aResult ) { TInt res; CTestConnection* pTest = CTestConnection::NewL(); - MSenMessage* pMsg; + //MSenMessage* pMsg = NULL; TRAP(res, pTest->Response()); // CleanupStack::Pop(pTest); delete pTest; @@ -6888,7 +6922,7 @@ iLog->Log(_L("CoBrand->start")); SetupL(); - TInt retVal(0); +// TInt retVal(0); iCoBrandingCallbackOption = ETrue; _LIT8(KFramework, "WS-STAR"); @@ -6933,6 +6967,11 @@ SetPolicyL(pSmSd, KPassportExtensions, KNullDesC8); iLog->Log(_L("CSenXmlServiceDescription* pSmSd = CSenXmlServiceDescription::NewLC()")); TInt error = manager->RegisterServiceDescriptionL( *pSmSd); + if(error != KErrNone) + { + return error; + } + iLog->Log(_L("manager->RegisterServiceDescriptionL( *pSmSd);")); CSenXmlServiceDescription* pScSd = CSenServicePattern::NewLC(); @@ -7000,7 +7039,7 @@ iHostletConsumerOption = ETrue; - TInt retVal(KErrNone); + //TInt retVal(KErrNone); _LIT8(KReq,"Some Query"); _LIT8(KEndPoint, "http://10.21.32.110/sereneHardCoded/WS_CM_001_001"); @@ -7033,12 +7072,14 @@ Teardown(); iLog->Log(_L("HostletConsumer->End")); + return ret; } void CSenServiceConnectionBCTest::SetConnectionId( TInt aConnectionId ) { TInt connectonId = 0; connectonId = aConnectionId; + iLog->Log(_L("Connection Id is %d"),connectonId); } TInt CSenServiceConnectionBCTest::DataTrafficDetailsL(TTestResult& aResult) @@ -7048,7 +7089,7 @@ iGetDataTrafficDetails = ETrue; - TInt retVal(KErrNone); + //TInt retVal(KErrNone); _LIT8(KReq,"Some Query"); _LIT8(KEndPoint, "http://10.21.32.110/sereneHardCoded/WS_CM_001_001"); @@ -7081,4 +7122,5 @@ Teardown(); iLog->Log(_L("HostletConsumer->End")); + return ret; } diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testconsumer.cpp --- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testconsumer.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testconsumer.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -52,4 +52,6 @@ } void CTestConsumer::SetStatus(const TInt aStatus) { - } \ No newline at end of file + } + + diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testfileobserver.cpp --- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testfileobserver.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testfileobserver.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -46,4 +46,6 @@ void CTestFileObserver::TransferProgress(TInt aTxnId , TBool aIncoming , const TDesC8& aMessage, const TDesC8& aCid , TInt aProgress ) { - } \ No newline at end of file + } + + diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testprovider.cpp --- a/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testprovider.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_connection_api/tsrc/bc/connection/src/testprovider.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -61,4 +61,4 @@ { return NULL; } - \ No newline at end of file + diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_connection_api/tsrc/bc/senutils/src/senutilscases.cpp --- a/websrv_pub/web_service_connection_api/tsrc/bc/senutils/src/senutilscases.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_connection_api/tsrc/bc/senutils/src/senutilscases.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -335,7 +335,7 @@ _LIT8(KBody,"ComarchBody"); TPtrC8 result = env->SetBodyL(KBody); - _LIT16(KRef2, "ComarchBody"); +// _LIT16(KRef2, "ComarchBody"); TPtrC16 result16(reinterpret_cast(result.Ptr()),(result.Size()/2)); RDebug::Print( _L( "WSModTester: body [%S]"),&result16); /*EUNIT_ASSERT_EQUALS(result, KBody);*/ @@ -586,8 +586,8 @@ { SetupL(); - _LIT8(KHeaderElementName, "HeaderElement"); - _LIT8(KHeaderContent, "HeaderContent"); +// _LIT8(KHeaderElementName, "HeaderElement"); +// _LIT8(KHeaderContent, "HeaderContent"); CSenSoapEnvelope* pEnvelope = CSenSoapEnvelope::NewL(); @@ -675,14 +675,14 @@ \ \ "); - _LIT8(KBodyAsString, "\ +/* _LIT8(KBodyAsString, "\ \ \ -"); +");*/ - _LIT8(KEmptyBodyAsString, ""); + //_LIT8(KEmptyBodyAsString, ""); - _LIT8(KEmptyBodyWithNsAsString, ""); + // _LIT8(KEmptyBodyWithNsAsString, ""); CSenParser* pParser = CSenParser::NewLC(); CSenSoapEnvelope* pEnvelope = CSenSoapEnvelope::NewL(); pEnvelope->SetReader( *iXmlReader ); @@ -997,14 +997,14 @@ \ \ "); - _LIT8(KBodyAsString, "\ +/* _LIT8(KBodyAsString, "\ \ \ "); +*/ + // _LIT8(KEmptyBodyAsString, ""); - _LIT8(KEmptyBodyAsString, ""); - - _LIT8(KEmptyBodyWithNsAsString, ""); + //_LIT8(KEmptyBodyWithNsAsString, ""); CSenParser* pParser = CSenParser::NewLC(); CSenSoapMessage* pMessage = CSenSoapMessage::NewL(); pMessage->SetReader( *iXmlReader ); @@ -1615,7 +1615,7 @@ if(err != KErrUnderflow) return err; //garbage year - _LIT8(KIn15, "xxxx-02-28T13:20:65Z"); +// _LIT8(KIn15, "xxxx-02-28T13:20:65Z"); //EUNIT_ASSERT_LEAVE //ASSERT(SenDateUtils::FromXmlDateTimeL(KIn15)); @@ -1980,12 +1980,17 @@ Flag=1; else Flag=0; - if(!( Flag )) KErrArgument; - CleanupStack::PopAndDestroy(pXmlElement); + if(!( Flag )) + { + CleanupStack::PopAndDestroy(pXmlElement); + CleanupStack::PopAndDestroy(pElement); + return KErrArgument; + } + CleanupStack::PopAndDestroy(pXmlElement); CleanupStack::PopAndDestroy(pElement); - Teardown(); - return KErrNone; - } + Teardown(); + return KErrNone; +} TInt CSenUtilsBCTest::SenTransportProperties_AsUtf8LL(TTestResult& aResult ) @@ -2021,7 +2026,7 @@ TInt CSenUtilsBCTest::SenTransportProperties_PropertyLL(TTestResult& aResult ) { SetupL(); - _LIT8(KValue,"Value"); + //_LIT8(KValue,"Value"); TPtrC8 ValuePtr; TPtrC8 ValuePtr1; CSenTransportProperties* pElement= CSenTransportProperties::NewL(); @@ -2617,7 +2622,7 @@ TInt CSenUtilsBCTest::SenTransportProperties_MaxTimeToLiveLL(TTestResult& aResult ) { TTestResult Result; - SenTransportProperties_SetMaxTimeToLiveLL( Result); + return SenTransportProperties_SetMaxTimeToLiveLL( Result); } TInt CSenUtilsBCTest::SenTransportProperties_SetMinTimeToLiveLL(TTestResult& aResult ) @@ -2706,7 +2711,7 @@ TInt CSenUtilsBCTest::SenTransportProperties_CloneL(TTestResult& aResult ) { SetupL(); - TBool Flag; + TBool Flag = 0; TInt var; CSenTransportProperties* pElement= CSenTransportProperties::NewL(); CleanupStack::PushL(pElement); @@ -2714,9 +2719,13 @@ pClone = (CSenTransportProperties*)pElement->Clone(var); if(pClone != NULL) Flag = 1; - if(!(Flag)) return KErrArgument; - - delete pClone; + if(!(Flag)) + { + delete pClone; + CleanupStack::PopAndDestroy(pElement); + return KErrArgument; + } + delete pClone; CleanupStack::PopAndDestroy(pElement); Teardown(); @@ -2744,8 +2753,12 @@ if(retVal != EFalse) Flag = 1; else + { + CleanupStack::PopAndDestroy(pElement); return KErrArgument; - + } + //TO resolve RVCT4.0 warning + if (Flag); CleanupStack::PopAndDestroy(pElement); Teardown(); @@ -2757,20 +2770,24 @@ TInt CSenUtilsBCTest::SenTransportProperties_CloneLL(TTestResult& aResult ) { SetupL(); - TBool Flag; + TBool Flag = 0; CSenTransportProperties* pElement= CSenTransportProperties::NewL(); CleanupStack::PushL(pElement); CSenTransportProperties* pClone = NULL; - pClone = (CSenTransportProperties*)pElement->CloneL(); - if(pClone != NULL) - Flag = 1; - if(!(Flag)) return KErrArgument; - + pClone = (CSenTransportProperties*)pElement->CloneL(); + if(pClone != NULL) + Flag = 1; + if(!(Flag)) + { + delete pClone; + CleanupStack::PopAndDestroy(pElement); + return KErrArgument; + } delete pClone; - CleanupStack::PopAndDestroy(pElement); + CleanupStack::PopAndDestroy(pElement); - Teardown(); - return KErrNone; + Teardown(); + return KErrNone; } @@ -2792,7 +2809,7 @@ TInt CSenUtilsBCTest::SenTransportProperties_MinTimeToLiveLL(TTestResult& aResult ) { TTestResult Result; - SenTransportProperties_SetMinTimeToLiveLL(Result); + return SenTransportProperties_SetMinTimeToLiveLL(Result); } TInt CSenUtilsBCTest::SenHttpTransportProperties_NewLL(TTestResult& aResult) diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_connection_api/tsrc/connection/src/senserviceconnectioncases.cpp --- a/websrv_pub/web_service_connection_api/tsrc/connection/src/senserviceconnectioncases.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_connection_api/tsrc/connection/src/senserviceconnectioncases.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -46,9 +46,9 @@ //#include #include "testproperty.h" -#include -#include -//#include +#include +#include +//#include #include // for CActive #include diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_connection_api/tsrc/senConnectionTester/src/senConnectionTesterBlocks.cpp --- a/websrv_pub/web_service_connection_api/tsrc/senConnectionTester/src/senConnectionTesterBlocks.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_connection_api/tsrc/senConnectionTester/src/senConnectionTesterBlocks.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -47,9 +47,9 @@ #include -#include -#include -#include +#include +#include +#include #include // for CActive #include diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_description_api/tsrc/bc/senservdesc/src/SenServDescCases.cpp --- a/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/src/SenServDescCases.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_description_api/tsrc/bc/senservdesc/src/SenServDescCases.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -1190,7 +1190,7 @@ idProvider->SetUserInfoL(KText, KNullDesC8, KNullDesC8); //checking xml - _LIT16(KRef, "texturn:liberty:as:2004-04text"); +// _LIT16(KRef, "texturn:liberty:as:2004-04text"); TPtr16 ptr = ConvertToPtr16LC(*idProvider); TInt posId(-1); @@ -1221,7 +1221,7 @@ idProvider->SetUserInfoL(KNullDesC8, KText, KNullDesC8); //checking xml - _LIT16(KRef, "texturn:liberty:as:2004-04text"); +// _LIT16(KRef, "texturn:liberty:as:2004-04text"); // TL(ConvertToPtr16LC(*idProvider) == KRef); @@ -1269,7 +1269,7 @@ idProvider->SetUserInfoL(KNullDesC8, KNullDesC8, KText2); idProvider->SetUserInfoL(KNullDesC8, KNullDesC8, KText); //checking xml - _LIT16(KRef, "texturn:liberty:as:2004-04text"); +// _LIT16(KRef, "texturn:liberty:as:2004-04text"); //TL(ConvertToPtr16LC(*idProvider) == KRef); //CleanupStack::PopAndDestroy();//Ptr @@ -1334,7 +1334,7 @@ __ASSERT_ALWAYS_NO_LEAVE(idProvider->SetProviderID(KText2)); __ASSERT_ALWAYS_NO_LEAVE(idProvider->SetProviderID(KText)); //checking xml - _LIT16(KRef, "texturn:liberty:as:2004-04text"); +// _LIT16(KRef, "texturn:liberty:as:2004-04text"); //TL(ConvertToPtr16LC(*idProvider) == KRef); TPtr16 ptr = ConvertToPtr16LC(*idProvider); TInt posId(-1); @@ -1357,7 +1357,7 @@ __ASSERT_ALWAYS_NO_LEAVE(idProvider->SetServiceID(KText2)); __ASSERT_ALWAYS_NO_LEAVE(idProvider->SetServiceID(KText)); //checking xml - _LIT16(KRef, "texturn:liberty:as:2004-04text"); +// _LIT16(KRef, "texturn:liberty:as:2004-04text"); //TL(ConvertToPtr16LC(*idProvider) == KRef); TPtr16 ptr = ConvertToPtr16LC(*idProvider); @@ -1791,7 +1791,7 @@ if(!(pattern->AddConsumerIdentityProviderIdL(KText2) == KErrNone))return KErrArgument; - _LIT16(KRef, ""); +// _LIT16(KRef, ""); //TL(ConvertToPtr16LC(*pattern) == KRef); //CleanupStack::PopAndDestroy();//Ptr @@ -2177,7 +2177,7 @@ if(!(xmlService->AddIdentityProviderIdL(ptr) == KErrNone))return KErrArgument; - _LIT16(KRef, "texttext2"); + //_LIT16(KRef, "texttext2"); //TL(ConvertToPtr16LC(*xmlService) == KRef); //CleanupStack::PopAndDestroy();//Ptr @@ -2356,7 +2356,7 @@ CSenXmlServiceDescription* xmlService = CSenXmlServiceDescription::NewL(); xmlService ->SetContractL(KText); //checking xml - _LIT16(KRef, "text"); +// _LIT16(KRef, "text"); //TL(ConvertToPtr16LC(*xmlService) == KRef); TPtr16 ptr = ConvertToPtr16LC(*xmlService); @@ -2386,7 +2386,7 @@ xmlService ->SetContractL(KText2); //checking xml - _LIT16(KRef2, "text2"); +// _LIT16(KRef2, "text2"); //TL(ConvertToPtr16LC(*xmlService) == KRef2); TL(xmlService->Contract() == KText2); @@ -2511,7 +2511,7 @@ senFacet->SetValueL(KText2); if(!(xmlService->SetFacetL(*senFacet) == KErrNone))return KErrArgument; - _LIT16(KRef, "text2"); +// _LIT16(KRef, "text2"); //TPtrC16 ptrRef = KRef(); //TL(ConvertToPtr16LC(*xmlService) == ptrRef); @@ -2621,7 +2621,7 @@ RDebug::Print( _L( "WSModTester: xmlBuffer [%S]"),&ptr); else RDebug::Print( _L( "WSModTester: xmlBuffer empty")); - _LIT8(KRef, "texttext"); +// _LIT8(KRef, "texttext"); /*EUNIT_ASSERT_EQUALS(ptr, KRef);*/ //TL(ptr == KRef); TInt posId(-1); @@ -2950,7 +2950,7 @@ xmlService ->SetEndPointL(KText); //checking xml - _LIT16(KRef, "text"); +// _LIT16(KRef, "text"); //TL(ConvertToPtr16LC(*xmlService) == KRef); TL(xmlService->Endpoint() == KText); @@ -2978,7 +2978,7 @@ xmlService ->SetEndPointL(KText2); //checking xml - _LIT16(KRef2, "text2"); +// _LIT16(KRef2, "text2"); //TL(ConvertToPtr16LC(*xmlService) == KRef2); TL(xmlService->Endpoint() == KText2); diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/src/SenServiceManagerCases.cpp --- a/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/src/SenServiceManagerCases.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_manager_api/tsrc/bc/senservicemanager/src/SenServiceManagerCases.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -914,7 +914,7 @@ LOCAL_ASSERT((iServiceManager->AssociateServiceL(KText, KNullDesC8)) == KErrArgument); LOCAL_ASSERT((iServiceManager->AssociateServiceL(KNullDesC8, KText)) == KErrArgument); LOCAL_ASSERT((iServiceManager->AssociateServiceL(KNullDesC8, KNullDesC8)) == KErrArgument); - _LIT8(KPattern, "&<>"); + //_LIT8(KPattern, "&<>"); iProvider->SetProviderID(KText); LOCAL_ASSERT((iServiceManager->RegisterIdentityProviderL(*iProvider)) == KErrNone); @@ -989,9 +989,8 @@ if(err != KErrNone)return err; LOCAL_ASSERT((iServiceManager->DissociateServiceL(KText, KText)) == KErrNotFound); - _LIT8(KPattern, "&<>"); - - Teardown(); +// _LIT8(KPattern, "&<>"); + Teardown(); return KErrNone; } diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/newsoapclassescases.cpp --- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/newsoapclassescases.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/newsoapclassescases.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -376,15 +376,15 @@ HBufC8* pAsXml = pEnvelope->AsXmlL(); CleanupStack::PushL(pAsXml); - if(!( *pAsXml == KEnvelopeString )) return KErrArgument; - - CleanupStack::PopAndDestroy(pAsXml); - + if(!( *pAsXml == KEnvelopeString )) + { + CleanupStack::PopAndDestroy(pAsXml); + return KErrArgument; + } + CleanupStack::PopAndDestroy(pAsXml); TInt var = pEnvelope->TxnId(); - TBool Flag; - if(var >= 0) - if(!(Flag)) return KErrArgument; + return KErrArgument; __ASSERT_ALWAYS_NO_LEAVE(delete pEnvelope); pEnvelope = NULL; @@ -397,18 +397,21 @@ TInt CNewSoapClassesBCTest::MT_CSenSoapEnvelope2_CloneL( TTestResult& aResult ) { SetupL(); - TBool Flag; + TBool Flag = 0; CSenSoapEnvelope2* pEnvelope = CSenSoapEnvelope2::NewL(); CleanupStack::PushL(pEnvelope); CSenSoapEnvelope2* pClone = NULL; pClone = (CSenSoapEnvelope2*)pEnvelope->CloneL(); if(pClone != NULL) Flag = 1; - if(!(Flag)) return KErrArgument; - - delete pClone; + if(!(Flag)) + { + delete pClone; CleanupStack::PopAndDestroy(pEnvelope); - + return KErrArgument; + } + delete pClone; + CleanupStack::PopAndDestroy(pEnvelope); Teardown(); return KErrNone; } @@ -574,9 +577,12 @@ HBufC8* pAsXml = pEnvelope->AsXmlL(); CleanupStack::PushL(pAsXml); - if(!( *pAsXml == KEnvelopeString )) KErrArgument; - CleanupStack::PopAndDestroy(pAsXml); - + if(!( *pAsXml == KEnvelopeString )) + { + CleanupStack::PopAndDestroy(pAsXml); + return KErrArgument; + } + CleanupStack::PopAndDestroy(pAsXml); TXmlEngElement bodyElement2 = document.CreateDocumentElementL(KBodyElementName2()); bodyElement2.AddTextL(KBodyContent2()); pEnvelope->SetBodyL(bodyElement2); @@ -2304,7 +2310,7 @@ TInt CNewSoapClassesBCTest::MT_CSenSoapMessage2_CloneL( TTestResult& aResult ) { SetupL(); - TBool Flag; + TBool Flag = 0; CSenSoapMessage2* pSoapMessage = CSenSoapMessage2::NewL(); CleanupStack::PushL(pSoapMessage); @@ -2312,9 +2318,14 @@ pClone = (CSenSoapMessage2*)pSoapMessage->CloneL(); if(pClone != NULL) Flag = 1; - if(!(Flag)) return KErrArgument; + if(!(Flag)) + { + delete pClone; + CleanupStack::PopAndDestroy(pSoapMessage); + return KErrArgument; + } delete pClone; - CleanupStack::PopAndDestroy(pSoapMessage); + CleanupStack::PopAndDestroy(pSoapMessage); Teardown(); return KErrNone; } @@ -3420,7 +3431,7 @@ filetext.Write(_L("CleanupStack::PopAndDestroy(1); ")); - /* // 2) Fault code in Soap 1.2 + // 2) Fault code in Soap 1.2 // Note: SOAP 1.2 faults are structured differently to SOAP 1.1. // In particular all fault elements are now namespace _qualified_, // many have been renamed and fault codes are now hierarchical @@ -3441,13 +3452,9 @@ CleanupStack::PopAndDestroy(pSoapFault2); CleanupStack::PopAndDestroy(1); // document2 - *//* + Teardown(); filetext.Write(_L("Teardown")); return KErrNone; */ - - - - // End of File \ No newline at end of file diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/testmsenmessage.cpp --- a/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/testmsenmessage.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/web_service_messaging_api/tsrc/bc/newsoapclasses/src/testmsenmessage.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -47,11 +47,11 @@ } MSenMessage::TClass CTestMSenMessage::Type() { - EMessageBase; + return EMessageBase; } MSenMessage::TDirection CTestMSenMessage::Direction() { - EOutbound; + return EOutbound; } TInt CTestMSenMessage::SetContext(MSenMessageContext* apNotOwnedContext) { diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTesterBlocks.cpp --- a/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTesterBlocks.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/xml_extensions_api/tsrc/bc/xml_extensions_api/src/WSTesterBlocks.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -811,6 +811,13 @@ iStringPool.OpenStringL(KAttribute()), iStringPool.OpenStringL(KAttributeValue()))); + if (err != KErrNone) + { + iLog->Log(_L("Retrieving the attribute failed. Error: %d"), err ); + CleanupStack::PopAndDestroy(); + return err; + } + // make a new array for all attributes including namespace (to be added) RAttributeArray justAttributes; @@ -837,6 +844,13 @@ iStringPool.OpenStringL(KAttribute()), iStringPool.OpenStringL(KAttributeValue()))); + if (err != KErrNone) + { + iLog->Log(_L("Retrieving the attribute failed. Error: %d"), err ); + CleanupStack::PopAndDestroy(); + return err; + } + RAttributeArray justAttributes; justAttributes.Append(justAttribute); @@ -2105,7 +2119,7 @@ HBufC8* pTestXml = HBufC8::NewLC( xmlDoc.Length() ); pTestXml->Des().Append(xmlDoc); - CSenElement* newElement; + CSenElement* newElement = NULL; //adding parsed document to SenElement and copy it to iElement @@ -2255,20 +2269,20 @@ TBuf8<128> name; name.Append(arg); - RAttributeArray apAttrs; + /*RAttributeArray apAttrs; HBufC8* newAttr; - /*TRAPD(r, newAttr = ((CSenBaseElement*)iElement)->AllocAttrValueL(apAttrs, name) ); + TRAPD(r, newAttr = ((CSenBaseElement*)iElement)->AllocAttrValueL(apAttrs, name) ); if (r != KErrNone) { iLog->Log(_L("AllocAttrValueL failed. Error: %d"), r ); return r; - }*/ + } if ( newAttr!= NULL ){ delete newAttr; newAttr = NULL; - } + }*/ iLog->Log(_L("******* _C_AllocAttrValue -> Ended! ********")); return error; @@ -3005,7 +3019,7 @@ return error; } //AsXML "UTF8" - HBufC8* pBuf; + HBufC8* pBuf = NULL; TRAPD(rAsXml, pBuf = pDom->AsXmlL()); if (rAsXml != KErrNone) @@ -3017,7 +3031,7 @@ iLog->Log(*pBuf); LogResultL( *pBuf ); //AsXMLUnicode - HBufC16* pBuf2; + HBufC16* pBuf2 = NULL; TRAPD(rAsXmlUnicode, pBuf2 = pDom->AsXmlUnicodeL()); if (rAsXmlUnicode != KErrNone) @@ -3083,7 +3097,7 @@ // close fsSession CleanupStack::PopAndDestroy(); // Store parsed documed in file - HBufC8* pBuf; + HBufC8* pBuf = NULL; // Convert document TRAPD(rAsXml, pBuf = pDom->AsXmlL()); if (rAsXml != KErrNone) diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/xml_fragment_api/inc/RSenDocument.h --- a/websrv_pub/xml_fragment_api/inc/RSenDocument.h Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/xml_fragment_api/inc/RSenDocument.h Fri Jun 11 14:42:58 2010 +0300 @@ -26,8 +26,8 @@ #ifndef R_SEN_DOCUMENT #define R_SEN_DOCUMENT -#include -#include +#include +#include typedef struct { diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/xml_fragment_api/inc/SenFragmentBase.h --- a/websrv_pub/xml_fragment_api/inc/SenFragmentBase.h Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/xml_fragment_api/inc/SenFragmentBase.h Fri Jun 11 14:42:58 2010 +0300 @@ -32,7 +32,7 @@ #include #include #include -#include +#include using namespace Xml; diff -r abb636afedf7 -r a1df79fa35b4 websrv_pub/xml_fragment_api/tsrc/senfragmentTester/src/SenFragmentTesterBlocks.cpp --- a/websrv_pub/xml_fragment_api/tsrc/senfragmentTester/src/SenFragmentTesterBlocks.cpp Fri Apr 16 16:07:50 2010 +0300 +++ b/websrv_pub/xml_fragment_api/tsrc/senfragmentTester/src/SenFragmentTesterBlocks.cpp Fri Jun 11 14:42:58 2010 +0300 @@ -26,17 +26,17 @@ #include #include #include -#include +#include #if defined( __SERIES60_31__ ) || (!defined( __SERIES60_30__ ) && defined( SYMBIAN_SWI_POST_INSTALL_REVOCATION) ) #include #endif #include // for TParserFeature enumeration -#include // needed for TSerializationOptions -#include +#include // needed for TSerializationOptions +#include #include -#include +#include // INTERNAL INCLUDES #include "maindomfragment.h"