diff -r d3e8e7d462dd -r f92a4f87e424 usbmgmt/usbmgr/device/classcontroller/SRC/CUsbClassControllerIterator.cpp --- a/usbmgmt/usbmgr/device/classcontroller/SRC/CUsbClassControllerIterator.cpp Thu Jul 15 20:42:20 2010 +0300 +++ b/usbmgmt/usbmgr/device/classcontroller/SRC/CUsbClassControllerIterator.cpp Tue Aug 31 17:01:47 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 1997-2010 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" @@ -24,10 +24,12 @@ #include #include +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "CUsbClassControllerIteratorTraces.h" +#endif -#ifdef __FLOG_ACTIVE -_LIT8(KLogComponent, "USBSVR"); -#endif + // Panic category only used in debug builds #ifdef _DEBUG @@ -130,10 +132,13 @@ */ EXPORT_C CUsbClassControllerBase* CUsbClassControllerIterator::Current() { - __ASSERT_DEBUG((iClassControllerIndex >= 0) && - (iClassControllerIndex < iClassControllerArray.Count()), - _USB_PANIC(KUsbCcIteratorPanicCategory, EIndexOutOfRange)); - +#ifdef _DEBUG + if(!((iClassControllerIndex >= 0) && (iClassControllerIndex < iClassControllerArray.Count()))) + { + OstTrace1( TRACE_FATAL, CUSBCLASSCONTROLLERITERATOR_CURRENT, "CUsbClassControllerIterator::Current;panic reason=%d", EIndexOutOfRange ); + User::Panic(KUsbCcIteratorPanicCategory, EIndexOutOfRange ); + } +#endif return iClassControllerArray[iClassControllerIndex]; }