comparison src/ui/mfw/mfw_cm.c @ 188:92abb46dc1ba

src/ui/mfw/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 06:10:27 +0000
parents 67bfe9f274f6
children
comparison
equal deleted inserted replaced
187:a33dd8a5dcc9 188:92abb46dc1ba
12 12
13 HISTORY: 13 HISTORY:
14 Dec 20, 2006 DR:OMAPS00108192 a0393213(R.Prabakar) 14 Dec 20, 2006 DR:OMAPS00108192 a0393213(R.Prabakar)
15 Description : Continous DTMF tones for simultanous keypress 15 Description : Continous DTMF tones for simultanous keypress
16 Solution : Bug was due to improper nesting of START-STOP sequence. Now they are avoided. 16 Solution : Bug was due to improper nesting of START-STOP sequence. Now they are avoided.
17 17
18 Dec 13, 2006 DR:OMAPS00107103 a0393213(R.Prabakar) 18 Dec 13, 2006 DR:OMAPS00107103 a0393213(R.Prabakar)
19 Description : No DTMF tones for simultanous keypress 19 Description : No DTMF tones for simultanous keypress
20 Solution : Once there was some problem in sending DTMF tones, the problem persisted till the next reset. 20 Solution : Once there was some problem in sending DTMF tones, the problem persisted till the next reset.
21 This was because the queue was not getting flushed once the call was ended. 21 This was because the queue was not getting flushed once the call was ended.
22 Now the queue is flushed once the call is ended. 22 Now the queue is flushed once the call is ended.
23 23
24 Nov 30, 2006 DR:OMAPS00105758 a0393213(R.Prabakar) 24 Nov 30, 2006 DR:OMAPS00105758 a0393213(R.Prabakar)
25 Description :No DTMF tones after collision of DTMF tones 25 Description :No DTMF tones after collision of DTMF tones
26 26
27 Nov 03, 2006 DR: OMAPS00101158 x0pleela 27 Nov 03, 2006 DR: OMAPS00101158 x0pleela
28 Description : Board crashes after sending atd command through HyperTerminal 28 Description : Board crashes after sending atd command through HyperTerminal
29 Solution : Avoid peforming phonebook search operation if the source id is not LOCAL 29 Solution : Avoid peforming phonebook search operation if the source id is not LOCAL
30 - Defined new static variable uOthersrc to set the value to TRUE or FALSE 30 - Defined new static variable uOthersrc to set the value to TRUE or FALSE
31 based on the source Id 31 based on the source Id
32 - Defined two new function mfw_set_OtherSrc_Value() to set the value of 32 - Defined two new function mfw_set_OtherSrc_Value() to set the value of
33 uOtherSrc to either TRUE or FALSE and mfw_get_OtherSrc_Value 33 uOtherSrc to either TRUE or FALSE and mfw_get_OtherSrc_Value
34 to get the value of uOtherSrc 34 to get the value of uOtherSrc
35 35
36 Oct 10, 2006 DR: OMAPS00093720 x0039928 36 Oct 10, 2006 DR: OMAPS00093720 x0039928
37 Description : If dial a international number and fail, when auto redail enabled, it will delete '+'. 37 Description : If dial a international number and fail, when auto redail enabled, it will delete '+'.
38 Solution : MFW_TON_INTERNATIONAL is set for out_call.ton if the dialling number contains '+' 38 Solution : MFW_TON_INTERNATIONAL is set for out_call.ton if the dialling number contains '+'
39 39
40 Sep 01, 2006 REF:OMAPS00090555 x0039928 40 Sep 01, 2006 REF:OMAPS00090555 x0039928
41 Description : When make a MO call,MFW can not get call number from ACI. 41 Description : When make a MO call,MFW can not get call number from ACI.
42 Solution : The called number is extracted from the parameter of callCmEvent() 42 Solution : The called number is extracted from the parameter of callCmEvent()
43 for event E_CM_MO_RES and is displayed. Also stack memory optimization is done to 43 for event E_CM_MO_RES and is displayed. Also stack memory optimization is done to
44 resolve MMI stack overflow problem. 44 resolve MMI stack overflow problem.
45 45
46 June 15, 2006 OMAPS00079492 x0043642 46 June 15, 2006 OMAPS00079492 x0043642
47 Description : FT TMO (wk20/06) TC 9.1, 9.2 Multi Party, MS fails to return to idle mode 47 Description : FT TMO (wk20/06) TC 9.1, 9.2 Multi Party, MS fails to return to idle mode
48 Solution : assign MFW_CM_DISCONNECT_ALL to variable cmd_hold, and call cm_signal() 48 Solution : assign MFW_CM_DISCONNECT_ALL to variable cmd_hold, and call cm_signal()
49 49
50 50
51 May 30, 2006 DR: OMAPS00070657 x0pleela 51 May 30, 2006 DR: OMAPS00070657 x0pleela
52 Description: CPHS feature on Locosto-Lite 52 Description: CPHS feature on Locosto-Lite
53 Solution: For ALS feature, 53 Solution: For ALS feature,
54 a) Added definition for new function "mfw_get_ALS_type" 54 a) Added definition for new function "mfw_get_ALS_type"
55 55
56 Apr 25, 2006 OMAPS00075711 a0393213 (R.Prabakar) 56 Apr 25, 2006 OMAPS00075711 a0393213 (R.Prabakar)
57 Description : 'End Conference' option doesn't work 57 Description : 'End Conference' option doesn't work
58 Solution : The ACI_CHLD_MOD is changed from CHLD_MOD_RelActSpec to CHLD_MOD_RelActAndAcpt while calling sAT_PlusCHLD() 58 Solution : The ACI_CHLD_MOD is changed from CHLD_MOD_RelActSpec to CHLD_MOD_RelActAndAcpt while calling sAT_PlusCHLD()
59 in cm_disconnect(). This is done since CHLD_MOD_RelActSpec with callId 0 is equivalent to sending 59 in cm_disconnect(). This is done since CHLD_MOD_RelActSpec with callId 0 is equivalent to sending
60 AT+CHLD=10 which is invalid according to GSM specification 60 AT+CHLD=10 which is invalid according to GSM specification
61 61
62 Apr 26, 2006 OMAPS00074886 a0393213 (Prabakar R) 62 Apr 26, 2006 OMAPS00074886 a0393213 (Prabakar R)
63 Description : No option in MMI to release the held call. 63 Description : No option in MMI to release the held call.
64 Solution : No option was available. Added a menu option. 64 Solution : No option was available. Added a menu option.
65 65
66 Mar 28, 2006 REF:DR OMAPS00072407 x0039928 66 Mar 28, 2006 REF:DR OMAPS00072407 x0039928
67 Description: Phone hangs when tried to make an outgoing call 67 Description: Phone hangs when tried to make an outgoing call
68 Solution: Reverting back the changes of issue OMAPS00048894 to stop from stack overflow. 68 Solution: Reverting back the changes of issue OMAPS00048894 to stop from stack overflow.
69 69
70 Feb 27, 2006 REF:DR OMAPS00067884 x0039928 70 Feb 27, 2006 REF:DR OMAPS00067884 x0039928
71 Description: Held call released at locosto phone does not release the call at other end 71 Description: Held call released at locosto phone does not release the call at other end
72 Solution: if the mode is greater than CHLD_MOD_RelDialCall then sAT_PercentCHLD() is called 72 Solution: if the mode is greater than CHLD_MOD_RelDialCall then sAT_PercentCHLD() is called
73 instead of sAT_PlusCHLD() 73 instead of sAT_PlusCHLD()
74 74
75 Jan 27, 2006 REF:DR OMAPS00048894 x0039928 75 Jan 27, 2006 REF:DR OMAPS00048894 x0039928
76 Description: Outgoing Call: The called number is not displayed while an outgoing call is made 76 Description: Outgoing Call: The called number is not displayed while an outgoing call is made
77 Solution: The called number is extracted from the parameter of callCmEvent() for event E_CM_MO_RES and is displayed. 77 Solution: The called number is extracted from the parameter of callCmEvent() for event E_CM_MO_RES and is displayed.
78 78
79 Apr 22, 2006 OMAPS00070762 a0393213 (Prabakar R) 79 Apr 22, 2006 OMAPS00070762 a0393213 (Prabakar R)
80 Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=1 in ATI. 80 Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=1 in ATI.
81 expected behaviour : active call should be released and the incoming call should be accepted 81 expected behaviour : active call should be released and the incoming call should be accepted
82 observed behaviour : happens as expected. but display shows incoming call screen only. 82 observed behaviour : happens as expected. but display shows incoming call screen only.
83 active screen is not shown eventhough the connection is established between MS1 and MS3 83 active screen is not shown eventhough the connection is established between MS1 and MS3
84 Fix : cmd.call_number was not set to 0, which is required in cm_result_cmd() 84 Fix : cmd.call_number was not set to 0, which is required in cm_result_cmd()
85 to call cm_ok_connect()which updates the display. It is set now. 85 to call cm_ok_connect()which updates the display. It is set now.
86 86
87 87
88 Apr 21, 2006 OMAPS00070774 a0393213 (Prabakar R) 88 Apr 21, 2006 OMAPS00070774 a0393213 (Prabakar R)
89 Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=2 in ATI. 89 Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=2 in ATI.
90 expected behaviour : active call should be put to hold and the incoming call should be accepted 90 expected behaviour : active call should be put to hold and the incoming call should be accepted
91 observed behaviour : happens as expected. but display shows incoming call screen only. 91 observed behaviour : happens as expected. but display shows incoming call screen only.
92 active screen is not shown eventhough the connection is established between MS1 and MS3 92 active screen is not shown eventhough the connection is established between MS1 and MS3
93 Fix : AT commands from CMD_SRC_ATI_3 was not processed. As a result, MFW was not informed of the acceptance of the call 93 Fix : AT commands from CMD_SRC_ATI_3 was not processed. As a result, MFW was not informed of the acceptance of the call
94 through ATI. In precise cmd_hold variable was not set to MFW_CM_MT_ACCEPT, which is necessary for display update 94 through ATI. In precise cmd_hold variable was not set to MFW_CM_MT_ACCEPT, which is necessary for display update
95 95
96 96
97 Sep 12, 2005 REF: MMI-SMR-34085 x0021334 97 Sep 12, 2005 REF: MMI-SMR-34085 x0021334
98 Description: RE: Add +CDIP command - MMI Additions 98 Description: RE: Add +CDIP command - MMI Additions
115 Description: Optimisation 2: Reduce the keyboard buffer and the dtmf buffer 115 Description: Optimisation 2: Reduce the keyboard buffer and the dtmf buffer
116 size 116 size
117 Solution : The dtmf buffer is reduced to 20 from 50 117 Solution : The dtmf buffer is reduced to 20 from 50
118 118
119 Apr 14, 2005 REF: CRR 29991 xpradipg 119 Apr 14, 2005 REF: CRR 29991 xpradipg
120 Description: Optimisation 5: Remove the static allocation and use dynamic 120 Description: Optimisation 5: Remove the static allocation and use dynamic
121 allocation/ deallocation for pb_list and black_list 121 allocation/ deallocation for pb_list and black_list
122 Solution: The static definition is removed and replaced with the dynamic 122 Solution: The static definition is removed and replaced with the dynamic
123 allocation 123 allocation
124 124
125 Feb 03, 200 REF: CRR 25960 x0012850 125 Feb 03, 200 REF: CRR 25960 x0012850
126 Description: Call Hold: While one call in Active and other in Held by swapping either of phone is not audible 126 Description: Call Hold: While one call in Active and other in Held by swapping either of phone is not audible
127 Solution: swapping action results in one of the calls getting muted. We attach user connection again. 127 Solution: swapping action results in one of the calls getting muted. We attach user connection again.
128 128
129 Aug 23, 2004 REF: CRR 22222 xkundadu 129 Aug 23, 2004 REF: CRR 22222 xkundadu
130 Bug: Runaway Call Waiting Tone. 130 Bug: Runaway Call Waiting Tone.
131 Call Waiting tone doesnot stop after ansering waiting call. 131 Call Waiting tone doesnot stop after ansering waiting call.
132 132
133 Fix: Handle the AT-Command source id CMD_SRC_ATI_2 also for call control 133 Fix: Handle the AT-Command source id CMD_SRC_ATI_2 also for call control
134 callback functions. 134 callback functions.
135 135
136 Jun 05, 2004 REF: CRR 18262 NISHIKANT KULKARNI 136 Jun 05, 2004 REF: CRR 18262 NISHIKANT KULKARNI
137 Description: The sample sends a STOP DTMF message without release of the key by the user 137 Description: The sample sends a STOP DTMF message without release of the key by the user
138 Solution: Instead of sending DTMF commands in "VTS_MOD_Auto" mode, on key press DTMF tone is started 138 Solution: Instead of sending DTMF commands in "VTS_MOD_Auto" mode, on key press DTMF tone is started
139 using VTS_MOD_ManStart and on key release DTMF tone is stopped using VTS_MOD_ManStop mode. 139 using VTS_MOD_ManStart and on key release DTMF tone is stopped using VTS_MOD_ManStop mode.
140 140
141 // Apr 26, 2004 REF: CRR 16545 Ajith K P and Side effect of CRR 16545. 141 // Apr 26, 2004 REF: CRR 16545 Ajith K P and Side effect of CRR 16545.
142 // Issue description: When the user enters 11SEND and if the first call is 142 // Issue description: When the user enters 11SEND and if the first call is
143 // HELD call,the held call disconnects. This should not happen. 143 // HELD call,the held call disconnects. This should not happen.
144 // Problem was, though sAT_PlusCHLD(..) is expected to disconnect an ACTIVE 144 // Problem was, though sAT_PlusCHLD(..) is expected to disconnect an ACTIVE
145 // call only, it was disconnecting HELD call rather than returning AT_FAIL. 145 // call only, it was disconnecting HELD call rather than returning AT_FAIL.
146 // If sAT_PlusCHLD() Fails, Send the user entered string as USSD to network using sAT-Dn(). 146 // If sAT_PlusCHLD() Fails, Send the user entered string as USSD to network using sAT-Dn().
147 // So now if the user wants to release a HELD call, in cm_disconect() we are calling the 147 // So now if the user wants to release a HELD call, in cm_disconect() we are calling the
148 // sAT_PlusCHLD(..) function with C 148 // sAT_PlusCHLD(..) function with C
149 149
150 150
151 Mar 28, 2006 REF:ER OMAPS00071798 x0043642 151 Mar 28, 2006 REF:ER OMAPS00071798 x0043642
152 Added new options in BMI to accept the value for tty audio mode, 152 Added new options in BMI to accept the value for tty audio mode,
153 and the accepted value is passed as parameter in function call sAT_PercentCTTY 153 and the accepted value is passed as parameter in function call sAT_PercentCTTY
154 154
155 */ 155 */
156 156
157 #define ENTITY_MFW 157 #define ENTITY_MFW
158 158
159 #include <string.h> 159 #include <string.h>
160 #include <stdio.h> 160 #include <stdio.h>
161 #include <stdlib.h> 161 #include <stdlib.h>
162 162
163 #if defined (NEW_FRAME) 163 #if defined (NEW_FRAME)
244 244
245 static UBYTE call_type; /* indicate an ECC call or normal call */ 245 static UBYTE call_type; /* indicate an ECC call or normal call */
246 static UBYTE call_stat; /* indicate an MO call or MT call */ 246 static UBYTE call_stat; /* indicate an MO call or MT call */
247 /*a0393213 lint WR:symbol not referenced soln:the variable is put under the flag (which won't be defined) so that the flag 247 /*a0393213 lint WR:symbol not referenced soln:the variable is put under the flag (which won't be defined) so that the flag
248 can be removed if the variable is necessary*/ 248 can be removed if the variable is necessary*/
249 #ifdef MMI_LINT_WARNING_REMOVAL 249 #ifdef MMI_LINT_WARNING_REMOVAL
250 static SHORT cc_id; /* current call index */ 250 static SHORT cc_id; /* current call index */
251 #endif 251 #endif
252 static UBYTE redial_stat; 252 static UBYTE redial_stat;
253 static UBYTE redial_count; 253 static UBYTE redial_count;
254 static UBYTE cmd_hold; 254 static UBYTE cmd_hold;
273 static int cm_redial_timeout(MfwEvt e, MfwTim *t); 273 static int cm_redial_timeout(MfwEvt e, MfwTim *t);
274 static char currAccepting = 0; /* ES!! 210999 */ 274 static char currAccepting = 0; /* ES!! 210999 */
275 static char currConnecting = 0; /* ES!! 290999 */ 275 static char currConnecting = 0; /* ES!! 290999 */
276 /*a0393213 lint WR:symbol not referenced soln:the variable is put under the flag (which won't be defined) so that the flag 276 /*a0393213 lint WR:symbol not referenced soln:the variable is put under the flag (which won't be defined) so that the flag
277 can be removed if the variable is necessary*/ 277 can be removed if the variable is necessary*/
278 #ifdef MMI_LINT_WARNING_REMOVAL 278 #ifdef MMI_LINT_WARNING_REMOVAL
279 static T_ACI_AT_CMD currCmd; 279 static T_ACI_AT_CMD currCmd;
280 #endif 280 #endif
281 static T_MFW_CM_DTMF dtmf_sent={FALSE};/*OMAPS00108192 a0393213 - variable which keeps track of the dtmf sent to ACI (via sAT_PlusVTS)*/ 281 static T_MFW_CM_DTMF dtmf_sent={FALSE};/*OMAPS00108192 a0393213 - variable which keeps track of the dtmf sent to ACI (via sAT_PlusVTS)*/
282 static T_MFW_CM_DTMF dtmf_queued={FALSE};/*OMAPS00108192 a0393213 - variable which keeps track of the recent dtmf added to the queue*/ 282 static T_MFW_CM_DTMF dtmf_queued={FALSE};/*OMAPS00108192 a0393213 - variable which keeps track of the recent dtmf added to the queue*/
283 void cm_force_disconnect(void); // RAVI 283 void cm_force_disconnect(void); // RAVI
295 #define CPI_CAUSE_MASK 0xFF /* cq11676 cause mask 17-02-04 MZ */ 295 #define CPI_CAUSE_MASK 0xFF /* cq11676 cause mask 17-02-04 MZ */
296 static UBYTE dtmf_q[MAX_DTMF_Q_ENTRIES]; 296 static UBYTE dtmf_q[MAX_DTMF_Q_ENTRIES];
297 static SHORT mfw_cm_dtmf_q_id; 297 static SHORT mfw_cm_dtmf_q_id;
298 298
299 // MMI-SPR 13873 xkundadu. 299 // MMI-SPR 13873 xkundadu.
300 // Added this boolean variable to check whether a particular call is in 300 // Added this boolean variable to check whether a particular call is in
301 // multiparty or not 301 // multiparty or not
302 BOOL bIsMultpty = FALSE; 302 BOOL bIsMultpty = FALSE;
303 303
304 EXTERN MfwHdr * current_mfw_elem; 304 EXTERN MfwHdr * current_mfw_elem;
305 305
329 // Apr 14, 2005 REF: CRR 29991 xpradipg 329 // Apr 14, 2005 REF: CRR 29991 xpradipg
330 // local variable definition 330 // local variable definition
331 #ifdef FF_MMI_OPTIM 331 #ifdef FF_MMI_OPTIM
332 T_MFW_CM_BLACKLIST_LIST black_list; 332 T_MFW_CM_BLACKLIST_LIST black_list;
333 /*a0393213 compiler warnings removal- removed variable 'file'*/ 333 /*a0393213 compiler warnings removal- removed variable 'file'*/
334 #endif 334 #endif
335 TRACE_FUNCTION ("cm_init()"); 335 TRACE_FUNCTION ("cm_init()");
336 memset(&black_list, 0, sizeof(T_MFW_CM_BLACKLIST_LIST)); 336 memset(&black_list, 0, sizeof(T_MFW_CM_BLACKLIST_LIST));
337 // Apr 14, 2005 REF: CRR 29991 xpradipg 337 // Apr 14, 2005 REF: CRR 29991 xpradipg
338 // Since the blacklist is not persistent across powercycles we reset the file 338 // Since the blacklist is not persistent across powercycles we reset the file
339 // contents 339 // contents
340 #ifdef FF_MMI_OPTIM 340 #ifdef FF_MMI_OPTIM
341 if( flash_MMI_blackList_write((U8 *)&black_list, sizeof(T_MFW_CM_BLACKLIST_LIST),0) < 0) 341 if( flash_MMI_blackList_write((U8 *)&black_list, sizeof(T_MFW_CM_BLACKLIST_LIST),0) < 0)
342 TRACE_EVENT("Error opening the black list file"); 342 TRACE_EVENT("Error opening the black list file");
343 #endif 343 #endif
344 344
345 currAccepting = 0; /* ES!! 210999 */ 345 currAccepting = 0; /* ES!! 210999 */
346 currConnecting = 0; /* ES!! 290999 */ 346 currConnecting = 0; /* ES!! 290999 */
347 347
348 call_type = MFW_CALL_FREE; 348 call_type = MFW_CALL_FREE;
741 */ 741 */
742 742
743 int cm_search_callId(T_ACI_CAL_STAT type, SHORT *id) 743 int cm_search_callId(T_ACI_CAL_STAT type, SHORT *id)
744 { 744 {
745 int i; 745 int i;
746 // Apr 06 2005 REF: CRR 29989 xpradipg 746 // Apr 06 2005 REF: CRR 29989 xpradipg
747 // Local definition and allocation 747 // Local definition and allocation
748 #ifdef FF_MMI_OPTIM 748 #ifdef FF_MMI_OPTIM
749 T_ACI_CAL_ENTR *call_tab; 749 T_ACI_CAL_ENTR *call_tab;
750 *id = 0; 750 *id = 0;
751 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 751 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
752 if(NULL == call_tab) 752 if(NULL == call_tab)
753 return CM_ERROR; 753 return CM_ERROR;
754 #else 754 #else
755 *id = 0; 755 *id = 0;
756 #endif 756 #endif
757 TRACE_FUNCTION("cm_search_callId()"); 757 TRACE_FUNCTION("cm_search_callId()");
758 758
759 759
760 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL) 760 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL)
761 { 761 {
762 // Apr 06 2005 REF: CRR 29989 xpradipg 762 // Apr 06 2005 REF: CRR 29989 xpradipg
763 // deallocation of memory allocated 763 // deallocation of memory allocated
764 #ifdef FF_MMI_OPTIM 764 #ifdef FF_MMI_OPTIM
765 if(call_tab) 765 if(call_tab)
766 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 766 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
767 #endif 767 #endif
768 return CM_ERROR; 768 return CM_ERROR;
769 } 769 }
770 770
771 for (i=0; i<MAX_CALL_NR; i++) 771 for (i=0; i<MAX_CALL_NR; i++)
772 { 772 {
773 if (call_tab[i].index == -1) 773 if (call_tab[i].index == -1)
774 break; 774 break;
779 // Apr 06 2005 REF: CRR 29989 xpradipg 779 // Apr 06 2005 REF: CRR 29989 xpradipg
780 // deallocation of memory 780 // deallocation of memory
781 #ifdef FF_MMI_OPTIM 781 #ifdef FF_MMI_OPTIM
782 if(call_tab) 782 if(call_tab)
783 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 783 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
784 #endif 784 #endif
785 return CM_OK; 785 return CM_OK;
786 } 786 }
787 787
788 } 788 }
789 // Apr 06 2005 REF: CRR 29989 xpradipg 789 // Apr 06 2005 REF: CRR 29989 xpradipg
790 // deallocation of memory 790 // deallocation of memory
791 #ifdef FF_MMI_OPTIM 791 #ifdef FF_MMI_OPTIM
792 if(call_tab) 792 if(call_tab)
793 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 793 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
794 #endif 794 #endif
795 return CM_ERROR; 795 return CM_ERROR;
796 } 796 }
797 797
798 /* 798 /*
799 +--------------------------------------------------------------------+ 799 +--------------------------------------------------------------------+
808 808
809 T_ACI_CAL_MODE cm_search_callMode(SHORT id) 809 T_ACI_CAL_MODE cm_search_callMode(SHORT id)
810 { 810 {
811 int i; 811 int i;
812 // Apr 06 2005 REF: CRR 29989 xpradipg 812 // Apr 06 2005 REF: CRR 29989 xpradipg
813 // allocation of memory, if the memory allocation fails then we return the 813 // allocation of memory, if the memory allocation fails then we return the
814 // error value same as when the qAT_PercentCAL() fails 814 // error value same as when the qAT_PercentCAL() fails
815 #ifdef FF_MMI_OPTIM 815 #ifdef FF_MMI_OPTIM
816 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR]; 816 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR];
817 T_ACI_CAL_MODE calMode; 817 T_ACI_CAL_MODE calMode;
818 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 818 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
819 if(NULL == call_tab) 819 if(NULL == call_tab)
820 return CAL_MODE_Unknown; 820 return CAL_MODE_Unknown;
821 #endif 821 #endif
822 822
823 TRACE_FUNCTION("cm_search_callMode()"); 823 TRACE_FUNCTION("cm_search_callMode()");
824 824
825 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL) 825 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL)
826 { 826 {
827 // Apr 06 2005 REF: CRR 29989 xpradipg 827 // Apr 06 2005 REF: CRR 29989 xpradipg
828 // deallocate memory 828 // deallocate memory
829 #ifdef FF_MMI_OPTIM 829 #ifdef FF_MMI_OPTIM
830 if(call_tab) 830 if(call_tab)
831 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 831 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
832 #endif 832 #endif
833 return CAL_MODE_Unknown; 833 return CAL_MODE_Unknown;
834 } 834 }
835 for (i=0; i<MAX_CALL_NR; i++) 835 for (i=0; i<MAX_CALL_NR; i++)
836 { 836 {
837 if (call_tab[i].index == -1) 837 if (call_tab[i].index == -1)
838 break; 838 break;
839 839
840 if (call_tab[i].index == id) 840 if (call_tab[i].index == id)
841 { 841 {
842 // Apr 06 2005 REF: CRR 29989 xpradipg 842 // Apr 06 2005 REF: CRR 29989 xpradipg
843 // deallocate memory 843 // deallocate memory
844 #ifdef FF_MMI_OPTIM 844 #ifdef FF_MMI_OPTIM
845 calMode = call_tab[i].calMode; 845 calMode = call_tab[i].calMode;
846 if(call_tab) 846 if(call_tab)
847 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 847 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
848 return calMode; 848 return calMode;
849 #else 849 #else
850 return call_tab[i].calMode; 850 return call_tab[i].calMode;
851 #endif 851 #endif
852 } 852 }
853 } 853 }
854 // Apr 06 2005 REF: CRR 29989 xpradipg 854 // Apr 06 2005 REF: CRR 29989 xpradipg
855 // deallocate memory 855 // deallocate memory
856 #ifdef FF_MMI_OPTIM 856 #ifdef FF_MMI_OPTIM
857 if(call_tab) 857 if(call_tab)
858 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 858 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
859 #endif 859 #endif
871 */ 871 */
872 872
873 int cm_search_mptyId(T_ACI_CAL_MPTY type, SHORT *id) 873 int cm_search_mptyId(T_ACI_CAL_MPTY type, SHORT *id)
874 { 874 {
875 int i; 875 int i;
876 // Apr 06 2005 REF: CRR 29989 xpradipg 876 // Apr 06 2005 REF: CRR 29989 xpradipg
877 // allocate memory 877 // allocate memory
878 #ifdef FF_MMI_OPTIM 878 #ifdef FF_MMI_OPTIM
879 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR]; 879 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR];
880 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 880 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
881 if( NULL == call_tab) 881 if( NULL == call_tab)
882 return CM_ERROR; 882 return CM_ERROR;
883 #endif 883 #endif
884 884
885 TRACE_FUNCTION("cm_search_mptyId()"); 885 TRACE_FUNCTION("cm_search_mptyId()");
886 *id = 0; 886 *id = 0;
887 887
888 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL) 888 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL)
889 { 889 {
890 // Apr 06 2005 REF: CRR 29989 xpradipg 890 // Apr 06 2005 REF: CRR 29989 xpradipg
891 // deallocate memory 891 // deallocate memory
892 #ifdef FF_MMI_OPTIM 892 #ifdef FF_MMI_OPTIM
893 if(call_tab) 893 if(call_tab)
894 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 894 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
895 #endif 895 #endif
901 break; 901 break;
902 902
903 if (call_tab[i].mpty == type) 903 if (call_tab[i].mpty == type)
904 { 904 {
905 *id = call_tab[i].index; 905 *id = call_tab[i].index;
906 // Apr 06 2005 REF: CRR 29989 xpradipg 906 // Apr 06 2005 REF: CRR 29989 xpradipg
907 // deallocate memory 907 // deallocate memory
908 #ifdef FF_MMI_OPTIM 908 #ifdef FF_MMI_OPTIM
909 if(call_tab) 909 if(call_tab)
910 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 910 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
911 #endif 911 #endif
912 return CM_OK; 912 return CM_OK;
913 } 913 }
914 } 914 }
915 // Apr 06 2005 REF: CRR 29989 xpradipg 915 // Apr 06 2005 REF: CRR 29989 xpradipg
916 // deallocate memory 916 // deallocate memory
917 #ifdef FF_MMI_OPTIM 917 #ifdef FF_MMI_OPTIM
918 if(call_tab) 918 if(call_tab)
919 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 919 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
920 #endif 920 #endif
921 return CM_ERROR; 921 return CM_ERROR;
922 } 922 }
923 923
924 924
925 /* 925 /*
936 936
937 #ifdef MMI_LINT_WARNING_REMOVAL 937 #ifdef MMI_LINT_WARNING_REMOVAL
938 LOCAL SHORT cm_search_numId(UBYTE *number) 938 LOCAL SHORT cm_search_numId(UBYTE *number)
939 { 939 {
940 int i; 940 int i;
941 // Apr 06 2005 REF: CRR 29989 xpradipg 941 // Apr 06 2005 REF: CRR 29989 xpradipg
942 // allocate memory 942 // allocate memory
943 #ifdef FF_MMI_OPTIM 943 #ifdef FF_MMI_OPTIM
944 SHORT index; 944 SHORT index;
945 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR]; 945 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR];
946 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 946 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
947 if(NULL == call_tab) 947 if(NULL == call_tab)
948 return 0; 948 return 0;
949 #endif 949 #endif
950 950
951 TRACE_FUNCTION("cm_search_numId()"); 951 TRACE_FUNCTION("cm_search_numId()");
952 952
953 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL) 953 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL)
954 { 954 {
955 // Apr 06 2005 REF: CRR 29989 xpradipg 955 // Apr 06 2005 REF: CRR 29989 xpradipg
956 // deallocate memory 956 // deallocate memory
957 #ifdef FF_MMI_OPTIM 957 #ifdef FF_MMI_OPTIM
958 if(call_tab) 958 if(call_tab)
959 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 959 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
960 #endif 960 #endif
961 return 0; 961 return 0;
962 } 962 }
963 963
964 for (i=0; i<MAX_CALL_NR; i++) 964 for (i=0; i<MAX_CALL_NR; i++)
965 { 965 {
966 if (call_tab[i].index == -1) 966 if (call_tab[i].index == -1)
967 break; 967 break;
968 968
969 if (!strcmp(call_tab[i].number, (char *)number)) 969 if (!strcmp(call_tab[i].number, (char *)number))
970 { 970 {
971 // Apr 06 2005 REF: CRR 29989 xpradipg 971 // Apr 06 2005 REF: CRR 29989 xpradipg
972 // deallocate memory 972 // deallocate memory
973 #ifdef FF_MMI_OPTIM 973 #ifdef FF_MMI_OPTIM
974 index = call_tab[i].index; 974 index = call_tab[i].index;
975 if(call_tab) 975 if(call_tab)
976 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 976 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
977 return index; 977 return index;
978 #else 978 #else
979 return call_tab[i].index; 979 return call_tab[i].index;
980 #endif 980 #endif
981 } 981 }
982 } 982 }
983 // Apr 06 2005 REF: CRR 29989 xpradipg 983 // Apr 06 2005 REF: CRR 29989 xpradipg
984 // deallocate memory 984 // deallocate memory
985 #ifdef FF_MMI_OPTIM 985 #ifdef FF_MMI_OPTIM
986 if(call_tab) 986 if(call_tab)
987 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 987 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
988 #endif 988 #endif
989 return 0; 989 return 0;
990 } 990 }
991 991
992 #endif 992 #endif
993 /* 993 /*
1005 T_MFW_CM_CALL_STAT *stat, 1005 T_MFW_CM_CALL_STAT *stat,
1006 UBYTE *ton, 1006 UBYTE *ton,
1007 UBYTE *mode) 1007 UBYTE *mode)
1008 { 1008 {
1009 int i; 1009 int i;
1010 // Apr 06 2005 REF: CRR 29989 xpradipg 1010 // Apr 06 2005 REF: CRR 29989 xpradipg
1011 // allocat memory 1011 // allocat memory
1012 #ifdef FF_MMI_OPTIM 1012 #ifdef FF_MMI_OPTIM
1013 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR]; 1013 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR];
1014 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 1014 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
1015 if( NULL == call_tab) 1015 if( NULL == call_tab)
1016 return CM_ERROR; 1016 return CM_ERROR;
1017 #endif 1017 #endif
1018 1018
1019 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) EQ AT_CMPL) 1019 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) EQ AT_CMPL)
1020 { 1020 {
1021 for (i=0; i<MAX_CALL_NR; i++) 1021 for (i=0; i<MAX_CALL_NR; i++)
1022 { 1022 {
1026 if (call_tab[i].index == call_number) 1026 if (call_tab[i].index == call_number)
1027 { 1027 {
1028 *stat = cm_cvt_call_status(call_tab[i].status); 1028 *stat = cm_cvt_call_status(call_tab[i].status);
1029 *ton = phb_cvtTon(call_tab[i].type.ton); 1029 *ton = phb_cvtTon(call_tab[i].type.ton);
1030 *mode = cm_cvt_call_mode(call_tab[i].calMode); 1030 *mode = cm_cvt_call_mode(call_tab[i].calMode);
1031 // Apr 06 2005 REF: CRR 29989 xpradipg 1031 // Apr 06 2005 REF: CRR 29989 xpradipg
1032 // deallocate memory 1032 // deallocate memory
1033 #ifdef FF_MMI_OPTIM 1033 #ifdef FF_MMI_OPTIM
1034 if(call_tab) 1034 if(call_tab)
1035 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 1035 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
1036 #endif 1036 #endif
1037 1037
1038 return CM_OK; 1038 return CM_OK;
1039 } 1039 }
1040 } 1040 }
1041 // Apr 06 2005 REF: CRR 29989 xpradipg 1041 // Apr 06 2005 REF: CRR 29989 xpradipg
1042 // this will be returned once we get out of the if statement 1042 // this will be returned once we get out of the if statement
1043 #ifndef FF_MMI_OPTIM 1043 #ifndef FF_MMI_OPTIM
1044 return CM_ERROR; 1044 return CM_ERROR;
1045 #endif 1045 #endif
1046 } 1046 }
1047 // Apr 06 2005 REF: CRR 29989 xpradipg 1047 // Apr 06 2005 REF: CRR 29989 xpradipg
1048 // deallocate memory 1048 // deallocate memory
1049 #ifdef FF_MMI_OPTIM 1049 #ifdef FF_MMI_OPTIM
1050 if(call_tab) 1050 if(call_tab)
1051 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 1051 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
1052 #endif 1052 #endif
1053 return CM_ERROR; 1053 return CM_ERROR;
1054 } 1054 }
1055 1055
1056 1056
1057 /* 1057 /*
1155 else 1155 else
1156 { 1156 {
1157 TRACE_EVENT("cm_search_callId(CAL_STAT_Wait, &id) != CM_OK"); // Marcus: CCBS: 14/11/2002 1157 TRACE_EVENT("cm_search_callId(CAL_STAT_Wait, &id) != CM_OK"); // Marcus: CCBS: 14/11/2002
1158 dis_connect.call_number = -1; // call id? 1158 dis_connect.call_number = -1; // call id?
1159 } 1159 }
1160 1160
1161 break; 1161 break;
1162 case CHLD_MOD_RelActAndAcpt: 1162 case CHLD_MOD_RelActAndAcpt:
1163 1163
1164 TRACE_EVENT("CHLD_MOD_RelActAndAcpt"); // Marcus: CCBS: 14/11/2002 1164 TRACE_EVENT("CHLD_MOD_RelActAndAcpt"); // Marcus: CCBS: 14/11/2002
1165 cmd_hold = MFW_CM_1_SEND; 1165 cmd_hold = MFW_CM_1_SEND;
1166 1166
1167 // Added xkundadu MMI-SPR 13873 1167 // Added xkundadu MMI-SPR 13873
1168 // Querying if there are any active calls, storing the index of the 1168 // Querying if there are any active calls, storing the index of the
1169 // call and setting a flag if found to be multiparty. 1169 // call and setting a flag if found to be multiparty.
1170 if (cm_search_callId(CAL_STAT_Active, &id) == CM_OK) 1170 if (cm_search_callId(CAL_STAT_Active, &id) == CM_OK)
1171 { 1171 {
1172 // Active call is present. 1172 // Active call is present.
1173 dis_connect.call_number = id; // call id ? 1173 dis_connect.call_number = id; // call id ?
1178 } 1178 }
1179 else 1179 else
1180 { 1180 {
1181 bIsMultpty = FALSE; 1181 bIsMultpty = FALSE;
1182 } 1182 }
1183 1183
1184 } 1184 }
1185 else 1185 else
1186 { 1186 {
1187 dis_connect.call_number = -1; 1187 dis_connect.call_number = -1;
1188 } 1188 }
1189 // Added xkundadu MMI-SPR 13873 1189 // Added xkundadu MMI-SPR 13873
1190 // Querying if there are any held calls, storing the index of the call 1190 // Querying if there are any held calls, storing the index of the call
1191 // to change the status to active call. 1191 // to change the status to active call.
1192 if (cm_search_callId(CAL_STAT_Held, &id) == CM_OK) 1192 if (cm_search_callId(CAL_STAT_Held, &id) == CM_OK)
1193 { 1193 {
1194 cmd.command = CM_RETRIEVE; 1194 cmd.command = CM_RETRIEVE;
1195 cmd.call_number = id; 1195 cmd.call_number = id;
1196 } 1196 }
1204 } 1204 }
1205 else 1205 else
1206 { 1206 {
1207 cmd.call_number=-1; 1207 cmd.call_number=-1;
1208 } 1208 }
1209 1209
1210 break; 1210 break;
1211 1211
1212 case CHLD_MOD_RelActSpec: 1212 case CHLD_MOD_RelActSpec:
1213 TRACE_EVENT("CHLD_MOD_RelActSpec"); // Marcus: CCBS: 14/11/2002 1213 TRACE_EVENT("CHLD_MOD_RelActSpec"); // Marcus: CCBS: 14/11/2002
1214 dis_connect.call_number = (SHORT)atoi(call); 1214 dis_connect.call_number = (SHORT)atoi(call);
1215 if (dis_connect.call_number) 1215 if (dis_connect.call_number)
1216 { 1216 {
1346 } 1346 }
1347 } 1347 }
1348 } 1348 }
1349 flash_MMI_blackList_close(file); 1349 flash_MMI_blackList_close(file);
1350 } 1350 }
1351 #else 1351 #else
1352 /* check whether this number is in blacklist */ 1352 /* check whether this number is in blacklist */
1353 for (i=0; i<black_list.count; i++) 1353 for (i=0; i<black_list.count; i++)
1354 { 1354 {
1355 if (!strcmp((char *)black_list.number[i], (char *)number)) 1355 if (!strcmp((char *)black_list.number[i], (char *)number))
1356 return CM_BLACKLIST; 1356 return CM_BLACKLIST;
1357 } 1357 }
1358 #endif 1358 #endif
1359 1359
1360 /* check the type of this number */ 1360 /* check the type of this number */
1361 if (cm_check_emergency(number) EQ TRUE) 1361 if (cm_check_emergency(number) EQ TRUE)
1362 call_type = MFW_ECC_CALL; 1362 call_type = MFW_ECC_CALL;
1363 else 1363 else
1508 /*a0393213 compiler warning removal -- removed clir_status def*/ 1508 /*a0393213 compiler warning removal -- removed clir_status def*/
1509 UBYTE colr_status; 1509 UBYTE colr_status;
1510 UBYTE prefix; 1510 UBYTE prefix;
1511 SHORT id; 1511 SHORT id;
1512 T_ACI_RETURN res,aci_result;//aci_result was added to fix the bug MMI-SPR 16545 1512 T_ACI_RETURN res,aci_result;//aci_result was added to fix the bug MMI-SPR 16545
1513 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1513 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1514 // Fix: If flag FF_MMI_PB_OPTIM is defined then allocate memory for buf, phone and num_save variables 1514 // Fix: If flag FF_MMI_PB_OPTIM is defined then allocate memory for buf, phone and num_save variables
1515 // through heap instead of stack. 1515 // through heap instead of stack.
1516 #ifdef FF_MMI_PB_OPTIM 1516 #ifdef FF_MMI_PB_OPTIM
1517 char * buf = (char*)mfwAlloc(80); 1517 char * buf = (char*)mfwAlloc(80);
1518 char * phone = (char*)mfwAlloc(MFW_NUM_LEN); 1518 char * phone = (char*)mfwAlloc(MFW_NUM_LEN);
1519 char * num_save = (char*)mfwAlloc(MFW_STRING_LEN); 1519 char * num_save = (char*)mfwAlloc(MFW_STRING_LEN);
1520 #else 1520 #else
1521 char buf[80]; 1521 char buf[80];
1523 UBYTE num_save[MFW_STRING_LEN]; 1523 UBYTE num_save[MFW_STRING_LEN];
1524 #endif 1524 #endif
1525 1525
1526 TRACE_FUNCTION ("cm_mo_call()"); 1526 TRACE_FUNCTION ("cm_mo_call()");
1527 1527
1528 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1528 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1529 #ifdef FF_MMI_PB_OPTIM 1529 #ifdef FF_MMI_PB_OPTIM
1530 memset(buf,0,80); 1530 memset(buf,0,80);
1531 memset(phone,0,MFW_NUM_LEN); 1531 memset(phone,0,MFW_NUM_LEN);
1532 memset(num_save,0,MFW_STRING_LEN); 1532 memset(num_save,0,MFW_STRING_LEN);
1533 strncpy(num_save, (char *)number, MFW_STRING_LEN-1); 1533 strncpy(num_save, (char *)number, MFW_STRING_LEN-1);
1534 #else 1534 #else
1535 strncpy((char *)num_save, (char *)number, MFW_STRING_LEN-1); 1535 strncpy((char *)num_save, (char *)number, MFW_STRING_LEN-1);
1536 num_save[MFW_STRING_LEN-1] = 0; 1536 num_save[MFW_STRING_LEN-1] = 0;
1537 #endif 1537 #endif
1538 // Oct 10, 2006 DR: OMAPS00093720 x0039928 1538 // Oct 10, 2006 DR: OMAPS00093720 x0039928
1539 // Fix: Set ton to MFW_TON_INTERNATIONAL 1539 // Fix: Set ton to MFW_TON_INTERNATIONAL
1540 if(number[0] EQ '+') 1540 if(number[0] EQ '+')
1541 { 1541 {
1542 out_call.ton = MFW_TON_INTERNATIONAL; 1542 out_call.ton = MFW_TON_INTERNATIONAL;
1543 } 1543 }
1556 1556
1557 if (typ == MFW_SS_HOLD) 1557 if (typ == MFW_SS_HOLD)
1558 { 1558 {
1559 cm_set_cmd_status(para.chld.mode, para.chld.call); 1559 cm_set_cmd_status(para.chld.mode, para.chld.call);
1560 1560
1561 // Feb 27, 2006 REF:DR OMAPS00067884 x0039928 1561 // Feb 27, 2006 REF:DR OMAPS00067884 x0039928
1562 // Fix : sAT_PercentCHLD() is called if the mode > CHLD_MOD_RelDialCall 1562 // Fix : sAT_PercentCHLD() is called if the mode > CHLD_MOD_RelDialCall
1563 if(para.chld.mode > CHLD_MOD_RelDialCall) 1563 if(para.chld.mode > CHLD_MOD_RelDialCall)
1564 aci_result = sAT_PercentCHLD(CMD_SRC_LCL, para.chld.mode, para.chld.call); 1564 aci_result = sAT_PercentCHLD(CMD_SRC_LCL, para.chld.mode, para.chld.call);
1565 else 1565 else
1566 aci_result = sAT_PlusCHLD(CMD_SRC_LCL, para.chld.mode, para.chld.call); 1566 aci_result = sAT_PlusCHLD(CMD_SRC_LCL, para.chld.mode, para.chld.call);
1567 1567
1568 // Apr 26, 2004 REF: CRR 16545 Ajith K P 1568 // Apr 26, 2004 REF: CRR 16545 Ajith K P
1569 // If sAT_PlusCHLD() Fails, Send the user entered string as USSD to network using sAT-Dn(). 1569 // If sAT_PlusCHLD() Fails, Send the user entered string as USSD to network using sAT-Dn().
1570 // So if its not failed just return CM_CTRL_STR, otherwise call sAT_Dn(). 1570 // So if its not failed just return CM_CTRL_STR, otherwise call sAT_Dn().
1571 if ( (aci_result EQ AT_CMPL ) OR (aci_result EQ AT_EXCT ) OR (aci_result EQ AT_BUSY )) 1571 if ( (aci_result EQ AT_CMPL ) OR (aci_result EQ AT_EXCT ) OR (aci_result EQ AT_BUSY ))
1572 { 1572 {
1573 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1573 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1574 // Fix: Free the memory allocated for buf, phone and num_save variables 1574 // Fix: Free the memory allocated for buf, phone and num_save variables
1575 #ifdef FF_MMI_PB_OPTIM 1575 #ifdef FF_MMI_PB_OPTIM
1576 if(buf) 1576 if(buf)
1577 mfwFree((U8*) buf,80); 1577 mfwFree((U8*) buf,80);
1578 if(phone) 1578 if(phone)
1579 mfwFree((U8*) phone,MFW_NUM_LEN); 1579 mfwFree((U8*) phone,MFW_NUM_LEN);
1580 if(num_save) 1580 if(num_save)
1581 mfwFree((U8*) num_save,MFW_STRING_LEN); 1581 mfwFree((U8*) num_save,MFW_STRING_LEN);
1582 #endif 1582 #endif
1583 return CM_CTRL_STR; 1583 return CM_CTRL_STR;
1584 } 1584 }
1585 } 1585 }
1586 //MC 11.04.02 1586 //MC 11.04.02
1587 if (typ == MFW_SS_ECT) 1587 if (typ == MFW_SS_ECT)
1593 //commented this return value. 1593 //commented this return value.
1594 // return CM_ERROR; 1594 // return CM_ERROR;
1595 } 1595 }
1596 else 1596 else
1597 { 1597 {
1598 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1598 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1599 // Fix: Free the memory allocated for buf,phone and num_save variables 1599 // Fix: Free the memory allocated for buf,phone and num_save variables
1600 #ifdef FF_MMI_PB_OPTIM 1600 #ifdef FF_MMI_PB_OPTIM
1601 if(buf) 1601 if(buf)
1602 mfwFree((U8*) buf,80); 1602 mfwFree((U8*) buf,80);
1603 if(phone) 1603 if(phone)
1604 mfwFree((U8*) phone,MFW_NUM_LEN); 1604 mfwFree((U8*) phone,MFW_NUM_LEN);
1605 if(num_save) 1605 if(num_save)
1606 mfwFree((U8*) num_save,MFW_STRING_LEN); 1606 mfwFree((U8*) num_save,MFW_STRING_LEN);
1607 #endif 1607 #endif
1608 return CM_CTRL_STR; 1608 return CM_CTRL_STR;
1609 } 1609 }
1610 } 1610 }
1611 //MC 1611 //MC
1612 1612
1613 if (typ == MFW_SS_DIAL_IDX) 1613 if (typ == MFW_SS_DIAL_IDX)
1614 { 1614 {
1615 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1615 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1616 // Fix: Free the memory allocated for buf,phone and num_save variables 1616 // Fix: Free the memory allocated for buf,phone and num_save variables
1617 #ifdef FF_MMI_PB_OPTIM 1617 #ifdef FF_MMI_PB_OPTIM
1618 if(buf) 1618 if(buf)
1619 mfwFree((U8*) buf,80); 1619 mfwFree((U8*) buf,80);
1620 if(phone) 1620 if(phone)
1621 mfwFree((U8*) phone,MFW_NUM_LEN); 1621 mfwFree((U8*) phone,MFW_NUM_LEN);
1622 if(num_save) 1622 if(num_save)
1623 mfwFree((U8*) num_save,MFW_STRING_LEN); 1623 mfwFree((U8*) num_save,MFW_STRING_LEN);
1624 #endif 1624 #endif
1625 return cm_mo_idx(&para, type); 1625 return cm_mo_idx(&para, type);
1626 } 1626 }
1627 1627
1628 switch (typ) 1628 switch (typ)
1629 { 1629 {
1678 } 1678 }
1679 else 1679 else
1680 { 1680 {
1681 cm_tty_enable(FALSE); 1681 cm_tty_enable(FALSE);
1682 } 1682 }
1683 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1683 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1684 #ifdef FF_MMI_PB_OPTIM 1684 #ifdef FF_MMI_PB_OPTIM
1685 strcpy(num_save, (num_save + 4)); /* Ignore SS string when dialling */ 1685 strcpy(num_save, (num_save + 4)); /* Ignore SS string when dialling */
1686 #else 1686 #else
1687 strcpy((char *)num_save, (char *)&num_save[4]); /* Ignore SS string when dialling */ 1687 strcpy((char *)num_save, (char *)&num_save[4]); /* Ignore SS string when dialling */
1688 #endif 1688 #endif
1689 rest = (char *)&number[4]; /* Look at number following SS string */ 1689 rest = (char *)&number[4]; /* Look at number following SS string */
1690 } 1690 }
1691 break; 1691 break;
1692 /* SH end */ 1692 /* SH end */
1693 1693
1694 default: 1694 default:
1695 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1695 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1696 // Fix: Free the memory allocated for buf,phone and num_save variables 1696 // Fix: Free the memory allocated for buf,phone and num_save variables
1697 #ifdef FF_MMI_PB_OPTIM 1697 #ifdef FF_MMI_PB_OPTIM
1698 if(buf) 1698 if(buf)
1699 mfwFree((U8*) buf,80); 1699 mfwFree((U8*) buf,80);
1700 if(phone) 1700 if(phone)
1701 mfwFree((U8*) phone,MFW_NUM_LEN); 1701 mfwFree((U8*) phone,MFW_NUM_LEN);
1702 if(num_save) 1702 if(num_save)
1703 mfwFree((U8*) num_save,MFW_STRING_LEN); 1703 mfwFree((U8*) num_save,MFW_STRING_LEN);
1704 #endif 1704 #endif
1705 return CM_ERROR; 1705 return CM_ERROR;
1706 } 1706 }
1707 1707
1708 string = rest; 1708 string = rest;
1709 1709
1710 colr_status = 0; 1710 colr_status = 0;
1711 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1711 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1712 #ifndef FF_MMI_PB_OPTIM 1712 #ifndef FF_MMI_PB_OPTIM
1713 buf[0] = '\0'; 1713 buf[0] = '\0';
1714 #endif 1714 #endif
1715 cc_stat.prefix[0] = '\0'; 1715 cc_stat.prefix[0] = '\0';
1716 while(strlen(string)) 1716 while(strlen(string))
1717 { 1717 {
1718 TRACE_EVENT("In the while"); 1718 TRACE_EVENT("In the while");
1719 new_typ = ss_decode((UBYTE *)string, &rest, &para); 1719 new_typ = ss_decode((UBYTE *)string, &rest, &para);
1720 // /* 1720 // /*
1721 if (new_typ == MFW_SS_CLIR) 1721 if (new_typ == MFW_SS_CLIR)
1722 { 1722 {
1723 1723
1724 if (para.Clir.mode == CLIR_MOD_Supp) 1724 if (para.Clir.mode == CLIR_MOD_Supp)
1725 { 1725 {
1726 strcat((char *)cc_stat.prefix, "*31#"); 1726 strcat((char *)cc_stat.prefix, "*31#");
1727 TRACE_EVENT ("CLIR_MOD_Supp"); 1727 TRACE_EVENT ("CLIR_MOD_Supp");
1728 } 1728 }
1771 if (typ == MFW_SS_DIAL) 1771 if (typ == MFW_SS_DIAL)
1772 { 1772 {
1773 res = (T_ACI_RETURN)cm_check_mo_number((UBYTE*)phone); /*a0393213 lint warnings removal - typecast done*/ 1773 res = (T_ACI_RETURN)cm_check_mo_number((UBYTE*)phone); /*a0393213 lint warnings removal - typecast done*/
1774 if ( res != CM_OK) 1774 if ( res != CM_OK)
1775 { 1775 {
1776 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1776 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1777 // Fix: Free the memory allocated for buf,phone and num_save variables 1777 // Fix: Free the memory allocated for buf,phone and num_save variables
1778 #ifdef FF_MMI_PB_OPTIM 1778 #ifdef FF_MMI_PB_OPTIM
1779 if(buf) 1779 if(buf)
1780 mfwFree((U8*) buf,80); 1780 mfwFree((U8*) buf,80);
1781 if(phone) 1781 if(phone)
1782 mfwFree((U8*) phone,MFW_NUM_LEN); 1782 mfwFree((U8*) phone,MFW_NUM_LEN);
1783 if(num_save) 1783 if(num_save)
1784 mfwFree((U8*) num_save,MFW_STRING_LEN); 1784 mfwFree((U8*) num_save,MFW_STRING_LEN);
1785 #endif 1785 #endif
1786 return res; 1786 return res;
1787 } 1787 }
1788 1788
1789 /* set the outgoing call status */ 1789 /* set the outgoing call status */
1790 call_stat = OUTGOING_CALL; 1790 call_stat = OUTGOING_CALL;
1808 #endif 1808 #endif
1809 } 1809 }
1810 if (type == DATA_CALL) 1810 if (type == DATA_CALL)
1811 para.dial.callType = D_TOC_Data; 1811 para.dial.callType = D_TOC_Data;
1812 1812
1813 // Apr 22, 2004 REF: CRR MMI-SPR-16873 Rashmi C N(Sasken) 1813 // Apr 22, 2004 REF: CRR MMI-SPR-16873 Rashmi C N(Sasken)
1814 // Using the CLIR status maintained in the flash, while making a call 1814 // Using the CLIR status maintained in the flash, while making a call
1815 if (!FFS_flashData.CLIR) 1815 if (!FFS_flashData.CLIR)
1816 { 1816 {
1817 res = sAT_Dn(CMD_SRC_LCL, buf, D_CLIR_OVRD_Supp, D_CUG_CTRL_NotPresent, para.dial.callType); /*a0393213 compiler warning removal-- -1 changed to D_CUG_CTRL_NotPresent*/ 1817 res = sAT_Dn(CMD_SRC_LCL, buf, D_CLIR_OVRD_Supp, D_CUG_CTRL_NotPresent, para.dial.callType); /*a0393213 compiler warning removal-- -1 changed to D_CUG_CTRL_NotPresent*/
1818 } 1818 }
1819 else 1819 else
1820 { 1820 {
1821 res = sAT_Dn(CMD_SRC_LCL, buf, D_CLIR_OVRD_Invoc, D_CUG_CTRL_NotPresent, para.dial.callType); /*a0393213 compiler warning removal-- -1 changed to D_CUG_CTRL_NotPresent*/ 1821 res = sAT_Dn(CMD_SRC_LCL, buf, D_CLIR_OVRD_Invoc, D_CUG_CTRL_NotPresent, para.dial.callType); /*a0393213 compiler warning removal-- -1 changed to D_CUG_CTRL_NotPresent*/
1822 } 1822 }
1823 1823
1824 if ((res == AT_FAIL) OR (res == AT_BUSY)) 1824 if ((res == AT_FAIL) OR (res == AT_BUSY))
1825 { 1825 {
1826 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1826 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1827 // Fix: Free the memory allocated for buf,phone and num_save variables 1827 // Fix: Free the memory allocated for buf,phone and num_save variables
1828 #ifdef FF_MMI_PB_OPTIM 1828 #ifdef FF_MMI_PB_OPTIM
1829 if(buf) 1829 if(buf)
1830 mfwFree((U8*) buf,80); 1830 mfwFree((U8*) buf,80);
1831 if(phone) 1831 if(phone)
1832 mfwFree((U8*) phone,MFW_NUM_LEN); 1832 mfwFree((U8*) phone,MFW_NUM_LEN);
1833 if(num_save) 1833 if(num_save)
1834 mfwFree((U8*) num_save,MFW_STRING_LEN); 1834 mfwFree((U8*) num_save,MFW_STRING_LEN);
1835 #endif 1835 #endif
1836 if (typ == MFW_SS_CLIP) 1836 if (typ == MFW_SS_CLIP)
1837 return CM_CLI; 1837 return CM_CLI;
1838 1838
1839 call_stat = MFW_CALL_FREE; 1839 call_stat = MFW_CALL_FREE;
1840 return cm_error_code(AT_CMD_D); 1840 return cm_error_code(AT_CMD_D);
1845 { 1845 {
1846 case MFW_SS_CLIR: 1846 case MFW_SS_CLIR:
1847 case MFW_SS_CLIP: 1847 case MFW_SS_CLIP:
1848 case MFW_SS_COLR: 1848 case MFW_SS_COLR:
1849 case MFW_SS_COLP: 1849 case MFW_SS_COLP:
1850 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1850 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1851 // Fix: Free the memory allocated for buf,phone and num_save variables 1851 // Fix: Free the memory allocated for buf,phone and num_save variables
1852 #ifdef FF_MMI_PB_OPTIM 1852 #ifdef FF_MMI_PB_OPTIM
1853 if(buf) 1853 if(buf)
1854 mfwFree((U8*) buf,80); 1854 mfwFree((U8*) buf,80);
1855 if(phone) 1855 if(phone)
1856 mfwFree((U8*) phone,MFW_NUM_LEN); 1856 mfwFree((U8*) phone,MFW_NUM_LEN);
1857 if(num_save) 1857 if(num_save)
1858 mfwFree((U8*) num_save,MFW_STRING_LEN); 1858 mfwFree((U8*) num_save,MFW_STRING_LEN);
1859 #endif 1859 #endif
1860 return CM_CLI; 1860 return CM_CLI;
1861 default: 1861 default:
1862 break; 1862 break;
1863 } 1863 }
1864 } 1864 }
1865 // Sep 01, 2006 REF:OMAPS00090555 x0039928 1865 // Sep 01, 2006 REF:OMAPS00090555 x0039928
1866 // Fix: Free the memory allocated for buf,phone and num_save variables 1866 // Fix: Free the memory allocated for buf,phone and num_save variables
1867 #ifdef FF_MMI_PB_OPTIM 1867 #ifdef FF_MMI_PB_OPTIM
1868 if(buf) 1868 if(buf)
1869 mfwFree((U8*) buf,80); 1869 mfwFree((U8*) buf,80);
1870 if(phone) 1870 if(phone)
1871 mfwFree((U8*) phone,MFW_NUM_LEN); 1871 mfwFree((U8*) phone,MFW_NUM_LEN);
1872 if(num_save) 1872 if(num_save)
1873 mfwFree((U8*) num_save,MFW_STRING_LEN); 1873 mfwFree((U8*) num_save,MFW_STRING_LEN);
1874 #endif 1874 #endif
1875 return cm_grp; 1875 return cm_grp;
1876 } 1876 }
1877 1877
1878 1878
1879 /* 1879 /*
2578 return; 2578 return;
2579 } 2579 }
2580 2580
2581 2581
2582 2582
2583 // Apr 26 2006, a0393213 (Prabakar R), OMAPS00074886 : No option in MMI to release the held call. 2583 // Apr 26 2006, a0393213 (Prabakar R), OMAPS00074886 : No option in MMI to release the held call.
2584 // This function is added to release all held calls 2584 // This function is added to release all held calls
2585 2585
2586 /******************************************************************************* 2586 /*******************************************************************************
2587 2587
2588 $Function: cm_end_held 2588 $Function: cm_end_held
2589 2589
2590 $Description: End held calls 2590 $Description: End held calls
2605 2605
2606 if (aci_res == AT_FAIL) 2606 if (aci_res == AT_FAIL)
2607 { 2607 {
2608 TRACE_EVENT("sAT_PlusCHLD returned AT_FAIL"); 2608 TRACE_EVENT("sAT_PlusCHLD returned AT_FAIL");
2609 } 2609 }
2610 2610
2611 return; 2611 return;
2612 } 2612 }
2613 2613
2614 2614
2615 /* 2615 /*
2962 { 2962 {
2963 2963
2964 int i; 2964 int i;
2965 USHORT report; /* Marcus: Extended error reporting: 12/11/2002 */ 2965 USHORT report; /* Marcus: Extended error reporting: 12/11/2002 */
2966 USHORT extend_report; /* API - 1564 - 16-01-03 - add this variable to store the new error code */ 2966 USHORT extend_report; /* API - 1564 - 16-01-03 - add this variable to store the new error code */
2967 // Apr 06 2005 REF: CRR 29989 xpradipg 2967 // Apr 06 2005 REF: CRR 29989 xpradipg
2968 // local definition 2968 // local definition
2969 #ifdef FF_MMI_OPTIM 2969 #ifdef FF_MMI_OPTIM
2970 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR]; 2970 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR];
2971 #endif 2971 #endif
2972 // Apr 14, 2005 REF: CRR 29991 xpradipg 2972 // Apr 14, 2005 REF: CRR 29991 xpradipg
2973 // local definition 2973 // local definition
2974 #ifdef FF_MMI_OPTIM 2974 #ifdef FF_MMI_OPTIM
2975 UBYTE count=0; 2975 UBYTE count=0;
2976 UBYTE blackListNum[MFW_NUM_LEN]; 2976 UBYTE blackListNum[MFW_NUM_LEN];
2977 int32 file = 0; 2977 int32 file = 0;
2978 #endif 2978 #endif
2979 TRACE_FUNCTION ("cm_error_connect()"); 2979 TRACE_FUNCTION ("cm_error_connect()");
2980 2980
2981 currAccepting = 0; /* ES!! 210999 */ 2981 currAccepting = 0; /* ES!! 210999 */
2982 currConnecting = 0; /* ES!! 290999 */ 2982 currConnecting = 0; /* ES!! 290999 */
2983 2983
3008 3008
3009 if ((call_stat EQ OUTGOING_CALL) 3009 if ((call_stat EQ OUTGOING_CALL)
3010 AND (call_type NEQ MFW_ECC_CALL) 3010 AND (call_type NEQ MFW_ECC_CALL)
3011 AND ((redial_stat EQ CM_REDIAL_AUTO) OR (redial_stat EQ CM_REDIAL_MANU))) 3011 AND ((redial_stat EQ CM_REDIAL_AUTO) OR (redial_stat EQ CM_REDIAL_MANU)))
3012 { 3012 {
3013 // Apr 06 2005 REF: CRR 29989 xpradipg 3013 // Apr 06 2005 REF: CRR 29989 xpradipg
3014 // allocate memory 3014 // allocate memory
3015 #ifdef FF_MMI_OPTIM 3015 #ifdef FF_MMI_OPTIM
3016 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 3016 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
3017 if( NULL == call_tab) 3017 if( NULL == call_tab)
3018 return; 3018 return;
3019 #endif 3019 #endif
3020 /* If this call is 2nd outgoing call, redial is not started */ 3020 /* If this call is 2nd outgoing call, redial is not started */
3021 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) EQ AT_CMPL) 3021 if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) EQ AT_CMPL)
3022 { 3022 {
3023 for (i=0; i<MAX_CALL_NR; i++) 3023 for (i=0; i<MAX_CALL_NR; i++)
3024 { 3024 {
3032 if (call_tab[i].calType == CAL_TYPE_MOC) 3032 if (call_tab[i].calType == CAL_TYPE_MOC)
3033 { 3033 {
3034 call_stat = MFW_CALL_FREE; 3034 call_stat = MFW_CALL_FREE;
3035 call_type = MFW_CALL_FREE; 3035 call_type = MFW_CALL_FREE;
3036 cmd_hold = MFW_CM_NO_FLAG; 3036 cmd_hold = MFW_CM_NO_FLAG;
3037 // Apr 06 2005 REF: CRR 29989 xpradipg 3037 // Apr 06 2005 REF: CRR 29989 xpradipg
3038 // deallocate memory 3038 // deallocate memory
3039 #ifdef FF_MMI_OPTIM 3039 #ifdef FF_MMI_OPTIM
3040 if(call_tab) 3040 if(call_tab)
3041 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 3041 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
3042 #endif 3042 #endif
3043 return; 3043 return;
3044 } 3044 }
3045 } 3045 }
3046 } 3046 }
3047 // Apr 06 2005 REF: CRR 29989 xpradipg 3047 // Apr 06 2005 REF: CRR 29989 xpradipg
3048 // deallocate memory 3048 // deallocate memory
3049 #ifdef FF_MMI_OPTIM 3049 #ifdef FF_MMI_OPTIM
3050 if(call_tab) 3050 if(call_tab)
3051 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 3051 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
3052 #endif 3052 #endif
3053 // Apr 14, 2005 REF: CRR 29991 xpradipg 3053 // Apr 14, 2005 REF: CRR 29991 xpradipg
3054 // read the list into the variable 3054 // read the list into the variable
3055 #ifdef FF_MMI_OPTIM 3055 #ifdef FF_MMI_OPTIM
3056 if((file = flash_MMI_blackList_open()) >= 0 ) 3056 if((file = flash_MMI_blackList_open()) >= 0 )
3057 { 3057 {
3058 if(flash_MMI_blackList_read(file,(U8*)&count, 1,0) > 0) 3058 if(flash_MMI_blackList_read(file,(U8*)&count, 1,0) > 0)
3059 { 3059 {
3060 if(count == MAX_BLACKLIST_NUM) 3060 if(count == MAX_BLACKLIST_NUM)
3061 #else 3061 #else
3062 /* check blacklist whether it is full */ 3062 /* check blacklist whether it is full */
3063 if (black_list.count == MAX_BLACKLIST_NUM) 3063 if (black_list.count == MAX_BLACKLIST_NUM)
3064 #endif 3064 #endif
3065 { 3065 {
3066 TRACE_EVENT ("blacklist is now full"); 3066 TRACE_EVENT ("blacklist is now full");
3067 3067
3068 /* Blacklist is now full and 3068 /* Blacklist is now full and
3069 MT shall prohibit further automatic call attempts 3069 MT shall prohibit further automatic call attempts
3085 } 3085 }
3086 #ifdef FF_MMI_OPTIM 3086 #ifdef FF_MMI_OPTIM
3087 } 3087 }
3088 flash_MMI_blackList_close(file); 3088 flash_MMI_blackList_close(file);
3089 } 3089 }
3090 #endif 3090 #endif
3091 3091
3092 /* check the registration staus */ 3092 /* check the registration staus */
3093 if (nm_reg_status() == MFW_NO_SERVICE) 3093 if (nm_reg_status() == MFW_NO_SERVICE)
3094 { 3094 {
3095 call_stat = MFW_CALL_FREE; 3095 call_stat = MFW_CALL_FREE;
3395 /*Apr 25, 2006 OMAPS00075711 a0393213 (R.Prabakar) 3395 /*Apr 25, 2006 OMAPS00075711 a0393213 (R.Prabakar)
3396 Description : 'End Conference' option doesn't work 3396 Description : 'End Conference' option doesn't work
3397 Solution : The ACI_CHLD_MOD is changed from CHLD_MOD_RelActSpec to CHLD_MOD_RelActAndAcpt while calling sAT_PlusCHLD(). 3397 Solution : The ACI_CHLD_MOD is changed from CHLD_MOD_RelActSpec to CHLD_MOD_RelActAndAcpt while calling sAT_PlusCHLD().
3398 This is done since CHLD_MOD_RelActSpec with callId 0 is equivalent to sending AT+CHLD=10 which is invalid 3398 This is done since CHLD_MOD_RelActSpec with callId 0 is equivalent to sending AT+CHLD=10 which is invalid
3399 according to GSM specification. Before calling sAT_PlusCHLD command status is also set*/ 3399 according to GSM specification. Before calling sAT_PlusCHLD command status is also set*/
3400 3400
3401 if (!call_number) 3401 if (!call_number)
3402 { 3402 {
3403 sprintf(callId, "%d", 0); 3403 sprintf(callId, "%d", 0);
3404 cm_set_cmd_status(CHLD_MOD_RelActAndAcpt, callId); 3404 cm_set_cmd_status(CHLD_MOD_RelActAndAcpt, callId);
3405 if (sAT_PlusCHLD(CMD_SRC_LCL, CHLD_MOD_RelActAndAcpt, callId) != AT_EXCT) 3405 if (sAT_PlusCHLD(CMD_SRC_LCL, CHLD_MOD_RelActAndAcpt, callId) != AT_EXCT)
3406 return CM_ERROR; 3406 return CM_ERROR;
3407 return CM_OK; 3407 return CM_OK;
3408 } 3408 }
3409 3409
3410 cm_search_callStat(call_number, &stat, &ton, &mode); 3410 cm_search_callStat(call_number, &stat, &ton, &mode);
3466 sprintf(callId, "%d", call_number); 3466 sprintf(callId, "%d", call_number);
3467 if (sAT_PlusCHLD(CMD_SRC_LCL, CHLD_MOD_RelActSpec, callId) != AT_EXCT) 3467 if (sAT_PlusCHLD(CMD_SRC_LCL, CHLD_MOD_RelActSpec, callId) != AT_EXCT)
3468 return CM_ERROR; 3468 return CM_ERROR;
3469 return CM_OK; 3469 return CM_OK;
3470 } 3470 }
3471 else if (stat == CALL_HELD) 3471 else if (stat == CALL_HELD)
3472 { 3472 {
3473 3473
3474 3474
3475 // Apr 26, 2004 REF: CRR 16545 Ajith K P Side effect of CRR 16545. 3475 // Apr 26, 2004 REF: CRR 16545 Ajith K P Side effect of CRR 16545.
3476 // CHLD_MOD_RelActSpec no longer releases held calls. 3476 // CHLD_MOD_RelActSpec no longer releases held calls.
3477 // So now if the user wants to release a HELD call, now we are calling the 3477 // So now if the user wants to release a HELD call, now we are calling the
3478 // sAT_PlusCHLD(..) function with CHLD_MOD_RelAnySpec as the parameter. 3478 // sAT_PlusCHLD(..) function with CHLD_MOD_RelAnySpec as the parameter.
3479 3479
3480 3480
3481 3481
3482 cmd_hold = MFW_CM_TERMINATED; 3482 cmd_hold = MFW_CM_TERMINATED;
3483 sprintf(callId, "%d", call_number); 3483 sprintf(callId, "%d", call_number);
3484 // Feb 27, 2006 REF:DR OMAPS00067884 x0039928 3484 // Feb 27, 2006 REF:DR OMAPS00067884 x0039928
3485 // Fix : sAT_PercentCHLD() is called if the mode > CHLD_MOD_RelDialCall 3485 // Fix : sAT_PercentCHLD() is called if the mode > CHLD_MOD_RelDialCall
3486 if (sAT_PercentCHLD(CMD_SRC_LCL, CHLD_MOD_RelAnySpec, callId) != AT_EXCT) 3486 if (sAT_PercentCHLD(CMD_SRC_LCL, CHLD_MOD_RelAnySpec, callId) != AT_EXCT)
3487 return CM_ERROR; 3487 return CM_ERROR;
3488 return CM_OK; 3488 return CM_OK;
3489 } 3489 }
3553 } 3553 }
3554 /* Marcus: CCBS: 14/11/2002: End */ 3554 /* Marcus: CCBS: 14/11/2002: End */
3555 3555
3556 if (cmd_hold == MFW_CM_MPTY_TERMINATED) 3556 if (cmd_hold == MFW_CM_MPTY_TERMINATED)
3557 dis_connect.call_number = 0; 3557 dis_connect.call_number = 0;
3558 //Nov 02, 2005 DR OMAPS00052132 xdeepadh 3558 //Nov 02, 2005 DR OMAPS00052132 xdeepadh
3559 //The usage of ATI enum is put under the flag FF_ATI 3559 //The usage of ATI enum is put under the flag FF_ATI
3560 #if defined (FF_ATI) || defined (NEPTUNE_BOARD) 3560 #if defined (FF_ATI) || defined (NEPTUNE_BOARD)
3561 else if (src EQ CMD_SRC_ATI_1) /* NM Berlin/UK integration 21.09.01 */ 3561 else if (src EQ CMD_SRC_ATI_1) /* NM Berlin/UK integration 21.09.01 */
3562 { 3562 {
3563 dis_connect.call_number = call_id; 3563 dis_connect.call_number = call_id;
3564 } 3564 }
3565 #endif 3565 #endif
3566 3566
3567 3567
3568 /* send event */ 3568 /* send event */
3569 qAT_PlusCEER( CMD_SRC_LCL, &cause); 3569 qAT_PlusCEER( CMD_SRC_LCL, &cause);
3570 /* Marcus: Extended error reporting: 12/11/2002: Start */ 3570 /* Marcus: Extended error reporting: 12/11/2002: Start */
3571 // TRACE_EVENT_P1("qAT_PlusCEER(%04X)", cause); 3571 // TRACE_EVENT_P1("qAT_PlusCEER(%04X)", cause);
3634 } 3634 }
3635 /* Marcus: CCBS: 14/11/2002: End */ 3635 /* Marcus: CCBS: 14/11/2002: End */
3636 3636
3637 if (cmd_hold == MFW_CM_MPTY_TERMINATED) 3637 if (cmd_hold == MFW_CM_MPTY_TERMINATED)
3638 dis_connect.call_number = 0; 3638 dis_connect.call_number = 0;
3639 //Nov 02, 2005 DR OMAPS00052132 xdeepadh 3639 //Nov 02, 2005 DR OMAPS00052132 xdeepadh
3640 //The usage of ATI enum is put under the flag FF_ATI 3640 //The usage of ATI enum is put under the flag FF_ATI
3641 #ifdef FF_ATI 3641 #ifdef FF_ATI
3642 else if (src EQ CMD_SRC_ATI_1) //NM Berlin/UK integration 21.09.01 3642 else if (src EQ CMD_SRC_ATI_1) //NM Berlin/UK integration 21.09.01
3643 { 3643 {
3644 dis_connect.call_number = call_id; 3644 dis_connect.call_number = call_id;
3645 } 3645 }
3646 #endif //FF_ATI 3646 #endif //FF_ATI
3647 3647
3648 /* send event */ 3648 /* send event */
3649 qAT_PlusCEER( CMD_SRC_LCL, &cause); 3649 qAT_PlusCEER( CMD_SRC_LCL, &cause);
3650 /* Marcus: Extended error reporting: 12/11/2002: Start */ 3650 /* Marcus: Extended error reporting: 12/11/2002: Start */
3651 TRACE_EVENT_P1("qAT_PlusCEER(%04X)", cause); 3651 TRACE_EVENT_P1("qAT_PlusCEER(%04X)", cause);
3789 break; 3789 break;
3790 3790
3791 case CM_DTMF_ACTIVE: 3791 case CM_DTMF_ACTIVE:
3792 // xnkulkar SPR-18262 3792 // xnkulkar SPR-18262
3793 // If there is a DTMF tone command already in the queue, add the current tone also 3793 // If there is a DTMF tone command already in the queue, add the current tone also
3794 // in the queue (with start mode). Also, start adding to the queue if we are expecting an acknowledgement 3794 // in the queue (with start mode). Also, start adding to the queue if we are expecting an acknowledgement
3795 // (rAT_OK) for the previous DTMF tone request sent. 3795 // (rAT_OK) for the previous DTMF tone request sent.
3796 /*OMAPS00108192 a0393213 DTMF START-DTMF STOP properly nested*/ 3796 /*OMAPS00108192 a0393213 DTMF START-DTMF STOP properly nested*/
3797 if (mfw_cbuf_num_elements(mfw_cm_dtmf_q_id) != 0) 3797 if (mfw_cbuf_num_elements(mfw_cm_dtmf_q_id) != 0)
3798 { 3798 {
3799 /*dtmf queue not empty*/ 3799 /*dtmf queue not empty*/
3800 if(dtmf_queued.mode==VTS_MOD_ManStop) 3800 if(dtmf_queued.mode==VTS_MOD_ManStop)
3801 { 3801 {
3802 /*most recent element in the queue corresponds to 'stop'*/ 3802 /*most recent element in the queue corresponds to 'stop'*/
3803 /*queue up*/ 3803 /*queue up*/
3804 modeRetVal = mfw_cbuf_put_mode(mfw_cm_dtmf_q_id, VTS_MOD_ManStart); 3804 modeRetVal = mfw_cbuf_put_mode(mfw_cm_dtmf_q_id, VTS_MOD_ManStart);
3805 retVal = mfw_cbuf_put(mfw_cm_dtmf_q_id, &crss_string); 3805 retVal = mfw_cbuf_put(mfw_cm_dtmf_q_id, &crss_string);
3806 // If the return values are negative, attempt to Queue the DTMF request failed 3806 // If the return values are negative, attempt to Queue the DTMF request failed
3807 if (retVal < 0 || modeRetVal < 0) 3807 if (retVal < 0 || modeRetVal < 0)
3814 return(FALSE); 3814 return(FALSE);
3815 } 3815 }
3816 /*successfully queued update the internal variable*/ 3816 /*successfully queued update the internal variable*/
3817 dtmf_queued.mode=VTS_MOD_ManStart; 3817 dtmf_queued.mode=VTS_MOD_ManStart;
3818 dtmf_queued.digit=crss_string; 3818 dtmf_queued.digit=crss_string;
3819 return (TRUE); 3819 return (TRUE);
3820 } 3820 }
3821 else 3821 else
3822 { 3822 {
3823 /*ignore the key press*/ 3823 /*ignore the key press*/
3824 return (TRUE); 3824 return (TRUE);
3868 } 3868 }
3869 else 3869 else
3870 { 3870 {
3871 TRACE_EVENT("sAT_PlusVTS() busy or failed"); 3871 TRACE_EVENT("sAT_PlusVTS() busy or failed");
3872 return (FALSE); 3872 return (FALSE);
3873 } 3873 }
3874 } 3874 }
3875 3875
3876 } 3876 }
3877 #ifdef MMI_LINT_WARNING_REMOVAL /*a0393213 lint warnings removal*/ 3877 #ifdef MMI_LINT_WARNING_REMOVAL /*a0393213 lint warnings removal*/
3878 currCmd = AT_CMD_VTS; 3878 currCmd = AT_CMD_VTS;
3879 #endif 3879 #endif
3880 break; 3880 break;
3881 3881
3882 case CM_DTMF_INACTIVE: 3882 case CM_DTMF_INACTIVE:
3883 // xnkulkar SPR-18262 3883 // xnkulkar SPR-18262
3884 // If there is a DTMF tone command already in the queue, add the current tone also 3884 // If there is a DTMF tone command already in the queue, add the current tone also
3885 // in the queue (with stop mode). Also, start adding to the queue if we are expecting an acknowledgement 3885 // in the queue (with stop mode). Also, start adding to the queue if we are expecting an acknowledgement
3886 // (rAT_OK) for the previous DTMF tone request sent. 3886 // (rAT_OK) for the previous DTMF tone request sent.
3887 /*OMAPS00108192 a0393213 DTMF START-DTMF STOP properly nested*/ 3887 /*OMAPS00108192 a0393213 DTMF START-DTMF STOP properly nested*/
3888 if (mfw_cbuf_num_elements(mfw_cm_dtmf_q_id) != 0) 3888 if (mfw_cbuf_num_elements(mfw_cm_dtmf_q_id) != 0)
3889 { 3889 {
3890 /*dtmf queue not empty*/ 3890 /*dtmf queue not empty*/
3891 if(dtmf_queued.mode==VTS_MOD_ManStart && dtmf_queued.digit==crss_string) 3891 if(dtmf_queued.mode==VTS_MOD_ManStart && dtmf_queued.digit==crss_string)
3892 { 3892 {
3893 /*most recent element in the queue corresponds to START and are of same digit so queue up*/ 3893 /*most recent element in the queue corresponds to START and are of same digit so queue up*/
3894 modeRetVal = mfw_cbuf_put_mode(mfw_cm_dtmf_q_id, VTS_MOD_ManStop); 3894 modeRetVal = mfw_cbuf_put_mode(mfw_cm_dtmf_q_id, VTS_MOD_ManStop);
3895 retVal = mfw_cbuf_put(mfw_cm_dtmf_q_id, &crss_string); 3895 retVal = mfw_cbuf_put(mfw_cm_dtmf_q_id, &crss_string);
3896 // If the return values are negative, attempt to Queue the DTMF request failed 3896 // If the return values are negative, attempt to Queue the DTMF request failed
3897 if (retVal < 0 || modeRetVal < 0) 3897 if (retVal < 0 || modeRetVal < 0)
3898 { 3898 {
3904 return(FALSE); 3904 return(FALSE);
3905 } 3905 }
3906 /*successfully queued update the internal variable*/ 3906 /*successfully queued update the internal variable*/
3907 dtmf_queued.mode=VTS_MOD_ManStop; 3907 dtmf_queued.mode=VTS_MOD_ManStop;
3908 dtmf_queued.digit=crss_string; 3908 dtmf_queued.digit=crss_string;
3909 return (TRUE); 3909 return (TRUE);
3910 } 3910 }
3911 else 3911 else
3912 { 3912 {
3913 /*ignore the key press*/ 3913 /*ignore the key press*/
3914 return (TRUE); 3914 return (TRUE);
3958 } 3958 }
3959 else 3959 else
3960 { 3960 {
3961 TRACE_EVENT("sAT_PlusVTS() busy or failed"); 3961 TRACE_EVENT("sAT_PlusVTS() busy or failed");
3962 return (FALSE); 3962 return (FALSE);
3963 } 3963 }
3964 } 3964 }
3965 3965
3966 } 3966 }
3967 res = TRUE; 3967 res = TRUE;
3968 cm_signal(E_CM_DTMF, &res); 3968 cm_signal(E_CM_DTMF, &res);
3969 break; 3969 break;
3970 3970
4032 static void send_queued_dtmf_tone(void) 4032 static void send_queued_dtmf_tone(void)
4033 { 4033 {
4034 SHORT retVal; 4034 SHORT retVal;
4035 UBYTE qdtmf; 4035 UBYTE qdtmf;
4036 //xnkulkar SPR-18262: Added these variables to store the Mode 4036 //xnkulkar SPR-18262: Added these variables to store the Mode
4037 T_ACI_VTS_MOD vts_mode = VTS_MOD_NotPresent; 4037 T_ACI_VTS_MOD vts_mode = VTS_MOD_NotPresent;
4038 4038
4039 TRACE_EVENT("send_queued_dtmf_tone()"); 4039 TRACE_EVENT("send_queued_dtmf_tone()");
4040 /*OMAPS00108192 a0393213*/ 4040 /*OMAPS00108192 a0393213*/
4041 if (mfw_cbuf_num_elements(mfw_cm_dtmf_q_id) > 0) 4041 if (mfw_cbuf_num_elements(mfw_cm_dtmf_q_id) > 0)
4042 { 4042 {
4051 { 4051 {
4052 dtmf_sent.valid=TRUE; 4052 dtmf_sent.valid=TRUE;
4053 dtmf_sent.mode=vts_mode; 4053 dtmf_sent.mode=vts_mode;
4054 dtmf_sent.digit=qdtmf; 4054 dtmf_sent.digit=qdtmf;
4055 } 4055 }
4056 4056
4057 } 4057 }
4058 else 4058 else
4059 { 4059 {
4060 TRACE_EVENT_P1("ERROR : mfw_cbuf_get failed with error value %d", retVal); 4060 TRACE_EVENT_P1("ERROR : mfw_cbuf_get failed with error value %d", retVal);
4061 dtmf_sent.valid=FALSE; 4061 dtmf_sent.valid=FALSE;
4062 } 4062 }
4063 4063
4064 } 4064 }
4065 else 4065 else
4066 { 4066 {
4067 dtmf_sent.valid=FALSE; 4067 dtmf_sent.valid=FALSE;
4068 } 4068 }
4079 void resetDTMFQueue() 4079 void resetDTMFQueue()
4080 { 4080 {
4081 TRACE_EVENT("resetDTMFQueue"); 4081 TRACE_EVENT("resetDTMFQueue");
4082 mfw_cbuf_reset(mfw_cm_dtmf_q_id); 4082 mfw_cbuf_reset(mfw_cm_dtmf_q_id);
4083 //expectRatOk=FALSE; 4083 //expectRatOk=FALSE;
4084 dtmf_sent.valid=FALSE; 4084 dtmf_sent.valid=FALSE;
4085 } 4085 }
4086 4086
4087 4087
4088 /* 4088 /*
4089 +--------------------------------------------------------------------+ 4089 +--------------------------------------------------------------------+
4183 else 4183 else
4184 { 4184 {
4185 if (cm_search_callId(CAL_STAT_Active, &call_number) != CM_OK) 4185 if (cm_search_callId(CAL_STAT_Active, &call_number) != CM_OK)
4186 return; 4186 return;
4187 cmd.call_number = call_number; 4187 cmd.call_number = call_number;
4188 #ifdef MMI_LINT_WARNING_REMOVAL /*a0393213 lint warnings removal*/ 4188 #ifdef MMI_LINT_WARNING_REMOVAL /*a0393213 lint warnings removal*/
4189 cc_id = 0; // ??? 4189 cc_id = 0; // ???
4190 #endif 4190 #endif
4191 } 4191 }
4192 } 4192 }
4193 break; 4193 break;
4208 else 4208 else
4209 { 4209 {
4210 if (cm_search_callId(CAL_STAT_Active, &call_number) != CM_OK) 4210 if (cm_search_callId(CAL_STAT_Active, &call_number) != CM_OK)
4211 return; 4211 return;
4212 cmd.call_number = call_number; 4212 cmd.call_number = call_number;
4213 #ifdef MMI_LINT_WARNING_REMOVAL /*a0393213 lint warnings removal*/ 4213 #ifdef MMI_LINT_WARNING_REMOVAL /*a0393213 lint warnings removal*/
4214 cc_id = 0; // ??? 4214 cc_id = 0; // ???
4215 #endif 4215 #endif
4216 } 4216 }
4217 } 4217 }
4218 break; 4218 break;
4219 4219
4220 case MFW_CM_1_SEND: 4220 case MFW_CM_1_SEND:
4221 { 4221 {
4222 4222
4223 cmd_hold = 0; 4223 cmd_hold = 0;
4224 if (result == Present) 4224 if (result == Present)
4225 { 4225 {
4226 // MMI-SPR 13873 xkundadu 4226 // MMI-SPR 13873 xkundadu
4227 // Handling of 1SEND 4227 // Handling of 1SEND
4228 // If the user presses 1SEND, release active calls and accept 4228 // If the user presses 1SEND, release active calls and accept
4229 // the WAITING call 4229 // the WAITING call
4230 if (dis_connect.call_number NEQ -1) 4230 if (dis_connect.call_number NEQ -1)
4231 { 4231 {
4232 // If there is an active call, disconnect it. 4232 // If there is an active call, disconnect it.
4233 cm_ok_disconnect(CMD_SRC_LCL, 0); 4233 cm_ok_disconnect(CMD_SRC_LCL, 0);
4234 } 4234 }
4235 4235
4236 if (!cmd.call_number) 4236 if (!cmd.call_number)
4237 { 4237 {
4238 // If there is waiting call, accept the call 4238 // If there is waiting call, accept the call
4239 cm_ok_connect(); 4239 cm_ok_connect();
4240 } 4240 }
4241 cmd.call_number = -1; 4241 cmd.call_number = -1;
4242 } 4242 }
4243 4243
4244 } 4244 }
4245 break; 4245 break;
4246 4246
4247 /* Marcus: CCBS: 14/11/2002: Start */ 4247 /* Marcus: CCBS: 14/11/2002: Start */
4248 case MFW_CM_CCBS_REGISTER: 4248 case MFW_CM_CCBS_REGISTER:
4731 // U8 version; // RAVI 4731 // U8 version; // RAVI
4732 // Apr 14, 2005 REF: CRR 29991 xpradipg 4732 // Apr 14, 2005 REF: CRR 29991 xpradipg
4733 // local definition 4733 // local definition
4734 #ifdef FF_MMI_OPTIM 4734 #ifdef FF_MMI_OPTIM
4735 T_MFW_CM_BLACKLIST_LIST black_list; 4735 T_MFW_CM_BLACKLIST_LIST black_list;
4736 #endif 4736 #endif
4737 4737
4738 TRACE_FUNCTION ("cm_set_redial()"); 4738 TRACE_FUNCTION ("cm_set_redial()");
4739 4739
4740 if (redial_mode == CM_REDIAL_BLACKLIST) 4740 if (redial_mode == CM_REDIAL_BLACKLIST)
4741 { 4741 {
4743 // Apr 14, 2005 REF: CRR 29991 xpradipg 4743 // Apr 14, 2005 REF: CRR 29991 xpradipg
4744 // reset the file contents 4744 // reset the file contents
4745 #ifdef FF_MMI_OPTIM 4745 #ifdef FF_MMI_OPTIM
4746 if(flash_MMI_blackList_write((U8 *)&black_list, sizeof(T_MFW_CM_BLACKLIST_LIST),0) < 0) 4746 if(flash_MMI_blackList_write((U8 *)&black_list, sizeof(T_MFW_CM_BLACKLIST_LIST),0) < 0)
4747 TRACE_FUNCTION(" Error writing into file"); 4747 TRACE_FUNCTION(" Error writing into file");
4748 #endif 4748 #endif
4749 return; 4749 return;
4750 } 4750 }
4751 4751
4752 if (redial_mode == CM_REDIAL_OFF 4752 if (redial_mode == CM_REDIAL_OFF
4753 || redial_mode == CM_REDIAL_AUTO 4753 || redial_mode == CM_REDIAL_AUTO
4877 TRACE_FUNCTION ("cm_redial_timeout()"); 4877 TRACE_FUNCTION ("cm_redial_timeout()");
4878 4878
4879 memset(number, 0, sizeof(number)); 4879 memset(number, 0, sizeof(number));
4880 mfwStrncpy(number, (CHAR *)cc_stat.prefix, max_num_size); 4880 mfwStrncpy(number, (CHAR *)cc_stat.prefix, max_num_size);
4881 max_num_size -= strlen((char *)cc_stat.prefix); 4881 max_num_size -= strlen((char *)cc_stat.prefix);
4882 4882
4883 if ((cc_stat.ton EQ MFW_TON_INTERNATIONAL) AND (cc_stat.number[0] != '+')) 4883 if ((cc_stat.ton EQ MFW_TON_INTERNATIONAL) AND (cc_stat.number[0] != '+'))
4884 { 4884 {
4885 strcat(number, "+"); 4885 strcat(number, "+");
4886 max_num_size--; 4886 max_num_size--;
4887 } 4887 }
4888 4888
4889 strncat(number, (CHAR *)cc_stat.number, max_num_size); 4889 strncat(number, (CHAR *)cc_stat.number, max_num_size);
4890 4890
4891 switch (redial_stat) 4891 switch (redial_stat)
4892 { 4892 {
4893 case CM_REDIAL_AUTO: 4893 case CM_REDIAL_AUTO:
4970 4970
4971 buf[0] = '\0'; 4971 buf[0] = '\0';
4972 4972
4973 mfwStrncpy(buf, (char *)cc_stat.prefix, max_buf_size); 4973 mfwStrncpy(buf, (char *)cc_stat.prefix, max_buf_size);
4974 max_buf_size -= strlen((char *)cc_stat.prefix); 4974 max_buf_size -= strlen((char *)cc_stat.prefix);
4975 4975
4976 if ((cc_stat.ton EQ MFW_TON_INTERNATIONAL) AND (cc_stat.number[0] != '+')) 4976 if ((cc_stat.ton EQ MFW_TON_INTERNATIONAL) AND (cc_stat.number[0] != '+'))
4977 { 4977 {
4978 strcat(buf, "+"); 4978 strcat(buf, "+");
4979 max_buf_size--; 4979 max_buf_size--;
4980 } 4980 }
5088 5088
5089 int cm_status(SHORT call_number, T_MFW_CM_STATUS *status, UBYTE num) 5089 int cm_status(SHORT call_number, T_MFW_CM_STATUS *status, UBYTE num)
5090 { 5090 {
5091 UBYTE cnt; 5091 UBYTE cnt;
5092 int i; 5092 int i;
5093 // Apr 06 2005 REF: CRR 29989 xpradipg 5093 // Apr 06 2005 REF: CRR 29989 xpradipg
5094 // define and allocate memory 5094 // define and allocate memory
5095 #ifdef FF_MMI_OPTIM 5095 #ifdef FF_MMI_OPTIM
5096 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR]; 5096 T_ACI_CAL_ENTR *call_tab;//[MAX_CALL_NR];
5097 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 5097 call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
5098 if( NULL == call_tab) 5098 if( NULL == call_tab)
5139 #endif 5139 #endif
5140 cnt = 1; 5140 cnt = 1;
5141 break; 5141 break;
5142 } 5142 }
5143 } 5143 }
5144 // Apr 06 2005 REF: CRR 29989 xpradipg 5144 // Apr 06 2005 REF: CRR 29989 xpradipg
5145 // deallocate memory 5145 // deallocate memory
5146 #ifdef FF_MMI_OPTIM 5146 #ifdef FF_MMI_OPTIM
5147 if(call_tab) 5147 if(call_tab)
5148 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 5148 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
5149 #endif 5149 #endif
5150 return cnt; 5150 return cnt;
5151 } 5151 }
5152 5152
5153 if (!call_number) 5153 if (!call_number)
5154 { 5154 {
5186 memset(status[cnt].name, '\0', MFW_TAG_LEN); 5186 memset(status[cnt].name, '\0', MFW_TAG_LEN);
5187 #endif 5187 #endif
5188 cnt++; 5188 cnt++;
5189 } 5189 }
5190 } 5190 }
5191 // Apr 06 2005 REF: CRR 29989 xpradipg 5191 // Apr 06 2005 REF: CRR 29989 xpradipg
5192 // deallocate memory 5192 // deallocate memory
5193 #ifdef FF_MMI_OPTIM 5193 #ifdef FF_MMI_OPTIM
5194 if(call_tab) 5194 if(call_tab)
5195 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 5195 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
5196 #endif 5196 #endif
5197 return cnt; 5197 return cnt;
5198 } 5198 }
5199 // Apr 06 2005 REF: CRR 29989 xpradipg 5199 // Apr 06 2005 REF: CRR 29989 xpradipg
5200 // deallocate memory 5200 // deallocate memory
5201 #ifdef FF_MMI_OPTIM 5201 #ifdef FF_MMI_OPTIM
5202 if(call_tab) 5202 if(call_tab)
5203 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR); 5203 mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
5204 #endif 5204 #endif
5205 return 0; 5205 return 0;
5206 } 5206 }
5207 5207
5208 5208
5209 /* 5209 /*
5265 else 5265 else
5266 dis_connect.call_number = id; 5266 dis_connect.call_number = id;
5267 } 5267 }
5268 } 5268 }
5269 5269
5270 // Apr 26 2006, a0393213 (Prabakar R), OMAPS00074886 : No option in MMI to release the held call. 5270 // Apr 26 2006, a0393213 (Prabakar R), OMAPS00074886 : No option in MMI to release the held call.
5271 // cmd_hold variable is set to MFW_CM_TERMINATED to indicate that the call has been terminated 5271 // cmd_hold variable is set to MFW_CM_TERMINATED to indicate that the call has been terminated
5272 cmd_hold = MFW_CM_TERMINATED; 5272 cmd_hold = MFW_CM_TERMINATED;
5273 break; 5273 break;
5274 5274
5275 case CHLD_MOD_RelActAndAcpt: 5275 case CHLD_MOD_RelActAndAcpt:
5276 5276
5277 // MMI-SPR 13873 xkundadu 5277 // MMI-SPR 13873 xkundadu
5278 // Handling of 1+SEND - Releases all active calls (if any exist) and 5278 // Handling of 1+SEND - Releases all active calls (if any exist) and
5279 // accepts the other (held or waiting) call. 5279 // accepts the other (held or waiting) call.
5280 5280
5281 if( (cm_search_callId(CAL_STAT_DeactiveReq, &id) == CM_OK) OR 5281 if( (cm_search_callId(CAL_STAT_DeactiveReq, &id) == CM_OK) OR
5282 (cm_search_callId(CAL_STAT_Active, &id) == CM_OK)) 5282 (cm_search_callId(CAL_STAT_Active, &id) == CM_OK))
5283 { 5283 {
5286 dis_connect.call_number = id; 5286 dis_connect.call_number = id;
5287 if(bIsMultpty == TRUE) 5287 if(bIsMultpty == TRUE)
5288 { 5288 {
5289 // Call is in multiparty 5289 // Call is in multiparty
5290 // 1SEND for multiparty will disconnect all the active calls 5290 // 1SEND for multiparty will disconnect all the active calls
5291 // To clear all calls assign the dis_connect.call_number to 5291 // To clear all calls assign the dis_connect.call_number to
5292 // zero 5292 // zero
5293 dis_connect.call_number = 0; 5293 dis_connect.call_number = 0;
5294 bIsMultpty = FALSE; 5294 bIsMultpty = FALSE;
5295 } 5295 }
5296 } 5296 }
5297 else 5297 else
5298 { 5298 {
5299 // There is no active calls/active calls whose disconnection is 5299 // There is no active calls/active calls whose disconnection is
5300 // iniated existing 5300 // iniated existing
5301 dis_connect.call_number = -1; 5301 dis_connect.call_number = -1;
5302 } 5302 }
5303 if (cm_search_callId(CAL_STAT_Wait, &id) == CM_OK) 5303 if (cm_search_callId(CAL_STAT_Wait, &id) == CM_OK)
5304 { 5304 {
5305 // Waiting call is existing. 5305 // Waiting call is existing.
5306 // In the function cm_result_cmd(), value of cmd.call_number 5306 // In the function cm_result_cmd(), value of cmd.call_number
5307 // is used to determine whether to call cm_connect() or not 5307 // is used to determine whether to call cm_connect() or not
5308 cmd.call_number=0; 5308 cmd.call_number=0;
5309 } 5309 }
5310 cmd_hold = MFW_CM_1_SEND; 5310 cmd_hold = MFW_CM_1_SEND;
5311 break; 5311 break;
5312 5312
5313 case CHLD_MOD_HldActAndAcpt: 5313 case CHLD_MOD_HldActAndAcpt:
5314 5314
5315 // MMI -SPR 13873 xkundadu 5315 // MMI -SPR 13873 xkundadu
5316 // Handling of 2+SEND - Places all active calls (if any exist) on hold 5316 // Handling of 2+SEND - Places all active calls (if any exist) on hold
5317 // and accepts the other (held or waiting) call. 5317 // and accepts the other (held or waiting) call.
5318 5318
5319 switch (clog_cmd->cmdPrm.sCHLD.act) 5319 switch (clog_cmd->cmdPrm.sCHLD.act)
5320 { 5320 {
5321 5321
5322 case CHLD_ACT_Accept: 5322 case CHLD_ACT_Accept:
5323 // Accept the incoming call 5323 // Accept the incoming call
5324 cmd_hold = MFW_CM_MT_ACCEPT; 5324 cmd_hold = MFW_CM_MT_ACCEPT;
5325 break; 5325 break;
5326 5326
5327 case CHLD_ACT_Hold: 5327 case CHLD_ACT_Hold:
5328 // Getting the id of the call which has been put on hold by ACI 5328 // Getting the id of the call which has been put on hold by ACI
5329 cmd.command = CM_HOLD; 5329 cmd.command = CM_HOLD;
5330 if (cm_search_callId(CAL_STAT_Held, &id) == CM_OK) 5330 if (cm_search_callId(CAL_STAT_Held, &id) == CM_OK)
5331 { 5331 {
5334 else 5334 else
5335 { 5335 {
5336 cmd.call_number = -1; 5336 cmd.call_number = -1;
5337 } 5337 }
5338 break; 5338 break;
5339 5339
5340 case CHLD_ACT_Swap: 5340 case CHLD_ACT_Swap:
5341 // Swap the call 5341 // Swap the call
5342 cmd.command = CM_SWAP; 5342 cmd.command = CM_SWAP;
5343 break; 5343 break;
5344 5344
5345 case CHLD_ACT_Retrieve: 5345 case CHLD_ACT_Retrieve:
5346 // Getting the id of the call which has been made active by ACI 5346 // Getting the id of the call which has been made active by ACI
5347 cmd.command = CM_RETRIEVE; 5347 cmd.command = CM_RETRIEVE;
5348 if (cm_search_callId(CAL_STAT_Active, &id) == CM_OK) 5348 if (cm_search_callId(CAL_STAT_Active, &id) == CM_OK)
5349 { 5349 {
5356 break; 5356 break;
5357 case CHLD_ACT_HoldMpty: 5357 case CHLD_ACT_HoldMpty:
5358 // Put the calls on HOLD 5358 // Put the calls on HOLD
5359 cmd.command = CM_HOLD_MULTIPARTY; 5359 cmd.command = CM_HOLD_MULTIPARTY;
5360 break; 5360 break;
5361 5361
5362 case CHLD_ACT_RetrieveMpty: 5362 case CHLD_ACT_RetrieveMpty:
5363 // Retrieve the held calls to active 5363 // Retrieve the held calls to active
5364 cmd.command = CM_RETRIEVE_MULTIPARTY; 5364 cmd.command = CM_RETRIEVE_MULTIPARTY;
5365 break; 5365 break;
5366 5366
5367 case CHLD_ACT_SwapMpty: 5367 case CHLD_ACT_SwapMpty:
5368 // Swap muliparty calls 5368 // Swap muliparty calls
5369 cmd.command = CM_SWAP_MULTIPARTY; 5369 cmd.command = CM_SWAP_MULTIPARTY;
5370 break; 5370 break;
5371 5371
5372 default: 5372 default:
5373 cmd.command = CM_COMMAND_UNKNOWN; 5373 cmd.command = CM_COMMAND_UNKNOWN;
5374 break; 5374 break;
5375 5375
5376 } 5376 }
5377 break; 5377 break;
5378 case CHLD_MOD_RelActSpec: 5378 case CHLD_MOD_RelActSpec:
5379 dis_connect.call_number = (SHORT)atoi(clog_cmd->cmdPrm.sCHLD.call); 5379 dis_connect.call_number = (SHORT)atoi(clog_cmd->cmdPrm.sCHLD.call);
5380 break; 5380 break;
5381 5381
5382 default: 5382 default:
5383 break; 5383 break;
5384 } 5384 }
5385 } 5385 }
5386 5386
5391 5391
5392 //Nov 02, 2005 DR OMAPS00052132 xdeepadh 5392 //Nov 02, 2005 DR OMAPS00052132 xdeepadh
5393 //The usage of ATI enum is put under the flag FF_ATI 5393 //The usage of ATI enum is put under the flag FF_ATI
5394 5394
5395 //Apr 21, 2006 OMAPS00070774 a0393213 (Prabakar R) 5395 //Apr 21, 2006 OMAPS00070774 a0393213 (Prabakar R)
5396 //Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=2 in ATI. 5396 //Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=2 in ATI.
5397 // expected behaviour : active call should be put to hold and the incoming call should be accepted 5397 // expected behaviour : active call should be put to hold and the incoming call should be accepted
5398 // observed behaviour : happens as expected. but display shows incoming call screen only. 5398 // observed behaviour : happens as expected. but display shows incoming call screen only.
5399 // active screen is not shown eventhough the connection is established between MS1 and MS3 5399 // active screen is not shown eventhough the connection is established between MS1 and MS3
5400 //Fix : AT commands from CMD_SRC_ATI_3 was not processed. As a result, MFW was not informed of the acceptance of the call 5400 //Fix : AT commands from CMD_SRC_ATI_3 was not processed. As a result, MFW was not informed of the acceptance of the call
5401 //through ATI. In precise cmd_hold variable was not set to MFW_CM_MT_ACCEPT, which is necessary for display update 5401 //through ATI. In precise cmd_hold variable was not set to MFW_CM_MT_ACCEPT, which is necessary for display update
5402 5402
5403 #ifdef FF_ATI 5403 #ifdef FF_ATI
5404 if ((clog_cmd->cmdPrm.sCHLD.srcId == CMD_SRC_ATI_1) //NM Berlin UK integration 5404 if ((clog_cmd->cmdPrm.sCHLD.srcId == CMD_SRC_ATI_1) //NM Berlin UK integration
5405 OR (clog_cmd->cmdPrm.sCHLD.srcId == CMD_SRC_ATI_2) // Added for MMI-SPR 22222 FIX 5405 OR (clog_cmd->cmdPrm.sCHLD.srcId == CMD_SRC_ATI_2) // Added for MMI-SPR 22222 FIX
5406 OR (clog_cmd->cmdPrm.sCHLD.srcId == CMD_SRC_ATI_3)) // Added for OMAPS00070774 FIX 5406 OR (clog_cmd->cmdPrm.sCHLD.srcId == CMD_SRC_ATI_3)) // Added for OMAPS00070774 FIX
5407 { 5407 {
5408 switch(clog_cmd->cmdPrm.sCHLD.mode) 5408 switch(clog_cmd->cmdPrm.sCHLD.mode)
5409 { 5409 {
5410 case CHLD_MOD_RelHldOrUdub: 5410 case CHLD_MOD_RelHldOrUdub:
5411 if (clog_cmd->cmdPrm.sCHLD.act == CHLD_ACT_Release) 5411 if (clog_cmd->cmdPrm.sCHLD.act == CHLD_ACT_Release)
5428 OR call_mode EQ CAL_MODE_Fax) 5428 OR call_mode EQ CAL_MODE_Fax)
5429 dis_connect.call_number = id; 5429 dis_connect.call_number = id;
5430 } 5430 }
5431 if (cm_search_callId(CAL_STAT_Wait, &id) == CM_OK) 5431 if (cm_search_callId(CAL_STAT_Wait, &id) == CM_OK)
5432 { 5432 {
5433 #ifdef MMI_LINT_WARNING_REMOVAL /*a0393213 lint warnings removal*/ 5433 #ifdef MMI_LINT_WARNING_REMOVAL /*a0393213 lint warnings removal*/
5434 cc_id = id; 5434 cc_id = id;
5435 #endif 5435 #endif
5436 5436
5437 //Apr 22, 2006 OMAPS00070762 a0393213 (Prabakar R) 5437 //Apr 22, 2006 OMAPS00070762 a0393213 (Prabakar R)
5438 //Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=1 in ATI. 5438 //Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=1 in ATI.
5439 //expected behaviour : active call should be released and the incoming call should be accepted 5439 //expected behaviour : active call should be released and the incoming call should be accepted
5440 //observed behaviour : happens as expected. but display shows incoming call screen only. 5440 //observed behaviour : happens as expected. but display shows incoming call screen only.
5441 // active screen is not shown eventhough the connection is established between MS1 and MS3 5441 // active screen is not shown eventhough the connection is established between MS1 and MS3
5442 //Fix : cmd.call_number was not set to 0, which is required in cm_result_cmd() 5442 //Fix : cmd.call_number was not set to 0, which is required in cm_result_cmd()
5443 // to call cm_ok_connect()which updates the display. It's set. 5443 // to call cm_ok_connect()which updates the display. It's set.
5444 cmd.call_number=0; 5444 cmd.call_number=0;
5445 } 5445 }
5446 5446
5447 break; 5447 break;
5448 case CHLD_ACT_Retrieve: 5448 case CHLD_ACT_Retrieve:
5449 if (cm_search_callId(CAL_STAT_Held, &id) == CM_OK) 5449 if (cm_search_callId(CAL_STAT_Held, &id) == CM_OK)
5450 { 5450 {
5451 cmd.command = CM_RETRIEVE; 5451 cmd.command = CM_RETRIEVE;
5452 cmd.call_number = id; 5452 cmd.call_number = id;
5453 } 5453 }
5454 #ifdef MMI_LINT_WARNING_REMOVAL /*a0393213 lint warnings removal*/ 5454 #ifdef MMI_LINT_WARNING_REMOVAL /*a0393213 lint warnings removal*/
5455 if (cm_search_callId(CAL_STAT_Wait, &id) == CM_OK) 5455 if (cm_search_callId(CAL_STAT_Wait, &id) == CM_OK)
5456 cc_id = id; 5456 cc_id = id;
5457 #else 5457 #else
5458 cm_search_callId(CAL_STAT_Wait, &id); 5458 cm_search_callId(CAL_STAT_Wait, &id);
5459 #endif 5459 #endif
5530 break; 5530 break;
5531 default: 5531 default:
5532 break; 5532 break;
5533 } 5533 }
5534 } 5534 }
5535 #endif //FF_ATI 5535 #endif //FF_ATI
5536 } 5536 }
5537 5537
5538 5538
5539 /* 5539 /*
5540 +--------------------------------------------------------------------+ 5540 +--------------------------------------------------------------------+
5551 { 5551 {
5552 SHORT index; 5552 SHORT index;
5553 T_MFW_CM_CALL_STAT stat; 5553 T_MFW_CM_CALL_STAT stat;
5554 UBYTE ton; 5554 UBYTE ton;
5555 UBYTE mode; 5555 UBYTE mode;
5556 // Sep 01, 2006 REF:OMAPS00090555 x0039928 5556 // Sep 01, 2006 REF:OMAPS00090555 x0039928
5557 // Fix : Allocate the memory for entry and findText from heap instead of stack. 5557 // Fix : Allocate the memory for entry and findText from heap instead of stack.
5558 #ifdef FF_MMI_PB_OPTIM 5558 #ifdef FF_MMI_PB_OPTIM
5559 T_MFW_PHB_ENTRY * entry = (T_MFW_PHB_ENTRY*)mfwAlloc(sizeof(T_MFW_PHB_ENTRY)); 5559 T_MFW_PHB_ENTRY * entry = (T_MFW_PHB_ENTRY*)mfwAlloc(sizeof(T_MFW_PHB_ENTRY));
5560 T_MFW_PHB_TEXT * findText = (T_MFW_PHB_TEXT*)mfwAlloc(sizeof(T_MFW_PHB_TEXT)); 5560 T_MFW_PHB_TEXT * findText = (T_MFW_PHB_TEXT*)mfwAlloc(sizeof(T_MFW_PHB_TEXT));
5561 #else 5561 #else
5562 T_MFW_PHB_ENTRY entry; 5562 T_MFW_PHB_ENTRY entry;
5563 T_MFW_PHB_TEXT findText; 5563 T_MFW_PHB_TEXT findText;
5564 #endif 5564 #endif
5565 5565
5566 TRACE_FUNCTION("cm_at_d()"); 5566 TRACE_FUNCTION("cm_at_d()");
5567 5567
5568 // Sep 01, 2006 REF:OMAPS00090555 x0039928 5568 // Sep 01, 2006 REF:OMAPS00090555 x0039928
5569 #ifdef FF_MMI_PB_OPTIM 5569 #ifdef FF_MMI_PB_OPTIM
5570 #ifdef NO_ASCIIZ 5570 #ifdef NO_ASCIIZ
5571 entry->name.len = 0; 5571 entry->name.len = 0;
5572 #else 5572 #else
5573 memset (entry->name, '\0', MAX_LEN); 5573 memset (entry->name, '\0', MAX_LEN);
5605 out_call.name[0] = '\0'; 5605 out_call.name[0] = '\0';
5606 #endif 5606 #endif
5607 if (cm_search_callStat(cmd->cId, &stat, &ton, &mode) == CM_OK) 5607 if (cm_search_callStat(cmd->cId, &stat, &ton, &mode) == CM_OK)
5608 { 5608 {
5609 out_call.type = mode; 5609 out_call.type = mode;
5610 // Oct 10, 2006 DR: OMAPS00093720 x0039928 5610 // Oct 10, 2006 DR: OMAPS00093720 x0039928
5611 // Fix: Set the cc_stat.ton info from out_call.ton 5611 // Fix: Set the cc_stat.ton info from out_call.ton
5612 cc_stat.ton = out_call.ton; 5612 cc_stat.ton = out_call.ton;
5613 cc_stat.mode = (T_MFW_CM_CALL_TYPE)mode; 5613 cc_stat.mode = (T_MFW_CM_CALL_TYPE)mode;
5614 } 5614 }
5615 5615
5616 // Sep 01, 2006 REF:OMAPS00090555 x0039928 5616 // Sep 01, 2006 REF:OMAPS00090555 x0039928
5617 #ifdef NO_ASCIIZ 5617 #ifdef NO_ASCIIZ
5618 #ifdef FF_MMI_PB_OPTIM 5618 #ifdef FF_MMI_PB_OPTIM
5619 mfwStrncpy((char *)findText->data, cmd->cmdPrm.sD.number, PHB_MAX_LEN); 5619 mfwStrncpy((char *)findText->data, cmd->cmdPrm.sD.number, PHB_MAX_LEN);
5620 findText->len = strlen(cmd->cmdPrm.sD.number); 5620 findText->len = strlen(cmd->cmdPrm.sD.number);
5621 #else 5621 #else
5673 #else 5673 #else
5674 mfwStrncpy((char *)out_call.name, (char *)cc_stat.name, MFW_TAG_LEN); 5674 mfwStrncpy((char *)out_call.name, (char *)cc_stat.name, MFW_TAG_LEN);
5675 #endif 5675 #endif
5676 out_call.type = cc_stat.mode; 5676 out_call.type = cc_stat.mode;
5677 } 5677 }
5678 // Sep 01, 2006 REF:OMAPS00090555 x0039928 5678 // Sep 01, 2006 REF:OMAPS00090555 x0039928
5679 // Fix: Free the dynamic memory allocated if flag FF_MMI_PB_OPTIM is defined 5679 // Fix: Free the dynamic memory allocated if flag FF_MMI_PB_OPTIM is defined
5680 #ifdef FF_MMI_PB_OPTIM 5680 #ifdef FF_MMI_PB_OPTIM
5681 mfwFree((U8*) entry, sizeof(T_MFW_PHB_ENTRY)); 5681 mfwFree((U8*) entry, sizeof(T_MFW_PHB_ENTRY));
5682 mfwFree((U8*) findText, sizeof(T_MFW_PHB_TEXT)); 5682 mfwFree((U8*) findText, sizeof(T_MFW_PHB_TEXT));
5683 #endif 5683 #endif
5702 //x0pleela 03 Nov, 2006 DR: OMAPS00101158 5702 //x0pleela 03 Nov, 2006 DR: OMAPS00101158
5703 //check the value of uOthersrc 5703 //check the value of uOthersrc
5704 //If the value is not set then do the phone book search operation 5704 //If the value is not set then do the phone book search operation
5705 //Else do not perform phone book search operation 5705 //Else do not perform phone book search operation
5706 //this is to avoid stack overflow probelm when the source id is not LOCAL 5706 //this is to avoid stack overflow probelm when the source id is not LOCAL
5707 if(!mfw_get_OtherSrc_Value())//x0pleela 3 nov 2006 5707 if(!mfw_get_OtherSrc_Value())//x0pleela 3 nov 2006
5708 { 5708 {
5709 // Sep 01, 2006 REF:OMAPS00090555 x0039928 5709 // Sep 01, 2006 REF:OMAPS00090555 x0039928
5710 #ifdef NO_ASCIIZ 5710 #ifdef NO_ASCIIZ
5711 #ifdef FF_MMI_PB_OPTIM 5711 #ifdef FF_MMI_PB_OPTIM
5712 mfwStrncpy((char *)findText->data, cmd->cmdPrm.sD.number, PHB_MAX_LEN); 5712 mfwStrncpy((char *)findText->data, cmd->cmdPrm.sD.number, PHB_MAX_LEN);
5713 findText->len = strlen(cmd->cmdPrm.sD.number); 5713 findText->len = strlen(cmd->cmdPrm.sD.number);
5714 #else 5714 #else
5747 mfwStrncpy((char *)out_call.name, (char *)entries.entry[0].name, MFW_TAG_LEN); 5747 mfwStrncpy((char *)out_call.name, (char *)entries.entry[0].name, MFW_TAG_LEN);
5748 } 5748 }
5749 } 5749 }
5750 #endif 5750 #endif
5751 } //3 5751 } //3
5752 // Sep 01, 2006 REF:OMAPS00090555 x0039928 5752 // Sep 01, 2006 REF:OMAPS00090555 x0039928
5753 // Fix: Free the dynamic memory allocated if flag FF_MMI_PB_OPTIM is defined 5753 // Fix: Free the dynamic memory allocated if flag FF_MMI_PB_OPTIM is defined
5754 #ifdef FF_MMI_PB_OPTIM 5754 #ifdef FF_MMI_PB_OPTIM
5755 mfwFree((U8*) entry, sizeof(T_MFW_PHB_ENTRY)); 5755 mfwFree((U8*) entry, sizeof(T_MFW_PHB_ENTRY));
5756 mfwFree((U8*) findText, sizeof(T_MFW_PHB_TEXT)); 5756 mfwFree((U8*) findText, sizeof(T_MFW_PHB_TEXT));
5757 #endif 5757 #endif
5780 case CPI_MSG_Alert: return CPI_TYPE_ALERT; 5780 case CPI_MSG_Alert: return CPI_TYPE_ALERT;
5781 case CPI_MSG_Proc: return CPI_TYPE_PROC; 5781 case CPI_MSG_Proc: return CPI_TYPE_PROC;
5782 case CPI_MSG_Sync: return CPI_TYPE_SYNC; 5782 case CPI_MSG_Sync: return CPI_TYPE_SYNC;
5783 case CPI_MSG_Conn: return CPI_TYPE_CONN; 5783 case CPI_MSG_Conn: return CPI_TYPE_CONN;
5784 /* CQ11676 Added new messages types in CPi indication. 17-02-04 MZ */ 5784 /* CQ11676 Added new messages types in CPi indication. 17-02-04 MZ */
5785 #ifndef FF_2TO1_PS 5785 #ifndef FF_2TO1_PS
5786 case CPI_MSG_Rls: return CPI_TYPE_RELEASE; 5786 case CPI_MSG_Rls: return CPI_TYPE_RELEASE;
5787 case CPI_MSG_Rjct: return CPI_TYPE_REJECT; 5787 case CPI_MSG_Rjct: return CPI_TYPE_REJECT;
5788 #endif 5788 #endif
5789 default: return CPI_TYPE_UNKNOWN; 5789 default: return CPI_TYPE_UNKNOWN;
5790 } 5790 }
5791 } 5791 }
5792 5792
5793 5793
7028 void cm_tty_enable(UBYTE enable) 7028 void cm_tty_enable(UBYTE enable)
7029 { 7029 {
7030 /*a0393213 compiler warnings removal -- removed ret*/ 7030 /*a0393213 compiler warnings removal -- removed ret*/
7031 7031
7032 /* Mar 27, 2006 REF:ER OMAPS00071798 */ 7032 /* Mar 27, 2006 REF:ER OMAPS00071798 */
7033 #ifdef NEPTUNE_BOARD 7033 #ifdef NEPTUNE_BOARD
7034 U8 audioMode = AUDIO_MODE_TEXT; 7034 U8 audioMode = AUDIO_MODE_TEXT;
7035 #endif 7035 #endif
7036 7036
7037 TRACE_FUNCTION("cm_tty_enable()"); 7037 TRACE_FUNCTION("cm_tty_enable()");
7038 7038
7039 /* SPR#1985 - SH - Now use proper ACI functions. */ 7039 /* SPR#1985 - SH - Now use proper ACI functions. */
7040 7040
7041 /* sAT_PercentCTTY() is changed bec the audio mode info is needed in lower layer, 7041 /* sAT_PercentCTTY() is changed bec the audio mode info is needed in lower layer,
7042 for now just use default value when calling the function, if we want to have 7042 for now just use default value when calling the function, if we want to have
7043 the same functionality in BMI/MFW as in ATI, BMI/MFW needs to be updated */ 7043 the same functionality in BMI/MFW as in ATI, BMI/MFW needs to be updated */
7044 #ifdef NEPTUNE_BOARD 7044 #ifdef NEPTUNE_BOARD
7045 if (flash_read() >= EFFS_OK) 7045 if (flash_read() >= EFFS_OK)
7046 { 7046 {
7047 audioMode = FFS_flashData.tty_audio_mode; 7047 audioMode = FFS_flashData.tty_audio_mode;
7048 } 7048 }
7049 7049
7050 #endif 7050 #endif
7051 7051
7052 /* Mar 27, 2006 REF:ER OMAPS00071798 */ 7052 /* Mar 27, 2006 REF:ER OMAPS00071798 */
7053 #ifdef NEPTUNE_BOARD 7053 #ifdef NEPTUNE_BOARD
7054 #ifdef CTTY_AUDIO_MODE 7054 #ifdef CTTY_AUDIO_MODE
7055 if (enable) 7055 if (enable)
7056 sAT_PercentCTTY(CMD_SRC_LCL, CTTY_MOD_Enable, CTTY_REQ_On, audioMode); 7056 sAT_PercentCTTY(CMD_SRC_LCL, CTTY_MOD_Enable, CTTY_REQ_On, audioMode);
7057 else 7057 else
7058 sAT_PercentCTTY(CMD_SRC_LCL, CTTY_MOD_Enable, CTTY_REQ_Off, audioMode); 7058 sAT_PercentCTTY(CMD_SRC_LCL, CTTY_MOD_Enable, CTTY_REQ_Off, audioMode);
7097 T_ACI_CTTY_REQ req; 7097 T_ACI_CTTY_REQ req;
7098 T_ACI_CTTY_STAT stat; 7098 T_ACI_CTTY_STAT stat;
7099 T_ACI_CTTY_TRX trx; 7099 T_ACI_CTTY_TRX trx;
7100 7100
7101 /* Mar 27, 2006 REF:ER OMAPS00071798 */ 7101 /* Mar 27, 2006 REF:ER OMAPS00071798 */
7102 #ifdef NEPTUNE_BOARD 7102 #ifdef NEPTUNE_BOARD
7103 U8 audio_mode; 7103 U8 audio_mode;
7104 #endif 7104 #endif
7105 7105
7106 TRACE_FUNCTION("cm_tty_query()"); 7106 TRACE_FUNCTION("cm_tty_query()");
7107 7107
7108 /* Mar 27, 2006 REF:ER OMAPS00071798 */ 7108 /* Mar 27, 2006 REF:ER OMAPS00071798 */
7109 #ifdef NEPTUNE_BOARD 7109 #ifdef NEPTUNE_BOARD
7110 #ifdef CTTY_AUDIO_MODE 7110 #ifdef CTTY_AUDIO_MODE
7111 qAT_PercentCTTY(CMD_SRC_LCL, &mode, &req, &stat, &trx, &audio_mode); 7111 qAT_PercentCTTY(CMD_SRC_LCL, &mode, &req, &stat, &trx, &audio_mode);
7112 #else 7112 #else
7113 qAT_PercentCTTY(CMD_SRC_LCL, &mode, &req, &stat, &trx); 7113 qAT_PercentCTTY(CMD_SRC_LCL, &mode, &req, &stat, &trx);
7114 #endif 7114 #endif
7177 7177
7178 $Function: set_cmdHold 7178 $Function: set_cmdHold
7179 7179
7180 $Description: Sets the value of the static variable cmd_hold. 7180 $Description: Sets the value of the static variable cmd_hold.
7181 7181
7182 $Returns: void 7182 $Returns: void
7183 7183
7184 $Arguments: command 7184 $Arguments: command
7185 *******************************************************************************/ 7185 *******************************************************************************/
7186 void set_cmdHold(int command) 7186 void set_cmdHold(int command)
7187 { 7187 {