diff 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
line wrap: on
line diff
--- a/src/ui/mfw/mfw_cm.c	Tue Jan 19 05:41:26 2021 +0000
+++ b/src/ui/mfw/mfw_cm.c	Tue Jan 19 06:10:27 2021 +0000
@@ -14,36 +14,36 @@
      Dec 20, 2006 DR:OMAPS00108192 a0393213(R.Prabakar)
      Description : Continous DTMF tones for simultanous keypress
      Solution     : Bug was due to improper nesting of START-STOP sequence. Now they are avoided.
-     
+
      Dec 13, 2006 DR:OMAPS00107103 a0393213(R.Prabakar)
      Description : No DTMF tones for simultanous keypress
      Solution     : Once there was some problem in sending DTMF tones, the problem persisted till the next reset.
-                       This was because the queue was not getting flushed once the call was ended. 
+                       This was because the queue was not getting flushed once the call was ended.
                        Now the queue is flushed once the call is ended.
-   
+
     Nov 30, 2006 DR:OMAPS00105758 a0393213(R.Prabakar)
     Description :No DTMF tones after collision of DTMF tones
-       
-    Nov 03, 2006  DR: OMAPS00101158 x0pleela 
+
+    Nov 03, 2006  DR: OMAPS00101158 x0pleela
     Description : Board crashes after sending atd command through HyperTerminal
     Solution    : Avoid peforming phonebook search operation if the source id is not LOCAL
-    			- Defined new static variable uOthersrc to set the value to TRUE or FALSE 
+    			- Defined new static variable uOthersrc to set the value to TRUE or FALSE
     				based on the source Id
-    			- Defined two new function mfw_set_OtherSrc_Value() to set the value of 
-    				uOtherSrc to either TRUE or FALSE and mfw_get_OtherSrc_Value 
+    			- Defined two new function mfw_set_OtherSrc_Value() to set the value of
+    				uOtherSrc to either TRUE or FALSE and mfw_get_OtherSrc_Value
     				to get the value of uOtherSrc
 
-    Oct 10, 2006  DR: OMAPS00093720   x0039928 
+    Oct 10, 2006  DR: OMAPS00093720   x0039928
     Description : If dial a international number and fail, when auto redail enabled, it will delete '+'.
     Solution    : MFW_TON_INTERNATIONAL is set for out_call.ton if the dialling number contains '+'
-    
+
     Sep 01, 2006 REF:OMAPS00090555  x0039928
     Description : When make a MO call,MFW can not get call number from ACI.
-    Solution     : The called number is extracted from the parameter of callCmEvent() 
-    for event E_CM_MO_RES and is displayed. Also stack memory optimization is done to 
+    Solution     : The called number is extracted from the parameter of callCmEvent()
+    for event E_CM_MO_RES and is displayed. Also stack memory optimization is done to
     resolve MMI stack overflow problem.
 
-    June 15, 2006 OMAPS00079492 x0043642 
+    June 15, 2006 OMAPS00079492 x0043642
     Description : FT TMO (wk20/06) TC 9.1, 9.2 Multi Party, MS fails to return to idle mode
     Solution    : assign MFW_CM_DISCONNECT_ALL to variable cmd_hold, and call cm_signal()
 
@@ -52,32 +52,32 @@
    Description: CPHS feature on Locosto-Lite
    Solution: For ALS feature,
    			a) Added definition for new function "mfw_get_ALS_type"
-   			
+
     Apr 25, 2006 OMAPS00075711 a0393213 (R.Prabakar)
     Description : 'End Conference' option doesn't work
     Solution    : The ACI_CHLD_MOD is changed from CHLD_MOD_RelActSpec to CHLD_MOD_RelActAndAcpt while calling sAT_PlusCHLD()
-                  in cm_disconnect(). This is done since CHLD_MOD_RelActSpec with callId 0 is equivalent to sending 
-                  AT+CHLD=10 which is invalid according to GSM specification 
-    
+                  in cm_disconnect(). This is done since CHLD_MOD_RelActSpec with callId 0 is equivalent to sending
+                  AT+CHLD=10 which is invalid according to GSM specification
+
     Apr 26, 2006 OMAPS00074886 a0393213 (Prabakar R)
-    Description : No option in MMI to release the held call. 
+    Description : No option in MMI to release the held call.
     Solution    : No option was available. Added a menu option.
-    
+
     Mar 28, 2006    REF:DR OMAPS00072407  x0039928
     Description:   Phone hangs when tried to make an outgoing call
     Solution: Reverting back the changes of issue OMAPS00048894 to stop from stack overflow.
 
     Feb 27, 2006    REF:DR OMAPS00067884  x0039928
     Description:   Held call released at locosto phone does not release the call at other end
-    Solution: if the mode is greater than CHLD_MOD_RelDialCall then sAT_PercentCHLD() is called 
+    Solution: if the mode is greater than CHLD_MOD_RelDialCall then sAT_PercentCHLD() is called
     instead of sAT_PlusCHLD()
 
     Jan 27, 2006    REF:DR OMAPS00048894  x0039928
     Description:   Outgoing Call: The called number is not displayed while an outgoing call is made
     Solution: The called number is extracted from the parameter of callCmEvent() for event E_CM_MO_RES and is displayed.
-	
+
    Apr 22, 2006 OMAPS00070762 a0393213 (Prabakar R)
-   Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=1 in ATI. 
+   Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=1 in ATI.
       expected behaviour : active call should be released and the incoming call should be accepted
       observed behaviour : happens as expected. but display shows incoming call screen only.
                            active screen is not shown eventhough the connection is established between MS1 and MS3
@@ -86,11 +86,11 @@
 
 
    Apr 21, 2006 OMAPS00070774 a0393213 (Prabakar R)
-   Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=2 in ATI. 
+   Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=2 in ATI.
       expected behaviour : active call should be put to hold and the incoming call should be accepted
       observed behaviour : happens as expected. but display shows incoming call screen only.
                            active screen is not shown eventhough the connection is established between MS1 and MS3
-   Fix : AT commands from CMD_SRC_ATI_3 was not processed. As a result, MFW was not informed of the acceptance of the call 
+   Fix : AT commands from CMD_SRC_ATI_3 was not processed. As a result, MFW was not informed of the acceptance of the call
          through ATI. In precise cmd_hold variable was not set to MFW_CM_MT_ACCEPT, which is necessary for display update
 
 
@@ -117,7 +117,7 @@
    Solution : The dtmf buffer is reduced to 20 from 50
 
 	Apr 14, 2005	REF: CRR 29991   xpradipg
-	Description:	Optimisation 5: Remove the static allocation and use dynamic 
+	Description:	Optimisation 5: Remove the static allocation and use dynamic
 					allocation/ deallocation for pb_list and black_list
 	Solution:	The static definition is removed and replaced with the dynamic
 					allocation
@@ -125,26 +125,26 @@
    Feb 03, 200   REF: CRR 25960   x0012850
    Description: Call Hold: While one call in Active and other in Held by swapping either of phone is not audible
    Solution: swapping action results in one of the calls getting muted. We attach user connection again.
-	
+
    Aug 23, 2004 REF: CRR 22222  xkundadu
    Bug:  Runaway Call Waiting Tone.
 		 Call Waiting tone doesnot stop after ansering waiting call.
 
-   Fix: Handle the AT-Command source id CMD_SRC_ATI_2 also for call control 
+   Fix: Handle the AT-Command source id CMD_SRC_ATI_2 also for call control
     	callback functions.
 
