adaptationlayer/tsy/simatktsy_dll/src/satdatadownload.cpp
changeset 7 fa67e03b87df
parent 5 8ccc39f9d787
child 8 6295dc2169f3
--- a/adaptationlayer/tsy/simatktsy_dll/src/satdatadownload.cpp	Fri Jan 22 10:04:04 2010 +0200
+++ b/adaptationlayer/tsy/simatktsy_dll/src/satdatadownload.cpp	Wed Feb 17 13:58:55 2010 +0200
@@ -211,7 +211,7 @@
     TUint8 causeType( ENone == aTpFailure ?
         SMS_CAUSE_TYPE_COMMON : SMS_CAUSE_TYPE_EXT );
     TUint8 smsCause( ENone == aTpFailure ?
-        SMS_OK : SMS_ERR_PP_RESERVED );
+        SMS_OK : SMS_EXT_ERR_PROTOCOL_ERROR );
 
     TUint16 dataLen( aUserData.Length() );
 
@@ -237,7 +237,8 @@
     msgBuffer.Append( 0 );           // no of sublocks
 
     // Add SMS_SB_DELIVER_REPORT subblock if any failure is there
-    if( ENone != aTpFailure )
+    if( ENone != aTpFailure || 
+        0 < dataLen )
         {
         TFLOGSTRING("TSY:CSatDataDownload::BuildSimMsgReport \
                  Adding SMS_SB_DELIVER_REPORT" );
@@ -253,7 +254,6 @@
         msgBuffer.Append( 0x00 ); // SMS_MTI_DELIVER_REPORT
 
         msgBuffer.Append( aTpFailure ); // GSM-TP Failure cause
-        msgBuffer.AppendFill( KPadding, 2);
         // Increment number of subblock
         msgBuffer[5]++;
         deliverReport.CompleteSubBlock();