connectivitylayer/usbphonetlink/usbpnserver_exe/src/cusbpnusbreceiver.cpp
changeset 8 6295dc2169f3
parent 7 fa67e03b87df
child 9 8486d82aef45
--- a/connectivitylayer/usbphonetlink/usbpnserver_exe/src/cusbpnusbreceiver.cpp	Wed Feb 17 13:58:55 2010 +0200
+++ b/connectivitylayer/usbphonetlink/usbpnserver_exe/src/cusbpnusbreceiver.cpp	Wed Apr 21 14:29:55 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -132,7 +132,14 @@
     C_TRACE( ( _T( "CUsbPnUsbReceiver::DoCancel()" ) ) );
 
     iLdd.ReadCancel( EEndpoint2 );
+
+#ifdef _DEBUG
     TRAPD(err, iPacket->ReleaseL());
+#elif defined OST_TRACE_COMPILER_IN_USE
+    TRAPD(err, iPacket->ReleaseL());
+#else
+    TRAP_IGNORE(iPacket->ReleaseL());
+#endif
 
     OstTrace1( TRACE_NORMAL, CUSBPNUSBRECEIVER_DOCANCEL, "CUsbPnUsbReceiver::DoCancel - err=%d", err );
     C_TRACE( ( _T( "CUsbPnUsbReceiver::DoCancel() - err=%d" ), err ) );
@@ -232,14 +239,13 @@
             }
         default:
             {
-            TRACE_ASSERT_ALWAYS;
-            User::Panic( KUsbPnPanicCat, aError );
+            TRACE_ASSERT_ALWAYS;           
             break;
             }
         }
 
     OstTrace0( TRACE_NORMAL, CUSBPNUSBRECEIVER_RUNERROR_EXIT, "CUsbPnUsbReceiver::RunError - return" );
-    C_TRACE( ( _T( "CUsbPnUsbReceiver::RunL() - return" ) ) );
+    C_TRACE( ( _T( "CUsbPnUsbReceiver::RunError() - return" ) ) );
     return KErrNone;
     }
 
@@ -377,11 +383,13 @@
             iStorage = NULL;
             }
 
+#ifdef ISI_LENGTH_LITTLE_ENDIAN
         // Converts the endianess of message length
         TUint8 tmp4(iRecvPtr[ISI_HEADER_OFFSET_LENGTH]);
         TUint8 tmp5(iRecvPtr[ISI_HEADER_OFFSET_LENGTH +1]);
         iRecvPtr[ISI_HEADER_OFFSET_LENGTH] = tmp5;
         iRecvPtr[ISI_HEADER_OFFSET_LENGTH +1] = tmp4;
+#endif // #ifdef ISI_LENGTH_LITTLE_ENDIAN
 
 #ifndef NCP_COMMON_BRIDGE_FAMILY
         // Message directly to APE Test Server.