-   Jun 05, 2004	REF: CRR 18262  NISHIKANT KULKARNI 
+   Jun 05, 2004	REF: CRR 18262  NISHIKANT KULKARNI
    Description: The sample sends a STOP DTMF message without release of the key by the user
    Solution: Instead of sending DTMF commands in "VTS_MOD_Auto" mode, on key press DTMF tone is started
   		   using VTS_MOD_ManStart and on key release DTMF tone is stopped using VTS_MOD_ManStop mode.
 
 	//  Apr 26, 2004 REF: CRR 16545 Ajith K P and Side effect of CRR 16545.
-	//  Issue description: When the user enters 11SEND and if the first call is 
+	//  Issue description: When the user enters 11SEND and if the first call is
 	//  HELD call,the held call disconnects. This should not happen.
 	//  Problem was, though sAT_PlusCHLD(..) is expected to disconnect an ACTIVE
 	//  call only, it was disconnecting HELD call rather than returning AT_FAIL.
 	//  If sAT_PlusCHLD() Fails, Send the user entered string as USSD to network using sAT-Dn().
-	//  So now if the user wants to release a HELD call, in cm_disconect() we are calling the 
+	//  So now if the user wants to release a HELD call, in cm_disconect() we are calling the
 	//  sAT_PlusCHLD(..) function with C
 
 
@@ -155,7 +155,7 @@
 */
 
 #define ENTITY_MFW
- 
+
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -246,7 +246,7 @@
 static	 UBYTE			    call_stat;	   /* indicate an MO call or MT call	    */
 /*a0393213 lint WR:symbol not referenced soln:the variable is put under the flag (which won't be defined) so that the flag
    can be removed if the variable is necessary*/
-#ifdef MMI_LINT_WARNING_REMOVAL 
+#ifdef MMI_LINT_WARNING_REMOVAL
 static	 SHORT			    cc_id;	   /* current call index		    */
 #endif
 static	 UBYTE			    redial_stat;
@@ -275,7 +275,7 @@
 static char currConnecting = 0; /* ES!! 290999 */
 /*a0393213 lint WR:symbol not referenced soln:the variable is put under the flag (which won't be defined) so that the flag
    can be removed if the variable is necessary*/
-#ifdef MMI_LINT_WARNING_REMOVAL 
+#ifdef MMI_LINT_WARNING_REMOVAL
 static T_ACI_AT_CMD currCmd;
 #endif
 static T_MFW_CM_DTMF dtmf_sent={FALSE};/*OMAPS00108192 a0393213 - variable which keeps track of the dtmf sent to ACI (via sAT_PlusVTS)*/
@@ -297,7 +297,7 @@
 static SHORT mfw_cm_dtmf_q_id;
 
 // MMI-SPR 13873 xkundadu.
-// Added this boolean variable to check whether a particular call is in 
+// Added this boolean variable to check whether a particular call is in
 // multiparty or not
 BOOL bIsMultpty = FALSE;
 
@@ -331,16 +331,16 @@
 #ifdef FF_MMI_OPTIM
 	T_MFW_CM_BLACKLIST_LIST black_list;
 	/*a0393213 compiler warnings removal- removed variable 'file'*/
-#endif	
+#endif
   TRACE_FUNCTION ("cm_init()");
   memset(&black_list, 0, sizeof(T_MFW_CM_BLACKLIST_LIST));
-//	Apr 14, 2005	REF: CRR 29991   xpradipg  
+//	Apr 14, 2005	REF: CRR 29991   xpradipg
 //	Since the blacklist is not persistent across powercycles we reset the file
 //	contents
 #ifdef FF_MMI_OPTIM
 	if(	flash_MMI_blackList_write((U8 *)&black_list, sizeof(T_MFW_CM_BLACKLIST_LIST),0) < 0)
 		TRACE_EVENT("Error opening the black list file");
-#endif  
+#endif
 
     currAccepting = 0; /* ES!! 210999 */
     currConnecting = 0; /* ES!! 290999 */
@@ -743,7 +743,7 @@
 int cm_search_callId(T_ACI_CAL_STAT type, SHORT *id)
 {
     int i;
-//  Apr 06 2005		REF: CRR 29989	xpradipg    
+//  Apr 06 2005		REF: CRR 29989	xpradipg
 //	Local definition and allocation
 #ifdef FF_MMI_OPTIM
 	T_ACI_CAL_ENTR 	    *call_tab;
@@ -753,9 +753,9 @@
 		return CM_ERROR;
 #else
 	*id = 0;
-#endif	
+#endif
     TRACE_FUNCTION("cm_search_callId()");
-    
+
 
     if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL)
 	{
@@ -766,7 +766,7 @@
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
 #endif
 		return CM_ERROR;
-	}		
+	}
 
     for (i=0; i<MAX_CALL_NR; i++)
     {
@@ -781,7 +781,7 @@
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif	    
+#endif
 	     return CM_OK;
 	}
 
@@ -791,7 +791,7 @@
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif    
+#endif
     return CM_ERROR;
 }
 
@@ -810,7 +810,7 @@
 {
     int i;
 //  Apr 06 2005		REF: CRR 29989	xpradipg
-//	allocation of memory, if the memory allocation fails then we return the 
+//	allocation of memory, if the memory allocation fails then we return the
 //	error value same as when the qAT_PercentCAL() fails
 #ifdef FF_MMI_OPTIM
 	T_ACI_CAL_ENTR 	    *call_tab;//[MAX_CALL_NR];
@@ -818,18 +818,18 @@
 	call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
 	if(NULL == call_tab)
 		return CAL_MODE_Unknown;
-#endif	
+#endif
 
     TRACE_FUNCTION("cm_search_callMode()");
 
     if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL)
 	{
-//   	Apr 06 2005		REF: CRR 29989	xpradipg	
+//   	Apr 06 2005		REF: CRR 29989	xpradipg
 //		deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif	
+#endif
 		return CAL_MODE_Unknown;
 	}
     for (i=0; i<MAX_CALL_NR; i++)
@@ -838,7 +838,7 @@
 	    break;
 
 		if (call_tab[i].index == id)
-		{	
+		{
 //   	Apr 06 2005		REF: CRR 29989	xpradipg
 //		deallocate memory
 #ifdef FF_MMI_OPTIM
@@ -846,12 +846,12 @@
 		    if(call_tab)
 		        mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
 		    return calMode;
-#else		
+#else
 		    return call_tab[i].calMode;
-#endif		    
-		}	    
+#endif
+		}
     }
-// 	Apr 06 2005		REF: CRR 29989	xpradipg    
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
@@ -873,21 +873,21 @@
 int cm_search_mptyId(T_ACI_CAL_MPTY type, SHORT *id)
 {
     int i;
-// 	Apr 06 2005		REF: CRR 29989	xpradipg    
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	allocate memory
 #ifdef FF_MMI_OPTIM
 	T_ACI_CAL_ENTR 	    *call_tab;//[MAX_CALL_NR];
 	call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
 	if( NULL == call_tab)
 		return CM_ERROR;
-#endif	
+#endif
 
     TRACE_FUNCTION("cm_search_mptyId()");
     *id = 0;
 
     if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL)
 	{
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
@@ -903,21 +903,21 @@
 	if (call_tab[i].mpty == type)
 	{
 	    *id = call_tab[i].index;
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif	    
+#endif
 	    return CM_OK;
 	}
     }
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif    
+#endif
     return CM_ERROR;
 }
 
