equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
199 // a fresh list of available iaps on connection closure. |
199 // a fresh list of available iaps on connection closure. |
200 iServer->Iap()->EnableWlanScan(); |
200 iServer->Iap()->EnableWlanScan(); |
201 } |
201 } |
202 |
202 |
203 if ( subConnUpDownNotifier->LinkLayerClosed() ) |
203 if ( subConnUpDownNotifier->LinkLayerClosed() ) |
204 { |
204 { |
205 // KLinkLayerClosed already received, finish with this connection |
205 // KLinkLayerClosed already received, finish with this connection |
206 subConnUpDownNotifier->SendDeletedEvent(); |
206 subConnUpDownNotifier->SendDeletedEvent(); |
207 } |
207 } |
208 } |
208 } |
209 else |
209 else |
632 if ( ret == KErrNone && bearerInfo.iBearer == EBearerInfoWLAN ) |
632 if ( ret == KErrNone && bearerInfo.iBearer == EBearerInfoWLAN ) |
633 { |
633 { |
634 LOGIT("CProgressNotifier::RunL triggered HandleAvailabilityChange()") |
634 LOGIT("CProgressNotifier::RunL triggered HandleAvailabilityChange()") |
635 iServer->AvailabilityManager()->HandleAvailabilityChange(); |
635 iServer->AvailabilityManager()->HandleAvailabilityChange(); |
636 } |
636 } |
637 |
637 |
638 } |
638 } |
639 else if ( iInfoBuf().iStage == KLinkLayerClosed ) |
639 else if ( iInfoBuf().iStage == KLinkLayerClosed ) |
640 { |
640 { |
641 CSubConnUpDownNotifier* subConnUpDownNotifier = 0; |
641 CSubConnUpDownNotifier* subConnUpDownNotifier = 0; |
642 |
642 |
645 &subConnUpDownNotifier ); |
645 &subConnUpDownNotifier ); |
646 |
646 |
647 if ( KErrNone == err ) |
647 if ( KErrNone == err ) |
648 { |
648 { |
649 subConnUpDownNotifier->SetLinkLayerClosed(); |
649 subConnUpDownNotifier->SetLinkLayerClosed(); |
650 |
650 |
651 if ( subConnUpDownNotifier->InterfaceClosed() ) |
651 if ( subConnUpDownNotifier->InterfaceClosed() ) |
652 { |
652 { |
653 // EInterfaceDown has arrived before KLinkLayerClosed |
653 // EInterfaceDown has arrived before KLinkLayerClosed |
654 // Let's finish with this connection. |
654 // Let's finish with this connection. |
655 subConnUpDownNotifier->SendDeletedEvent(); |
655 subConnUpDownNotifier->SendDeletedEvent(); |
656 return; |
656 return; |
657 } |
657 } |
658 } |
658 } |
659 } |
659 } |
660 |
660 |
661 iFilter = KNoFiltering; |
661 iFilter = KNoFiltering; |
662 } |
662 } |
663 else |
663 else |
664 { |
664 { |
2139 void CSubConnUpDownNotifier::SendDeletedEvent() |
2139 void CSubConnUpDownNotifier::SendDeletedEvent() |
2140 { |
2140 { |
2141 if ( !iDeleteSent ) |
2141 if ( !iDeleteSent ) |
2142 { |
2142 { |
2143 LOGIT("CSubConnUpDownNotifier::SendDeletedEvent") |
2143 LOGIT("CSubConnUpDownNotifier::SendDeletedEvent") |
2144 |
2144 |
2145 iEventInfo.Reset(); |
2145 iEventInfo.Reset(); |
2146 |
2146 |
2147 iEventInfo.iEventType = EConnMonDeleteConnection; |
2147 iEventInfo.iEventType = EConnMonDeleteConnection; |
2148 iEventInfo.iConnectionId = iConnectionId; |
2148 iEventInfo.iConnectionId = iConnectionId; |
2149 iEventInfo.iSubConnectionId = iSubConnectionId; |
2149 iEventInfo.iSubConnectionId = iSubConnectionId; |
2279 { |
2279 { |
2280 // Is progress notifier still alive |
2280 // Is progress notifier still alive |
2281 if ( !progressNotifier->IsActive() ) |
2281 if ( !progressNotifier->IsActive() ) |
2282 { |
2282 { |
2283 iStatus = KErrDied; |
2283 iStatus = KErrDied; |
2284 // might delete this object |
2284 // might delete this object |
2285 SendDeletedEvent(); |
2285 SendDeletedEvent(); |
2286 return; |
2286 return; |
2287 } |
2287 } |
2288 } |
2288 } |
2289 } |
2289 } |
2303 |
2303 |
2304 LOGIT3("SERVER: EVENT -> Connection %d closed, u: %d, d: %d", |
2304 LOGIT3("SERVER: EVENT -> Connection %d closed, u: %d, d: %d", |
2305 iConnectionId, iTotalUplinkDataVolume, iTotalDownlinkDataVolume) |
2305 iConnectionId, iTotalUplinkDataVolume, iTotalDownlinkDataVolume) |
2306 |
2306 |
2307 iStatus = KErrDisconnected; |
2307 iStatus = KErrDisconnected; |
2308 |
2308 |
2309 CProgressNotifier* progressNotifier = 0; |
2309 CProgressNotifier* progressNotifier = 0; |
2310 TInt err = iServer->Iap()->GetProgressNotifier( iConnectionId, &progressNotifier ); |
2310 TInt err = iServer->Iap()->GetProgressNotifier( iConnectionId, &progressNotifier ); |
2311 if ( err == KErrNone ) |
2311 if ( err == KErrNone ) |
2312 { |
2312 { |
2313 // Progess notifier has stopped and allinterface closed event has arrived |
2313 // Progess notifier has stopped and allinterface closed event has arrived |
2318 return; |
2318 return; |
2319 } |
2319 } |
2320 } |
2320 } |
2321 else |
2321 else |
2322 { |
2322 { |
2323 // might delete this object |
2323 // might delete this object |
2324 SendDeletedEvent(); |
2324 SendDeletedEvent(); |
2325 return; |
2325 return; |
2326 } |
2326 } |
2327 } |
2327 } |
2328 else if ( ( event.iSubConnectionUniqueId == 0 ) && |
2328 else if ( ( event.iSubConnectionUniqueId == 0 ) && |