diff -r ab2197e94294 -r 7f274f99c152 telephonyprotocols/csdagt/src/ND_DIRCT.CPP --- a/telephonyprotocols/csdagt/src/ND_DIRCT.CPP Wed Jun 16 15:43:02 2010 +0100 +++ b/telephonyprotocols/csdagt/src/ND_DIRCT.CPP Thu Jul 22 16:45:24 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -23,7 +23,6 @@ #include "ND_SCR.H" #include "ND_DBACC.H" #include "ND_STD.H" -#include "SLOGGER.H" #include "ND_DIRECTSTATES.H" CDirCtAgXSM* CDirCtAgXSM::NewL(MAgentNotify& aControllerObserver, CDialogProcessor* aDlgPrc, CCommsDbAccess& aDbAccess) @@ -90,10 +89,18 @@ iDbAccess->GetCommPortRoleL(role); TInt len; iDbAccess->GetScriptDetailsL(iUseScript,len); + if (!iUseScript || len==0) { // set them consistently iUseScript=EFalse; } + + if (iNdScript != NULL) + { + delete iNdScript; + iNdScript = NULL; + } + iNdScript=CNetDialScript::NewL(iDbAccess,iDlgPrc,commPort,role,len); // create it whatever because we need other stuff }