@@ -938,7 +938,7 @@
 LOCAL SHORT cm_search_numId(UBYTE *number)
 {
 	int i;
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	allocate memory
 #ifdef FF_MMI_OPTIM
 	SHORT	index;
@@ -946,20 +946,20 @@
 	call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
 	if(NULL == call_tab)
 		return 0;
-#endif	
+#endif
 
     TRACE_FUNCTION("cm_search_numId()");
 
     if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) != AT_CMPL)
 	{
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif	
+#endif
 		return 0;
-	}		
+	}
 
     for (i=0; i<MAX_CALL_NR; i++)
     {
@@ -968,24 +968,24 @@
 
 		if (!strcmp(call_tab[i].number, (char *)number))
 		{
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 			index = call_tab[i].index;
 		    if(call_tab)
 		    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
 		    return index;
-#else	
+#else
 		    return call_tab[i].index;
-#endif		    
-		}	    
+#endif
+		}
     }
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif    
+#endif
     return 0;
 }
 
@@ -1007,14 +1007,14 @@
 			 UBYTE *mode)
 {
     int i;
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	allocat memory
 #ifdef FF_MMI_OPTIM
 	T_ACI_CAL_ENTR 	    *call_tab;//[MAX_CALL_NR];
 	call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
 	if( NULL == call_tab)
 		return CM_ERROR;
-#endif	
+#endif
 
     if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) EQ AT_CMPL)
     {
@@ -1028,7 +1028,7 @@
 		*stat = cm_cvt_call_status(call_tab[i].status);
 		*ton = phb_cvtTon(call_tab[i].type.ton);
 		*mode = cm_cvt_call_mode(call_tab[i].calMode);
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 			    if(call_tab)
@@ -1038,18 +1038,18 @@
 		return CM_OK;
 	    }
 	}
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	this will be returned once we get out of the if statement
 #ifndef FF_MMI_OPTIM
 	return CM_ERROR;
-#endif		
+#endif
     }
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	    
-//  deallocate memory  
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
+//  deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif    
+#endif
     return CM_ERROR;
 }
 
@@ -1157,15 +1157,15 @@
             	   TRACE_EVENT("cm_search_callId(CAL_STAT_Wait, &id) != CM_OK");       // Marcus: CCBS: 14/11/2002
 		    dis_connect.call_number = -1;	// call id?
 	    }
-				
+
 	    break;
 	case CHLD_MOD_RelActAndAcpt:
 
 		TRACE_EVENT("CHLD_MOD_RelActAndAcpt");       // Marcus: CCBS: 14/11/2002
 	        cmd_hold = MFW_CM_1_SEND;
-	
+
 		// Added xkundadu MMI-SPR 13873
-		// Querying if there are any active calls, storing the index of the 
+		// Querying if there are any active calls, storing the index of the
 		// call and setting a flag if found to be multiparty.
 		if (cm_search_callId(CAL_STAT_Active, &id) == CM_OK)
 		{
@@ -1180,15 +1180,15 @@
 			{
 				bIsMultpty = FALSE;
 			}
-		
+
 		}
 		else
 		{
-			dis_connect.call_number = -1;	
+			dis_connect.call_number = -1;
 		}
 		// Added xkundadu MMI-SPR 13873
 		// Querying if there are any held calls, storing the index of the call
-		// to change the status to active call. 
+		// to change the status to active call.
 		if (cm_search_callId(CAL_STAT_Held, &id) == CM_OK)
 		{
 			cmd.command     = CM_RETRIEVE;
@@ -1206,9 +1206,9 @@
 		{
 			cmd.call_number=-1;
 		}
-		
+
 	    break;
-		
+
 	case CHLD_MOD_RelActSpec:
         TRACE_EVENT("CHLD_MOD_RelActSpec");       // Marcus: CCBS: 14/11/2002
 	    dis_connect.call_number = (SHORT)atoi(call);
@@ -1348,14 +1348,14 @@
 		}
 		flash_MMI_blackList_close(file);
 	}
-#else	
+#else
 	  /* check whether this number is in blacklist */
 	  for (i=0; i<black_list.count; i++)
 	  {
 	    if (!strcmp((char *)black_list.number[i], (char *)number))
 	      return CM_BLACKLIST;
 	  }
-#endif	
+#endif
 
   /* check the type of this number */
   if (cm_check_emergency(number) EQ TRUE)
@@ -1510,10 +1510,10 @@
   UBYTE 		     prefix;
   SHORT 		     id;
   T_ACI_RETURN		     res,aci_result;//aci_result was added to fix the bug MMI-SPR 16545
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
-// Fix: If flag FF_MMI_PB_OPTIM is defined then allocate memory for buf, phone and num_save variables 
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
+// Fix: If flag FF_MMI_PB_OPTIM is defined then allocate memory for buf, phone and num_save variables
 // through heap instead of stack.
-#ifdef FF_MMI_PB_OPTIM  
+#ifdef FF_MMI_PB_OPTIM
   char		     * buf = (char*)mfwAlloc(80);
   char 		     * phone = (char*)mfwAlloc(MFW_NUM_LEN);
   char 		     * num_save = (char*)mfwAlloc(MFW_STRING_LEN);
@@ -1525,8 +1525,8 @@
 
   TRACE_FUNCTION ("cm_mo_call()");
 
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
-#ifdef FF_MMI_PB_OPTIM  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
+#ifdef FF_MMI_PB_OPTIM
   memset(buf,0,80);
   memset(phone,0,MFW_NUM_LEN);
   memset(num_save,0,MFW_STRING_LEN);
@@ -1535,7 +1535,7 @@
   strncpy((char *)num_save, (char *)number, MFW_STRING_LEN-1);
   num_save[MFW_STRING_LEN-1] = 0;
 #endif
-// Oct 10, 2006  DR: OMAPS00093720   x0039928 
+// Oct 10, 2006  DR: OMAPS00093720   x0039928
 // Fix: Set ton to MFW_TON_INTERNATIONAL
   if(number[0] EQ '+')
   {
@@ -1558,28 +1558,28 @@
   {
     cm_set_cmd_status(para.chld.mode, para.chld.call);
 
-    // Feb 27, 2006    REF:DR OMAPS00067884  x0039928	
+    // Feb 27, 2006    REF:DR OMAPS00067884  x0039928
     // Fix :  sAT_PercentCHLD() is called if the mode > CHLD_MOD_RelDialCall
     if(para.chld.mode > CHLD_MOD_RelDialCall)
 	aci_result = sAT_PercentCHLD(CMD_SRC_LCL, para.chld.mode, para.chld.call);
     else
 	aci_result = sAT_PlusCHLD(CMD_SRC_LCL, para.chld.mode, para.chld.call);
-	
+
 	//  Apr 26, 2004 REF: CRR 16545 Ajith K P
 	//  If sAT_PlusCHLD() Fails, Send the user entered string as USSD to network using sAT-Dn().
-	//  So if its not failed just return CM_CTRL_STR, otherwise call sAT_Dn().	
+	//  So if its not failed just return CM_CTRL_STR, otherwise call sAT_Dn().
     if ( (aci_result  EQ AT_CMPL ) OR (aci_result  EQ AT_EXCT ) OR (aci_result  EQ AT_BUSY ))
     {
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
 // Fix: Free the memory allocated for buf, phone and num_save variables
-#ifdef FF_MMI_PB_OPTIM  
+#ifdef FF_MMI_PB_OPTIM
     if(buf)
 	mfwFree((U8*) buf,80);
     if(phone)
-	mfwFree((U8*) phone,MFW_NUM_LEN);	
+	mfwFree((U8*) phone,MFW_NUM_LEN);
     if(num_save)
       	mfwFree((U8*) num_save,MFW_STRING_LEN);
-#endif	
+#endif
 		return CM_CTRL_STR;
 	}
   }
@@ -1595,33 +1595,33 @@
 	}
 	else
 	{
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
-// Fix: Free the memory allocated for buf,phone and num_save variables	
-	#ifdef FF_MMI_PB_OPTIM  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
+// Fix: Free the memory allocated for buf,phone and num_save variables
+	#ifdef FF_MMI_PB_OPTIM
  	 	if(buf)
 		    mfwFree((U8*) buf,80);
   		if(phone)
-		    mfwFree((U8*) phone,MFW_NUM_LEN);	
+		    mfwFree((U8*) phone,MFW_NUM_LEN);
  		if(num_save)
   		   mfwFree((U8*) num_save,MFW_STRING_LEN);
-	#endif	
+	#endif
 		return CM_CTRL_STR;
-	}	
+	}
   }
   //MC
 
   if (typ == MFW_SS_DIAL_IDX)
   {
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
-// Fix: Free the memory allocated for buf,phone and num_save variables  
-  	#ifdef FF_MMI_PB_OPTIM  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
+// Fix: Free the memory allocated for buf,phone and num_save variables
+  	#ifdef FF_MMI_PB_OPTIM
  	 	if(buf)
 		    mfwFree((U8*) buf,80);
   		if(phone)
-		    mfwFree((U8*) phone,MFW_NUM_LEN);	
+		    mfwFree((U8*) phone,MFW_NUM_LEN);
  		if(num_save)
   		   mfwFree((U8*) num_save,MFW_STRING_LEN);
-	#endif	
+	#endif
       return cm_mo_idx(&para, type);
   }
 
