diff -r a03f92240627 -r 33016869e0dd hti/HtiFramework/src/HtiFramework.cpp --- a/hti/HtiFramework/src/HtiFramework.cpp Tue Feb 02 01:57:15 2010 +0200 +++ b/hti/HtiFramework/src/HtiFramework.cpp Fri Apr 16 16:37:27 2010 +0300 @@ -49,14 +49,16 @@ _LIT8( KEnableHtiWatchDog, "EnableHtiWatchDog" ); _LIT8( KEnableHtiAutoStart, "EnableHtiAutoStart" ); _LIT8( KShowErrorDialogs, "ShowErrorDialogs" ); +_LIT8( KReconnectDelay, "ReconnectDelay"); const static TInt KDefaultMaxWaitTime = 90; // seconds const static TInt KDefaultStartUpDelay = 5; // seconds const static TInt KHtiDefaultPriority = 3; const static TInt KHtiWatchDogEnabledDefault = 0; const static TInt KHtiConsoleEnabledDefault = 0; -const static TInt KHtiAutoStartEnabledDefault = 0; +const static TInt KHtiAutoStartEnabledDefault = 1; const static TInt KHtiShowErrorDialogsDefault = 1; +const static TInt KHtiReconnectDelay = 0; // MACROS @@ -101,6 +103,7 @@ TInt showConsole = KHtiConsoleEnabledDefault; TInt enableHtiAutoStart = KHtiAutoStartEnabledDefault; TInt showErrorDialogs = KHtiShowErrorDialogsDefault; + TInt reconnectDelay = KHtiReconnectDelay; TRAPD( err, iCfg = CHtiCfg::NewL() ); if ( err == KErrNone ) @@ -212,7 +215,14 @@ HTI_LOG_TEXT( "The following parameter not defined in cfg, using default value:" ); HTI_LOG_DES( KShowErrorDialogs ); } - + + TRAP( paramErr, reconnectDelay = iCfg->GetParameterIntL( KReconnectDelay ) ); + if ( paramErr != KErrNone ) + { + HTI_LOG_TEXT( "The following parameter not defined in cfg, using default value:" ); + HTI_LOG_DES( KReconnectDelay ); + } + if ( !IsStartAcceptedL( enableHtiAutoStart ) ) { User::Leave( KErrAbort ); @@ -220,7 +230,7 @@ WaitNormalState( maxWaitTime, startUpDelay ); iDispatcher = CHtiDispatcher::NewL( commPlugin, maxMsgSize, - maxQueueSize, showConsole != 0, showErrorDialogs != 0 ); + maxQueueSize, reconnectDelay, showConsole != 0, showErrorDialogs != 0 ); } } @@ -239,7 +249,7 @@ //create with default values iDispatcher = CHtiDispatcher::NewL( - KNullDesC8, 0, 0, showConsole != 0, showErrorDialogs != 0 ); + KNullDesC8, 0, 0, 0, showConsole != 0, showErrorDialogs != 0 ); } HTI_LOG_FORMAT( "Priority setting = %d", priority );