diff -r df4dfb214df5 -r 8c9c07ad8b6b voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlpresencehandler.cpp --- a/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlpresencehandler.cpp Wed Jun 09 09:31:04 2010 +0300 +++ b/voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlpresencehandler.cpp Mon Jun 21 15:29:21 2010 +0300 @@ -214,14 +214,16 @@ void CVoipXmlPresenceHandler::CreateProviderNameL( TDes& aName ) { DBG_PRINT( "CVoipXmlPresenceHandler::CreateProviderNameL begin" ); - + + const TInt maxModifyLength = + KMaxNodeNameLength - KMaxProfileNameAppendLength; RArray settingIds; CleanupClosePushL( settingIds ); // CS:1 // CS:2 CDesCArray* names = PresSettingsApi::GetAllSetsNamesLC( settingIds ); HBufC* newName = HBufC::NewLC( KMaxNodeNameLength ); // CS:3 - newName->Des().Copy( aName ); + newName->Des().Copy( aName.Left( maxModifyLength ) ); const TInt count( names->MdcaCount() ); TUint i( 1 ); // Add number to the name if name already in use. @@ -236,7 +238,7 @@ { // If the name is changed we need to begin the comparison // again from the first profile. - newName->Des().Copy( aName ); + newName->Des().Copy( aName.Left( maxModifyLength ) ); newName->Des().Append( KOpenParenthesis() ); newName->Des().AppendNum( i ); newName->Des().Append( KClosedParenthesis() );