@@ -1680,8 +1680,8 @@
 			{
 				cm_tty_enable(FALSE);
 			}
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  			
-	#ifdef FF_MMI_PB_OPTIM  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
+	#ifdef FF_MMI_PB_OPTIM
 		strcpy(num_save, (num_save + 4)); /* Ignore SS string when dialling */
 	#else
 	      	strcpy((char *)num_save, (char *)&num_save[4]); /* Ignore SS string when dialling */
@@ -1692,24 +1692,24 @@
 /* SH end */
 
     default:
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
-// Fix: Free the memory allocated for buf,phone and num_save variables    
-      	#ifdef FF_MMI_PB_OPTIM  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
+// Fix: Free the memory allocated for buf,phone and num_save variables
+      	#ifdef FF_MMI_PB_OPTIM
  	 	if(buf)
 		    mfwFree((U8*) buf,80);
   		if(phone)
-		    mfwFree((U8*) phone,MFW_NUM_LEN);	
+		    mfwFree((U8*) phone,MFW_NUM_LEN);
  		if(num_save)
   		   mfwFree((U8*) num_save,MFW_STRING_LEN);
-	#endif	
+	#endif
       return CM_ERROR;
   }
 
   string = rest;
-  
+
   colr_status = 0;
-// Sep 01, 2006 REF:OMAPS00090555  x0039928    
-#ifndef FF_MMI_PB_OPTIM    
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
+#ifndef FF_MMI_PB_OPTIM
   buf[0] = '\0';
 #endif
   cc_stat.prefix[0] = '\0';
@@ -1720,7 +1720,7 @@
 // /*
     if (new_typ == MFW_SS_CLIR)
     {
-      
+
       if (para.Clir.mode == CLIR_MOD_Supp)
 	  {
 	    strcat((char *)cc_stat.prefix, "*31#");
@@ -1773,16 +1773,16 @@
     res = (T_ACI_RETURN)cm_check_mo_number((UBYTE*)phone); /*a0393213 lint warnings removal - typecast done*/
     if ( res != CM_OK)
     {
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
-// Fix: Free the memory allocated for buf,phone and num_save variables    
-	#ifdef FF_MMI_PB_OPTIM  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
+// Fix: Free the memory allocated for buf,phone and num_save variables
+	#ifdef FF_MMI_PB_OPTIM
  	 	if(buf)
 		    mfwFree((U8*) buf,80);
   		if(phone)
-		    mfwFree((U8*) phone,MFW_NUM_LEN);	
+		    mfwFree((U8*) phone,MFW_NUM_LEN);
  		if(num_save)
   		   mfwFree((U8*) num_save,MFW_STRING_LEN);
-	#endif	
+	#endif
 	return res;
     }
 
@@ -1810,29 +1810,29 @@
   if (type == DATA_CALL)
 	para.dial.callType = D_TOC_Data;
 
-//  Apr 22, 2004        REF: CRR MMI-SPR-16873  Rashmi C N(Sasken) 
+//  Apr 22, 2004        REF: CRR MMI-SPR-16873  Rashmi C N(Sasken)
 //		Using the CLIR status maintained in the flash, while making a call
 	if (!FFS_flashData.CLIR)
 	{
 		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*/
 	}
-	else 
+	else
 	{
 		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*/
 	}
-	
+
   if ((res == AT_FAIL) OR (res == AT_BUSY))
   {
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
-// Fix: Free the memory allocated for buf,phone and num_save variables  
-  	#ifdef FF_MMI_PB_OPTIM  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
+// Fix: Free the memory allocated for buf,phone and num_save variables
+  	#ifdef FF_MMI_PB_OPTIM
  	 	if(buf)
 		    mfwFree((U8*) buf,80);
   		if(phone)
-		    mfwFree((U8*) phone,MFW_NUM_LEN);	
+		    mfwFree((U8*) phone,MFW_NUM_LEN);
  		if(num_save)
   		   mfwFree((U8*) num_save,MFW_STRING_LEN);
-	#endif	
+	#endif
     if (typ == MFW_SS_CLIP)
       return CM_CLI;
 
@@ -1847,31 +1847,31 @@
       case MFW_SS_CLIP:
       case MFW_SS_COLR:
       case MFW_SS_COLP:
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
-// Fix: Free the memory allocated for buf,phone and num_save variables	  	
-	  #ifdef FF_MMI_PB_OPTIM  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
+// Fix: Free the memory allocated for buf,phone and num_save variables
+	  #ifdef FF_MMI_PB_OPTIM
  	 	if(buf)
 		    mfwFree((U8*) buf,80);
   		if(phone)
-		    mfwFree((U8*) phone,MFW_NUM_LEN);	
+		    mfwFree((U8*) phone,MFW_NUM_LEN);
  		if(num_save)
   		   mfwFree((U8*) num_save,MFW_STRING_LEN);
-	#endif	
+	#endif
 	return CM_CLI;
       default:
 	break;
     }
   }
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
-// Fix: Free the memory allocated for buf,phone and num_save variables  
-  #ifdef FF_MMI_PB_OPTIM  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
+// Fix: Free the memory allocated for buf,phone and num_save variables
+  #ifdef FF_MMI_PB_OPTIM
   	if(buf)
 	    mfwFree((U8*) buf,80);
   	if(phone)
-	    mfwFree((U8*) phone,MFW_NUM_LEN);	
+	    mfwFree((U8*) phone,MFW_NUM_LEN);
  	if(num_save)
   	   mfwFree((U8*) num_save,MFW_STRING_LEN);
-  #endif	
+  #endif
   return cm_grp;
 }
 
@@ -2580,9 +2580,9 @@
 
 
 
