diff -r fa67e03b87df -r 6295dc2169f3 adaptationlayer/tsy/simatktsy_dll/src/satdatadownload.cpp --- a/adaptationlayer/tsy/simatktsy_dll/src/satdatadownload.cpp Wed Feb 17 13:58:55 2010 +0200 +++ b/adaptationlayer/tsy/simatktsy_dll/src/satdatadownload.cpp Wed Apr 21 14:29:55 2010 +0300 @@ -287,6 +287,13 @@ TIsiSubBlock userData( msgBuffer, SMS_SB_USER_DATA, EIsiSubBlockTypeId16Len16 ); + TUint16 maxDataLen( SMS_DELIVER_ACK_UD_MAX_LEN ); + if( ENone != aTpFailure ) + { + maxDataLen = SMS_DELIVER_ERR_UD_MAX_LEN; + } + dataLen = Min( dataLen, maxDataLen ); + // data length // to append MSB byte msgBuffer.Append( dataLen >> 8 ); @@ -307,9 +314,8 @@ msgBuffer.Append( dataLengthInOctets >> 8 ); msgBuffer.Append( dataLengthInOctets ); - // Append whole msg or SMS_GSM_DELIVER_ACK_UD_MAX_LEN bytes - msgBuffer.Append( aUserData.Left(Min( dataLen, - SMS_COMMAND_DATA_MAX_LEN ) ) ); + // Append whole msg or max data len bytes + msgBuffer.Append( aUserData.Left( dataLen ) ); // Increment number of subblock msgBuffer[5]++;