# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1268649892 -7200 # Node ID 6abf3d6055cdc38b65306beed5d15da485e4ec67 # Parent 7bc6ab9b5bcda7f17ae73b51e9820834f81b0a3e Revision: 201009 Kit: 201010 diff -r 7bc6ab9b5bcd -r 6abf3d6055cd webservices/wsconnection/src/senserviceconnectionimpl.cpp --- a/webservices/wsconnection/src/senserviceconnectionimpl.cpp Fri Feb 19 23:55:35 2010 +0200 +++ b/webservices/wsconnection/src/senserviceconnectionimpl.cpp Mon Mar 15 12:44:52 2010 +0200 @@ -2481,6 +2481,7 @@ TInt CSenServiceConnectionImpl::CancelTransaction(TInt aTransactionID) { + TLSLOG_L(KSenServiceConnectionLogChannelBase+iConnectionID, KMinLogLevel ,"CSenServiceConnectionImpl::CancelTransaction"); TInt retVal(0); if ( iDispatcherEnabled ) // DISPATCHER IS ENABLED { diff -r 7bc6ab9b5bcd -r 6abf3d6055cd webservices/wscore/src/senclientsession.cpp --- a/webservices/wscore/src/senclientsession.cpp Fri Feb 19 23:55:35 2010 +0200 +++ b/webservices/wscore/src/senclientsession.cpp Mon Mar 15 12:44:52 2010 +0200 @@ -224,6 +224,7 @@ CSenMessageResourceHandler* tmp = resHandler; resHandler = resHandler->iNext; delete tmp; + tmp = NULL; } RSessionBase::Close(); } @@ -260,6 +261,7 @@ SendReceive(ESenCliServPrefferedCarrierAvailable, args, caSync->iStatus); retVal = caSync->iStatus.Int(); delete caSync; + caSync = NULL; } return retVal; @@ -279,6 +281,7 @@ SendReceive(ESenCliServNewCarrierActive, args, caSync->iStatus); retVal = caSync->iStatus.Int(); delete caSync; + caSync = NULL; } return retVal; } @@ -294,6 +297,7 @@ SendReceive(ESenCliServMobilityError, args, caSync->iStatus); retVal = caSync->iStatus.Int(); delete caSync; + caSync = NULL; } return retVal; } @@ -328,6 +332,7 @@ asWait.Start(); retVal = caSync->iStatus.Int(); delete caSync; + caSync = NULL; } return retVal; } diff -r 7bc6ab9b5bcd -r 6abf3d6055cd webservices/wsdescription/src/sencredential2.cpp --- a/webservices/wsdescription/src/sencredential2.cpp Fri Feb 19 23:55:35 2010 +0200 +++ b/webservices/wsdescription/src/sencredential2.cpp Mon Mar 15 12:44:52 2010 +0200 @@ -279,7 +279,10 @@ EXPORT_C CSenCredential2::~CSenCredential2() { - delete iId; + if(iId) + { + delete iId; + } } EXPORT_C void CSenCredential2::SetIdL(const TDesC8& aNewId) diff -r 7bc6ab9b5bcd -r 6abf3d6055cd webservices/wsdescription/src/senservicepolicy.cpp --- a/webservices/wsdescription/src/senservicepolicy.cpp Fri Feb 19 23:55:35 2010 +0200 +++ b/webservices/wsdescription/src/senservicepolicy.cpp Mon Mar 15 12:44:52 2010 +0200 @@ -16,12 +16,6 @@ */ - - - - - - // INCLUDE FILES #include #include @@ -159,7 +153,8 @@ } } } - delete copy; + delete copy; + copy = NULL; return retVal; } diff -r 7bc6ab9b5bcd -r 6abf3d6055cd webservices/wsdescription/src/servicepolicy.cpp --- a/webservices/wsdescription/src/servicepolicy.cpp Fri Feb 19 23:55:35 2010 +0200 +++ b/webservices/wsdescription/src/servicepolicy.cpp Mon Mar 15 12:44:52 2010 +0200 @@ -15,13 +15,6 @@ * */ - - - - - - - // INCLUDE FILES #include #include @@ -378,10 +371,10 @@ } } - } } + void CServicePolicy::AddUserAgentElementsL(CSenElement* aUserAgentElement) { CSenElement* pClientPolicyElement = AsElement().Element(KClientServicePolicyLocalName); @@ -587,7 +580,6 @@ } else //Just add this policy in the { - CSenElement& apol= pPolicyArray->AddElementL(KPolicyLocalName); apol.CopyFromL(*aPolicy); PolicyIdL(&apol); //codescannerwarnings diff -r 7bc6ab9b5bcd -r 6abf3d6055cd webservices/wsframework/src/sensyncrequester.cpp --- a/webservices/wsframework/src/sensyncrequester.cpp Fri Feb 19 23:55:35 2010 +0200 +++ b/webservices/wsframework/src/sensyncrequester.cpp Mon Mar 15 12:44:52 2010 +0200 @@ -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 7bc6ab9b5bcd -r 6abf3d6055cd webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp --- a/webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp Fri Feb 19 23:55:35 2010 +0200 +++ b/webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp Mon Mar 15 12:44:52 2010 +0200 @@ -300,7 +300,7 @@ TInt CSenHttpChannelImpl::SetIapPrefsL( TUint32 aIapId, TBool aDialogPref, RConnection& aConnection, RSocketServ& aSocketServer ) { - TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KNormalLogLevel, _L8("- SetIapPrefsL , IAP ID (%d)"), aIapId)); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _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 ) @@ -475,7 +475,7 @@ } prefList.AppendL(&extPrefs); retVal = aConnection.Start(prefList); - + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("RConnection Start retval[%d]"), retVal)); if(retVal == KErrNone) { aConnection.GetIntSetting( _L("IAP\\Id"), iIapId); @@ -510,10 +510,10 @@ 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 ) @@ -1046,11 +1046,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 @@ -1082,8 +1084,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); @@ -1096,8 +1097,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 @@ -1175,8 +1174,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) { @@ -1936,6 +1934,7 @@ { // 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 ) diff -r 7bc6ab9b5bcd -r 6abf3d6055cd webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp --- a/webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp Fri Feb 19 23:55:35 2010 +0200 +++ b/webservices/wshttpchanneltransportplugin/src/senhttpchanneltransportplugin.cpp Mon Mar 15 12:44:52 2010 +0200 @@ -115,8 +115,11 @@ iSessionMap.Reset(); delete iHttpChannel; + iHttpChannel = NULL; delete iRequester; + iRequester = NULL; delete iProperties; + iProperties = NULL; delete ipCtx; ipCtx = NULL; diff -r 7bc6ab9b5bcd -r 6abf3d6055cd webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp --- a/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp Fri Feb 19 23:55:35 2010 +0200 +++ b/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp Mon Mar 15 12:44:52 2010 +0200 @@ -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 7bc6ab9b5bcd -r 6abf3d6055cd webservices/wsoviplugin/src/wsoviservicesession.cpp --- a/webservices/wsoviplugin/src/wsoviservicesession.cpp Fri Feb 19 23:55:35 2010 +0200 +++ b/webservices/wsoviplugin/src/wsoviservicesession.cpp Mon Mar 15 12:44:52 2010 +0200 @@ -588,6 +588,7 @@ void CWSOviServiceSession::AdaptEndpointL(TBool aToOrginal) { + TLSLOG_L(KSenCoreServiceManagerLogChannelBase,KMinLogLevel ,"CWSOviServiceSession::AdaptEndpointL"); TPtrC8 oldEndpoint = Endpoint(); if (aToOrginal) { @@ -633,11 +634,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) diff -r 7bc6ab9b5bcd -r 6abf3d6055cd webservices/wsutils/src/senxmlproperties.cpp --- a/webservices/wsutils/src/senxmlproperties.cpp Fri Feb 19 23:55:35 2010 +0200 +++ b/webservices/wsutils/src/senxmlproperties.cpp Mon Mar 15 12:44:52 2010 +0200 @@ -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);