-// Apr 26 2006, a0393213 (Prabakar R), OMAPS00074886 : No option in MMI to release the held call. 
+// Apr 26 2006, a0393213 (Prabakar R), OMAPS00074886 : No option in MMI to release the held call.
 // This function is added to release all held calls
-    
+
 /*******************************************************************************
 
  $Function:     cm_end_held
@@ -2607,7 +2607,7 @@
         {
             TRACE_EVENT("sAT_PlusCHLD returned AT_FAIL");
         }
-        
+
 	return;
 }
 
@@ -2964,18 +2964,18 @@
     int i;
     USHORT report;  /* Marcus: Extended error reporting: 12/11/2002 */
     USHORT extend_report; /* API - 1564 - 16-01-03 - add this variable to store the new error code */
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	local definition
 #ifdef FF_MMI_OPTIM
 	T_ACI_CAL_ENTR 	    *call_tab;//[MAX_CALL_NR];
-#endif	
+#endif
 //	Apr 14, 2005	REF: CRR 29991   xpradipg
 //	local definition
 #ifdef FF_MMI_OPTIM
 	UBYTE count=0;
 	UBYTE blackListNum[MFW_NUM_LEN];
 	int32 file = 0;
-#endif	
+#endif
     TRACE_FUNCTION ("cm_error_connect()");
 
     currAccepting = 0; /* ES!! 210999 */
@@ -3010,13 +3010,13 @@
 	AND (call_type NEQ MFW_ECC_CALL)
 	AND ((redial_stat EQ CM_REDIAL_AUTO) OR (redial_stat EQ CM_REDIAL_MANU)))
     {
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	allocate memory
 #ifdef FF_MMI_OPTIM
 		call_tab = (T_ACI_CAL_ENTR*)mfwAlloc(sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
 		if( NULL == call_tab)
-			return; 
-#endif		
+			return;
+#endif
 	/* If this call is 2nd outgoing call, redial is not started */
 	if (qAT_PercentCAL(CMD_SRC_LCL, call_tab) EQ AT_CMPL)
 	{
@@ -3034,17 +3034,17 @@
 		    call_stat = MFW_CALL_FREE;
 		    call_type = MFW_CALL_FREE;
 		    cmd_hold = MFW_CM_NO_FLAG;
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 			    if(call_tab)
 			    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif			    
+#endif
 			    return;
 		}
 	    }
 	}
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
@@ -3054,14 +3054,14 @@
 //	read the list into the variable
 #ifdef FF_MMI_OPTIM
 	if((file = flash_MMI_blackList_open()) >= 0 )
-	{	
+	{
 		if(flash_MMI_blackList_read(file,(U8*)&count, 1,0) > 0)
 		{
-			if(count == MAX_BLACKLIST_NUM)		
+			if(count == MAX_BLACKLIST_NUM)
 #else
 	/* check blacklist whether it is full */
 	if (black_list.count == MAX_BLACKLIST_NUM)
-#endif	
+#endif
 	{
 			TRACE_EVENT ("blacklist is now full");
 
@@ -3087,7 +3087,7 @@
 		}
 		flash_MMI_blackList_close(file);
 	}
-#endif	
+#endif
 
 	/* check the registration staus */
 	if (nm_reg_status() == MFW_NO_SERVICE)
@@ -3397,12 +3397,12 @@
       Solution    : The ACI_CHLD_MOD is changed from CHLD_MOD_RelActSpec to CHLD_MOD_RelActAndAcpt while calling sAT_PlusCHLD().
                     This is done since CHLD_MOD_RelActSpec with callId 0 is equivalent to sending AT+CHLD=10 which is invalid
                     according to GSM specification. Before calling sAT_PlusCHLD command status is also set*/
-    
+
     if (!call_number)
     {
     sprintf(callId, "%d", 0);
 	cm_set_cmd_status(CHLD_MOD_RelActAndAcpt, callId);
-	if (sAT_PlusCHLD(CMD_SRC_LCL, CHLD_MOD_RelActAndAcpt, callId) != AT_EXCT)  
+	if (sAT_PlusCHLD(CMD_SRC_LCL, CHLD_MOD_RelActAndAcpt, callId) != AT_EXCT)
 	    return CM_ERROR;
 	return CM_OK;
     }
@@ -3468,20 +3468,20 @@
 			return CM_ERROR;
 		return CM_OK;
     }
-    else if (stat == CALL_HELD) 
+    else if (stat == CALL_HELD)
    {
-   
+
 
                 //  Apr 26, 2004 REF: CRR 16545 Ajith K P Side effect of CRR 16545.
                 //  CHLD_MOD_RelActSpec no longer releases held calls.
-                //  So now if the user wants to release a HELD call, now we are calling the 
+                //  So now if the user wants to release a HELD call, now we are calling the
                 //  sAT_PlusCHLD(..) function with CHLD_MOD_RelAnySpec as the parameter.
 
 
 
 		cmd_hold = MFW_CM_TERMINATED;
 		sprintf(callId, "%d", call_number);
-               // Feb 27, 2006    REF:DR OMAPS00067884  x0039928	 
+               // Feb 27, 2006    REF:DR OMAPS00067884  x0039928
                // Fix :  sAT_PercentCHLD() is called if the mode > CHLD_MOD_RelDialCall
 		if (sAT_PercentCHLD(CMD_SRC_LCL, CHLD_MOD_RelAnySpec, callId) != AT_EXCT)
 		    return CM_ERROR;
@@ -3555,15 +3555,15 @@
 
     if (cmd_hold == MFW_CM_MPTY_TERMINATED)
 	       dis_connect.call_number = 0;
-	//Nov 02, 2005    DR OMAPS00052132   xdeepadh	
+	//Nov 02, 2005    DR OMAPS00052132   xdeepadh
 	//The usage of ATI enum is put under the flag FF_ATI
 #if  defined (FF_ATI) || defined (NEPTUNE_BOARD)
         else if (src EQ CMD_SRC_ATI_1) /* NM Berlin/UK integration 21.09.01 */
         {
                dis_connect.call_number = call_id;
         }
-#endif 
-       
+#endif
+
 
     /* send event */
     qAT_PlusCEER( CMD_SRC_LCL, &cause);
@@ -3636,14 +3636,14 @@
 
     if (cmd_hold == MFW_CM_MPTY_TERMINATED)
 	       dis_connect.call_number = 0;
-	//Nov 02, 2005    DR OMAPS00052132   xdeepadh	
+	//Nov 02, 2005    DR OMAPS00052132   xdeepadh
 	//The usage of ATI enum is put under the flag FF_ATI
-#ifdef FF_ATI	
+#ifdef FF_ATI
 	else if (src EQ CMD_SRC_ATI_1) //NM Berlin/UK integration 21.09.01
 	{
 		dis_connect.call_number = call_id;
 	}
-#endif	//FF_ATI  
+#endif	//FF_ATI
 
     /* send event */
     qAT_PlusCEER( CMD_SRC_LCL, &cause);
@@ -3791,7 +3791,7 @@
     case CM_DTMF_ACTIVE:
 	// xnkulkar SPR-18262
 	// If there is a DTMF tone command already in the queue, add the current tone also
-	// in the queue (with start mode). Also, start adding to the queue if we are expecting an acknowledgement 
+	// in the queue (with start mode). Also, start adding to the queue if we are expecting an acknowledgement
 	// (rAT_OK) for the previous DTMF tone request sent.
 	/*OMAPS00108192 a0393213 DTMF START-DTMF STOP properly nested*/
 	if (mfw_cbuf_num_elements(mfw_cm_dtmf_q_id) != 0)
@@ -3799,7 +3799,7 @@
 		/*dtmf queue not empty*/
 		if(dtmf_queued.mode==VTS_MOD_ManStop)
 		{
-			/*most recent element in the queue corresponds to 'stop'*/	
+			/*most recent element in the queue corresponds to 'stop'*/
 			/*queue up*/
 			modeRetVal = mfw_cbuf_put_mode(mfw_cm_dtmf_q_id, VTS_MOD_ManStart);
 	    		retVal = mfw_cbuf_put(mfw_cm_dtmf_q_id, &crss_string);
@@ -3816,7 +3816,7 @@
 			/*successfully queued update the internal variable*/
 			dtmf_queued.mode=VTS_MOD_ManStart;
 			dtmf_queued.digit=crss_string;
-			return (TRUE);			
+			return (TRUE);
 		}
 		else
 		{
@@ -3870,10 +3870,10 @@
 			{
 				TRACE_EVENT("sAT_PlusVTS() busy or failed");
 				return (FALSE);
-			}				
+			}
 		}
 
-	}			
+	}
 	#ifdef MMI_LINT_WARNING_REMOVAL 	/*a0393213 lint warnings removal*/
       currCmd = AT_CMD_VTS;
 	#endif
