networkprotocolmodules/suplproxyprotocolmodule/suplproxyprotocolmodule/src/suplproxymodule.cpp
--- a/networkprotocolmodules/suplproxyprotocolmodule/suplproxyprotocolmodule/src/suplproxymodule.cpp Tue Jul 13 12:25:28 2010 +0100
+++ b/networkprotocolmodules/suplproxyprotocolmodule/suplproxyprotocolmodule/src/suplproxymodule.cpp Wed Sep 08 15:16:57 2010 +0100
@@ -572,7 +572,12 @@
// Add this request to the queue of outstanding requests
LBSLOG2(ELogP1, "CSuplProxyProtocol::RequestNetworkLocation() Adding sppm session object 0x%x to array\n", aSessionId);
- iLbsNetSessions.Append(netSession);
+ TInt err = iLbsNetSessions.Append(netSession);
+ if(KErrNone != err)
+ {
+ LBSLOG(ELogP1, "CSuplProxyProtocol::RequestNetworkLocation() - iLbsNetSessions.Append failed!!\n");
+ delete netSession;
+ }
}
//Create the prioritised list of positioning methods
@@ -733,7 +738,13 @@
// Add this request to the queue of outstanding requests
LBSLOG2(ELogP1, "CSuplProxyProtocol::RequestSelfLocation() Adding sppm session object 0x%x to array\n", aSessionId);
- iLbsNetSessions.Append(netSession);
+ TInt err = iLbsNetSessions.Append(netSession);
+ if(KErrNone != err)
+ {
+ LBSLOG(ELogP1, "CSuplProxyProtocol::RequestSelfLocation() - iLbsNetSessions.Append failed!!\n");
+ delete netSession;
+ return;
+ }
}
//Inform LBS of the start of an MOLR - TB
@@ -990,7 +1001,19 @@
{
netSession->SetExtRequestInfo(extReqInfo);
LBSLOG2(ELogP1, "CSuplProxyProtocol::ProcessRequest() Adding sppm session object 0x%x to array\n", sessionId);
- iLbsNetSessions.Append(netSession);
+ TInt err = iLbsNetSessions.Append(netSession);
+ if (err != KErrNone)
+ {
+ // A problem occured and the request could not be added to the buffer
+ LBSLOG_WARN2(ELogP1, "CSuplProxyProtocol::ProcessRequest() - iLbsNetSessions.Append failed!! - (%d)\n", err);
+ if (aRequest->IsResponseRequired())
+ {
+ aRequest->CompleteRequest(err);
+ }
+ delete netSession;
+ delete aRequest;
+ return;
+ }
}
}
}
@@ -1145,7 +1168,12 @@
netSession->SetPosSessionStarted(ETrue);
netSession->SetSessionStarted();
LBSLOG2(ELogP1, "CSuplProxyProtocol::NotifySubSessionOpen() Adding sppm session object 0x%x to array\n", sessionId);
- iLbsNetSessions.Append(netSession);
+ TInt err = iLbsNetSessions.Append(netSession);
+ if(KErrNone != err)
+ {
+ LBSLOG(ELogP1, "CSuplProxyProtocol::NotifySubSessionOpen() - iLbsNetSessions.Append failed!!\n");
+ delete netSession;
+ }
}
//Update LBS of the currently active services including this new session type
StatusUpdate(MLbsNetworkProtocolObserver2::EServiceTriggeredMolr,ETrue);