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); } }