@@ -3882,15 +3882,15 @@
     case CM_DTMF_INACTIVE:
 	// xnkulkar SPR-18262
 	// If there is a DTMF tone command already in the queue, add the current tone also
-	// in the queue (with stop mode). Also, start adding to the queue if we are expecting an acknowledgement 
-	// (rAT_OK) for the previous DTMF tone request sent. 
+	// in the queue (with stop mode). Also, start adding to the queue if we are expecting an acknowledgement
+	// (rAT_OK) for the previous DTMF tone request sent.
 	/*OMAPS00108192 a0393213 DTMF START-DTMF STOP properly nested*/
     	if (mfw_cbuf_num_elements(mfw_cm_dtmf_q_id) != 0)
     	{
 		/*dtmf queue not empty*/
 		if(dtmf_queued.mode==VTS_MOD_ManStart && dtmf_queued.digit==crss_string)
 		{
-			/*most recent element in the queue corresponds to START and are of same digit so queue up*/	
+			/*most recent element in the queue corresponds to START and are of same digit so queue up*/
 			modeRetVal = mfw_cbuf_put_mode(mfw_cm_dtmf_q_id, VTS_MOD_ManStop);
 	    		retVal = mfw_cbuf_put(mfw_cm_dtmf_q_id, &crss_string);
 			// If the return values are negative, attempt to Queue the DTMF request failed
@@ -3906,7 +3906,7 @@
 			/*successfully queued update the internal variable*/
 			dtmf_queued.mode=VTS_MOD_ManStop;
 			dtmf_queued.digit=crss_string;
-			return (TRUE);			
+			return (TRUE);
 		}
 		else
 		{
@@ -3960,9 +3960,9 @@
 			{
 				TRACE_EVENT("sAT_PlusVTS() busy or failed");
 				return (FALSE);
-			}				
+			}
 		}
-	
+
       }
       res = TRUE;
       cm_signal(E_CM_DTMF, &res);
@@ -4034,7 +4034,7 @@
 	SHORT retVal;
     UBYTE qdtmf;
 	//xnkulkar SPR-18262: Added these variables to store the Mode
-	T_ACI_VTS_MOD  vts_mode = VTS_MOD_NotPresent; 
+	T_ACI_VTS_MOD  vts_mode = VTS_MOD_NotPresent;
 
     	TRACE_EVENT("send_queued_dtmf_tone()");
 	/*OMAPS00108192 a0393213*/
@@ -4053,14 +4053,14 @@
 				dtmf_sent.mode=vts_mode;
 				dtmf_sent.digit=qdtmf;
 		      	}
-			
+
 		}
     		else
 		{
 			TRACE_EVENT_P1("ERROR : mfw_cbuf_get failed with error value %d", retVal);
 			dtmf_sent.valid=FALSE;
-		}    	
-    		
+		}
+
     	}
 	else
 	{
@@ -4081,7 +4081,7 @@
 	TRACE_EVENT("resetDTMFQueue");
 	mfw_cbuf_reset(mfw_cm_dtmf_q_id);
 	//expectRatOk=FALSE;
-	dtmf_sent.valid=FALSE;	
+	dtmf_sent.valid=FALSE;
 }
 
 
@@ -4185,7 +4185,7 @@
 	if (cm_search_callId(CAL_STAT_Active, &call_number) != CM_OK)
 	  return;
 	cmd.call_number = call_number;
-#ifdef MMI_LINT_WARNING_REMOVAL 	/*a0393213 lint warnings removal*/	
+#ifdef MMI_LINT_WARNING_REMOVAL 	/*a0393213 lint warnings removal*/
 	cc_id = 0; // ???
 #endif
       }
@@ -4210,29 +4210,29 @@
 	if (cm_search_callId(CAL_STAT_Active, &call_number) != CM_OK)
 	  return;
 	cmd.call_number = call_number;
-#ifdef MMI_LINT_WARNING_REMOVAL 	/*a0393213 lint warnings removal*/	
+#ifdef MMI_LINT_WARNING_REMOVAL 	/*a0393213 lint warnings removal*/
 	cc_id = 0; // ???
-#endif	
+#endif
       }
     }
 	break;
 
 	case MFW_CM_1_SEND:
 	{
-			
+
 		cmd_hold = 0;
 		if (result == Present)
 		{
 			// MMI-SPR 13873 xkundadu
-			// Handling of 1SEND 
-			// If the user presses 1SEND, release active calls and accept 
+			// Handling of 1SEND
+			// If the user presses 1SEND, release active calls and accept
 			// the WAITING call
 		       if (dis_connect.call_number NEQ -1)
 		    	{
 		    		// If there is an active call, disconnect it.
 				cm_ok_disconnect(CMD_SRC_LCL, 0);
 		    	}
-	      
+
 	    		if (!cmd.call_number)
 		       {
 				// If there is waiting call, accept the call
@@ -4240,7 +4240,7 @@
 		       }
 		    	cmd.call_number = -1;
 		}
-		
+
   	}
 	   break;
 
@@ -4733,7 +4733,7 @@
 //	local definition
 #ifdef FF_MMI_OPTIM
 	T_MFW_CM_BLACKLIST_LIST black_list;
-#endif	
+#endif
 
   TRACE_FUNCTION ("cm_set_redial()");
 
@@ -4745,7 +4745,7 @@
 #ifdef FF_MMI_OPTIM
   	if(flash_MMI_blackList_write((U8 *)&black_list, sizeof(T_MFW_CM_BLACKLIST_LIST),0) < 0)
 		TRACE_FUNCTION(" Error writing into file");
-#endif	
+#endif
 	return;
   }
 
@@ -4879,13 +4879,13 @@
   memset(number, 0, sizeof(number));
   mfwStrncpy(number, (CHAR *)cc_stat.prefix, max_num_size);
   max_num_size -= strlen((char *)cc_stat.prefix);
-  
+
   if ((cc_stat.ton EQ MFW_TON_INTERNATIONAL) AND (cc_stat.number[0] != '+'))
   {
     strcat(number, "+");
     max_num_size--;
   }
-  
+
   strncat(number, (CHAR *)cc_stat.number, max_num_size);
 
   switch (redial_stat)
