diff -r f92a4f87e424 -r 012cc2ee6408 usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/ActiveWriter.cpp --- a/usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/ActiveWriter.cpp Tue Aug 31 17:01:47 2010 +0300 +++ b/usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/ActiveWriter.cpp Wed Sep 01 12:35:00 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -22,12 +22,12 @@ #include "AcmPanic.h" #include "WriteObserver.h" #include "AcmUtils.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "ActiveWriterTraces.h" +#include + +#ifdef __FLOG_ACTIVE +_LIT8(KLogComponent, "ECACM"); #endif - CActiveWriter::CActiveWriter(MWriteObserver& aParent, RDevUsbcClient& aLdd, TEndpointNumber aEndpoint) : CActive(KEcacmAOPriority), iParent(aParent), @@ -44,9 +44,7 @@ * @param aEndpoint The endpoint to write to. */ { - OstTraceFunctionEntry0( CACTIVEWRITER_CACTIVEWRITER_CONS_ENTRY ); CActiveScheduler::Add(this); - OstTraceFunctionExit0( CACTIVEWRITER_CACTIVEWRITER_CONS_EXIT ); } CActiveWriter::~CActiveWriter() @@ -54,9 +52,9 @@ * Destructor. */ { - OstTraceFunctionEntry0( CACTIVEWRITER_CACTIVEWRITER_DES_ENTRY ); + LOG_FUNC + Cancel(); - OstTraceFunctionExit0( CACTIVEWRITER_CACTIVEWRITER_DES_EXIT ); } CActiveWriter* CActiveWriter::NewL(MWriteObserver& aParent, @@ -72,9 +70,9 @@ * @return Ownership of a new CActiveWriter object. */ { - OstTraceFunctionEntry0( CACTIVEWRITER_NEWL_ENTRY ); + LOG_STATIC_FUNC_ENTRY + CActiveWriter* self = new(ELeave) CActiveWriter(aParent, aLdd, aEndpoint); - OstTraceFunctionExit0( CACTIVEWRITER_NEWL_EXIT ); return self; } @@ -89,8 +87,8 @@ * @param aZlp Whether ZLP termination may be required. */ { - OstTraceFunctionEntry0( CACTIVEWRITER_WRITE_ENTRY ); - + LOGTEXT(_L8(">>CActiveWriter::Write")); + if ( aZlp ) { // the driver can be relied on to correctly handle appended ZLPs @@ -111,7 +109,7 @@ { iLdd.Write(iStatus, iEndpoint, aDes, aLen, EFalse); iWritingState = ECompleteMessage; - OstTrace1( TRACE_NORMAL, CACTIVEWRITER_WRITE, "CActiveWriter::Write;Writing %d bytes", aLen ); + LOGTEXT2(_L8("CActiveWriter::Writing %d bytes"), aLen); } else { @@ -127,12 +125,12 @@ iLdd.Write(iStatus, iEndpoint, iFirstPortion, aLen-1, EFalse); iWritingState = EFirstMessagePart; - OstTraceExt2( TRACE_NORMAL, CACTIVEWRITER_WRITE_DUP1, - "CActiveWriter::Write;Writing %d bytes of the %d", aLen-1, aLen ); + LOGTEXT3(_L8("CActiveWriter::Writing %d bytes of the %d"), aLen-1, aLen); } } SetActive(); - OstTraceFunctionExit0( CACTIVEWRITER_WRITE_EXIT ); + + LOGTEXT(_L8("<>CActiveWriter::RunL iStatus=%d"), iStatus.Int()); if ( iWritingState == EFirstMessagePart ) { @@ -161,8 +159,8 @@ // now send the second part.. iLdd.Write(iStatus, iEndpoint, iSecondPortion, iSecondPortion.Length(), EFalse); iWritingState = EFinalMessagePart; - OstTrace0( TRACE_NORMAL, CACTIVEWRITER_RUNL_DUP1, - "CActiveWriter::RunL;Writing 1 byte to complete original nx64 byte message" ); + LOGTEXT(_L8("CActiveWriter::Writing 1 byte to complete original nx64 byte message")); + SetActive(); } else @@ -177,7 +175,7 @@ iParent.WriteCompleted(iStatus.Int()); } - OstTraceFunctionExit0( CACTIVEWRITER_RUNL_EXIT ); + LOGTEXT(_L8("<