# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1286149520 -10800 # Node ID 955592283707d86bccb0e7b51666be12f6a07037 # Parent 34ec136802c5bf66abe854409c60d786b36973d1 Revision: 201039 Kit: 201039 diff -r 34ec136802c5 -r 955592283707 linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp --- a/linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp Fri Sep 17 08:38:11 2010 +0300 +++ b/linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp Mon Oct 04 02:45:20 2010 +0300 @@ -328,8 +328,9 @@ User::LeaveIfError(fileSrv.Connect()); User::LeaveIfError(macFile.Open(fileSrv,KEtherMacFileName,EFileRead)); + CleanupClosePushL(macFile); User::LeaveIfError(macFile.Read(macAddress,12)); - macFile.Close(); + CleanupStack::PopAndDestroy(&macFile); fileSrv.Close(); controlBuf.SetLength(8); controlBuf[0] = KEthSpeed10BaseT; diff -r 34ec136802c5 -r 955592283707 networkcontrol/ipnetworklayer/src/IPProtoSCPR.cpp --- a/networkcontrol/ipnetworklayer/src/IPProtoSCPR.cpp Fri Sep 17 08:38:11 2010 +0300 +++ b/networkcontrol/ipnetworklayer/src/IPProtoSCPR.cpp Mon Oct 04 02:45:20 2010 +0300 @@ -160,7 +160,7 @@ CIPProtoSubConnectionProvider::~CIPProtoSubConnectionProvider() { if (iControl) - delete iControl; + iControl->AsyncDelete(); if (iNotify) delete iNotify; diff -r 34ec136802c5 -r 955592283707 networkcontrol/ipnetworklayer/src/ipprotodeftscpr.cpp --- a/networkcontrol/ipnetworklayer/src/ipprotodeftscpr.cpp Fri Sep 17 08:38:11 2010 +0300 +++ b/networkcontrol/ipnetworklayer/src/ipprotodeftscpr.cpp Mon Oct 04 02:45:20 2010 +0300 @@ -202,7 +202,7 @@ } } if (iControl) - delete iControl; + iControl->AsyncDelete(); //incase registration is successful and Network is configured. if (iNotify) { diff -r 34ec136802c5 -r 955592283707 networkprotocols/iphook/inhook6/src/in_pkt.cpp --- a/networkprotocols/iphook/inhook6/src/in_pkt.cpp Fri Sep 17 08:38:11 2010 +0300 +++ b/networkprotocols/iphook/inhook6/src/in_pkt.cpp Mon Oct 04 02:45:20 2010 +0300 @@ -85,7 +85,7 @@ if (len < aMin) return NULL; iLength = len; - return p->Buffer() + offset; + return p->Buffer() ? (p->Buffer() + offset) : NULL; } // The requested alignment value is not // satisfied! diff -r 34ec136802c5 -r 955592283707 networkprotocols/tcpipv4v6prt/src/tcp.cpp --- a/networkprotocols/tcpipv4v6prt/src/tcp.cpp Fri Sep 17 08:38:11 2010 +0300 +++ b/networkprotocols/tcpipv4v6prt/src/tcp.cpp Mon Oct 04 02:45:20 2010 +0300 @@ -263,6 +263,13 @@ #ifdef _LOG LogPacket('<', seg, info, info->iOffset); pkt.Set(seg, info->iOffset, pkt.iHdr->HeaderLength()); // LogPacket() may have realigned the header. + + if (!pkt.iHdr) + { + LOG(Log::Printf(_L("\ttcp Process() header alignment failed. Packet discarded"))); + seg.Free(); + return; + } #endif // Verify TCP checksum diff -r 34ec136802c5 -r 955592283707 networksecurity/tls/group/tls.iby --- a/networksecurity/tls/group/tls.iby Fri Sep 17 08:38:11 2010 +0300 +++ b/networksecurity/tls/group/tls.iby Mon Oct 04 02:45:20 2010 +0300 @@ -20,7 +20,7 @@ #include // DEF139848 fix - Forward Propogation from Symtb9.1 - Illegal dependency from OCSP to HTTP. -#include +#include #include #include diff -r 34ec136802c5 -r 955592283707 networksecurity/tls/protocol/AlertProtocolEvents.cpp --- a/networksecurity/tls/protocol/AlertProtocolEvents.cpp Fri Sep 17 08:38:11 2010 +0300 +++ b/networksecurity/tls/protocol/AlertProtocolEvents.cpp Mon Oct 04 02:45:20 2010 +0300 @@ -124,6 +124,13 @@ } case KErrSSLAlertCloseNotify: { + if ( iStateMachine->iStatus.Int() == KRequestPending || + iRecordComposer.CurrentPos() != 0 || + iRecordComposer.UserData()!= NULL ) + { + LOG(Log::Printf(_L("Previous data send request is in the pending state"));) + return this; + } //Upon sending the close_notify from server report KErrEof to the application //to be intact with existing behaviour. iStateMachine->SetLastError( KErrEof ); @@ -153,7 +160,6 @@ case KErrCancel: {// A user_canceled alert should be followed by a close_notify alert. So this // event will be the next one to be processed. - iRecordComposer.SetNext( NULL ); iAlertMsg.Append( EAlertWarning ); iAlertMsg.Append( EAlertclose_notify ); iRecordComposer.SetNext( NULL ); @@ -198,13 +204,19 @@ LOG(Log::Printf(_L("CRecvAlert::ProcessL(). Alert level = %d"), alertLevel )); LOG(Log::Printf(_L("CRecvAlert::ProcessL(). Alert description = %d"), alertDesc )); + if ( alertLevel == EAlertFatal ) + { TRequestStatus* p=&aStatus; - User::RequestComplete( p, KErrNone ); - if ( alertLevel == EAlertWarning ) + User::RequestComplete( p, KErrSSLAlertHandshakeFailure ); + iStateMachine->SetLastError( KErrSSLAlertHandshakeFailure ); + } + else if ( alertLevel == EAlertWarning ) {// In all circumstances, when a warning alert is received, we carry on as normal. // There is no need to set the next event as this will be unchanged from normal // operation. For a Close_notify alert, we must send one in response. // So the next event will be CSendAlert sending a close-notify alert. + TRequestStatus* p=&aStatus; + User::RequestComplete( p, KErrNone ); if ( alertDesc == EAlertclose_notify ) { iStateMachine->SetLastError( KErrSSLAlertCloseNotify ); diff -r 34ec136802c5 -r 955592283707 networksecurity/tls/protocol/tlsconnection.cpp --- a/networksecurity/tls/protocol/tlsconnection.cpp Fri Sep 17 08:38:11 2010 +0300 +++ b/networksecurity/tls/protocol/tlsconnection.cpp Mon Oct 04 02:45:20 2010 +0300 @@ -1184,6 +1184,7 @@ __ASSERT_DEBUG( !aStateMachine->SuspendRequest(), TlsPanic(ETlsPanicStateMachineStopped) ); if ( aStateMachine->LastError() != KErrNone ) {//user will be notified after return from this fn + LOG(Log::Printf(_L("CTlsConnection::OnCompletion() aStateMachine->LastError() %d"), aStateMachine->LastError() );) if ( iHandshake != aStateMachine ) { return EFalse; @@ -1209,6 +1210,7 @@ {//something went completely wrong //set last error so that the user will be notified after return from this fn aStateMachine->SetLastError( ret ); + LOG(Log::Printf(_L("CTlsConnection::OnCompletion() - AppData->ResumeL Last Error %d"), aStateMachine->LastError() );) delete iSendAppData; iSendAppData = NULL; delete iRecvAppData; @@ -1233,6 +1235,7 @@ // Create the Data state machines so that the user can send/receive data __ASSERT_DEBUG( !iRecvAppData && !iSendAppData, TlsPanic(ETlsPanicStateMachineAlreadyExists)); + LOG(Log::Printf(_L(" Create the Data state machines so that the user can send/receive data") );) //don't change the order see CRecvAppData::ResumeL TRAPD( ret, iSendAppData = CSendAppData::NewL( *iRecordComposer ); iRecvAppData = CRecvAppData::NewL( *this ) ); @@ -1240,6 +1243,7 @@ {//something went completely wrong //set last error so that the user will be notified after return from this fn aStateMachine->SetLastError( ret ); + LOG(Log::Printf(_L("CTlsConnection::OnCompletion() AppData::NewL Last Error %d"), aStateMachine->LastError() );) //delete what may have been created delete iRecvAppData; iRecvAppData = 0; diff -r 34ec136802c5 -r 955592283707 package_definition.xml --- a/package_definition.xml Fri Sep 17 08:38:11 2010 +0300 +++ b/package_definition.xml Mon Oct 04 02:45:20 2010 +0300 @@ -1,11 +1,6 @@ - - - - - diff -r 34ec136802c5 -r 955592283707 package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_map.xml Mon Oct 04 02:45:20 2010 +0300 @@ -0,0 +1,1 @@ + diff -r 34ec136802c5 -r 955592283707 tcpiputils/dhcp/src/DHCPControl.cpp --- a/tcpiputils/dhcp/src/DHCPControl.cpp Fri Sep 17 08:38:11 2010 +0300 +++ b/tcpiputils/dhcp/src/DHCPControl.cpp Mon Oct 04 02:45:20 2010 +0300 @@ -94,10 +94,10 @@ //forced to do this horrible stuff RSocket socket; User::LeaveIfError(socket.Open(iEsock, KAfInet, KSockDatagram, KProtocolInetUdp,iConnection)); + CleanupClosePushL( socket ); // make socket invisible for interface counting User::LeaveIfError(socket.SetOpt(KSoKeepInterfaceUp, KSolInetIp, 0)); - CleanupClosePushL( socket ); TPckgBuf info; while ( err == KErrNotFound && iConnection.Control(KCOLProvider, KConnGetInterfaceName, name) == KErrNone ) {