@@ -4972,7 +4972,7 @@
 
   mfwStrncpy(buf, (char *)cc_stat.prefix, max_buf_size);
   max_buf_size -= strlen((char *)cc_stat.prefix);
-  
+
   if ((cc_stat.ton EQ MFW_TON_INTERNATIONAL) AND (cc_stat.number[0] != '+'))
   {
       strcat(buf, "+");
@@ -5090,7 +5090,7 @@
 {
     UBYTE cnt;
     int   i;
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	define and allocate memory
 #ifdef FF_MMI_OPTIM
 	T_ACI_CAL_ENTR 	    *call_tab;//[MAX_CALL_NR];
@@ -5141,12 +5141,12 @@
 	  break;
 	}
       }
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif      
+#endif
       return cnt;
     }
 
@@ -5188,20 +5188,20 @@
 	  cnt++;
 	}
       }
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 //	deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif      
+#endif
       return cnt;
     }
-// 	Apr 06 2005		REF: CRR 29989	xpradipg	
+// 	Apr 06 2005		REF: CRR 29989	xpradipg
 // deallocate memory
 #ifdef FF_MMI_OPTIM
 	    if(call_tab)
 	    mfwFree((U8*)call_tab, sizeof(T_ACI_CAL_ENTR)*MAX_CALL_NR);
-#endif    
+#endif
     return 0;
 }
 
@@ -5267,15 +5267,15 @@
 		    }
 		}
 
-        // Apr 26 2006, a0393213 (Prabakar R), OMAPS00074886 : No option in MMI to release the held call. 
+        // Apr 26 2006, a0393213 (Prabakar R), OMAPS00074886 : No option in MMI to release the held call.
         // cmd_hold variable is set to MFW_CM_TERMINATED to indicate that the call has been terminated
 		cmd_hold = MFW_CM_TERMINATED;
 		break;
-					
+
 	case CHLD_MOD_RelActAndAcpt:
 
 		// MMI-SPR 13873 xkundadu
-		// Handling of 1+SEND - Releases all active calls (if any exist) and 
+		// Handling of 1+SEND - Releases all active calls (if any exist) and
 		// accepts the other (held or waiting) call.
 
 		if( (cm_search_callId(CAL_STAT_DeactiveReq, &id) == CM_OK) OR
@@ -5288,17 +5288,17 @@
 			{
 				//  Call is in multiparty
 				//  1SEND for multiparty will disconnect all the active calls
-				//  To clear all calls assign the dis_connect.call_number to 
+				//  To clear all calls assign the dis_connect.call_number to
 				//  zero
-				dis_connect.call_number = 0;	
+				dis_connect.call_number = 0;
 				bIsMultpty = FALSE;
 			}
 		}
 		else
 		{
-			// There is no active calls/active calls whose disconnection is 
+			// There is no active calls/active calls whose disconnection is
 			// iniated existing
-			dis_connect.call_number = -1;	
+			dis_connect.call_number = -1;
 		}
 		if (cm_search_callId(CAL_STAT_Wait, &id) == CM_OK)
 		{
@@ -5307,23 +5307,23 @@
 			// is used to determine whether to call cm_connect() or not
 			cmd.call_number=0;
 		}
-		cmd_hold = MFW_CM_1_SEND; 
+		cmd_hold = MFW_CM_1_SEND;
 		break;
-	
+
 	case CHLD_MOD_HldActAndAcpt:
-		
+
 		// MMI -SPR 13873 xkundadu
 		// Handling of 2+SEND - Places all active calls (if any exist) on hold
 		// and accepts the other (held or waiting) call.
-		
+
 		switch (clog_cmd->cmdPrm.sCHLD.act)
 		{
-		
+
 		  case CHLD_ACT_Accept:
 		  	   // Accept the incoming call
 			    cmd_hold = MFW_CM_MT_ACCEPT;
 			    break;
-				
+
 		  case CHLD_ACT_Hold:
 		  	    // Getting the id of the call which has been put on hold by ACI
 			    cmd.command = CM_HOLD;
@@ -5336,12 +5336,12 @@
 			      	   cmd.call_number = -1;
 			    }
 			    break;
-				
+
 		  case CHLD_ACT_Swap:
 		  	   // Swap the call
 			    cmd.command = CM_SWAP;
 			    break;
-				
+
 		  case CHLD_ACT_Retrieve:
 		  	    // Getting the id of the call which has been made active by ACI
 			    cmd.command = CM_RETRIEVE;
@@ -5358,27 +5358,27 @@
 		  	    // Put the calls on HOLD
 			    cmd.command = CM_HOLD_MULTIPARTY;
 			    break;
-				
+
 		  case CHLD_ACT_RetrieveMpty:
 		  	    // Retrieve the held calls to active
 			    cmd.command = CM_RETRIEVE_MULTIPARTY;
 			    break;
-				
+
 		   case CHLD_ACT_SwapMpty:
 		  	    // Swap muliparty calls
 			    cmd.command = CM_SWAP_MULTIPARTY;
 			    break;
-				
+
 		  default:
 			    cmd.command = CM_COMMAND_UNKNOWN;
 			    break;
-				
+
 		}
 		break;
 	   case CHLD_MOD_RelActSpec:
 		dis_connect.call_number = (SHORT)atoi(clog_cmd->cmdPrm.sCHLD.call);
-		break;			
-		
+		break;
+
 	    default:
 		break;
 	}
@@ -5393,17 +5393,17 @@
 //The usage of ATI enum is put under the flag FF_ATI
 
 //Apr 21, 2006 OMAPS00070774 a0393213 (Prabakar R)
-//Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=2 in ATI. 
+//Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=2 in ATI.
 //      expected behaviour : active call should be put to hold and the incoming call should be accepted
 //      observed behaviour : happens as expected. but display shows incoming call screen only.
 //                           active screen is not shown eventhough the connection is established between MS1 and MS3
-//Fix : AT commands from CMD_SRC_ATI_3 was not processed. As a result, MFW was not informed of the acceptance of the call 
+//Fix : AT commands from CMD_SRC_ATI_3 was not processed. As a result, MFW was not informed of the acceptance of the call
 //through ATI. In precise cmd_hold variable was not set to MFW_CM_MT_ACCEPT, which is necessary for display update
 
-#ifdef FF_ATI  
+#ifdef FF_ATI
     if ((clog_cmd->cmdPrm.sCHLD.srcId == CMD_SRC_ATI_1) //NM Berlin UK integration
 		OR (clog_cmd->cmdPrm.sCHLD.srcId == CMD_SRC_ATI_2) // Added for MMI-SPR 22222 FIX
-		OR (clog_cmd->cmdPrm.sCHLD.srcId == CMD_SRC_ATI_3)) // Added for OMAPS00070774 FIX  
+		OR (clog_cmd->cmdPrm.sCHLD.srcId == CMD_SRC_ATI_3)) // Added for OMAPS00070774 FIX
     {
 	switch(clog_cmd->cmdPrm.sCHLD.mode)
 	{
@@ -5430,12 +5430,12 @@
 			}
 			if (cm_search_callId(CAL_STAT_Wait, &id) == CM_OK)
 			{
-			   #ifdef MMI_LINT_WARNING_REMOVAL 	/*a0393213 lint warnings removal*/			
+			   #ifdef MMI_LINT_WARNING_REMOVAL 	/*a0393213 lint warnings removal*/
 			    cc_id = id;
 			   #endif
-	
+
 		//Apr 22, 2006 OMAPS00070762 a0393213 (Prabakar R)
-        //Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=1 in ATI. 
+        //Bug : Make MO call from MS1 to MS2. Make MT call from MS3 to MS1. Type at+chld=1 in ATI.
         //expected behaviour : active call should be released and the incoming call should be accepted
         //observed behaviour : happens as expected. but display shows incoming call screen only.
         //           active screen is not shown eventhough the connection is established between MS1 and MS3
@@ -5443,7 +5443,7 @@
         //      to call cm_ok_connect()which updates the display. It's set.
 				cmd.call_number=0;
 			}
-			    
+
 			break;
 		    case CHLD_ACT_Retrieve:
 			if (cm_search_callId(CAL_STAT_Held, &id) == CM_OK)
@@ -5451,7 +5451,7 @@
 			    cmd.command     = CM_RETRIEVE;
 			    cmd.call_number = id;
 			}
