552 TUint16 calcFinalLength( TUint16( iFinalLength - KMessageHeaderLength ) ); |
552 TUint16 calcFinalLength( TUint16( iFinalLength - KMessageHeaderLength ) ); |
553 |
553 |
554 C_TRACE( ( _T ( "TIsiSend::Complete, length: 0x%x, calcfinallength: 0x%x" ), length, calcFinalLength ) ); |
554 C_TRACE( ( _T ( "TIsiSend::Complete, length: 0x%x, calcfinallength: 0x%x" ), length, calcFinalLength ) ); |
555 OstTraceExt2( TRACE_NORMAL, DUP1_TISISEND_COMPLETE, "TIsiSend::Complete;length=%hu;calcFinalLength=%hu", length, calcFinalLength ); |
555 OstTraceExt2( TRACE_NORMAL, DUP1_TISISEND_COMPLETE, "TIsiSend::Complete;length=%hu;calcFinalLength=%hu", length, calcFinalLength ); |
556 |
556 |
557 #if defined( __WINS__ ) || defined( __WINSCW__ ) |
557 if( iFinalLength == 0 ) // TIsiSend alternative constructor used |
558 { |
558 { |
559 if( iFinalLength == 0 ) // TIsiSend alternative constructor used |
559 TUint8 byte1 = ( TUint8 )( ( length & 0xff00 ) >> 8 ); |
560 { |
560 TUint8 byte2 = ( TUint8 )( length & 0x00ff ); |
561 TUint8 byte1 = ( TUint8 )( ( length & 0xff00 ) >> 8 ); |
561 this->Set8bit( ISI_HEADER_OFFSET_LENGTH, byte1 ); // BE |
562 TUint8 byte2 = ( TUint8 )( length & 0x00ff ); |
562 this->Set8bit( ISI_HEADER_OFFSET_LENGTH + 1, byte2 ); // BE |
563 this->Set8bit( ISI_HEADER_OFFSET_LENGTH, byte1 ); // BE |
563 } |
564 this->Set8bit( ISI_HEADER_OFFSET_LENGTH + 1, byte2 ); // BE |
564 else |
565 } |
565 { |
566 else |
566 TUint8 byte1 = ( TUint8 )( ( calcFinalLength & 0xff00 ) >> 8 ); |
567 { |
567 TUint8 byte2 = ( TUint8 )( calcFinalLength & 0x00ff ); |
568 TUint8 byte1 = ( TUint8 )( ( calcFinalLength & 0xff00 ) >> 8 ); |
568 this->Set8bit( ISI_HEADER_OFFSET_LENGTH, byte1 ); // BE |
569 TUint8 byte2 = ( TUint8 )( calcFinalLength & 0x00ff ); |
569 this->Set8bit( ISI_HEADER_OFFSET_LENGTH + 1, byte2 ); // BE |
570 this->Set8bit( ISI_HEADER_OFFSET_LENGTH, byte1 ); // BE |
570 iBuffer.SetLength( iFinalLength ); |
571 this->Set8bit( ISI_HEADER_OFFSET_LENGTH + 1, byte2 ); // BE |
571 } |
572 iBuffer.SetLength( iFinalLength ); |
|
573 } |
|
574 } |
|
575 #else |
|
576 { |
|
577 if( iFinalLength == 0 ) // TIsiSend alternative constructor used |
|
578 { |
|
579 TUint8 byte1 = ( TUint8 )( ( length & 0xff00 ) >> 8 ); |
|
580 TUint8 byte2 = ( TUint8 )( length & 0x00ff ); |
|
581 this->Set8bit( ISI_HEADER_OFFSET_LENGTH, byte2 ); // LE |
|
582 this->Set8bit( ISI_HEADER_OFFSET_LENGTH + 1, byte1 ); // LE |
|
583 } |
|
584 else |
|
585 { |
|
586 TUint8 byte1 = ( TUint8 )( ( calcFinalLength & 0xff00 ) >> 8 ); |
|
587 TUint8 byte2 = ( TUint8 )( calcFinalLength & 0x00ff ); |
|
588 this->Set8bit( ISI_HEADER_OFFSET_LENGTH, byte2 ); // LE |
|
589 this->Set8bit( ISI_HEADER_OFFSET_LENGTH + 1, byte1 ); // LE |
|
590 iBuffer.SetLength( iFinalLength ); |
|
591 } |
|
592 } |
|
593 #endif |
|
594 |
572 |
595 C_TRACE( ( _T ( "TIsiSend::Complete, byte2: 0x%x, byte1: 0x%x" ), iBuffer[5], iBuffer[4] ) ); |
573 C_TRACE( ( _T ( "TIsiSend::Complete, byte2: 0x%x, byte1: 0x%x" ), iBuffer[5], iBuffer[4] ) ); |
596 OstTraceExt2( TRACE_NORMAL, DUP2_TISISEND_COMPLETE, "TIsiSend::Complete;byte2=%hhu;byte1=%hhu", iBuffer[5], iBuffer[4] ); |
574 OstTraceExt2( TRACE_NORMAL, DUP2_TISISEND_COMPLETE, "TIsiSend::Complete;byte2=%hhu;byte1=%hhu", iBuffer[5], iBuffer[4] ); |
597 |
575 |
598 C_TRACE( ( _L ( "TIsiSend::Complete - return, buffer length = 0x%x, iFinalLength = 0x%x" ), length, iFinalLength ) ); |
576 C_TRACE( ( _L ( "TIsiSend::Complete - return, buffer length = 0x%x, iFinalLength = 0x%x" ), length, iFinalLength ) ); |