--- a/syncmlfw/common/http/src/nsmlhttpclient.cpp Tue May 11 16:59:53 2010 +0300
+++ b/syncmlfw/common/http/src/nsmlhttpclient.cpp Tue May 25 13:36:17 2010 +0300
@@ -19,6 +19,9 @@
#include "nsmlhttpclient.h"
#include "nsmlerror.h"
#include <featmgr.h>
+#include "NsmlOperatorErrorCRKeys.h"
+#include <centralrepository.h>
+
//Fix to Remove the Bad Compiler Warnings
#ifndef __WINS__
@@ -129,10 +132,21 @@
status = CNSmlHTTP::SetErrorStatus( status );
if (status == resp.StatusCode() )
- {
- DBG_FILE( _S8("Error in Communication string is set"));
- status = TNSmlError::ESmlCommunicationInterrupted;
- }
+ {
+ if( this->iAgent->iSession == ESyncMLDSSession )
+ {
+ CRepository* rep = NULL;
+ TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys ) );
+ if ( err == KErrNone )
+ {
+ rep->Set( KNsmlOpDsErrorCode, status );
+ delete rep;
+ }
+ }
+
+ DBG_FILE( _S8("Error in Communication string is set"));
+ status = TNSmlError::ESmlCommunicationInterrupted;
+ }
// content mismatch
aTransaction.Close();
--- a/syncmlfw/ds/settings/bld/DEF/bwinscwdssettingsu.def Tue May 11 16:59:53 2010 +0300
+++ b/syncmlfw/ds/settings/bld/DEF/bwinscwdssettingsu.def Tue May 25 13:36:17 2010 +0300
@@ -55,6 +55,5 @@
?WriteStreamCommitL@CNSmlDSProfile@@QAEXXZ @ 54 NONAME ; void CNSmlDSProfile::WriteStreamCommitL(void)
?IsOperatorProfileL@CNSmlDSSettings@@QAEHABVTDesC16@@@Z @ 55 NONAME ; int CNSmlDSSettings::IsOperatorProfileL(class TDesC16 const &)
?OperatorProfileModValueLC@CNSmlDSSettings@@QAEPAVHBufC8@@XZ @ 56 NONAME ; class HBufC8 * CNSmlDSSettings::OperatorProfileModValueLC(void)
- ?StoreSyncType@CNSmlDSSettings@@QAEXABVTDes8@@@Z @ 57 NONAME ; void CNSmlDSSettings::StoreSyncType(class TDes8 const &)
- ?OperatorProfileSWVValueLC@CNSmlDSSettings@@QAEPAVHBufC8@@XZ @ 58 NONAME ; class HBufC8 * CNSmlDSSettings::OperatorProfileSWVValueLC(void)
+ ?OperatorProfileSWVValueLC@CNSmlDSSettings@@QAEPAVHBufC8@@XZ @ 57 NONAME ; class HBufC8 * CNSmlDSSettings::OperatorProfileSWVValueLC(void)
--- a/syncmlfw/ds/settings/bld/DEF/eabidssettingsu.def Tue May 11 16:59:53 2010 +0300
+++ b/syncmlfw/ds/settings/bld/DEF/eabidssettingsu.def Tue May 25 13:36:17 2010 +0300
@@ -83,8 +83,7 @@
_ZTV26CNSmlDSResourceContentType @ 82 NONAME ; #<VT>#
_ZTI26CNSmlProfileContentHandler @ 83 NONAME ; #<TI>#
_ZTV26CNSmlProfileContentHandler @ 84 NONAME ; #<VT>#
- _ZN15CNSmlDSSettings13StoreSyncTypeERK5TDes8 @ 85 NONAME
- _ZN15CNSmlDSSettings18IsOperatorProfileLERK7TDesC16 @ 86 NONAME
- _ZN15CNSmlDSSettings25OperatorProfileModValueLCEv @ 87 NONAME
- _ZN15CNSmlDSSettings25OperatorProfileSWVValueLCEv @ 88 NONAME
+ _ZN15CNSmlDSSettings18IsOperatorProfileLERK7TDesC16 @ 85 NONAME
+ _ZN15CNSmlDSSettings25OperatorProfileModValueLCEv @ 86 NONAME
+ _ZN15CNSmlDSSettings25OperatorProfileSWVValueLCEv @ 87 NONAME
--- a/syncmlfw/ds/settings/inc/nsmldssettings.h Tue May 11 16:59:53 2010 +0300
+++ b/syncmlfw/ds/settings/inc/nsmldssettings.h Tue May 25 13:36:17 2010 +0300
@@ -390,14 +390,6 @@
*/
IMPORT_C HBufC8* OperatorProfileModValueLC();
- /**
- * Checks if received Alert Code is a sync type and tries to convert
- * it to Sync Type (TSmlSyncType). If conversion is succesful, the
- * value is stored into Cenrep file (KCRUidOperatorDatasyncInternalKeys).
- * @param aAlertCode received alert code.
- */
- IMPORT_C void StoreSyncType( const TDes8& aAlertCode );
-
/**
* Parse xml
* @param - whether data has to be restored from existing database
--- a/syncmlfw/ds/settings/src/NSmlDSSettings.cpp Tue May 11 16:59:53 2010 +0300
+++ b/syncmlfw/ds/settings/src/NSmlDSSettings.cpp Tue May 25 13:36:17 2010 +0300
@@ -31,7 +31,6 @@
#include "nsmldsagconstants.h"
#include <centralrepository.h> //CRepository
#include <NsmlOperatorDataCRKeys.h> // KCRUidOperatorDatasyncInternalKeys
-#include <NsmlOperatorErrorCRKeys.h> // KCRUidOperatorDatasyncErrorKeys
_LIT(Kinfile,"z:\\Private\\101F99FB\\VariantData.xml");
const TInt KUrlLength = 256;
@@ -983,51 +982,4 @@
return buf;
}
-//-----------------------------------------------------------------------------
-// CNSmlDSSettings::StoreSyncType
-// Checks if received Alert Code is a sync type and tries to convert
-// it to Sync Type (TSmlSyncType).
-//-----------------------------------------------------------------------------
-//
-EXPORT_C void CNSmlDSSettings::StoreSyncType( const TDes8& aAlertCode )
- {
- TInt syncType = KErrNotFound;
-
- if ( aAlertCode == KNSmlDSTwoWay )
- {
- syncType = ESmlTwoWay;
- }
- else if ( aAlertCode == KNSmlDSOneWayFromServer )
- {
- syncType = ESmlOneWayFromServer;
- }
- else if ( aAlertCode == KNSmlDSOneWayFromClient )
- {
- syncType = ESmlOneWayFromClient;
- }
- else if ( aAlertCode == KNSmlDSSlowSync )
- {
- syncType = ESmlSlowSync;
- }
- else if ( aAlertCode == KNSmlDSRefreshFromServer )
- {
- syncType = ESmlRefreshFromServer;
- }
- else if ( aAlertCode == KNSmlDSRefreshFromClient )
- {
- syncType = ESmlRefreshFromClient;
- }
-
- if ( syncType != KErrNotFound )
- {
- CRepository* rep = NULL;
- TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys ) );
- if ( err == KErrNone )
- {
- rep->Set( KNsmlOpDsSyncType, syncType );
- delete rep;
- }
- }
- }
-
// End of File
--- a/syncmlfw/ds/syncagent/inc/NSmlDSAgent.h Tue May 11 16:59:53 2010 +0300
+++ b/syncmlfw/ds/syncagent/inc/NSmlDSAgent.h Tue May 25 13:36:17 2010 +0300
@@ -578,6 +578,7 @@
TBool iUpdateLastAnchor;
//For storing Server Status Code
CRepository* iRepositorySSC;
+ CRepository* iErrorReportingRep;
RArray<TInt>* iServerStatusCodeArray;
TBool iIsExtendedServerErrorCodesSupported;
};
--- a/syncmlfw/ds/syncagent/inc/NSmlDSCmds.h Tue May 11 16:59:53 2010 +0300
+++ b/syncmlfw/ds/syncagent/inc/NSmlDSCmds.h Tue May 25 13:36:17 2010 +0300
@@ -216,6 +216,15 @@
* @param aFinal ETrue if this is the last message from the client.
*/
void DoEndMessageL( TBool aFinal );
+
+ /**
+ * Checks if received Alert Code is a sync type and tries to convert
+ * it to Sync Type (TSmlSyncType). If conversion is succesful, the
+ * value is stored into Cenrep file (KCRUidOperatorDatasyncInternalKeys).
+ * @param aAlertCode received alert code.
+ */
+ void StoreSyncType( const TDes8& aAlertCode );
+
private: // constructors and operators
/**
--- a/syncmlfw/ds/syncagent/src/nsmldsagent.cpp Tue May 11 16:59:53 2010 +0300
+++ b/syncmlfw/ds/syncagent/src/nsmldsagent.cpp Tue May 25 13:36:17 2010 +0300
@@ -63,8 +63,8 @@
// CONSTANTS
const TInt KNSmlDsHTTPErrCodeBase = 1400;
-const TInt KNSmlDsHTTPErrCodeRangeFirst = 1800;
-const TInt KNSmlDsHTTPErrCodeRangeLast = 1905;
+const TInt KNSmlDsErrCodeFirst = 400;
+const TInt KNSmlDsErrCodeLast = 516;
// ============================ MEMBER FUNCTIONS ===============================
@@ -135,6 +135,7 @@
{
InitializeServerStatusCodeList();
}
+ TRAP_IGNORE( iErrorReportingRep = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys ) );
DBG_FILE(_S8("CNSmlDSAgent::ConstructL ends"));
}
@@ -184,6 +185,11 @@
{
delete iRepositorySSC;
}
+
+ if(iErrorReportingRep)
+ {
+ delete iErrorReportingRep;
+ }
FeatureManager::UnInitializeLib();
}
@@ -1684,15 +1690,11 @@
EDataSyncRunning12 );
}
- CRepository* rep = NULL;
- TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys ) );
- if ( err == KErrNone )
+ if ( iErrorReportingRep )
{
- rep->Set( KNsmlOpDsErrorCode, KErrNone );
- rep->Set( KNsmlOpDsSyncProfUid, profile->IntValue( EDSProfileId ) );
- rep->Set( KNsmlOpDsSyncInitiation, iSyncInitiation );
-
- delete rep;
+ iErrorReportingRep->Set( KNsmlOpDsErrorCode, KErrNone );
+ iErrorReportingRep->Set( KNsmlOpDsSyncProfUid, profile->IntValue( EDSProfileId ) );
+ iErrorReportingRep->Set( KNsmlOpDsSyncInitiation, iSyncInitiation );
}
TBool ifInternet = ETrue ; // CR: 403-1188
@@ -2939,12 +2941,9 @@
// Set sync stopped to P&S
RProperty::Set( KPSUidDataSynchronizationInternalKeys, KDataSyncStatus, EDataSyncNotRunning );
- CRepository* rep = NULL;
- TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys ) );
- if ( err == KErrNone )
+ if ( iErrorReportingRep )
{
- rep->Set( KNsmlOpDsSyncInitiation, EDataSyncNotRunning );
- delete rep;
+ iErrorReportingRep->Set( KNsmlOpDsSyncInitiation, EDataSyncNotRunning );
}
ResetDSSessionInfoL();
@@ -3111,15 +3110,10 @@
}
// Store status code to cenrep in case of error
- if ( error )
+ if ( error && iErrorReportingRep
+ && ( status >= KNSmlDsErrCodeFirst && status <= KNSmlDsErrCodeLast ) )
{
- CRepository* rep = NULL;
- TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys ) );
- if ( err == KErrNone )
- {
- rep->Set( KNsmlOpDsErrorCode, status );
- delete rep;
- }
+ iErrorReportingRep->Set( KNsmlOpDsErrorCode, status );
}
if ( cmd == KNSmlAgentSyncHdr )
@@ -3459,20 +3453,20 @@
DBG_FILE(_S8("CNSmlDSAgent::FinaliseWhenErrorL begins"));
// Store error code to cenrep
- CRepository* rep = NULL;
- TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys ) );
- if ( err == KErrNone )
+ if ( iErrorReportingRep )
{
- TInt errCode = iError->SyncLogErrorCode();
+ TInt errCode = iError->SyncLogErrorCode();
- if ( errCode >= KNSmlDsHTTPErrCodeRangeFirst &&
- errCode <= KNSmlDsHTTPErrCodeRangeLast )
- {
- errCode -= KNSmlDsHTTPErrCodeBase;
- }
+ if ( errCode >= ( KNSmlDsHTTPErrCodeBase + KNSmlDsErrCodeFirst ) &&
+ errCode <= ( KNSmlDsHTTPErrCodeBase + KNSmlDsErrCodeLast ) )
+ {
+ errCode -= KNSmlDsHTTPErrCodeBase;
+ }
- rep->Set( KNsmlOpDsErrorCode, errCode );
- delete rep;
+ if ( errCode >= KNSmlDsErrCodeFirst && errCode <= KNSmlDsErrCodeLast )
+ {
+ iErrorReportingRep->Set( KNsmlOpDsErrorCode, errCode );
+ }
}
// <MAPINFO_RESEND_MOD_BEGIN>
--- a/syncmlfw/ds/syncagent/src/nsmldscmds.cpp Tue May 11 16:59:53 2010 +0300
+++ b/syncmlfw/ds/syncagent/src/nsmldscmds.cpp Tue May 25 13:36:17 2010 +0300
@@ -52,6 +52,7 @@
#include "nsmldsbatchbuffer.h"
#include "nsmldshostclient.h"
#include "nsmloperatordefines.h"
+#include "NsmlOperatorErrorCRKeys.h"
#ifndef __WINS__
// This lowers the unnecessary compiler warning (armv5) to remark.
@@ -1712,9 +1713,7 @@
}
}
}
- CNSmlDSSettings* settings = CNSmlDSSettings::NewLC();
- settings->StoreSyncType( alertCode );
- CleanupStack::PopAndDestroy( settings );
+ StoreSyncType( alertCode );
}
// status 406 is returned if <Filter> is present BUT the session continues
@@ -4812,4 +4811,50 @@
}
}
+//-----------------------------------------------------------------------------
+// CNSmlDSCmds::StoreSyncType
+// Checks if received Alert Code is a sync type and tries to convert
+// it to Sync Type (TSmlSyncType).
+//-----------------------------------------------------------------------------
+//
+void CNSmlDSCmds::StoreSyncType( const TDes8& aAlertCode )
+ {
+ TInt syncType = KErrNotFound;
+
+ if ( aAlertCode == KNSmlDSTwoWay )
+ {
+ syncType = ESmlTwoWay;
+ }
+ else if ( aAlertCode == KNSmlDSOneWayFromServer )
+ {
+ syncType = ESmlOneWayFromServer;
+ }
+ else if ( aAlertCode == KNSmlDSOneWayFromClient )
+ {
+ syncType = ESmlOneWayFromClient;
+ }
+ else if ( aAlertCode == KNSmlDSSlowSync )
+ {
+ syncType = ESmlSlowSync;
+ }
+ else if ( aAlertCode == KNSmlDSRefreshFromServer )
+ {
+ syncType = ESmlRefreshFromServer;
+ }
+ else if ( aAlertCode == KNSmlDSRefreshFromClient )
+ {
+ syncType = ESmlRefreshFromClient;
+ }
+
+ if ( syncType != KErrNotFound )
+ {
+ CRepository* rep = NULL;
+ TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys ) );
+ if ( err == KErrNone )
+ {
+ rep->Set( KNsmlOpDsSyncType, syncType );
+ delete rep;
+ }
+ }
+ }
// End of File
--- a/terminalsecurity/SCP/SCPServer/src/SCPServer.cpp Tue May 11 16:59:53 2010 +0300
+++ b/terminalsecurity/SCP/SCPServer/src/SCPServer.cpp Tue May 25 13:36:17 2010 +0300
@@ -52,6 +52,21 @@
// For Device encryption
#include <DevEncEngineConstants.h>
#include <DevEncSessionBase.h>
+#include <startupdomainpskeys.h>
+/*
+#ifdef _DEBUG
+#define __SCP_DEBUG
+#endif // _DEBUG
+
+// Define this so the precompiler in CW 3.1 won't complain about token pasting,
+// the warnings are not valid
+#pragma warn_illtokenpasting off
+
+#ifdef __SCP_DEBUG
+#define Dprint(a) RDebug::Print##a
+#else
+#define Dprint(a)
+#endif // _DEBUG*/
// ==================== LOCAL FUNCTIONS ====================
@@ -654,6 +669,12 @@
void CSCPServer::ValidateConfigurationL( TInt aMode )
{
Dprint( (_L("--> CSCPServer::ValidateConfigurationL()") ));
+ RDebug::Print(_L("--> CSCPServer::ValidateConfigurationL()"));
+ TInt startupReason(ENormalStartup);
+ RProperty::Get(KPSUidStartup, KPSStartupReason, startupReason);
+ Dprint( (_L("CSCPServer::ValidateConfigurationL(): startupReason = %d"), startupReason));
+ if((startupReason == ENormalRFSReset)||(startupReason == EDeepRFSReset)||(startupReason == EFirmwareUpdate)||(iConfiguration.iConfigFlag == KSCPConfigUnknown))
+ {
RMobilePhone::TMobilePassword storedCode;
storedCode.Zero();
@@ -793,7 +814,7 @@
}
User::LeaveIfError( err );
-
+ }
Dprint( (_L("<-- CSCPServer::ValidateConfigurationL()") ));
}