-			#ifdef MMI_LINT_WARNING_REMOVAL 	/*a0393213 lint warnings removal*/		
+			#ifdef MMI_LINT_WARNING_REMOVAL 	/*a0393213 lint warnings removal*/
 			if (cm_search_callId(CAL_STAT_Wait, &id) == CM_OK)
 			    cc_id = id;
 			#else
@@ -5532,7 +5532,7 @@
 		break;
 	}
    }
-#endif		//FF_ATI  
+#endif		//FF_ATI
 }
 
 
@@ -5553,9 +5553,9 @@
     T_MFW_CM_CALL_STAT stat;
     UBYTE	       ton;
     UBYTE	       mode;
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
 // Fix : Allocate the memory for entry and findText from heap instead of stack.
-#ifdef FF_MMI_PB_OPTIM	
+#ifdef FF_MMI_PB_OPTIM
     T_MFW_PHB_ENTRY    * entry =  (T_MFW_PHB_ENTRY*)mfwAlloc(sizeof(T_MFW_PHB_ENTRY));
     T_MFW_PHB_TEXT     * findText =  (T_MFW_PHB_TEXT*)mfwAlloc(sizeof(T_MFW_PHB_TEXT));
 #else
@@ -5565,7 +5565,7 @@
 
     TRACE_FUNCTION("cm_at_d()");
 
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
 #ifdef FF_MMI_PB_OPTIM
 	#ifdef NO_ASCIIZ
   	  entry->name.len = 0;
@@ -5607,13 +5607,13 @@
 	    if (cm_search_callStat(cmd->cId, &stat, &ton, &mode) == CM_OK)
 	    {
 		out_call.type = mode;
-// Oct 10, 2006  DR: OMAPS00093720   x0039928 
+// Oct 10, 2006  DR: OMAPS00093720   x0039928
 // Fix: Set the cc_stat.ton info from out_call.ton
 		cc_stat.ton  = out_call.ton;
 		cc_stat.mode = (T_MFW_CM_CALL_TYPE)mode;
 	    }
 
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
 #ifdef NO_ASCIIZ
 	#ifdef FF_MMI_PB_OPTIM
 	    mfwStrncpy((char *)findText->data, cmd->cmdPrm.sD.number, PHB_MAX_LEN);
@@ -5675,7 +5675,7 @@
 #endif
 	    out_call.type = cc_stat.mode;
 	}
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
 // Fix: Free the dynamic memory allocated if flag FF_MMI_PB_OPTIM is defined
 	#ifdef FF_MMI_PB_OPTIM
       		mfwFree((U8*) entry, sizeof(T_MFW_PHB_ENTRY));
@@ -5704,9 +5704,9 @@
     	//If the value is not set then do the phone book search operation
     	//Else do not perform  phone book search operation
     	//this is to avoid stack overflow probelm when the source id is not LOCAL
-	if(!mfw_get_OtherSrc_Value())//x0pleela 3 nov 2006	
+	if(!mfw_get_OtherSrc_Value())//x0pleela 3 nov 2006
 	{
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
 #ifdef NO_ASCIIZ
 	#ifdef FF_MMI_PB_OPTIM
 	mfwStrncpy((char *)findText->data, cmd->cmdPrm.sD.number, PHB_MAX_LEN);
@@ -5749,7 +5749,7 @@
 	}
 #endif
 	} //3
-// Sep 01, 2006 REF:OMAPS00090555  x0039928  
+// Sep 01, 2006 REF:OMAPS00090555  x0039928
 // Fix: Free the dynamic memory allocated if flag FF_MMI_PB_OPTIM is defined
 	#ifdef FF_MMI_PB_OPTIM
       		mfwFree((U8*) entry, sizeof(T_MFW_PHB_ENTRY));
@@ -5782,10 +5782,10 @@
 	case CPI_MSG_Sync:  return CPI_TYPE_SYNC;
 	 case CPI_MSG_Conn: return CPI_TYPE_CONN;
 	 /* CQ11676 Added new messages types in CPi indication. 17-02-04 MZ */
-    #ifndef FF_2TO1_PS                      
+    #ifndef FF_2TO1_PS
 		case CPI_MSG_Rls:  return CPI_TYPE_RELEASE;
 	case CPI_MSG_Rjct:  return CPI_TYPE_REJECT;
-    #endif                     
+    #endif
 		default:		    return CPI_TYPE_UNKNOWN;
 	}
 }
@@ -7030,8 +7030,8 @@
 	/*a0393213 compiler warnings removal -- removed ret*/
 
 /* Mar 27, 2006    REF:ER OMAPS00071798 */
-    #ifdef NEPTUNE_BOARD 
-        U8 audioMode = AUDIO_MODE_TEXT; 
+    #ifdef NEPTUNE_BOARD
+        U8 audioMode = AUDIO_MODE_TEXT;
     #endif
 
 	TRACE_FUNCTION("cm_tty_enable()");
@@ -7039,7 +7039,7 @@
 	/* SPR#1985 - SH - Now use proper ACI functions.  */
 
   /* sAT_PercentCTTY() is changed bec the audio mode info is needed in lower layer,
-     for now just use default value when calling the function, if we want to have 
+     for now just use default value when calling the function, if we want to have
      the same functionality in BMI/MFW as in ATI, BMI/MFW needs to be updated */
 #ifdef NEPTUNE_BOARD
     if (flash_read() >= EFFS_OK)
@@ -7050,7 +7050,7 @@
 #endif
 
 /* Mar 27, 2006    REF:ER OMAPS00071798 */
-#ifdef NEPTUNE_BOARD 
+#ifdef NEPTUNE_BOARD
 #ifdef CTTY_AUDIO_MODE
 	if (enable)
 		sAT_PercentCTTY(CMD_SRC_LCL, CTTY_MOD_Enable, CTTY_REQ_On, audioMode);
@@ -7099,14 +7099,14 @@
 	T_ACI_CTTY_TRX trx;
 
 /* Mar 27, 2006    REF:ER OMAPS00071798 */
-#ifdef NEPTUNE_BOARD 
+#ifdef NEPTUNE_BOARD
       U8 audio_mode;
 #endif
 
 	TRACE_FUNCTION("cm_tty_query()");
 
 /* Mar 27, 2006    REF:ER OMAPS00071798 */
-#ifdef NEPTUNE_BOARD 
+#ifdef NEPTUNE_BOARD
 #ifdef CTTY_AUDIO_MODE
         qAT_PercentCTTY(CMD_SRC_LCL, &mode, &req, &stat, &trx, &audio_mode);
 #else
@@ -7179,7 +7179,7 @@
 
  $Description: Sets the value of the static variable cmd_hold.
 
- $Returns:      void   
+ $Returns:      void
 
  $Arguments: command
 *******************************************************************************/