AutoRedialAttempt.c
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:21k
源码类别:

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*******************************************************************************
  36.  *  Modification Notice:
  37.  *  --------------------------
  38.  *  This software is modified by MediaTek Inc. and the information contained
  39.  *  herein is confidential. The software may not be copied and the information
  40.  *  contained herein may not be used or disclosed except with the written
  41.  *  permission of MediaTek Inc. (C) 2001
  42.  *
  43.  *******************************************************************************/
  44.  /*******************************************************************************
  45.  * Filename:
  46.  * ---------
  47.  *   AutoRedialAttempt.c
  48.  *
  49.  * Project:
  50.  * --------
  51.  *   Maui_Software
  52.  *
  53.  * Description:
  54.  * ------------
  55.  *  .......
  56.  *
  57.  * Author:
  58.  * -------
  59.  * -------
  60.  *
  61.  *------------------------------------------------------------------------------
  62.  * $Log$
  63.  *
  64.  * removed!
  65.  * removed!
  66.  * set new maximun attempt value everytime there comes new cause. 
  67.  *
  68.  * removed!
  69.  * removed!
  70.  * 
  71.  *
  72.  * removed!
  73.  * removed!
  74.  * 
  75.  *
  76.  * removed!
  77.  * removed!
  78.  * 
  79.  *
  80.  * removed!
  81.  * removed!
  82.  * 
  83.  *
  84.  * removed!
  85.  * removed!
  86.  * 
  87.  *
  88.  *******************************************************************************/
  89.  /**
  90.  * Copyright Notice
  91.  * ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
  92.  * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
  93.  *  (It is illegal to remove this copyright notice from this software or any
  94.  *  portion of it)
  95.  */
  96. /**************************************************************
  97.    FILENAME : AutoRedialAttempt.c
  98.    PURPOSE     : Redial attempts api
  99.    REMARKS     : nil
  100.    AUTHOR      : Ashish
  101.    DATE     : Nov 8,02
  102. **************************************************************/
  103. #include "stdC.h"
  104. #include "MMI_Features.h"
  105. #include "L4Dr.h"
  106. #include "L4Dr1.h"
  107. #include "PixtelDataTypes.h"
  108. #include "GlobalDefs.h"
  109. #include "GlobalConstants.h"
  110. #include "EventsGprot.h"
  111. #include "HistoryGprot.h"
  112. #include "DebugInitDef.h"
  113. #include "MMI_trc.h"
  114. #include "Wgui_categories.h"
  115. #include "TimerEvents.h"
  116. #include "SATGProts.h"
  117. #include "SettingGprots.h"
  118. #include "PhonebookTypes.h"
  119. #include "CallmanagementIdDef.h"
  120. #include "HistoryHelperProt.h"
  121. #include "CallManagementStruct.h"
  122. #include "CallStructureManagementProt.h"
  123. #include "CommonStubsProt.h"
  124. #include "CmErrorTypes.h"
  125. #include "CmErrorHandlersProt.h"
  126. #include "PsCallHelperGprot.h"
  127. #include "CallManagementGProt.h"
  128. #include "OutgoingCallHelperProt.h"
  129. #include "OutgoingCallManagementProt.h"
  130. #include "RedialHelperGprot.h"
  131. static U8 gRedialMsgTemp[100];  /* temp array for display redial string */
  132. /*****************************************************************************
  133.  * FUNCTION
  134.  *  EntryScrShowUserTimeToRedial
  135.  * DESCRIPTION
  136.  *  Entry Screen for user notification on time left to redial
  137.  * PARAMETERS
  138.  *  void
  139.  * RETURNS
  140.  *  void
  141.  *****************************************************************************/
  142. void EntryScrShowUserTimeToRedial(void)
  143. {
  144.     /*----------------------------------------------------------------*/
  145.     /* Local Variables                                                */
  146.     /*----------------------------------------------------------------*/
  147.     /*----------------------------------------------------------------*/
  148.     /* Code Body                                                      */
  149.     /*----------------------------------------------------------------*/
  150.     EntryNewScreen(CM_SCR_RDL_TIME, ExitScrShowUserTimeToRedial, NULL, NULL);
  151.     MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_FUNC_EntryScrShowUserTimeToRedial));
  152.     if (GetCurrScrnId() != CM_SCR_RDL_TIME)
  153.     {
  154.         DeleteScreenIfPresent(CM_SCR_RDL_TIME);
  155.     }
  156.     ShowCategory141Screen(0, 0, 0, 0, STR_GLOBAL_ABORT, 0, gRedialMsgTemp, 0, NULL);
  157.     SetRightSoftkeyFunction(ResetRedialAndGoBack, KEY_EVENT_UP);
  158.     SetKeyHandler(ResetRedialAndGoBack, KEY_END, KEY_EVENT_DOWN);
  159.     return;
  160. }
  161. /*****************************************************************************
  162.  * FUNCTION
  163.  *  ExitScrShowUserTimeToRedial
  164.  * DESCRIPTION
  165.  *  Exit Screen for blacklist full
  166.  * PARAMETERS
  167.  *  void
  168.  * RETURNS
  169.  *  void
  170.  *****************************************************************************/
  171. void ExitScrShowUserTimeToRedial(void)
  172. {
  173.     /*----------------------------------------------------------------*/
  174.     /* Local Variables                                                */
  175.     /*----------------------------------------------------------------*/
  176.     /*----------------------------------------------------------------*/
  177.     /* Code Body                                                      */
  178.     /*----------------------------------------------------------------*/
  179.     if (GetCurrentState() == CM_INCOMING_STATE)
  180.     {
  181.         return;
  182.     }
  183.     if (cm_p->redial_info.RedialTimer == TRUE)
  184.     {
  185.         history Scr1009;
  186.         S16 nHistory = 0;
  187.         Scr1009.scrnID = CM_SCR_RDL_TIME;
  188.         Scr1009.entryFuncPtr = EntryScrShowUserTimeToRedial;
  189.         pfnUnicodeStrcpy((S8*) Scr1009.inputBuffer, (S8*) & nHistory);
  190.         GetCategoryHistory(Scr1009.guiBuffer);
  191.         AddHistory(Scr1009);
  192.     }
  193.     return;
  194. }
  195. /*****************************************************************************
  196.  * FUNCTION
  197.  *  ResetRedialAndGoBack
  198.  * DESCRIPTION
  199.  *  Entry Screen for user notification on time left to redial
  200.  * PARAMETERS
  201.  *  void
  202.  * RETURNS
  203.  *  void
  204.  *****************************************************************************/
  205. void ResetRedialAndGoBack(void)
  206. {
  207.     /*----------------------------------------------------------------*/
  208.     /* Local Variables                                                */
  209.     /*----------------------------------------------------------------*/
  210.     /*----------------------------------------------------------------*/
  211.     /* Code Body                                                      */
  212.     /*----------------------------------------------------------------*/
  213.     ResetRedialAttempts();
  214.     GoBackfromNotifyScr();
  215.     return;
  216. }
  217. /*****************************************************************************
  218.  * FUNCTION
  219.  *  ResetRedialAttempts
  220.  * DESCRIPTION
  221.  *  This function resets redial counter for call
  222.  * PARAMETERS
  223.  *  void
  224.  * RETURNS
  225.  *  void
  226.  *****************************************************************************/
  227. void ResetRedialAttempts(void)
  228. {
  229.     /*----------------------------------------------------------------*/
  230.     /* Local Variables                                                */
  231.     /*----------------------------------------------------------------*/
  232.     /*----------------------------------------------------------------*/
  233.     /* Code Body                                                      */
  234.     /*----------------------------------------------------------------*/
  235.     cm_p->redial_info.MaxAttempts = 0;
  236.     cm_p->redial_info.CurrentAttempt = 0;
  237.     cm_p->redial_info.RedialTimer = FALSE;
  238.     cm_p->redial_info.ErrRedialScreen = FALSE;
  239.     cm_p->redial_info.DialFromPhb = MMI_PHB_NONE;
  240.     memset(cm_p->redial_info.RedialNum, 0, MAX_NUMBER);
  241.     StopTimer(CM_REDIAL_TIMER);
  242.     return;
  243. }
  244. /*****************************************************************************
  245.  * FUNCTION
  246.  *  SetMaxAttempts
  247.  * DESCRIPTION
  248.  *  Sets the maximum number of attempts for this call
  249.  * PARAMETERS
  250.  *  attempts        [IN]        Number
  251.  * RETURNS
  252.  *  void
  253.  *****************************************************************************/
  254. void SetMaxAttempts(U8 attempts)
  255. {
  256.     /*----------------------------------------------------------------*/
  257.     /* Local Variables                                                */
  258.     /*----------------------------------------------------------------*/
  259.     /*----------------------------------------------------------------*/
  260.     /* Code Body                                                      */
  261.     /*----------------------------------------------------------------*/
  262.     cm_p->redial_info.MaxAttempts = attempts;
  263.     
  264.     return;
  265. }
  266. /*****************************************************************************
  267.  * FUNCTION
  268.  *  SetRedialNumber
  269.  * DESCRIPTION
  270.  *  To store number to redial
  271.  * PARAMETERS
  272.  *  void
  273.  * RETURNS
  274.  *  void
  275.  *****************************************************************************/
  276. void SetRedialNumber(void)
  277. {
  278.     /*----------------------------------------------------------------*/
  279.     /* Local Variables                                                */
  280.     /*----------------------------------------------------------------*/
  281.     /*----------------------------------------------------------------*/
  282.     /* Code Body                                                      */
  283.     /*----------------------------------------------------------------*/
  284.     memset((PS8) cm_p->redial_info.RedialNum, 0, MAX_NUMBER);
  285.     pfnUnicodeStrcpy((PS8) cm_p->redial_info.RedialNum, (PS8) GetOutgoingNumber());
  286. }
  287. /*****************************************************************************
  288.  * FUNCTION
  289.  *  IsRedialSet
  290.  * DESCRIPTION
  291.  *  This function checks if the redial flag is set
  292.  * PARAMETERS
  293.  *  void
  294.  *  TRUE(?)     [OUT]       /FALSE
  295.  * RETURNS
  296.  *  pBOOL
  297.  *****************************************************************************/
  298. pBOOL IsRedialSet(void)
  299. {
  300.     /*----------------------------------------------------------------*/
  301.     /* Local Variables                                                */
  302.     /*----------------------------------------------------------------*/
  303.     /*----------------------------------------------------------------*/
  304.     /* Code Body                                                      */
  305.     /*----------------------------------------------------------------*/
  306.     if (GetOutgoingCallOrigin() == CM_CALL_MO_STK)
  307.     {
  308.         return SATCallRedialStatus();
  309.     }
  310.     return AutoRedialOnOffStatus();
  311. }
  312. /*****************************************************************************
  313.  * FUNCTION
  314.  *  IsRedialNeeded
  315.  * DESCRIPTION
  316.  *  This function checks if the error cause needs
  317.  *  to redial
  318.  * PARAMETERS
  319.  *  response        [IN]        
  320.  *  TRUE(?)         [OUT]       /FALSE
  321.  * RETURNS
  322.  *  pBOOL
  323.  *****************************************************************************/
  324. pBOOL IsRedialNeeded(U16 response)
  325. {
  326.     /*----------------------------------------------------------------*/
  327.     /* Local Variables                                                */
  328.     /*----------------------------------------------------------------*/
  329.     pBOOL result = FALSE;
  330.     /*----------------------------------------------------------------*/
  331.     /* Code Body                                                      */
  332.     /*----------------------------------------------------------------*/
  333.     MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_FUNC_IsRedialNeeded));
  334.     if ((GetTotalCallCount() == 0) || ((GetTotalCallCount() == 1) && (GetCurrentState() == CM_OUTGOING_STATE)))
  335.     {
  336.         switch (response)
  337.         {
  338.             case ERR_USER_BUSY:
  339.             case ERR_NO_USER_RESPONDING:
  340.             case ERR_DEST_OUT_OF_ORDER:
  341.             case ERR_NO_ANSWER_ON_ALERT:
  342.             case ERR_NO_CIRCUIT_CHANNEL_AVAIL:
  343.             case ERR_TEMPORARY_FAILURE:
  344.             case ERR_SWITCH_EQUIPMENT_CONGESTION:
  345.             case ERR_REQUESTED_CKT_CHANEL_NOT_AVIL:
  346.             case ERR_RESOURCE_UNAVAIL_UNSPECIFIED:
  347.                 SetMaxAttempts(10);
  348.                 result = TRUE;
  349.                 break;
  350.             case ERR_UNASSIGNED_NUM:
  351.             case ERR_NO_ROUTE_TO_DESTINATION:
  352.             case ERR_NUMBER_CHANGED:
  353.             case ERR_INVALID_NUMBER_FORMAT:
  354.             case ERR_NETWORK_OUT_OF_ORDER:
  355.                 SetMaxAttempts(1);
  356.                 result = TRUE;
  357.                 break;
  358.             default:
  359.                 break;
  360.         }
  361.     }
  362.     if (result == FALSE)
  363.     {
  364.         ResetRedialAttempts();
  365.         return FALSE;
  366.     }
  367.     return TRUE;
  368. }
  369. /*****************************************************************************
  370.  * FUNCTION
  371.  *  CheckRedialOrShowError
  372.  * DESCRIPTION
  373.  *  Checks if number must be redialed or error
  374.  *  must be shown
  375.  * PARAMETERS
  376.  *  response        [IN]        
  377.  *  Number(?)       [IN]        To show on screen
  378.  * RETURNS
  379.  *  void
  380.  *****************************************************************************/
  381. void CheckRedialOrShowError(U16 response)
  382. {
  383.     /*----------------------------------------------------------------*/
  384.     /* Local Variables                                                */
  385.     /*----------------------------------------------------------------*/
  386.     pBOOL result;
  387.     /*----------------------------------------------------------------*/
  388.     /* Code Body                                                      */
  389.     /*----------------------------------------------------------------*/
  390.     MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_FUNC_CheckRedialOrShowError));
  391.     result = CalculateSetBackOff();
  392.     ShowCallManagementErrorMessage(response);
  393.     if (result == TRUE)
  394.     SetCurrentState(GetPreviousState());
  395.     return;
  396. }
  397. /*****************************************************************************
  398.  * FUNCTION
  399.  *  ShowRedialScreen
  400.  * DESCRIPTION
  401.  *  Timer callback after notification time expires
  402.  * PARAMETERS
  403.  *  void
  404.  * RETURNS
  405.  *  void
  406.  *****************************************************************************/
  407. void ShowRedialScreen(void)
  408. {
  409.     /*----------------------------------------------------------------*/
  410.     /* Local Variables                                                */
  411.     /*----------------------------------------------------------------*/
  412.     /*----------------------------------------------------------------*/
  413.     /* Code Body                                                      */
  414.     /*----------------------------------------------------------------*/
  415.     StopTimer(CM_NOTIFYDURATION_TIMER);
  416.     cm_p->redial_info.ErrRedialScreen = FALSE;
  417.     EntryScrShowUserTimeToRedial();
  418. }
  419. /*****************************************************************************
  420.  * FUNCTION
  421.  *  CalculateSetBackOff
  422.  * DESCRIPTION
  423.  *  Calculates attempt value and resets timer for redial
  424.  * PARAMETERS
  425.  *  void
  426.  * RETURNS
  427.  *  void
  428.  *****************************************************************************/
  429. pBOOL CalculateSetBackOff(void)
  430. {
  431.     /*----------------------------------------------------------------*/
  432.     /* Local Variables                                                */
  433.     /*----------------------------------------------------------------*/
  434.     pBOOL minFlag = FALSE;
  435.     U8 timer, dispTimer;
  436.     S8 temp[10], temp2[20];
  437.     /*----------------------------------------------------------------*/
  438.     /* Code Body                                                      */
  439.     /*----------------------------------------------------------------*/
  440.     MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_FUNC_CalculateSetBackOff));
  441.     cm_p->redial_info.CurrentAttempt++;
  442.     /* exceed redial attempt */
  443.     if (cm_p->redial_info.CurrentAttempt > cm_p->redial_info.MaxAttempts)
  444.     {
  445.         ResetRedialAttempts();
  446.         return FALSE;
  447.     }
  448.     switch (cm_p->redial_info.CurrentAttempt)
  449.     {
  450.         case 1:
  451.             timer = 7;
  452.             dispTimer = 5;
  453.             break;
  454.         case 2:
  455.         case 3:
  456.         case 4:
  457.             timer = 65;
  458.             dispTimer = 1;
  459.             minFlag = TRUE;
  460.             break;
  461.         default:
  462.             timer = 190;
  463.             dispTimer = 3;
  464.             minFlag = TRUE;
  465.             break;
  466.     }
  467.     memset(gRedialMsgTemp, 0, sizeof(gRedialMsgTemp));
  468.     pfnUnicodeStrcpy((PS8) gRedialMsgTemp, GetString(STR_CM_REDIAL));
  469.     sprintf((PS8) temp, "n%d ", cm_p->redial_info.CurrentAttempt);
  470.     AnsiiToUnicodeString((PS8) temp2, (PS8) temp);
  471.     pfnUnicodeStrcat((PS8) gRedialMsgTemp, (PS8) temp2);
  472.     pfnUnicodeStrcat((PS8) gRedialMsgTemp, GetString(STR_CM_REDIAL_TIMES));
  473.     pfnUnicodeStrcat((PS8) gRedialMsgTemp, GetString(STR_CM_REDIAL_NEXT_ATTEMPT));
  474.     sprintf((PS8) temp, "n%d ", dispTimer);
  475.     AnsiiToUnicodeString((PS8) temp2, (PS8) temp);
  476.     pfnUnicodeStrcat((PS8) gRedialMsgTemp, (PS8) temp2);
  477.     if (minFlag == FALSE)
  478.     {
  479.         pfnUnicodeStrcat((PS8) gRedialMsgTemp, GetString(STR_CM_REDIAL_SEC));
  480.     }
  481.     else
  482.     {
  483.         pfnUnicodeStrcat((PS8) gRedialMsgTemp, GetString(STR_CM_REDIAL_MIN));
  484.     }
  485.     cm_p->redial_info.RedialTimer = TRUE;
  486.     StartTimer(CM_REDIAL_TIMER, (timer * 1000), (FuncPtr) RedailAttemptNoArg);
  487.     return TRUE;
  488. }
  489. /*****************************************************************************
  490.  * FUNCTION
  491.  *  RedailAttemptNoArg
  492.  * DESCRIPTION
  493.  *  Call back handler for timer expiry
  494.  * PARAMETERS
  495.  *  info        [?]         
  496.  *  flag(?)     [IN]        
  497.  * RETURNS
  498.  *  void
  499.  *****************************************************************************/
  500. void RedailAttemptNoArg(void *info)
  501. {
  502.     /*----------------------------------------------------------------*/
  503.     /* Local Variables                                                */
  504.     /*----------------------------------------------------------------*/
  505.     U16 index;
  506.     S8 TempMsgStruct[MAX_NUMBER];
  507.     PHB_CM_INTERFACE *temp;
  508.     /*----------------------------------------------------------------*/
  509.     /* Code Body                                                      */
  510.     /*----------------------------------------------------------------*/
  511.     StopTimer(CM_REDIAL_TIMER);
  512.     cm_p->redial_info.RedialTimer = FALSE;
  513.     if (IsScreenPresent(SCR1001_CM_OUTGOINGCALLSCREEN) == TRUE)
  514.     {
  515.         DeleteNScrId(SCR1001_CM_OUTGOINGCALLSCREEN);
  516.     }
  517.     DeleteScreenIfPresent(CM_SCR_RDL_TIME);
  518.     if (IsScreenPresent(CM_SCR_MARKER) == FALSE)
  519.     {
  520.         AddMarkerToHistory();
  521.     }
  522.     SetPreviousState(CM_IDLE_STATE);
  523.     SetCurrentState(CM_OUTGOING_STATE);
  524.     temp = GetCMPhoneBookStruct();
  525.     if (temp->dialInList != MMI_PHB_NONE)
  526.     {
  527.         cm_p->redial_info.DialFromPhb = temp->dialInList;
  528.     }
  529.     index = GetFirstFreeIndex();
  530.     AddNewCallInfo(
  531.         (U8*) cm_p->redial_info.RedialNum,
  532.         (CALL_STATE) GetCurrentState(),
  533.         CM_IDLE_STATE,
  534.         CM_CALL_MO,
  535.         (CM_CALL_HANDLE) (index + 1),
  536.         CM_VOICE_CALL);
  537.     UnicodeToAnsii(TempMsgStruct, (PS8) cm_p->redial_info.RedialNum);
  538.     MakePsInitiateCall((PU8) TempMsgStruct, (void*)OutgoingCallConnected);
  539.     return;
  540. }
  541. /*****************************************************************************
  542.  * FUNCTION
  543.  *  GetCurrentAttempt
  544.  * DESCRIPTION
  545.  *  To get flag to show redial screen
  546.  * PARAMETERS
  547.  *  void
  548.  * RETURNS
  549.  *  void
  550.  *****************************************************************************/
  551. U8 GetCurrentAttempt(void)
  552. {
  553.     /*----------------------------------------------------------------*/
  554.     /* Local Variables                                                */
  555.     /*----------------------------------------------------------------*/
  556.     /*----------------------------------------------------------------*/
  557.     /* Code Body                                                      */
  558.     /*----------------------------------------------------------------*/
  559.     return cm_p->redial_info.CurrentAttempt;
  560. }