--- a/basebandadaptationplugins/basebandchanneladaptorforc32/te_c32bca/configs/TE_C32BcaUnit.ini Mon Jun 21 16:59:31 2010 +0300
+++ b/basebandadaptationplugins/basebandchanneladaptorforc32/te_c32bca/configs/TE_C32BcaUnit.ini Thu Jul 15 19:58:53 2010 +0300
@@ -135,14 +135,19 @@
ExpectedCommRole = DCE
[ValidChannelId]
+PDD_Name = ECDRV
+LDD_Name = ECOMM
+CSY_Name = PKTLOOPBACK
+Port_Name = PKTLOOPBACK::501
+BcaCSY_Name = PKTLOOPBACK
UUT_Name = UUT
Peer_Name = Peer
UUT_PortName = BOGUS
Peer_PortName = BOGUS
-UUT_IapId = 4
+UUT_IapId = 1
Peer_IapId = 2
-Port_Name1 = ECUART::COMM::0
-Port_Name2 = COMM::0
+Port_Name1 = PKTLOOPBACK::PKTLOOPBACK::501
+Port_Name2 = PKTLOOPBACK::501
[HiddenIAPRecord]
PDD_Name = ECDRV
--- a/basebandadaptationplugins/basebandchanneladaptorforc32/te_c32bca/configs/te_c32BcaUnit.xml Mon Jun 21 16:59:31 2010 +0300
+++ b/basebandadaptationplugins/basebandchanneladaptorforc32/te_c32bca/configs/te_c32BcaUnit.xml Thu Jul 15 19:58:53 2010 +0300
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+ Copyright (c) 2004-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"
@@ -83,9 +83,9 @@
</IAP>
<IAP operation="add">
- <Name>ECUART_Csy_Invalid_Port</Name>
+ <Name>PKTLB_Csy_Invalid_Port</Name>
<IAPService>OutgoingGPRS.Dummy</IAPService>
- <IAPBearer>ModemBearer.ECUART_Csy_Invalid_Port</IAPBearer>
+ <IAPBearer>ModemBearer.PKTLB_Csy_Invalid_Port</IAPBearer>
<IAPNetwork>Network.Intranet</IAPNetwork>
<IAPNetworkWeighting>0</IAPNetworkWeighting>
<LocationRef>Location.Mobile</LocationRef>
@@ -223,9 +223,10 @@
</ModemBearer>
<ModemBearer operation="add">
- <Name>ECUART_Csy_Invalid_Port</Name>
- <CSYName>ECUART</CSYName>
+ <Name>PKTLB_Csy_Invalid_Port</Name>
+ <CSYName>PKTLOOPBACK</CSYName>
<PortName>INVALID_PORT_NAME</PortName>
+ <CommRole>1</CommRole>
</ModemBearer>
--- a/basebandadaptationplugins/basebandchanneladaptorforc32/te_c32bca/scripts/TE_C32BcaUnit.script Mon Jun 21 16:59:31 2010 +0300
+++ b/basebandadaptationplugins/basebandchanneladaptorforc32/te_c32bca/scripts/TE_C32BcaUnit.script Thu Jul 15 19:58:53 2010 +0300
@@ -520,42 +520,42 @@
START_TESTCASE NET-BasebandAdaptation-c32bca-0133
//! @SYMTestCaseID NET-BasebandAdaptation-c32bca-0133
-//! @SYMTestCaseDesc Tests C32Bca Ioctl for serial port.
+//! @SYMTestCaseDesc Tests C32Bca Ioctl for serial port (using packetloopback.csy as current phone hardware does not support a serial driver).
//! @SYMFssID NETWORKING/BCA
//! @SYMTestActions Refer to SGL.GT0233.603.C32Bca_Unit_test_spec.doc
//! @SYMTestExpectedResults Refer to SGL.GT0233.603.C32Bca_Unit_test_spec.doc.
//! @SYMTestPriority High
//! @SYMTestStatus Implemented
//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_C32BcaSvr CIoctlSerialPort1 z:\TestData\Configs\TE_C32BcaUnit.ini SerialPortConfig0
+RUN_TEST_STEP 100 TE_C32BcaSvr CIoctlSerialPort1 z:\TestData\Configs\TE_C32BcaUnit.ini CommRoleDTE
DELAY 1000
END_TESTCASE NET-BasebandAdaptation-c32bca-0133
START_TESTCASE NET-BasebandAdaptation-c32bca-0134
//! @SYMTestCaseID NET-BasebandAdaptation-c32bca-0134
-//! @SYMTestCaseDesc Tests C32Bca Ioctl for serial port.
+//! @SYMTestCaseDesc Tests C32Bca Ioctl for serial port (using packetloopback.csy as current phone hardware does not support a serial driver).
//! @SYMFssID NETWORKING/BCA
//! @SYMTestActions Refer to SGL.GT0233.603.C32Bca_Unit_test_spec.doc
//! @SYMTestExpectedResults Refer to SGL.GT0233.603.C32Bca_Unit_test_spec.doc.
//! @SYMTestPriority Critical
//! @SYMTestStatus Implemented
//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_C32BcaSvr CIoctlSerialPort2 z:\TestData\Configs\TE_C32BcaUnit.ini SerialPortConfig0
+RUN_TEST_STEP 100 TE_C32BcaSvr CIoctlSerialPort2 z:\TestData\Configs\TE_C32BcaUnit.ini CommRoleDTE
DELAY 1000
END_TESTCASE NET-BasebandAdaptation-c32bca-0134
START_TESTCASE NET-BasebandAdaptation-c32bca-0135
//! @SYMTestCaseID NET-BasebandAdaptation-c32bca-0135
-//! @SYMTestCaseDesc Tests C32Bca Ioctl for serial port.
+//! @SYMTestCaseDesc Tests C32Bca Ioctl for serial port (using packetloopback.csy as current phone hardware does not support a serial driver).
//! @SYMFssID NETWORKING/BCA
//! @SYMTestActions Refer to SGL.GT0233.603.C32Bca_Unit_test_spec.doc
//! @SYMTestExpectedResults Refer to SGL.GT0233.603.C32Bca_Unit_test_spec.doc.
//! @SYMTestPriority High
//! @SYMTestStatus Implemented
//! @SYMTestType UT
-RUN_TEST_STEP 100 TE_C32BcaSvr CIoctlSerialPort3 z:\TestData\Configs\TE_C32BcaUnit.ini SerialPortConfig0
+RUN_TEST_STEP 100 TE_C32BcaSvr CIoctlSerialPort3 z:\TestData\Configs\TE_C32BcaUnit.ini CommRoleDTE
DELAY 1000
END_TESTCASE NET-BasebandAdaptation-c32bca-0135
--- a/basebandadaptationplugins/basebandchanneladaptorforc32/te_c32bca/src/te_C32BcaUnitSteps.cpp Mon Jun 21 16:59:31 2010 +0300
+++ b/basebandadaptationplugins/basebandchanneladaptorforc32/te_c32bca/src/te_C32BcaUnitSteps.cpp Thu Jul 15 19:58:53 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -1301,13 +1301,17 @@
}
/**
-Tests C32Bca can read hidden records from the Comms database.
+Tests C32Bca can read hidden records from the Comms database.
+The test creates an entry in CommsDat for a valid CSY using an invalid (unknown) Port Id.
+The C32Bca reads this entry and tries to connect to the Comms Server, load the packet loopback csy and open channel UNKNOWN:0.
+The Comms Server returns -46, which indicates that it managed to load the packetloop bca csy but returns -46 indicating that
+port is invalid.
*/
TVerdict CHiddenIAPRecord::RunTestStepL()
{
- _LIT(KCsyName, "ECUART");
- _LIT(KCsyPortName, "ECUART::0");
+ _LIT(KCsyName, "PKTLOOPBACK");
+ _LIT(KCsyPortName, "UNKNOWN::0");
_LIT(KCsyRecordName, "DummyRecordName");
_LIT(KIAPRecordName, "DummyHiddenIAP");
@@ -1540,30 +1544,31 @@
TVerdict CIoctlSerialPort1::RunTestStepL()
{
LoadC32SettingsFromConfigFileL();
-
+
LoadCsyNameFromConfigFileL();
OpenRealCommPortL(iCommPort, iC32CsyName, iC32PortName);
-
+
LoadUutL();
SetProxyCsyL(*iUut, iC32CsyName);
-
+
iUut->Open(iC32PortName);
iUut->WaitForOpenL(KErrNone);
-
+
TCommConfig actualCommConfig;
iCommPort.Config(actualCommConfig);
actualCommConfig().iTerminatorCount = 1;
actualCommConfig().iTerminator[0] = 0x7E;
- LogAndLeaveIfErrorL(iCommPort.SetConfig(actualCommConfig), _L("Setting COMM Config on RComm"));
-
+
+ LogAndLeaveIfErrorL(iCommPort.SetConfig(actualCommConfig), _L("Setting COMM Config on RComm"));
+
TCommConfig balCommConfig;
// sanity check
TRAPD(err, CheckBuffersEqualL(balCommConfig, actualCommConfig));
if(KErrNone == err)
- {
- INFO_PRINTF1(_L("Santify Check Failure: buffers were equal before TCommConfig was retrieved from BCA."));
- return EInconclusive;
- }
+ {
+ INFO_PRINTF1(_L("Santify Check Failure: buffers were equal before TCommConfig was retrieved from BCA."));
+ return EInconclusive;
+ }
TPckgBuf<TCommConfig> argPckg(balCommConfig);
iUut->Ioctl(KBcaOptLevelExtSerial, KSerialConfig, argPckg);
@@ -1571,15 +1576,33 @@
balCommConfig = argPckg();
CheckBuffersEqualL(balCommConfig, actualCommConfig);
-
+
+ // Now check that we can accept a V2 structure, although only the V1 attributes are configured for use.
+ TCommConfig2 actualCommConfig2;
+ actualCommConfig2.FillZ();
+ actualCommConfig2().iTerminatorCount = 2;
+ actualCommConfig2().iTerminator[0] = 0x7E;
+ LogAndLeaveIfErrorL(iCommPort.SetConfig(actualCommConfig2), _L("Setting COMM Config using V2 on RComm"));
+
+ // Now check that we can retrieve a V1 structure correctly.
+ TCommConfig balCommConfig1;
+ balCommConfig1.FillZ();
+ TPckgBuf<TCommConfig> argPckg1(balCommConfig1);
+ iUut->Ioctl(KBcaOptLevelExtSerial, KSerialConfig, argPckg1);
+ iUut->WaitForIoctlL(KErrNone);
+ balCommConfig1 = argPckg1();
+
+ actualCommConfig().iTerminatorCount = 2; //Modify Comparison Structure to be aligned to balCommConfig1
+ CheckBuffersEqualL(balCommConfig1, actualCommConfig);
+
iCommPort.Close();
-
+
iUut->Shutdown();
iUut->WaitForShutdownL(KErrNone);
-
+
UnloadUut();
-
- return EPass;
+
+ return EPass;
}
/**
@@ -1777,7 +1800,7 @@
/** Test C32 BCA open functionality with the different combinations of ChannelId*/
TVerdict CValidChannelId::RunTestStepL()
{
- TPtrC channelId;
+ TPtrC channelId;
if(!GetStringFromConfig(ConfigSection(), _L("Port_Name1"), channelId))
{
@@ -1785,10 +1808,19 @@
return EAbort;
}
- // Pass channelId in the form of csyname::portname (ECUART::COMM::0) to the BCA
+ // Pass channelId in the form of:
+ // csyname::portname (ECUART::COMM::0) to the BCA
+ // where csyname = ECUART
+ // portname = COMM::0
+ // OR alternatively
+ // csyname::portname (PKTLOOPBACK::PKTLOOPBACK::501)
+ // where csyname = PKTLOOPBACK
+ // portname = PKTLOOPBACK::501
+ // (PKTLOOPBACK port names contain a seemingly redundant PKTLOOPBACK in their specification).
+ LoadUutL();
+
+ // Scenario 1 - the CSY name is specified in the descriptor argument passed to the Open()
- LoadUutL();
-
iUut->Open(channelId);
iUut->WaitForOpenL(KErrNone);
@@ -1800,10 +1832,16 @@
return EAbort;
}
- // Pass channelId in the form of portname (COMM::0) to the BCA
-
+ // Pass channelId in the form of portname (COMM::0) to the BCA
+ // OR
+ // (PKTLOOPBACK::501)
+
+ // Scenario 2 - the CSY name is not specified in the descriptor argument passed to the Open()
+ // In this case, the CSY name is retrieved from CommsDat, based on the IAP.
+ // The client specifies the IAP by call SetProxyIapIdL();
+
LoadUutL();
-
+
SetProxyIapIdL(*iUut, iUutIapId);
iUut->Open(channelId);
--- a/telephonyprotocols/pdplayer/src/PDPCPR.cpp Mon Jun 21 16:59:31 2010 +0300
+++ b/telephonyprotocols/pdplayer/src/PDPCPR.cpp Thu Jul 15 19:58:53 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -31,7 +31,7 @@
#include <etelmm.h>
#include <etelpckt.h>
#include <comms-infras/ss_metaconnprov.h>
-#include "pdpprovision.h"
+#include "PDPProvision.h"
#include <etel.h>
#include <networking/cfbearers.h>
#include "pdpcpravailabilitylistener.h"
@@ -44,19 +44,12 @@
using namespace ESock;
-
//-=========================================================
//
// CPDPConnectionProvider methods
//
//-=========================================================
-//We reserve space for two preallocated activities that may start concurrently on the CPR
-//node: destroy and data client stop.
-static const TUint KDefaultMaxPreallocatedActivityCount = 2;
-static const TUint KMaxPreallocatedActivitySize = sizeof(MeshMachine::CNodeRetryParallelActivity) + sizeof(MeshMachine::APreallocatedOriginators<4>);
-static const TUint KPDPCPRPreallocatedActivityBufferSize = KDefaultMaxPreallocatedActivityCount * KMaxPreallocatedActivitySize;
-
namespace PDPCprLinkCharacteristicActivity
{
DECLARE_DEFINE_NODEACTIVITY(ECFActivityParamRequest, PDPCprLinkCharacteristic, TCFScpr::TGetParamsRequest)
@@ -112,7 +105,7 @@
* @return void
*/
{
- CCoreConnectionProvider::ConstructL(KPDPCPRPreallocatedActivityBufferSize);
+ CCoreConnectionProvider::ConstructL();
}
void CPDPConnectionProvider::StopListener()
--- a/telephonyprotocols/pdplayer/src/PDPSCPR.cpp Mon Jun 21 16:59:31 2010 +0300
+++ b/telephonyprotocols/pdplayer/src/PDPSCPR.cpp Thu Jul 15 19:58:53 2010 +0300
@@ -42,12 +42,6 @@
using namespace NetStateMachine;
using namespace Factories;
-//We reserve space for two preallocated activities that may start concurrently on the SCPR
-//node: destroy and data client stop.
-static const TUint KDefaultMaxPreallocatedActivityCount = 2;
-static const TUint KMaxPreallocatedActivitySize = sizeof(MeshMachine::CNodeRetryParallelActivity) + sizeof(MeshMachine::APreallocatedOriginators<4>);
-static const TUint KPDPSCPRPreallocatedActivityBufferSize = KDefaultMaxPreallocatedActivityCount * KMaxPreallocatedActivitySize;
-
//-=========================================================
//
// CPDPSubConnectionProvider Activities
@@ -266,7 +260,7 @@
IP SubConnection Provider Second Phase Constructor
*/
{
- CCoreSubConnectionProvider::ConstructL(KPDPSCPRPreallocatedActivityBufferSize);
+ CCoreSubConnectionProvider::ConstructL();
}
void CPDPSubConnectionProvider::Received(TNodeContextBase& aContext)
@@ -549,7 +543,7 @@
{
grantedIPAddressInfo->AddParamInfo(aParamInfo);
- iPacketFilterId.Append(aId);
+ User::LeaveIfError(iPacketFilterId.Append(aId));
iPacketFilterMaskId |= 1 << aId;
}
else
--- a/telephonyprotocols/qosextnapi/src/sblpextn.cpp Mon Jun 21 16:59:31 2010 +0300
+++ b/telephonyprotocols/qosextnapi/src/sblpextn.cpp Thu Jul 15 19:58:53 2010 +0300
@@ -70,21 +70,33 @@
EXPORT_C void CSblpParameters::SetFlowIds(const RArray<TFlowIdentifier> &aFlowIds)
{
+ //in case of low memory the function might not set all the ids
iFlowIds.Reset();
TInt i;
for(i=0; i<aFlowIds.Count();i++)
{
- this->iFlowIds.Append(aFlowIds[i]);
+ TInt errorCode = this->iFlowIds.Append(aFlowIds[i]);
+ if (errorCode != KErrNone)
+ {
+ LOG(Log::Printf(_L("CSblpParameters::SetFlowIds - Not Enough Memory!!!\n"));)
+ }
}
}
EXPORT_C TInt CSblpParameters::GetFlowIds(RArray<TFlowIdentifier>& aFlowIds)
{
+ //in case of low memory the function might not get all the ids and returns an error code
aFlowIds.Reset();
TInt i;
+ TInt errorCode = KErrNone;
for(i=0; i<iFlowIds.Count();i++)
{
- aFlowIds.Append(this->iFlowIds[i]);
+ errorCode = aFlowIds.Append(this->iFlowIds[i]);
+ if (errorCode != KErrNone)
+ {
+ LOG(Log::Printf(_L("CSblpParameters::GetFlowIds - Not Enough Memory!!!\n"));)
+ return errorCode;
+ }
}
return KErrNone;
}
@@ -234,6 +246,7 @@
iSblp->GetMAT (authToken);
RArray<CSblpParameters::TFlowIdentifier> flowIds;
iSblp->GetFlowIds(flowIds);
+ // in case of low memory GetFlowIds might return an error and flowIds might not have all the ids, but we still try to log as much as we can
TBuf<KAuthorizationTokenSize> label;
label.Copy(authToken);
--- a/telephonyprotocols/rawipnif/src/Receiver.cpp Mon Jun 21 16:59:31 2010 +0300
+++ b/telephonyprotocols/rawipnif/src/Receiver.cpp Thu Jul 15 19:58:53 2010 +0300
@@ -71,10 +71,13 @@
/**
* Destructor.
*/
- {
- iData.Close();
- Cancel();
- }
+ {
+ Cancel();
+ // iData is a shared bit of memory between raw ip and bca
+ // you cannot delete it while bca might be using it otherwise
+ // bad things may happen.
+ iData.Close();
+ }
void CReceiver::RunL()
/**
--- a/telephonyprotocols/rawipnif/src/Sender.cpp Mon Jun 21 16:59:31 2010 +0300
+++ b/telephonyprotocols/rawipnif/src/Sender.cpp Thu Jul 15 19:58:53 2010 +0300
@@ -72,10 +72,13 @@
/**
* Destructor.
*/
- {
- iSendBuffer.Close();
- Cancel();
- }
+ {
+ Cancel();
+ // iSendBuffer is a shared bit of memory between raw ip and bca
+ // you cannot delete it while bca might be using it otherwise
+ // bad things may happen.
+ iSendBuffer.Close();
+ }
void CSender::RunL()
/**
--- a/telephonyutils/etel3rdpartyapi/src/TelephonyFunctions.cpp Mon Jun 21 16:59:31 2010 +0300
+++ b/telephonyutils/etel3rdpartyapi/src/TelephonyFunctions.cpp Thu Jul 15 19:58:53 2010 +0300
@@ -354,14 +354,14 @@
for( TInt i=0; i<EMaxNumberOperations; i++)
{
TRequestStatus dummy(KErrNone);
- iReqPendingTable.Append(EFalse);
- iReqStatusTable.Append(&dummy);
+ iReqPendingTable.AppendL(EFalse);
+ iReqStatusTable.AppendL(&dummy);
}
for( TInt j=0; j<CTelephony::EISVMaxNumOfCalls; j++)
{
RMobileCall aDummyCall;
- iCallPool.Append(aDummyCall);
- iCallPoolStatus.Append(EUnset);
+ iCallPool.AppendL(aDummyCall);
+ iCallPoolStatus.AppendL(EUnset);
}
__ASSERT_DEBUG(iState==EIdle, User::Invariant());