diff -r 5266b1f337bd -r 8baf28733c3d phoneengine/contacthandling/src/cpecontactmatch.cpp --- a/phoneengine/contacthandling/src/cpecontactmatch.cpp Wed Sep 01 12:30:10 2010 +0100 +++ b/phoneengine/contacthandling/src/cpecontactmatch.cpp Tue Sep 14 21:18:17 2010 +0300 @@ -691,8 +691,10 @@ RBuf parsedAddress; CleanupClosePushL( parsedAddress ); TInt digitsformatching( 0 ); - User::LeaveIfError( plugin.GetAddressForMatching( parsedAddress, digitsformatching ) ); - + TBool allowUserNameMatch( EFalse ); + User::LeaveIfError( plugin.GetAddressForMatching( + parsedAddress, digitsformatching, allowUserNameMatch ) ); + CDesCArray* array = new ( ELeave ) CDesC16ArrayFlat( 1 ); CleanupStack::PushL( array ); User::LeaveIfError( plugin.GetContactStoreUris( *array ) ); @@ -704,17 +706,20 @@ // Digits for matching. Supported range is between 4-20. // If not valid value use whole address length for matching. - digitsformatching = ( digitsformatching < KMinValueOfMeaningfulDigits || - digitsformatching > KMaxValueOfMeaningfulDigits ) ? - parsedAddress.Length() : digitsformatching; - + if ( digitsformatching != 0 && + ( digitsformatching < KMinValueOfMeaningfulDigits || + digitsformatching > KMaxValueOfMeaningfulDigits ) ) + { + digitsformatching = parsedAddress.Length(); + } + // Use service specific parameters for matching. TEFLOGSTRING3( KTAINT, "CNT MatchWithVoipAddressUsingExtensionL >\ CPhCntMatcher::MatchVoipNumber, NUMBER: %S, CALL ID: %d", &remoteNumber, aCallId ) iContactMatcher->MatchVoipNumber( aMatch, parsedAddress.Left( Min( parsedAddress.Length(), KPEPhoneNumberMaxLength ) ), - ETrue, array, digitsformatching ); + allowUserNameMatch, array, digitsformatching ); CleanupStack::PopAndDestroy( array ); CleanupStack::PopAndDestroy( &parsedAddress );