equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002-2009 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". |
62 LOG( SIMPLE, |
62 LOG( SIMPLE, |
63 "OPENCHANNEL: COpenChannelHandler::~COpenChannelHandler calling" ) |
63 "OPENCHANNEL: COpenChannelHandler::~COpenChannelHandler calling" ) |
64 |
64 |
65 Cancel(); |
65 Cancel(); |
66 iDataChannel = NULL; |
66 iDataChannel = NULL; |
|
67 |
|
68 delete iConnectionInfo.iOverrideSet; |
67 |
69 |
68 LOG( SIMPLE, |
70 LOG( SIMPLE, |
69 "OPENCHANNEL: COpenChannelHandler::~CCloseChannelHandler exiting" ) |
71 "OPENCHANNEL: COpenChannelHandler::~CCloseChannelHandler exiting" ) |
70 } |
72 } |
71 |
73 |
631 { |
633 { |
632 LOG2( SIMPLE, |
634 LOG2( SIMPLE, |
633 "OPENCHANNEL: COpenChannelHandler::SetConnectionSettingsL calling,\ |
635 "OPENCHANNEL: COpenChannelHandler::SetConnectionSettingsL calling,\ |
634 aBearerType: %d", aBearerType ) |
636 aBearerType: %d", aBearerType ) |
635 |
637 |
|
638 RPacketContext::TProtocolType pdpType = RPacketContext::EPdpTypeIPv4; |
|
639 TUint32 defaultId( 0 ); |
636 switch ( aBearerType ) |
640 switch ( aBearerType ) |
637 { |
641 { |
638 case MSatBIPUtils::ESatGPRS: |
642 case MSatBIPUtils::ESatGPRS: |
639 { |
643 { |
640 // Resolve override settings |
644 // Resolve override settings |
646 |
650 |
647 TUint32 iapId( 0 ); |
651 TUint32 iapId( 0 ); |
648 TUint32 nwId( 0 ); |
652 TUint32 nwId( 0 ); |
649 TBool apnCreated( EFalse ); |
653 TBool apnCreated( EFalse ); |
650 |
654 |
651 RPacketContext::TProtocolType pdpType = |
655 pdpType = RPacketContext::EPdpTypeIPv6; |
652 RPacketContext::EPdpTypeIPv6; |
656 |
653 |
|
654 if ( RSat::EIPv4Address == |
657 if ( RSat::EIPv4Address == |
655 iOpenChannelData.iDestinationAddress.iType ) |
658 iOpenChannelData.iDestinationAddress.iType ) |
656 { |
659 { |
657 LOG( NORMAL, |
660 LOG( NORMAL, |
658 "OPENCHANNEL: COpenChannelHandler::SetConnectionSettingsL \ |
661 "OPENCHANNEL: COpenChannelHandler::SetConnectionSettingsL \ |
682 |
685 |
683 SetOverrideSettingsL( iapId ); |
686 SetOverrideSettingsL( iapId ); |
684 } |
687 } |
685 else |
688 else |
686 { |
689 { |
687 LOG( NORMAL, "OPENCHANNEL: COpenChannelHandler::SetConnectionSettingsL \ |
690 LOG( NORMAL, "OPENCHANNEL: SetConnectionSettingsL \ |
688 No APN, using defaults" ) |
691 No APN, using defaults" ) |
689 // No APN, use default settings |
692 // No APN, use default settings |
690 SetOverrideSettingsL( 0 ); |
693 TRAPD( err, defaultId = |
|
694 iUtils->BipUtils().ApnHandler().FindDefaultApL( pdpType ) ); |
|
695 LOG2( NORMAL, "OPENCHANNEL: SetConnectionSettingsL \ |
|
696 No APN, using defaults err = %i", err ) |
|
697 SetOverrideSettingsL( defaultId ); |
691 } |
698 } |
692 break; |
699 break; |
693 } |
700 } |
694 |
701 |
695 default: |
702 default: |
701 } |
708 } |
702 } |
709 } |
703 |
710 |
704 #ifdef SAT_USE_DUMMY_TSY |
711 #ifdef SAT_USE_DUMMY_TSY |
705 // No APN, use default settings |
712 // No APN, use default settings |
706 SetOverrideSettingsL( 0 ); |
713 TRAPD( err, |
|
714 defaultId = iUtils->BipUtils().ApnHandler().FindDefaultApL( pdpType ) ); |
|
715 LOG2( NORMAL, "OPENCHANNEL: COpenChannelHandler::SetConnectionSettingsL \ |
|
716 No APN, using defaults err = %i", err ) |
|
717 SetOverrideSettingsL( defaultId ); |
707 #endif // SAT_USE_DUMMY_TSY |
718 #endif // SAT_USE_DUMMY_TSY |
708 |
719 |
709 LOG( SIMPLE, |
720 LOG( SIMPLE, |
710 "OPENCHANNEL: COpenChannelHandler::SetConnectionSettingsL exiting" ) |
721 "OPENCHANNEL: COpenChannelHandler::SetConnectionSettingsL exiting" ) |
711 } |
722 } |
718 { |
729 { |
719 |
730 |
720 LOG2( SIMPLE, |
731 LOG2( SIMPLE, |
721 "OPENCHANNEL: COpenChannelHandler::SetOverrideSettingsL aIapId: %i", |
732 "OPENCHANNEL: COpenChannelHandler::SetOverrideSettingsL aIapId: %i", |
722 aIapId ) |
733 aIapId ) |
|
734 |
|
735 delete iConnectionInfo.iOverrideSet; |
|
736 iConnectionInfo.iOverrideSet = NULL; |
723 |
737 |
724 // Override connection preferences |
738 // Override connection preferences |
725 TExtendedConnPref* overrideSettings = new( ELeave ) TExtendedConnPref; |
739 TExtendedConnPref* overrideSettings = new( ELeave ) TExtendedConnPref; |
726 overrideSettings->SetIapId( aIapId ); |
740 overrideSettings->SetIapId( aIapId ); |
727 overrideSettings->SetNoteBehaviour( |
741 overrideSettings->SetNoteBehaviour( |