diff -r c40eb8fe8501 -r ab7247ff6ef9 wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp --- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp Tue Feb 02 02:03:13 2010 +0200 +++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp Fri Mar 19 10:03:22 2010 +0200 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-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" @@ -16,7 +16,7 @@ */ /* -* %version: 23 % +* %version: 24 % */ #include "WlLddWlanLddConfig.h" @@ -168,7 +168,7 @@ // DEthernetFrameMemMngr::~DEthernetFrameMemMngr() { - OnReleaseMemory(); + MarkMemFree(); iFrameXferBlock = NULL; iTxDataBuffer = NULL; @@ -179,15 +179,6 @@ // // --------------------------------------------------------------------------- // -void DEthernetFrameMemMngr::OnReleaseMemory() - { - MarkMemFree(); // mark as free - } - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// TDataBuffer* DEthernetFrameMemMngr::OnWriteEthernetFrame() const { if ( iTxDataBuffer->GetLength() >= sizeof( SEthernetHeader ) ) @@ -420,11 +411,18 @@ TDataBuffer*& aPacketInKernSpace, TBool aUserDataTxEnabled ) { - return (static_cast( - iFrameXferBlock))->AddTxFrame( - aPacketInUserSpace, - aPacketInKernSpace, - aUserDataTxEnabled ); + if ( IsMemInUse() ) + { + return (static_cast( + iFrameXferBlock))->AddTxFrame( + aPacketInUserSpace, + aPacketInKernSpace, + aUserDataTxEnabled ); + } + else + { + return EFalse; + } } // --------------------------------------------------------------------------- @@ -435,13 +433,15 @@ const TWhaTxQueueState& aTxQueueState, TBool& aMore ) { - if ( IsMemInUse() ) + if ( IsMemInUse() && iFrameXferBlock ) { return (static_cast( iFrameXferBlock))->GetTxFrame( aTxQueueState, aMore ); } else + { return NULL; + } } // ---------------------------------------------------------------------------