voipplugins/voipadapters/voipxmlprovisioning/voipxmlprocessor/src/voipxmlvoiphandler.cpp
equal
deleted
inserted
replaced
292 TInt intValue( KErrNotFound ); |
292 TInt intValue( KErrNotFound ); |
293 switch ( aParam ) |
293 switch ( aParam ) |
294 { |
294 { |
295 case EName: |
295 case EName: |
296 { |
296 { |
297 TBuf<KMaxSettingsNameLength> name( KNullDesC ); |
297 TBuf<KMaxNodeValueLength> name( KNullDesC ); |
298 name.Copy( aValue ); |
298 name.Copy( aValue ); |
299 TRAP_IGNORE( ValidateProfileNameL( name ) ); |
299 TRAP_IGNORE( ValidateProfileNameL( name ) ); |
300 iEntry->iProviderName.Copy( name ); |
300 iEntry->iProviderName.Copy( name ); |
301 iEntry->iSettingsName.Copy( name ); |
301 iEntry->iSettingsName.Copy( name ); |
302 iSettingsSet = ETrue; |
302 iSettingsSet = ETrue; |
807 |
807 |
808 HBufC* newName = HBufC::NewLC( KMaxSettingsNameLength ); // CS:2 |
808 HBufC* newName = HBufC::NewLC( KMaxSettingsNameLength ); // CS:2 |
809 newName->Des().Copy( aName.Left( maxModifyLength ) ); |
809 newName->Des().Copy( aName.Left( maxModifyLength ) ); |
810 |
810 |
811 TUint i( 1 ); // Add number to the name if name already in use. |
811 TUint i( 1 ); // Add number to the name if name already in use. |
812 TBool changed( EFalse ); |
|
813 |
812 |
814 // Go through each profile and see if the name of the new profile |
813 // Go through each profile and see if the name of the new profile |
815 // matches one of the existing names. If it does change it and |
814 // matches one of the existing names. If it does change it and |
816 // check the new name again. |
815 // check the new name again. |
817 for ( TInt index = 0; index < count; index++ ) |
816 for ( TInt index = 0; index < count; index++ ) |
832 i++; |
831 i++; |
833 if ( KMaxProfileNames < i ) |
832 if ( KMaxProfileNames < i ) |
834 { |
833 { |
835 User::Leave( KErrBadName ); |
834 User::Leave( KErrBadName ); |
836 } |
835 } |
837 changed = ETrue; |
|
838 } |
836 } |
839 CleanupStack::PopAndDestroy( profile ); // CS:2 |
837 CleanupStack::PopAndDestroy( profile ); // CS:2 |
840 } |
838 } |
841 |
839 |
842 // Change setting only if it was changed. |
840 aName.Copy( *newName ); |
843 if ( changed ) |
|
844 { |
|
845 aName.Copy( newName->Des() ); |
|
846 } |
|
847 |
841 |
848 // newName, &voipIds |
842 // newName, &voipIds |
849 CleanupStack::PopAndDestroy( 2, &voipIds ); // CS:0 |
843 CleanupStack::PopAndDestroy( 2, &voipIds ); // CS:0 |
850 } |
844 } |
851 |
845 |