# HG changeset patch # User hgs # Date 1284374561 -19800 # Node ID 2fc972553898cb323eb8b2af2bc2449710cff30e # Parent ea8d11a88e23df7bd4129724710b4f0790f521dd 201035_04 diff -r ea8d11a88e23 -r 2fc972553898 linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp --- a/linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp Mon Aug 30 12:20:22 2010 +0530 +++ b/linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp Mon Sep 13 16:12:41 2010 +0530 @@ -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 ea8d11a88e23 -r 2fc972553898 networkcontrol/ipnetworklayer/src/IPProtoSCPR.cpp --- a/networkcontrol/ipnetworklayer/src/IPProtoSCPR.cpp Mon Aug 30 12:20:22 2010 +0530 +++ b/networkcontrol/ipnetworklayer/src/IPProtoSCPR.cpp Mon Sep 13 16:12:41 2010 +0530 @@ -160,7 +160,7 @@ CIPProtoSubConnectionProvider::~CIPProtoSubConnectionProvider() { if (iControl) - delete iControl; + iControl->AsyncDelete(); if (iNotify) delete iNotify; diff -r ea8d11a88e23 -r 2fc972553898 networkcontrol/ipnetworklayer/src/ipprotodeftscpr.cpp --- a/networkcontrol/ipnetworklayer/src/ipprotodeftscpr.cpp Mon Aug 30 12:20:22 2010 +0530 +++ b/networkcontrol/ipnetworklayer/src/ipprotodeftscpr.cpp Mon Sep 13 16:12:41 2010 +0530 @@ -202,7 +202,7 @@ } } if (iControl) - delete iControl; + iControl->AsyncDelete(); //incase registration is successful and Network is configured. if (iNotify) { diff -r ea8d11a88e23 -r 2fc972553898 networkprotocols/iphook/inhook6/src/in_pkt.cpp --- a/networkprotocols/iphook/inhook6/src/in_pkt.cpp Mon Aug 30 12:20:22 2010 +0530 +++ b/networkprotocols/iphook/inhook6/src/in_pkt.cpp Mon Sep 13 16:12:41 2010 +0530 @@ -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 ea8d11a88e23 -r 2fc972553898 networkprotocols/tcpipv4v6prt/src/tcp.cpp --- a/networkprotocols/tcpipv4v6prt/src/tcp.cpp Mon Aug 30 12:20:22 2010 +0530 +++ b/networkprotocols/tcpipv4v6prt/src/tcp.cpp Mon Sep 13 16:12:41 2010 +0530 @@ -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 ea8d11a88e23 -r 2fc972553898 networksecurity/tls/protocol/AlertProtocolEvents.cpp --- a/networksecurity/tls/protocol/AlertProtocolEvents.cpp Mon Aug 30 12:20:22 2010 +0530 +++ b/networksecurity/tls/protocol/AlertProtocolEvents.cpp Mon Sep 13 16:12:41 2010 +0530 @@ -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 ea8d11a88e23 -r 2fc972553898 networksecurity/tls/protocol/tlsconnection.cpp --- a/networksecurity/tls/protocol/tlsconnection.cpp Mon Aug 30 12:20:22 2010 +0530 +++ b/networksecurity/tls/protocol/tlsconnection.cpp Mon Sep 13 16:12:41 2010 +0530 @@ -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 ea8d11a88e23 -r 2fc972553898 package_definition.xml --- a/package_definition.xml Mon Aug 30 12:20:22 2010 +0530 +++ b/package_definition.xml Mon Sep 13 16:12:41 2010 +0530 @@ -1,11 +1,6 @@ - - - - - diff -r ea8d11a88e23 -r 2fc972553898 package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_map.xml Mon Sep 13 16:12:41 2010 +0530 @@ -0,0 +1,1 @@ + diff -r ea8d11a88e23 -r 2fc972553898 tcpiputils/dhcp/src/DHCPControl.cpp --- a/tcpiputils/dhcp/src/DHCPControl.cpp Mon Aug 30 12:20:22 2010 +0530 +++ b/tcpiputils/dhcp/src/DHCPControl.cpp Mon Sep 13 16:12:41 2010 +0530 @@ -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 ) {