telephonyprotocols/rawipnif/src/Sender.cpp
branchRCL_3
changeset 7 fe8b59ab9fa0
parent 0 3553901f7fa8
child 17 1ac40e087278
--- a/telephonyprotocols/rawipnif/src/Sender.cpp	Mon Mar 15 12:45:06 2010 +0200
+++ b/telephonyprotocols/rawipnif/src/Sender.cpp	Wed Mar 31 23:24:02 2010 +0300
@@ -1,4 +1,4 @@
-// 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 "Eclipse Public License v1.0"
@@ -30,11 +30,15 @@
  *
  * @param aObserver Reference to the observer of this state machine
  */
-	: CActive(EPriorityStandard), 
+	: CActive(EPriorityUserInput), 
 	  iObserver(aObserver),
 	  iTheLogger(aTheLogger),
-	  iMaxPacketSise(aMaxPacketSise)
+	  iMaxPacketSize(aMaxPacketSise)
 	{
+    // EPriorityUserInput is higher than the default priority but lower than
+    // EPriorityHigh which is used on Receiving (DL having priority), however,
+    // we want this to be handled in an expedited manner compared to other
+    // active objects in the thread.
 	CActiveScheduler::Add(this);
 	}
 
@@ -61,7 +65,7 @@
  */
 	{
 	_LOG_L1C1(_L8("CSender::ConstructL"));
-	iSendBuffer.CreateL(iMaxPacketSise);
+	iSendBuffer.CreateL(iMaxPacketSize);
 	}
 
 CSender::~CSender()
@@ -143,20 +147,8 @@
 
 	aPdu.Free();
 
-	SendBuffer(iSendBuffer);
+	(iObserver.Bca())->Write(iStatus, iSendBuffer);
+	
+	SetActive();
 	}
 
-void CSender::SendBuffer(const TDesC8& aBuffer)
-/**
- * Sends an IP packet, contained in the specified descriptor
- *
- * @param aBuffer The IP packet to send.
- * @return Always KStopSending.
- */
-	{
-	_LOG_L1C1(_L8("CSender::SendBuffer"));
-
-	// Finally, send the packet to BCA
-	(iObserver.Bca())->Write(iStatus, aBuffer);
-	SetActive();
-	}