77 if ( iConnUpNotifier ) |
77 if ( iConnUpNotifier ) |
78 { |
78 { |
79 iConnUpNotifier->Cancel(); |
79 iConnUpNotifier->Cancel(); |
80 delete iConnUpNotifier; |
80 delete iConnUpNotifier; |
81 iConnUpNotifier = NULL; |
81 iConnUpNotifier = NULL; |
|
82 } |
|
83 |
|
84 if ( iRestoreAttachModeTimer ) |
|
85 { |
|
86 iRestoreAttachModeTimer->Cancel(); |
|
87 delete iRestoreAttachModeTimer; |
|
88 iRestoreAttachModeTimer = NULL; |
82 } |
89 } |
83 |
90 |
84 // Delete all ConnectionData objects |
91 // Delete all ConnectionData objects |
85 for ( TUint index = 0; index < KMaxPsdConnectionCount; index++ ) |
92 for ( TUint index = 0; index < KMaxPsdConnectionCount; index++ ) |
86 { |
93 { |
538 } |
545 } |
539 } |
546 } |
540 LOGEXITFN("CPsdFax::DeleteConnections()") |
547 LOGEXITFN("CPsdFax::DeleteConnections()") |
541 } |
548 } |
542 |
549 |
|
550 // --------------------------------------------------------- |
|
551 // CPsdFax::RestoreAttachModeCb |
|
552 // --------------------------------------------------------- |
|
553 // |
|
554 TInt CPsdFax::RestoreAttachModeCb( TAny* aObject ) |
|
555 { |
|
556 LOGENTRFN("CPsdFax::RestoreAttachModeCb()") |
|
557 |
|
558 CPsdFax* myself = static_cast<CPsdFax*>( aObject ); |
|
559 |
|
560 myself->iRestoreAttachModeTimer->Cancel(); |
|
561 |
|
562 // Make sure that ETel goes to correct network status |
|
563 // in case AT+CGATT=0 has been sent from PC. |
|
564 myself->iServer->Iap()->RestoreAttachMode(); |
|
565 |
|
566 LOGEXITFN("CPsdFax::RestoreAttachModeCb()") |
|
567 |
|
568 return 0; |
|
569 } |
|
570 |
|
571 // --------------------------------------------------------- |
|
572 // CPsdFax::RestoreAttachMode |
|
573 // --------------------------------------------------------- |
|
574 // |
|
575 void CPsdFax::RestoreAttachMode() |
|
576 { |
|
577 LOGENTRFN("CPsdFax::RestoreAttachMode()") |
|
578 |
|
579 if ( iRestoreAttachModeTimer ) |
|
580 { |
|
581 iRestoreAttachModeTimer->Cancel(); |
|
582 } |
|
583 else |
|
584 { |
|
585 iRestoreAttachModeTimer = CPeriodic::NewL( CActive::EPriorityStandard ); |
|
586 } |
|
587 |
|
588 iRestoreAttachModeTimer->Start( |
|
589 TTimeIntervalMicroSeconds32( KRestoreAttachModeInterval ), |
|
590 TTimeIntervalMicroSeconds32( KRestoreAttachModeInterval ), |
|
591 TCallBack( RestoreAttachModeCb, this ) ); |
|
592 |
|
593 LOGEXITFN("CPsdFax::RestoreAttachMode()") |
|
594 } |
543 |
595 |
544 // ============================ MEMBER FUNCTIONS =============================== |
596 // ============================ MEMBER FUNCTIONS =============================== |
545 |
597 |
546 // ----------------------------------------------------------------------------- |
598 // ----------------------------------------------------------------------------- |
547 // CPsdFaxUpNotifier::CPsdFaxUpNotifier |
599 // CPsdFaxUpNotifier::CPsdFaxUpNotifier |
1372 |
1424 |
1373 // Dial-up connection has gone down. Make sure the dial-up PDP |
1425 // Dial-up connection has gone down. Make sure the dial-up PDP |
1374 // context override is disabled. |
1426 // context override is disabled. |
1375 LOGIT("External PSD connection status EStatusDeleted, disabling dial-up override") |
1427 LOGIT("External PSD connection status EStatusDeleted, disabling dial-up override") |
1376 iServer->SetDialUpOverrideStatus( EConnMonDialUpOverrideInactive ); |
1428 iServer->SetDialUpOverrideStatus( EConnMonDialUpOverrideInactive ); |
|
1429 |
|
1430 // Restore packet data network attach mode in case it has been |
|
1431 // changed by sending at+cgatt=0 from PC. |
|
1432 iFaxModule->RestoreAttachMode(); |
1377 |
1433 |
1378 // Delete all old connection objects. This method should be used |
1434 // Delete all old connection objects. This method should be used |
1379 // carefully because it will delete ConnectionData and |
1435 // carefully because it will delete ConnectionData and |
1380 // statusnotifier objects. Get out fast from RunL(). |
1436 // statusnotifier objects. Get out fast from RunL(). |
1381 iFaxModule->DeleteConnections(); |
1437 iFaxModule->DeleteConnections(); |