# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1282204770 -10800 # Node ID 6f5ef5fc65b4db12d9bcec8698de6ca37509a6b0 # Parent f68f0715725029bfcde59676c8833b98b4c0b9bc Revision: 201031 Kit: 201033 diff -r f68f07157250 -r 6f5ef5fc65b4 webservices/wscore/group/sencore.mmp --- a/webservices/wscore/group/sencore.mmp Thu Jul 15 19:53:58 2010 +0300 +++ b/webservices/wscore/group/sencore.mmp Thu Aug 19 10:59:30 2010 +0300 @@ -57,6 +57,7 @@ // Currently, WS-stack requires (and consumes MAX) 4 MBs of heap EPOCHEAPSIZE 0x060000 0x400000 +EPOCSTACKSIZE 0x3000 SOURCEPATH ../src SOURCE senclientsession.cpp diff -r f68f07157250 -r 6f5ef5fc65b4 webservices/wscore/src/senxmldao.cpp --- a/webservices/wscore/src/senxmldao.cpp Thu Jul 15 19:53:58 2010 +0300 +++ b/webservices/wscore/src/senxmldao.cpp Thu Aug 19 10:59:30 2010 +0300 @@ -1712,16 +1712,16 @@ // when server (main thread) goes down. pLookupInfo = NULL; - if(pHostlet->Threadsafe()) + if(pHostlet && pHostlet->Threadsafe()) { - TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMaxLogLevel,"- Adding new threadsafe, unsharable provider into cache."); + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"- Adding new threadsafe, unsharable provider into cache."); pLookupInfo = CSenHostletLookupInfo::NewLC(aReqThreadId, aReqConsumerId); } else { // Any non-threadsafe provider should compare whether consumer ID // is equal. The thread ID is irrelevant in the matching. - TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMaxLogLevel,"- Adding new non-threadsafe, unsharable provider into cache."); + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"- Adding new non-threadsafe, unsharable provider into cache."); pLookupInfo = CSenHostletLookupInfo::NewLC(KNullDesC, aReqConsumerId); } @@ -1729,7 +1729,7 @@ append = iUnsharableProviders.Append(pLookupInfo, pHostlet); if(append==KErrNone) { - TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMaxLogLevel, _L8("- Loaded new unsharable hostlet instance: 0x%X, lookup info: 0x%X, lookup count: %d"), pHostlet, pLookupInfo, pLookupInfo->LookupCount())); + TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("- Loaded new unsharable hostlet instance: 0x%X, lookup info: 0x%X, lookup count: %d"), pHostlet, pLookupInfo, pLookupInfo->LookupCount())); CleanupStack::Pop(2); // pLookupInfo, pHostlet } else @@ -1933,12 +1933,26 @@ TPtrC CSenHostletLookupInfo::ThreadId() const { - return *ipFullThreadName; + if(ipFullThreadName) + { + return *ipFullThreadName; + } + else + { + return KNullDesC(); + } } TPtrC8 CSenHostletLookupInfo::ConsumerId() const { - return *ipUniqueConsumerId; + if(ipUniqueConsumerId) + { + return *ipUniqueConsumerId; + } + else + { + return KNullDesC8(); + } } @@ -1960,9 +1974,15 @@ TBool CSenHostletLookupInfo::operator==(const CSenHostletLookupInfo& aHostletRequestor) { - return((ipFullThreadName->Length()==0 || aHostletRequestor.ThreadId() == *ipFullThreadName) + if(ipFullThreadName && ipUniqueConsumerId) + { + return((ipFullThreadName->Length()==0 || aHostletRequestor.ThreadId() == *ipFullThreadName) && aHostletRequestor.ConsumerId() == *ipUniqueConsumerId); - + } + else + { + return EFalse; + } // return (aHostletRequestor.ThreadId() == *ipFullThreadName // && aHostletRequestor.ConsumerId() == *ipUniqueConsumerId); } diff -r f68f07157250 -r 6f5ef5fc65b4 webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp --- a/webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp Thu Jul 15 19:53:58 2010 +0300 +++ b/webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp Thu Aug 19 10:59:30 2010 +0300 @@ -1274,6 +1274,7 @@ iSessionAuthentication = iManager.IdentityProviderL(aURI.UriDes()); if(!iSessionAuthentication) { + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"--- create and register new IDP"); // create and register new IDP iSessionAuthentication = CSenIdentityProvider::NewL(aURI.UriDes(), KNullDesC8); @@ -1287,13 +1288,15 @@ TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() returning EFalse"); return EFalse; // decision: we could not save info into database, abort } - TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"New IDP registeration OK. Proceeding."); + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"--- New IDP registeration OK. Proceeding."); } // we have credentials + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"--- we have credentials"); TRAPD(err, aUsername = aRealm.Pool().OpenStringL(iSessionAuthentication->AuthzID())); TRAP(err, aPassword = aRealm.Pool().OpenStringL(iSessionAuthentication->Password())); + TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("--- username (%s), password (%d)"), aUsername, aPassword)); TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() returning ETrue"); return ETrue; } @@ -1307,7 +1310,7 @@ TPckgBuf authInfo; iManager.AuthenticationForL(*iSessionAuthentication, authInfo); iPasswordFromUser = ETrue; - + TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"--- AuthenticationForL Called"); TRAPD(err, aUsername = aRealm.Pool().OpenStringL(authInfo().iUsername)); TRAP(err, aPassword = diff -r f68f07157250 -r 6f5ef5fc65b4 webservices/wsidentitymanager/src/senbaseidentitymanager.cpp --- a/webservices/wsidentitymanager/src/senbaseidentitymanager.cpp Thu Jul 15 19:53:58 2010 +0300 +++ b/webservices/wsidentitymanager/src/senbaseidentitymanager.cpp Thu Aug 19 10:59:30 2010 +0300 @@ -567,8 +567,7 @@ TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("Username: %S"), pUsernameUtf8)); TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("Password: %S"), pPasswordUtf8 )); HBufC8* pEncodedUsername = NULL; - illegalUsername = - SenXmlUtils::EncodeHttpCharactersL(*pUsernameUtf8, + illegalUsername = SenXmlUtils::EncodeHttpCharactersL(*pUsernameUtf8, pEncodedUsername); if (illegalUsername) { @@ -617,7 +616,7 @@ // if advisory was changed in service (is no longer // valid), there would NOT be any way for end-user // to change (remove) it(!) - + TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"There was at least AuthzID available"); CSenElement& element = aProvider.AsElement(); delete element.RemoveElement(KSenIdpAdvisoryAuthnIdLocalname); @@ -654,14 +653,32 @@ aResponse().iPassword.Zero(); if (!illegalUsername) { - aResponse().iUsername.Copy(pUsernameUtf8->Des()); - aResponse().iPassword.Copy(pPasswordUtf8->Des()); + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("NOT illegalUsername"))); + if(pUsernameUtf8) + { + TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8(" pUsernameUtf8 Length is %d"), pUsernameUtf8->Length())); + if(pUsernameUtf8->Length() > 0 && pUsernameUtf8->Length() <= KSenAuthMaxUsernameLength) + { + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("Copy username"))); + aResponse().iUsername.Copy(pUsernameUtf8->Des()); + } + } + if(pPasswordUtf8) + { + TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8(" pPasswordUtf8 Length is %d"), pPasswordUtf8->Length())); + if(pPasswordUtf8->Length() > 0 && pPasswordUtf8->Length() <= KSenAuthMaxPasswordLength) + { + TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("Copy password"))); + aResponse().iPassword.Copy(pPasswordUtf8->Des()); + } + } } - CleanupStack::PopAndDestroy(2); // pPasswordUtf8, pUsernameUtf8 } else { + aResponse().iUsername.Zero(); + aResponse().iPassword.Zero(); TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("User pressed Cancel Button in Password dialog"))); } } @@ -671,8 +688,7 @@ } else { - TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8(" Notifier plugin for 'Password' dialog returned an error: %d"), - reqStatus.Int())); + TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8(" Notifier plugin for 'Password' dialog returned an error: %d"), reqStatus.Int())); } CleanupStack::PopAndDestroy(2); // request, response;