diff src/ui/mfw/mfw_cphs.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_cphs.c	Tue Jan 19 05:41:26 2021 +0000
+++ b/src/ui/mfw/mfw_cphs.c	Tue Jan 19 06:10:27 2021 +0000
@@ -10,20 +10,20 @@
 
    PURPOSE : This modul contains CPHS management functions.
 
-  
+
    $History:: mfw_cphs.c					      $
 
    	June 27,2007 OMAPS00134788 x0066814(Geetha)
    	Description: EXT1 record not appende to CHPHS Voice Mail Number (6F17) though referenced
    	Solution: Added a function to read the EXT1 records for mailbox number.
    	Added a condition in cphs_read_mbn() to check whether EXT1 is present.
-   
+
  	Nov 27, 2006 OMAPS00098359 a0393213(R.Prabakar)
  	Description: CPHS 4.2 : Call Divert doesn't work properly for Line 2
- 	   
+
       Oct 30 2006, OMAPS00098881 x0039928(sumanth)
       Removal of power variant
-      
+
        May 30, 2006 REF:OMAPS00079650  a0393213 (R.Prabakar)
        Description : CPHS Call Forwarding feature implementation
 
@@ -33,22 +33,22 @@
 			a) Added the definition for the new function "mfw_cphs_get_als_info()"
 
 	May 18, 2006    DR: OMAPS00070657 x0pleela
-   	Description: CPHS feature on Locosto-Lite 
+   	Description: CPHS feature on Locosto-Lite
    	Solution: 	For VMWI feature,
-   			a) A new function "sendCPWIEvt" is defined to set the voice mail indication 
+   			a) A new function "sendCPWIEvt" is defined to set the voice mail indication
    			if there are any voice mails
 
 	Jan 12, 2006	OMAPS00062632	x0018858
 	Description: The differnace in the type of the data passed to the function cphs_read_information()
 	is causing an incorrect value being received as the output.
 	Solution: The errcode being passed to the function has been modified to USHORT
-	
+
 	Mar 30, 2005	REF: CRR 29986	xpradipg
 	Description: Optimisation 1: Removal of unused variables and dynamically
 	allocate/ deallocate mbndata
 	Solution: Static allocation of mbnData is replaced with dynamic allocation
 	and deallocation
-   
+
 	Aug 16, 2004    REF: CRR 24323   Deepa M.D
 	Bug:Clenup of sprintf used for tracing
 	Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX
@@ -136,12 +136,12 @@
 T_MFW_CPHS_REL4_MWIS mwis_stat[4];
 #endif
 //	Mar 30, 2005	REF: CRR 29986	xpradipg
-//	the optimisation is placed under a flag, a pointer variable is defined 
+//	the optimisation is placed under a flag, a pointer variable is defined
 //	instead of the static array, which is allocated and deallocated
 #ifdef FF_MMI_OPTIM
 //x0pleela 14 June, 2006  DR: OMAPS00080549
 //changed the size of the Mail box number to avoid SIM write operation to overwrite other memory locations
-#ifdef FF_CPHS 
+#ifdef FF_CPHS
 	#if defined ( TI_PS_FFS_PHB) || defined(PHONEBOOK_EXTENSION)
 		#define MAX_MAIL_BOX_NUMBER       120
 	#else//TI_PS_FFS_PHB OR PHONEBOOK_EXTENSION
@@ -150,10 +150,10 @@
 #else 	//FF_CPHS
 	#define MAX_MAIL_BOX_NUMBER 120
 #endif //FF_CPHS
-UBYTE *mbnData; 
+UBYTE *mbnData;
 #else //FF_MMI_OPTIM
 //x0pleela 14 June, 2006  DR: OMAPS00080549
-#ifdef FF_CPHS 
+#ifdef FF_CPHS
 	#if defined ( TI_PS_FFS_PHB) || defined(PHONEBOOK_EXTENSION)
 		static UBYTE	mbnData[120]; // it should be allocated dynamically.
 	#else//TI_PS_FFS_PHB OR PHONEBOOK_EXTENSION
@@ -214,15 +214,15 @@
 #define TRACE_EVENT_P4 FFS_log_message
 
 void FFS_log_message(char *LogMsg,...)
-{  
-       fd_t fd= -1;   
-       char log_ffs_buf[256]; 
+{
+       fd_t fd= -1;
+       char log_ffs_buf[256];
        va_list varpars;
- va_start (varpars, LogMsg);      
+ va_start (varpars, LogMsg);
  vsprintf(log_ffs_buf,LogMsg,varpars);
- va_end (varpars);     
+ va_end (varpars);
   fd = ffs_open((const char*)"/ffslog", FFS_O_APPEND | FFS_O_WRONLY );
-        if(fd < 0) 
+        if(fd < 0)
            fd=ffs_open((const char*)"/ffslog", FFS_O_CREATE |FFS_O_WRONLY );
         if(fd > 0)
         {
@@ -233,7 +233,7 @@
 }
 
 #endif
- 
+
 
 /*
 +--------------------------------------------------------------------+
@@ -298,13 +298,13 @@
   if (!hdr || !cphs_para)
   	{
     	TRACE_ERROR("ERROR: cphs_create() Mem Alloc Failed.");
-			
+
 	   	if(hdr)
    			mfwFree((U8*)hdr,sizeof(MfwHdr));
 
    		if(cphs_para)
    			mfwFree((U8*)cphs_para,sizeof(T_MFW_CPHS));
-   		
+
 	   	return FALSE;
   	}
 
@@ -377,46 +377,46 @@
       if (cphs_data->emask & event)
       {
 	cphs_data->event = event;
-	TRACE_EVENT_P1("cphs_sign_exec():event=%d",event); 
+	TRACE_EVENT_P1("cphs_sign_exec():event=%d",event);
 	switch (event)
 	{
-	  case E_CPHS_IND:  
+	  case E_CPHS_IND:
 	    memcpy(&cphs_data->para.stat, para, sizeof(T_MFW_CPHS_STATUS));
 	    break;
-	  case E_CPHS_OP_NAME:	
+	  case E_CPHS_OP_NAME:
 	    memcpy(&cphs_data->para.oper_name, para, sizeof(T_MFW_CPHS_OP_NAME));
 	    break;
-	  case E_CPHS_GET_VC_NUM:  
+	  case E_CPHS_GET_VC_NUM:
 	    memcpy(&cphs_data->para.vc_entry, para, sizeof(T_MFW_CPHS_VC_NUM));
 	    break;
-	  case E_CPHS_SET_VC_NUM:  
+	  case E_CPHS_SET_VC_NUM:
 	    memcpy(&cphs_data->para.result, para, sizeof(UBYTE));
 	    break;
-	  case E_CPHS_GET_VC_STAT:  
+	  case E_CPHS_GET_VC_STAT:
 	    memcpy(&cphs_data->para.vc_status, para, sizeof(T_MFW_CPHS_VC_STAT));
 	    break;
-	  case E_CPHS_SET_VC_STAT:  
+	  case E_CPHS_SET_VC_STAT:
 	    memcpy(&cphs_data->para.result, para, sizeof(UBYTE));
-	    break; 
-	  case E_CPHS_GET_DV_STAT:  
+	    break;
+	  case E_CPHS_GET_DV_STAT:
 	    memcpy(&cphs_data->para.dv_status, para, sizeof(T_MFW_CPHS_DV_STAT));
 	    break;
-	  case E_CPHS_SET_DV_STAT:  
+	  case E_CPHS_SET_DV_STAT:
 	    memcpy(&cphs_data->para.result, para, sizeof(UBYTE));
 	    break;
-	  case E_CPHS_GET_ALS_STATUS:  
+	  case E_CPHS_GET_ALS_STATUS:
 	    memcpy(&cphs_data->para.als_status, para, sizeof(T_MFW_CPHS_ALS_STATUS));
 	    break;
-	  case E_CPHS_SET_LINE:  
+	  case E_CPHS_SET_LINE:
 	    memcpy(&cphs_data->para.result, para, sizeof(UBYTE));
 	    break;
-	  case E_CPHS_GET_CSP:	
+	  case E_CPHS_GET_CSP:
 	    memcpy(&cphs_data->para.csp, para, sizeof(T_MFW_CPHS_CSP));
 	    break;
-	  case E_CPHS_GET_INFO_LIST:  
+	  case E_CPHS_GET_INFO_LIST:
 	    memcpy(&cphs_data->para.num_list, para, sizeof(T_MFW_CPHS_INFONUM_LIST));
 	    break;
-	  case E_CPHS_GET_INFO_NUM:  
+	  case E_CPHS_GET_INFO_NUM:
 	    memcpy(&cphs_data->para.info_entry, para, sizeof(T_MFW_CPHS_INFONUM_ENTRY));
 	    break;
 	 case E_CPHS_GET_SIM_FIELD://MC added for generic read function
@@ -455,11 +455,11 @@
 */
 
 static void cphs_signal (MfwEvt event, void *para)
-{	
-/*MC, SPR 1389, we have to enable the display whenever 
+{
+/*MC, SPR 1389, we have to enable the display whenever
 	we send an event up to the MMI*/
 
-      UBYTE temp=0;  
+      UBYTE temp=0;
 #ifndef FF_POWER_MANAGEMENT
 	temp = dspl_Enable(0);
 #else
@@ -475,15 +475,15 @@
   {
     if (mfwFocus)
       if (cphs_sign_exec(mfwFocus,event,para))
-      { 
+      {
       	#ifndef FF_POWER_MANAGEMENT
 		dspl_Enable(temp);/*MC, SPR 1389*/
 	#else
          /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
              display is enabled only when lcd refresh is needed*/
 		if(FFS_flashData.refresh == 1)
-			dspl_Enable(temp);/*MC, SPR 1389*/	
-	#endif	
+			dspl_Enable(temp);/*MC, SPR 1389*/
+	#endif
 		return;
       }
     if (mfwRoot)
@@ -503,7 +503,7 @@
      */
     if (!h)
       h = mfwRoot;
-      
+
     /*
      * No elements available, return
      */
@@ -514,15 +514,15 @@
        * Signal consumed, then return
        */
       if (cphs_sign_exec (h, event, para))
-      {	
+      {
 	      	#ifndef FF_POWER_MANAGEMENT
 			dspl_Enable(temp);/*MC, SPR 1389*/
 		#else
 	         /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
 	             display is enabled only when lcd refresh is needed*/
 			if(FFS_flashData.refresh == 1)
-				dspl_Enable(temp);/*MC, SPR 1389*/	
-		#endif	
+				dspl_Enable(temp);/*MC, SPR 1389*/
+		#endif
 		return;
       }
 
@@ -537,8 +537,8 @@
 	         /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
 	             display is enabled only when lcd refresh is needed*/
 			if(FFS_flashData.refresh == 1)
-				dspl_Enable(temp);/*MC, SPR 1389*/	
-		#endif	
+				dspl_Enable(temp);/*MC, SPR 1389*/
+		#endif
 	 	return;
       }
 
@@ -548,18 +548,18 @@
       h = mfwParent(mfwParent(h));
       if(h)
 	h = ((MfwWin * )(h->data))->elems;
-    } 
+    }
     cphs_sign_exec(mfwRoot,event,para);
   }
-  // Power Management	
+  // Power Management
 #ifndef FF_POWER_MANAGEMENT
   dspl_Enable(temp);/*MC, SPR 1389*/
 #else
   /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
    display is enabled only when lcd refresh is needed*/
   if(FFS_flashData.refresh == 1)
-     dspl_Enable(temp);/*MC, SPR 1389*/	
-#endif	
+     dspl_Enable(temp);/*MC, SPR 1389*/
+#endif
 }
 
 /*
@@ -622,9 +622,9 @@
 		vc_stat.data = MFW_CFLAG_NotPresent;
 		vc_stat.fax = MFW_CFLAG_NotPresent;
 	break;
-		
+
   }
-  
+
   cphs_signal(E_CPHS_GET_VC_STAT,(void*)&vc_stat);
 }
 #endif
@@ -643,7 +643,7 @@
 void sendCPHSSignal( UBYTE event, void* para)
 {
 	TRACE_FUNCTION("sendCPHSSignal()");
-	cphs_signal(event,para);	
+	cphs_signal(event,para);
 }
 #endif
 /*
@@ -668,7 +668,7 @@
     cphsStatus = CPHS_ERR;
     TRACE_EVENT("CPHS, error reading support indication");
     cphs_signal(E_CPHS_IND, &cphsStatus);
-  }    
+  }
 }
 
 /*
@@ -726,7 +726,7 @@
   TRACE_FUNCTION ("cphs_operator_name()");
 
   /* Check CPHS support status */
-  if (cphsStatus EQ CPHS_NotPresent) 
+  if (cphsStatus EQ CPHS_NotPresent)
     return cphsStatus;
 
   /* Read operator name sring */
@@ -740,7 +740,7 @@
 	(cphs_ssc(MFW_CHPS_NAME_SHORT,	 cphsServTab) NEQ ALLOCATED_AND_ACTIVATED) OR
 	!cphs_read_sim_dat(SIM_CPHS_ONSHF, NOT_PRESENT_8BIT, MFW_CPHS_ONSF_SIZE)		  )
     {
-      /* Read operator name shortform failed. 
+      /* Read operator name shortform failed.
 	 Send event with empty info to MMI   */
       opName.shortName.len = 0;
       cphs_signal(E_CPHS_OP_NAME, &opName);
@@ -759,13 +759,13 @@
 
 */
 
-void cphs_get_mailbox (void) 
+void cphs_get_mailbox (void)
 {
   TRACE_FUNCTION ("cphs_get_mailbox()");
 
   mbNum.count = 0;
 
-  /* Check CPHS support status. 
+  /* Check CPHS support status.
      When CPHS is not support, read mailbox numbers from EEPROM */
   if (cphsStatus EQ CPHS_NotPresent)
   {
@@ -773,26 +773,26 @@
     return;
   }
 
-  /* Check CPHS service table. 
+  /* Check CPHS service table.
      When CPHS is not support, read mailbox numbers from EEPROM */
   if (cphs_ssc(MFW_CPHS_MB_NUMBER, cphsServTab) NEQ ALLOCATED_AND_ACTIVATED)
   {
     cphs_read_eeprom_mailbox();
     return;
   }
-  /* Read mailbox numbers from SIM. 
+  /* Read mailbox numbers from SIM.
      When this reading failed, read mailbox numbers from EEPROM */
   if (!cphs_read_sim_rcd(SIM_CPHS_MBXN, 1, 0)) /* read the first record */
     cphs_read_eeprom_mailbox();
 }
 
 static UBYTE cphs_write_sim_voicemail_rcd(void)
-{		
+{
 	BOOL 	bSavePossible 	= FALSE;
 	UBYTE 	result			= MFW_SIMOP_WRITE_OK;
-	
+
 	TRACE_FUNCTION("cphs_write_sim_voicemail_rcd");
-	
+
 	/* allocate mbnData (sizeof(dataLen)) */
 	//	Mar 30, 2005	REF: CRR 29986	xpradipg
 	//	the dynamic allocation is done here, if the write fails it is deallocated
@@ -815,10 +815,10 @@
 		if ( bSavePossible == FALSE )
 		{
 			result = MFW_SIMOP_WRITE_ERR;
-			
+
 			TRACE_FUNCTION("cphs_write_sim_voicemail_rcd: notenuf EXT1recs");
 			cphs_signal(E_CPHS_SET_VC_NUM, &result);
-			
+
 			//	Mar 30, 2005	REF: CRR 29986	xpradipg
 			//	mbnData is deallocated, on failure of write operation
 			#ifdef FF_MMI_OPTIM
@@ -830,15 +830,15 @@
 		}
 		/**************************************************************************************/
 		/**************************************************************************************/
-			
-		if (!cphs_write_sim_rcd(SIM_CPHS_MBXN, vcEntry->index, 
-			mbnData, vcEntry->datalen)) 
+
+		if (!cphs_write_sim_rcd(SIM_CPHS_MBXN, vcEntry->index,
+			mbnData, vcEntry->datalen))
 		{
 			cphs_write_eeprom_mailbox(vcEntry);
 		}
-#ifdef FF_MMI_OPTIM      
+#ifdef FF_MMI_OPTIM
 	}
-#endif      
+#endif
 
 	return 1;
 }
@@ -853,7 +853,7 @@
 
 */
 
-T_MFW cphs_set_mailbox (T_MFW_CPHS_ENTRY *entry) 
+T_MFW cphs_set_mailbox (T_MFW_CPHS_ENTRY *entry)
 {
 
   TRACE_FUNCTION ("cphs_set_mailbox()");
@@ -876,7 +876,7 @@
       (entry->index > 4)      )
     return CPHS_ERR;
 
-  /* Check CPHS support status. 
+  /* Check CPHS support status.
      When CPHS is not support, write mailbox numbers to EEPROM */
   if (cphsStatus EQ CPHS_NotPresent)
   {
@@ -886,7 +886,7 @@
     return MFW_CPHS_OK;
   }
 
-  /* Check CPHS service table. 
+  /* Check CPHS service table.
      When CPHS is not support, write mailbox numbers to EEPROM */
   if ( cphs_ssc(MFW_CPHS_MB_NUMBER, cphsServTab) NEQ ALLOCATED_AND_ACTIVATED)
   {
@@ -899,7 +899,7 @@
   /* Read first record to determine the data length,
      When the reading failed, write mailbox numbers to EEPROM */
 //  simStatus = MFW_SIMOP_WRITE_OK;
-  if (!cphs_write_sim_voicemail_rcd()) 
+  if (!cphs_write_sim_voicemail_rcd())
   {
   	return CPHS_ERR;
   }
@@ -919,14 +919,14 @@
 
 */
 
-T_MFW cphs_get_mailbox_status () 
+T_MFW cphs_get_mailbox_status ()
 {
   TRACE_FUNCTION ("cphs_get_mailbox_status()");
 
 
-  /* Read voice message waiting flag. 
+  /* Read voice message waiting flag.
      When this reading failed, send event with "read error" parameter to MMI */
-  if (!cphs_read_sim_dat(SIM_CPHS_VMW, NOT_PRESENT_8BIT, MFW_CPHS_MBS_SIZE)) 
+  if (!cphs_read_sim_dat(SIM_CPHS_VMW, NOT_PRESENT_8BIT, MFW_CPHS_MBS_SIZE))
   {
     mbStatus.result = MFW_SIMOP_READ_ERR;
     cphs_signal(E_CPHS_GET_VC_STAT, &mbStatus);
@@ -964,10 +964,10 @@
 
 */
 
-T_MFW cphs_set_mailbox_status (T_MFW_CFLAG_STATUS line1, 
-			       T_MFW_CFLAG_STATUS line2, 
-			       T_MFW_CFLAG_STATUS fax, 
-			       T_MFW_CFLAG_STATUS data) 
+T_MFW cphs_set_mailbox_status (T_MFW_CFLAG_STATUS line1,
+			       T_MFW_CFLAG_STATUS line2,
+			       T_MFW_CFLAG_STATUS fax,
+			       T_MFW_CFLAG_STATUS data)
 {
   UBYTE result;
 
@@ -991,8 +991,8 @@
 
   if (line2 EQ MFW_CFLAG_SET   OR
       line2 EQ MFW_CFLAG_NOTSet  )
-  {	mbsData[0]&=0x0F;	
-		mbsData[0] |= (line2 << 4)&0xF0;;    /* high Nibble */	
+  {	mbsData[0]&=0x0F;
+		mbsData[0] |= (line2 << 4)&0xF0;;    /* high Nibble */
   }
 
   if (fax EQ MFW_CFLAG_SET   OR
@@ -1004,12 +1004,12 @@
   if (data EQ MFW_CFLAG_SET   OR
       data EQ MFW_CFLAG_NOTSet	)
   {	mbsData[1] &= 0x0F;			//zero the high nibble
-		mbsData[1] |= (data << 4)&0xF0;     /* high Nibble */  
+		mbsData[1] |= (data << 4)&0xF0;     /* high Nibble */
   }
 
   /* Read voice message waiting flag to determine the size */
   simStatus = MFW_SIMOP_WRITE_OK;
-  if (!cphs_read_sim_dat(SIM_CPHS_VMW, NOT_PRESENT_8BIT, MFW_CPHS_MBS_SIZE)) 
+  if (!cphs_read_sim_dat(SIM_CPHS_VMW, NOT_PRESENT_8BIT, MFW_CPHS_MBS_SIZE))
   {
     result    = MFW_SIMOP_WRITE_ERR;
     cphs_signal(E_CPHS_SET_VC_STAT, &result);
@@ -1028,20 +1028,20 @@
 
 */
 
-T_MFW cphs_get_divert_status () 
+T_MFW cphs_get_divert_status ()
 {
   TRACE_FUNCTION ("cphs_get_divert_status()");
 
 
-  /* Read call forwarding flags. 
+  /* Read call forwarding flags.
      When this reading failed, send event with "read error" parameter to MMI */
      /*a0393213 cphs rel4 - when EF(CFIS) is present call sAT_PercentCFIS to get CFIS*/
 	#ifdef FF_CPHS_REL4
 	if(sim_serv_table_check((UBYTE)SRV_No_55) != ALLOCATED_AND_ACTIVATED )
 		{
 	#endif
-	
-		  if (!cphs_read_sim_dat(SIM_CPHS_CFF, NOT_PRESENT_8BIT, MFW_CPHS_CFF_SIZE)) 
+
+		  if (!cphs_read_sim_dat(SIM_CPHS_CFF, NOT_PRESENT_8BIT, MFW_CPHS_CFF_SIZE))
 		  {
 		    dvStatus.result = MFW_SIMOP_READ_ERR;
 		    cphs_signal(E_CPHS_GET_DV_STAT, &dvStatus);
@@ -1069,10 +1069,10 @@
 
 */
 
-T_MFW cphs_set_divert_status  (T_MFW_CFLAG_STATUS line1, 
-			       T_MFW_CFLAG_STATUS line2, 
-			       T_MFW_CFLAG_STATUS fax, 
-			       T_MFW_CFLAG_STATUS data) 
+T_MFW cphs_set_divert_status  (T_MFW_CFLAG_STATUS line1,
+			       T_MFW_CFLAG_STATUS line2,
+			       T_MFW_CFLAG_STATUS fax,
+			       T_MFW_CFLAG_STATUS data)
 {
   UBYTE result;
 
@@ -1089,7 +1089,7 @@
   if (line2 EQ MFW_CFLAG_SET   OR
       line2 EQ MFW_CFLAG_NOTSet  )
   {		dvData[0]&= 0x0F;
-	dvData[0] |= (line2 << 4)&0xF0;    /* high Nibble */  
+	dvData[0] |= (line2 << 4)&0xF0;    /* high Nibble */
   }
 
   if (fax EQ MFW_CFLAG_SET   OR
@@ -1097,19 +1097,19 @@
  {	dvData[1]&= 0xF0;		//zero the lower nibble
     dvData[1] |= fax&0x0F;		/* low Nibble */
   }
-    
+
 
   if (data EQ MFW_CFLAG_SET   OR
       data EQ MFW_CFLAG_NOTSet	)
   {	dvData[1] &=0x0F;
-		dvData[1] |= (data << 4)&0xF0;	   /* high Nibble */  
+		dvData[1] |= (data << 4)&0xF0;	   /* high Nibble */
   }
 
   /* Read call forwarding flag to determine the size */
   simStatus = MFW_SIMOP_WRITE_OK;
-  if (!cphs_read_sim_dat(SIM_CPHS_CFF, NOT_PRESENT_8BIT, MFW_CPHS_CFF_SIZE)) 
+  if (!cphs_read_sim_dat(SIM_CPHS_CFF, NOT_PRESENT_8BIT, MFW_CPHS_CFF_SIZE))
   {
-    TRACE_EVENT("cphs_set_divert_status:cphs_read_sim_dat failed"); 
+    TRACE_EVENT("cphs_set_divert_status:cphs_read_sim_dat failed");
     result    = MFW_SIMOP_WRITE_ERR;
     cphs_signal(E_CPHS_SET_DV_STAT, &result);
   }
@@ -1130,7 +1130,7 @@
 
 */
 #ifdef FF_CPHS_REL4
-T_MFW cphs_rel4_set_divert_status(T_MFW_CFLAG_STATUS voice, T_MFW_CFLAG_STATUS fax, 
+T_MFW cphs_rel4_set_divert_status(T_MFW_CFLAG_STATUS voice, T_MFW_CFLAG_STATUS fax,
 										T_MFW_CFLAG_STATUS data, char number[PHB_MAX_LEN])
 {
 	UBYTE mspId=mfw_cphs_get_reg_profile();
@@ -1141,19 +1141,19 @@
 	TRACE_EVENT_P1("msp id  %d",mspId);
 
 	cfuStat= cfuStat | (voice == MFW_CFLAG_SET) | ((fax==MFW_CFLAG_SET)<<1) | ((data==MFW_CFLAG_SET)<<2);
-	
+
 	/*check third, fourth, sixth, seventh and eight parameters, number convert to 10 digit, TOA - psaSAT_getTonNpi is a local fn in ACI*/
 	sAT_PercentCFIS( CMD_SRC_LCL,
-                                    CFIS_MOD_Write, 
+                                    CFIS_MOD_Write,
                                     mspId,
                                     mspId,
                                     cfuStat,
-                                    number, 
+                                    number,
                                     NULL,
                                     0xFF);
 	return cphsStatus;
 
-	
+
 }
 #endif
 
@@ -1171,7 +1171,7 @@
 
 */
 
-void cphs_get_als_info (T_MFW_CPHS_ALS_STATUS *info) 
+void cphs_get_als_info (T_MFW_CPHS_ALS_STATUS *info)
 {
   TRACE_FUNCTION ("cphs_get_als_info()");
 
@@ -1187,12 +1187,12 @@
 | STATE   : code			ROUTINE : cphs_select_line    |
 +---------------------------------------------------------------------+
 
-  PURPOSE : Select the current used line. When the field does not 
+  PURPOSE : Select the current used line. When the field does not
 	    exist in SIM, read it from EEPROM.
 
 */
 
-void cphs_select_line (T_MFW_LINE_INDEX line) 
+void cphs_select_line (T_MFW_LINE_INDEX line)
 {
   UBYTE 	result;
   T_ACI_ALS_MOD alsMode=ALS_MOD_NOTPRESENT;
@@ -1211,13 +1211,13 @@
 
 
       /* write alternate line service in EEPROM */
-      cphs_write_eeprom_als(&result); 
+      cphs_write_eeprom_als(&result);
 
       if (line EQ MFW_SERV_LINE1)
 	alsMode = ALS_MOD_SPEECH;
       if (line EQ MFW_SERV_LINE2)
 	alsMode = ALS_MOD_AUX_SPEECH;
-      sAT_PercentALS(CMD_SRC_LCL, alsMode); 
+      sAT_PercentALS(CMD_SRC_LCL, alsMode);
 
       cphs_signal(E_CPHS_SET_LINE, &result);
 }
@@ -1228,12 +1228,12 @@
 | STATE   : code			ROUTINE : cphs_set_als_status |
 +---------------------------------------------------------------------+
 
-  PURPOSE : Change the lock status of the line. When the field does 
+  PURPOSE : Change the lock status of the line. When the field does
 	    not exist in SIM, read it from EEPROM.
 
 */
 
-T_MFW cphs_set_als_status (T_MFW_LINE_STATUS status) 
+T_MFW cphs_set_als_status (T_MFW_LINE_STATUS status)
 {
   UBYTE result;
   T_MFW_SIM_PIN_STATUS pinStatus;
@@ -1244,7 +1244,7 @@
   pinStatus.type = MFW_SIM_PIN2;
   sim_pin_status(&pinStatus);
   if (pinStatus.stat NEQ MFW_SIM_NO_PIN)
-    return MFW_SIM_PIN2_REQ;	 
+    return MFW_SIM_PIN2_REQ;
 
   /* check given parameter */
   if (status NEQ MFW_LINE_LOCKED  AND
@@ -1275,7 +1275,7 @@
 
 */
 
-T_MFW cphs_get_csp () 
+T_MFW cphs_get_csp ()
 {
   UBYTE res;
 
@@ -1287,7 +1287,7 @@
   if ( res NEQ ALLOCATED_AND_ACTIVATED)
     return res;
 
-  /* Read customer service profile. 
+  /* Read customer service profile.
      When this reading failed, send event with empty parameter array to MMI */
   if (!cphs_read_sim_dat(SIM_CPHS_CSP, NOT_PRESENT_8BIT, MFW_CPHS_CSP_SIZE))
   {
@@ -1309,21 +1309,21 @@
 
 */
 
-T_MFW cphs_get_info_num (UBYTE level, UBYTE startIndex) 
+T_MFW cphs_get_info_num (UBYTE level, UBYTE startIndex)
 {
 //  UBYTE res;  // RAVI
   T_MFW_CPHS_INFO cf_info;
 
   TRACE_FUNCTION ("cphs_get_info_num()");
 
-	
+
   if (level < 1       OR
       startIndex < 1	)
     return CPHS_ERR;
 	cphs_config(&cf_info);
- 
-
-  /* Read customer service profile to check 
+
+
+  /* Read customer service profile to check
      whether information numbers are supported.       */
   numList.count = 0;
   idxLevel	= level;
@@ -1349,12 +1349,12 @@
 
 */
 
-T_MFW cphs_select_info_num (UBYTE index) 
+T_MFW cphs_select_info_num (UBYTE index)
 {
   TRACE_FUNCTION ("cphs_select_info_num()");
 
 
-  /* Read a information number entry.	    
+  /* Read a information number entry.
      When this reading failed, send event with "read error" parameter to MMI */
   simStatus = MFW_SIMOP_READ_OK;
   startIdx  = index;
@@ -1364,7 +1364,7 @@
 
   if (cphsPrevRead == SIM_CPHS_INFN)
   {
-    if (!cphs_read_sim_rcd(SIM_CPHS_INFN, 1, 0)) 
+    if (!cphs_read_sim_rcd(SIM_CPHS_INFN, 1, 0))
     {
       infoEntry.result = MFW_SIMOP_READ_ERR;
       cphs_signal(E_CPHS_GET_INFO_NUM, &infoEntry);
@@ -1379,7 +1379,7 @@
   {
     if (cphsPrevRead == SIM_CPHS_INFN2)
     {
-      if (!cphs_read_sim_rcd(SIM_CPHS_INFN2, 1, 0)) 
+      if (!cphs_read_sim_rcd(SIM_CPHS_INFN2, 1, 0))
       {TRACE_EVENT("Error reading single info num 2");
 	infoEntry.result = MFW_SIMOP_READ_ERR;
 	cphs_signal(E_CPHS_GET_INFO_NUM, &infoEntry);
@@ -1406,24 +1406,24 @@
 void cphs_read_information(USHORT errCode, UBYTE *data, UBYTE dataLen)
 {
   UBYTE *ptr;
-/* PATCH VO 22.01.01: copy CPHS service table according to 
+/* PATCH VO 22.01.01: copy CPHS service table according to
    the actual length in the SIM card			    */
-  UBYTE len; 
+  UBYTE len;
 /* PATCH VO 22.01.01 END */
 
   TRACE_FUNCTION ("cphs_read_information()");
 
   ptr = data;
-/* PATCH VO 22.01.01: copy CPHS service table according to 
+/* PATCH VO 22.01.01: copy CPHS service table according to
    the actual length in the SIM card			    */
-  len = dataLen; 
+  len = dataLen;
   memset(cphsServTab, 0, sizeof(cphsServTab));
 /* PATCH VO 22.01.01 END */
 #ifdef FF_2TO1_PS
   if ( errCode NEQ CAUSE_SIM_NO_ERROR    OR
 #else
   if ( errCode NEQ SIM_NO_ERROR    OR
-#endif          
+#endif
        ptr EQ NULL		   OR
        dataLen <= 0) /* PATCH VO 22.01.01: not check a certain length */
   {
@@ -1431,7 +1431,7 @@
   }
   else
   {
-    cphsPhase = *ptr; 
+    cphsPhase = *ptr;
     len--;
     if (len > 0)
     {
@@ -1467,7 +1467,7 @@
   if ( errCode NEQ CAUSE_SIM_NO_ERROR    OR
 #else
   if ( errCode NEQ SIM_NO_ERROR    OR
-#endif          
+#endif
        ptr EQ NULL		   OR
        // dataLen < MFW_CPHS_ONS_SIZE  )
        dataLen <= 0  ) /* PATCH VO 22.01.01: not check a certain length */
@@ -1476,7 +1476,7 @@
   }
   else
   {
-    cmhPHB_getMfwTagNt(ptr, (UBYTE)MINIMUM(LONG_NAME, dataLen), 
+    cmhPHB_getMfwTagNt(ptr, (UBYTE)MINIMUM(LONG_NAME, dataLen),
 		       opName.longName.data, &opName.longName.len);
     opName.longName.dcs = MFW_DCS_SIM;
 
@@ -1513,7 +1513,7 @@
   if ( errCode NEQ CAUSE_SIM_NO_ERROR    OR
 #else
   if ( errCode NEQ SIM_NO_ERROR    OR
-#endif          
+#endif
        ptr EQ NULL		   OR
        dataLen < MFW_CPHS_ONSF_SIZE )
   {
@@ -1521,7 +1521,7 @@
   }
   else
   {
-    cmhPHB_getMfwTagNt(ptr, MFW_CPHS_ONSF_SIZE, 
+    cmhPHB_getMfwTagNt(ptr, MFW_CPHS_ONSF_SIZE,
 		       opName.shortName.data, &opName.shortName.len);
     opName.shortName.dcs = MFW_DCS_SIM;
     TRACE_EVENT("Got a short Name");
@@ -1557,12 +1557,12 @@
   TRACE_EVENT_P1("curr_recNr: %d", curr_recNr);
 
   TRACE_EVENT_P1("dataLen: %d", dataLen);
-  
+
 #ifdef FF_2TO1_PS
   if ( simShrdPrm.atb[table_id].errCode NEQ CAUSE_SIM_NO_ERROR  OR
 #else
   if ( simShrdPrm.atb[table_id].errCode NEQ SIM_NO_ERROR  OR
-#endif          
+#endif
        pData EQ NULL					  OR
        dataLen	 <  MFW_CPHS_MIN_MBN_SIZE )
   {
@@ -1595,22 +1595,22 @@
 	  }
 
 	  /* Copy/encode data */
-	  if (  ( *(pData + alphaLen) > 0 ) /* If Length of the contents is > 0 */ 
+	  if (  ( *(pData + alphaLen) > 0 ) /* If Length of the contents is > 0 */
 	  	    &&
 	  	    ( *(pData + alphaLen) <= 11 )
 	  	 )
 	  {
 	  	  /*June 27,2007 OMAPS00134788 x0066814(Geetha)*/
-		  mbNum.entries[mbNum.count].index = curr_recNr; 
+		  mbNum.entries[mbNum.count].index = curr_recNr;
 
 		  mbNum.entries[mbNum.count].datalen = dataLen;
 
 		  TRACE_EVENT_P1("mbNum.count: %d", mbNum.count);
 
 		  TRACE_EVENT_P1("mbNum.entries[mbNum.count].index: %d", mbNum.entries[mbNum.count].index);
-		 
-		  cmhPHB_getMfwTagNt(pData, alphaLen, 
-		  mbNum.entries[mbNum.count].alpha.data, 
+
+		  cmhPHB_getMfwTagNt(pData, alphaLen,
+		  mbNum.entries[mbNum.count].alpha.data,
 				 &mbNum.entries[mbNum.count].alpha.len);
 		  pData += alphaLen;
 
@@ -1637,7 +1637,7 @@
 		  TRACE_EVENT_P1("alphaLen: %d", alphaLen);
 
 		  TRACE_EVENT_P2("cphs_read_mbn: idx, ext_rec_number: %d, %d", mbNum.count, mbNum.entries[mbNum.count].ext_rec_number);
-		  
+
 	      pData += 12;
 
 	      if ( *pData NEQ 0xFF )
@@ -1648,7 +1648,7 @@
 
 	 	/*June 27,2007 OMAPS00134788 x0066814(Geetha)*/
 		 pData += 1;
-	 
+
 		 if ( *pData NEQ 0xFF )
 	 	 {
 		 	/*Read EXT1 EF */
@@ -1659,7 +1659,7 @@
 			if(!cphs_read_sim_rcd(SIM_EXT1,rcd_no,UCHAR_MAX))
 			{
 				/*Append the extension data to mailbox number*/
-				TRACE_FUNCTION("EXTENSION RECORD PRESENT");		
+				TRACE_FUNCTION("EXTENSION RECORD PRESENT");
 			}
 			else
 			{
@@ -1667,13 +1667,13 @@
 				return;
 			}
 		 }
-		
+
 	  	 mbNum.count++;
-		 
+
 	}
-	  
-	curr_recNr++; 
-    if (curr_recNr > maxRec) 
+
+	curr_recNr++;
+    if (curr_recNr > maxRec)
     {
     	TRACE_EVENT("got CPHS MAilbox nos");
         cphs_signal(E_CPHS_GET_VC_NUM, &mbNum);
@@ -1681,7 +1681,7 @@
     else
     {
       /* Read the next entry */
-      if (!cphs_read_sim_rcd(SIM_CPHS_MBXN, curr_recNr, UCHAR_MAX)) 
+      if (!cphs_read_sim_rcd(SIM_CPHS_MBXN, curr_recNr, UCHAR_MAX))
   	  {
 		cphs_signal(E_CPHS_GET_VC_NUM, &mbNum);
       }
@@ -1715,9 +1715,9 @@
 	dataLen = simShrdPrm.atb[table_id].dataLen;
 	recNr   = simShrdPrm.atb[table_id].recNr;
 
-	if ( *pData EQ 0x02 ) //implies that the EF conatins additional data 
+	if ( *pData EQ 0x02 ) //implies that the EF conatins additional data
 	{
-		
+
 		/*Extract ext data*/
 		if(*(pData+1) NEQ 0xFF)
 		{
@@ -1727,28 +1727,28 @@
 							 	pData + 2,
 			 					*(pData+1) );
 
-			strncat( (CHAR *)mbNum.entries[mbNum.count].number, (CHAR *)ext1num, 
+			strncat( (CHAR *)mbNum.entries[mbNum.count].number, (CHAR *)ext1num,
 				      strlen((CHAR *)ext1num) );
 
 			mbNum.entries[mbNum.count].ext_rec_number++;
 
 			TRACE_EVENT_P2("cphs_read_ext1: idx, ext_rec_number: %d, %d", mbNum.count, mbNum.entries[mbNum.count].ext_rec_number);
-			
+
 			if ( *(pData + 12) == 0xFF )
 			{
 				//return control to mbn
 				curr_recNr++;
 
 				mbNum.count++;
-				
-				if (curr_recNr > maxRec) 
-		    	{	
+
+				if (curr_recNr > maxRec)
+		    	{
     				TRACE_EVENT("got CPHS MAilbox nos-2");
       				cphs_signal(E_CPHS_GET_VC_NUM, &mbNum);
     			}
-				else 
-				{									
-					if(!cphs_read_sim_rcd(SIM_CPHS_MBXN, curr_recNr, UCHAR_MAX)) 
+				else
+				{
+					if(!cphs_read_sim_rcd(SIM_CPHS_MBXN, curr_recNr, UCHAR_MAX))
 					{
 						TRACE_FUNCTION("Control Back to mbn-1");
 						return;
@@ -1760,17 +1760,17 @@
    				ext_rec_no = *(pData + 12);
 
 				mbNum.entries[mbNum.count].ext_rec_idx[mbNum.entries[mbNum.count].ext_rec_number] = ext_rec_no;
-				
+
    				if(!cphs_read_sim_rcd(SIM_EXT1,ext_rec_no,UCHAR_MAX))
 				{
 					/*Append the extension data to mailbox number*/
 					TRACE_FUNCTION( " MORE EXTENSION RECORDS PRESENT -But read Error");
-					
+
 					curr_recNr++;
 
 					mbNum.count++;
-					
-					if(!cphs_read_sim_rcd(SIM_CPHS_MBXN, curr_recNr, UCHAR_MAX)) 
+
+					if(!cphs_read_sim_rcd(SIM_CPHS_MBXN, curr_recNr, UCHAR_MAX))
 					{
 						TRACE_FUNCTION("Control Back to mbn-2");
 						return;
@@ -1779,9 +1779,9 @@
 			}
 		}
 	}
-  	else 
+  	else
 	  ;
-	
+
 	return;
 }
 
@@ -1859,7 +1859,7 @@
   if ( errCode NEQ CAUSE_SIM_NO_ERROR    OR
 #else
   if ( errCode NEQ SIM_NO_ERROR    OR
-#endif          
+#endif
        ptr EQ NULL		   OR
        dataLen <= 0  )	/* PATCH VO 22.01.01: not check a certain length */
   {
@@ -1868,11 +1868,11 @@
   else
   {
     memset(&mbStatus, MFW_CFLAG_NotPresent, sizeof(mbStatus));
-	
+
     //x0pleela, 07 June, 2006  DVT: OMAPS00079692
     //Copy SIM data into mbsData to initialise mbsData with the SIM data instead of zeros
     memcpy( mbsData, ptr, dataLen );
-	
+
     mbStatus.result = MFW_SIMOP_READ_OK;
 
     for (i=0; i<dataLen; i++)
@@ -1922,7 +1922,7 @@
   if ( errCode NEQ CAUSE_SIM_NO_ERROR    OR
 #else
   if ( errCode NEQ SIM_NO_ERROR    OR
-#endif          
+#endif
        ptr EQ NULL		   OR
        dataLen <= 0  )	/* PATCH VO 22.01.01: not check a certain length */
   {
@@ -1935,7 +1935,7 @@
        Description : CPHS Call Forwarding feature implementation
        Solution     : As part of this implementation, dvData is made to be consistent with the data
                         read from SIM*/
-    memcpy(&dvData, ptr,dataLen); 
+    memcpy(&dvData, ptr,dataLen);
     dvStatus.result = MFW_SIMOP_READ_OK;
     for (i=0; i<dataLen; i++)
     {
@@ -2012,16 +2012,16 @@
   if ( errCode NEQ CAUSE_SIM_NO_ERROR    OR
 #else
   if ( errCode NEQ SIM_NO_ERROR    OR
-#endif          
+#endif
        ptr EQ NULL		   OR
        dataLen <= 0	 )  /* PATCH VO 22.01.01: not check a certain length */
   {
-    if (simStatus EQ MFW_SIMOP_READ_OK) /* Used for read information numbers */  
+    if (simStatus EQ MFW_SIMOP_READ_OK) /* Used for read information numbers */
     {
       simStatus = MFW_SIMOP_UNKNOWN;
       cphs_signal(E_CPHS_GET_INFO_LIST, &numList);
     }
-    else 
+    else
     {
       csProfile.result = MFW_SIMOP_READ_ERR;
       memset(csProfile.csp, 0, sizeof(csProfile.csp));
@@ -2048,7 +2048,7 @@
       }
 
       /* Read the first information numbers record */
-      if (!cphs_read_sim_rcd(SIM_CPHS_INFN, 1, 0))  
+      if (!cphs_read_sim_rcd(SIM_CPHS_INFN, 1, 0))
 	cphs_signal(E_CPHS_GET_INFO_LIST, &numList);
       else
 	cphsPrevRead = SIM_CPHS_INFN;
@@ -2083,7 +2083,7 @@
   {
     if (cphsPrevRead == SIM_CPHS_INFN)
     {
-      if (!cphs_read_sim_rcd(SIM_CPHS_INFN, rcd_num, dataLen)) 
+      if (!cphs_read_sim_rcd(SIM_CPHS_INFN, rcd_num, dataLen))
       {
 	cphs_signal(E_CPHS_GET_INFO_LIST, &numList);
       }
@@ -2096,7 +2096,7 @@
     {
       if (cphsPrevRead == SIM_CPHS_INFN2)
       {
-	if (!cphs_read_sim_rcd(SIM_CPHS_INFN2, rcd_num, dataLen)) 
+	if (!cphs_read_sim_rcd(SIM_CPHS_INFN2, rcd_num, dataLen))
 	{
 	  cphs_signal(E_CPHS_GET_INFO_LIST, &numList);
 	}
@@ -2129,10 +2129,10 @@
   if ( simShrdPrm.atb[table_id].errCode NEQ CAUSE_SIM_NO_ERROR ) /* VO patch 040501 - remove dataLen and pData check */
 #else
   if ( simShrdPrm.atb[table_id].errCode NEQ SIM_NO_ERROR ) /* VO patch 040501 - remove dataLen and pData check */
-#endif      
+#endif
   {
     if (simStatus EQ MFW_SIMOP_READ_OK) /* Read entry of information numbers */
-    { 
+    {
       simStatus = MFW_SIMOP_UNKNOWN;
       infoEntry.result = MFW_SIMOP_READ_ERR;
       cphs_signal(E_CPHS_GET_INFO_NUM, &infoEntry);
@@ -2142,7 +2142,7 @@
 
      if (cphsPrevRead == SIM_CPHS_INFN)
      {
-      if (!cphs_read_sim_rcd(SIM_CPHS_INFN2, 1, 0)) 
+      if (!cphs_read_sim_rcd(SIM_CPHS_INFN2, 1, 0))
       {
 	infoEntry.result = MFW_SIMOP_READ_ERR;
 	cphs_signal(E_CPHS_GET_INFO_LIST, &infoEntry);
@@ -2154,7 +2154,7 @@
      }
      else
      {
-       cphs_signal(E_CPHS_GET_INFO_LIST, &numList); 
+       cphs_signal(E_CPHS_GET_INFO_LIST, &numList);
      }
     }
   }
@@ -2178,7 +2178,7 @@
     else /* Read list of information numbers */
     {
       /* VO patch 040501 - add dataLen check: if (patch) else ...  */
-      if (dataLen < MFW_CPHS_MIN_INS_SIZE ) 
+      if (dataLen < MFW_CPHS_MIN_INS_SIZE )
 	cphs_signal(E_CPHS_GET_INFO_LIST, &numList);
       else
       {
@@ -2219,7 +2219,7 @@
   if ( simShrdPrm.atb[table_id].errCode NEQ CAUSE_SIM_NO_ERROR  OR
 #else
   if ( simShrdPrm.atb[table_id].errCode NEQ SIM_NO_ERROR  OR
-#endif          
+#endif
        pData EQ NULL					  OR
        dataLen	 <  MFW_CPHS_MIN_INS_SIZE		     )
   {
@@ -2235,7 +2235,7 @@
 
      if (cphsPrevRead == SIM_CPHS_INFN2)
      {
-      if (!cphs_read_sim_rcd(SIM_CPHS_INFN2, 1, 0)) 
+      if (!cphs_read_sim_rcd(SIM_CPHS_INFN2, 1, 0))
       {
 	infoEntry.result = MFW_SIMOP_READ_ERR;
 	cphs_signal(E_CPHS_GET_INFO_LIST, &infoEntry);
@@ -2247,24 +2247,24 @@
      }
      else
      {
-       cphs_signal(E_CPHS_GET_INFO_LIST, &numList); 
+       cphs_signal(E_CPHS_GET_INFO_LIST, &numList);
      }
     }
     cphs_signal(E_CPHS_GET_INFO_LIST, &numList); // correct ??? VO
   }
   else
-  { 
-    if (simStatus EQ MFW_SIMOP_READ_OK) 
+  {
+    if (simStatus EQ MFW_SIMOP_READ_OK)
     {
       /* Read entry of information numbers */
       alphaLen = *pData;
-      if (alphaLen)	 
+      if (alphaLen)
       {
 	/* copy/encode entry */
 	infoEntry.index   = recNr;
 	infoEntry.entryStat = *(pData + 1);
 
-	cmhPHB_getMfwTagNt(pData + 2, alphaLen, 
+	cmhPHB_getMfwTagNt(pData + 2, alphaLen,
 			  infoEntry.alpha.data, &infoEntry.alpha.len);
 
 	pData += alphaLen + 2;
@@ -2291,12 +2291,12 @@
       cphs_signal(E_CPHS_GET_INFO_NUM, &infoEntry);
       return;
     }
-    else if ((*(pData + 1) & 0x0F) < idxLevel) 
+    else if ((*(pData + 1) & 0x0F) < idxLevel)
     {
       /* The index level is out the wished index level. */
       cphs_signal(E_CPHS_GET_INFO_LIST, &numList);
     }
-    else if ((*(pData + 1) & 0x0F) > idxLevel) 
+    else if ((*(pData + 1) & 0x0F) > idxLevel)
     {
       /* This is not wished index level. Read the next */
       recNr++;
@@ -2313,8 +2313,8 @@
 	numList.entry[numList.count].index   = recNr;
 	numList.entry[numList.count].entryStat = *(pData + 1) & 0x7F;	/* set bit 8 to 0 */
 
-	cmhPHB_getMfwTagNt(pData + 2, alphaLen, 
-			   numList.entry[numList.count].alpha.data, 
+	cmhPHB_getMfwTagNt(pData + 2, alphaLen,
+			   numList.entry[numList.count].alpha.data,
 			   &numList.entry[numList.count].alpha.len);
 
 	pData += alphaLen + 2;
@@ -2350,7 +2350,7 @@
  #else
   EF_MBN	      mbn;
  #endif
- 
+
   T_ACI_TOA	      numTp;
   int		      i;
   USHORT	      max_rcd;
@@ -2358,14 +2358,14 @@
   for (i=0; i<MAX_CPHS_ENTRY; i++)
   {
   #ifdef PCM_2_FFS
-	if (ffs_ReadRecord((UBYTE *)PSPDF_MBN_ID, (UBYTE *)&mbn, 
+	if (ffs_ReadRecord((UBYTE *)PSPDF_MBN_ID, (UBYTE *)&mbn,
 		sizeof( T_PSPDF_MBN ), (USHORT)(i+1), 1 ) ==  sizeof( T_PSPDF_MBN ) )
 
 #else
     if (pcm_ReadRecord((UBYTE *)EF_MBN_ID,
 	(USHORT)(i+1),
-	SIZE_EF_MBN, 
-	(UBYTE *)&mbn, 
+	SIZE_EF_MBN,
+	(UBYTE *)&mbn,
 	&version,
 	&max_rcd) == PCM_OK)
 #endif
@@ -2374,10 +2374,10 @@
       if (mbn.len)
       {
 	mbNum.entries[mbNum.count].index = i+1;
-	cmhPHB_getAdrStr ( (char *)mbNum.entries[mbNum.count].number, 
+	cmhPHB_getAdrStr ( (char *)mbNum.entries[mbNum.count].number,
 			   PHB_MAX_LEN - 1, mbn.mbNum, mbn.len );
-	cmhPHB_getMfwTagNt ( mbn.alphId, 10, 
-			     mbNum.entries[mbNum.count].alpha.data, 
+	cmhPHB_getMfwTagNt ( mbn.alphId, 10,
+			     mbNum.entries[mbNum.count].alpha.data,
 			     &mbNum.entries[mbNum.count].alpha.len );
 	cmhPHB_toaDmrg ( mbn.numTp, &numTp );
 	mbNum.entries[mbNum.count].ton = phb_cvtTon(numTp.ton);
@@ -2412,7 +2412,7 @@
 
   len = MINIMUM ( MAX_PCM_MAILBOX_LEN, entry->alpha.len);
   text.len = len;
-  memcpy(text.data, entry->alpha.data, len); 
+  memcpy(text.data, entry->alpha.data, len);
   text.cs = CS_Sim;
   cmhPHB_getMfwTagSim ( &text, FFS_flashData.mbn_AlphId, &outLen, MAX_PCM_MAILBOX_LEN );
 
@@ -2495,7 +2495,7 @@
 
    info->selectedLine = alsStatus.selectedLine;
    info->status = alsStatus.status;
-   
+
 }
 
 /*
@@ -2521,7 +2521,7 @@
   {
     if (alsStatus.status EQ MFW_LINE_LOCKED)
       *res = MFW_SIMOP_WRITE_ERR;
-  
+
     alsStatus.selectedLine = (T_MFW_LINE_INDEX)alsData;
 
      FFS_flashData.als_selLine = alsData;
@@ -2598,7 +2598,7 @@
                max_length,
                NULL,
                cphs_read_sim_dat_cb);
-#endif  
+#endif
   if (res NEQ AT_EXCT)
     return FALSE;
   return TRUE;
@@ -2638,13 +2638,13 @@
 			     simShrdPrm.atb[table_id].dataLen);
 #endif
       break;
-    
+
     case SIM_CPHS_ONSTR:  /* operator name string */
       cphs_read_ons(simShrdPrm.atb[table_id].errCode,
 		    simShrdPrm.atb[table_id].exchData,
 		    simShrdPrm.atb[table_id].dataLen);
       break;
-    
+
     case SIM_CPHS_ONSHF:	/* operator name short form */
       cphs_read_onsf(simShrdPrm.atb[table_id].errCode,
 		     simShrdPrm.atb[table_id].exchData,
@@ -2653,22 +2653,22 @@
 
     case SIM_CPHS_VMW:	/* voice message waiting flag */
 /* PATCH VO 22.01.01 */
-      if (simStatus EQ MFW_SIMOP_WRITE_OK) 
+      if (simStatus EQ MFW_SIMOP_WRITE_OK)
       {
 	/* Determine the size of this field, and write the data.
-	   When the writing is not possible, write this voice  
+	   When the writing is not possible, write this voice
 	   message waiting flag in EEPROM.		       */
 	simStatus = MFW_SIMOP_UNKNOWN;
 #ifdef FF_2TO1_PS
 	if ( simShrdPrm.atb[table_id].errCode EQ CAUSE_SIM_NO_ERROR )
 #else
 	if ( simShrdPrm.atb[table_id].errCode EQ SIM_NO_ERROR )
-#endif        
+#endif
 	{
 	  dataLen = simShrdPrm.atb[table_id].dataLen;
-	  /* Write voice message waiting flag. 
+	  /* Write voice message waiting flag.
 	     When this writing failed, send event with "write error" parameter to MMI */
-	  if (!cphs_write_sim_dat(SIM_CPHS_VMW, mbsData, dataLen)) 
+	  if (!cphs_write_sim_dat(SIM_CPHS_VMW, mbsData, dataLen))
 	  {
 	    result    = MFW_SIMOP_WRITE_ERR;
 	    cphs_signal(E_CPHS_SET_VC_STAT, &result);
@@ -2689,22 +2689,22 @@
 
     case SIM_CPHS_CFF:	/* call forwarding flag */
 /* PATCH VO 22.01.01 */
-      if (simStatus EQ MFW_SIMOP_WRITE_OK) 
+      if (simStatus EQ MFW_SIMOP_WRITE_OK)
       {
 	/* Determine the size of this field, and write the data.
-	   When the writing is not possible, write this call forward flag in EEPROM*/ 
+	   When the writing is not possible, write this call forward flag in EEPROM*/
 	simStatus = MFW_SIMOP_UNKNOWN;
 #ifdef FF_2TO1_PS
 	if ( simShrdPrm.atb[table_id].errCode EQ CAUSE_SIM_NO_ERROR )
 #else
 	if ( simShrdPrm.atb[table_id].errCode EQ SIM_NO_ERROR )
-#endif        
+#endif
 	{
 	  dataLen = simShrdPrm.atb[table_id].dataLen;
-	  /* Write call forwarding flag. 
+	  /* Write call forwarding flag.
 	     When this writing failed, send event with "write error" parameter to MMI */
 	     TRACE_EVENT_P2("cphs_read_sim_dat_cb():%x %x",dvData[0],dvData[1]);
-	  if (!cphs_write_sim_dat(SIM_CPHS_CFF, dvData, dataLen)) 
+	  if (!cphs_write_sim_dat(SIM_CPHS_CFF, dvData, dataLen))
 	  {
 	    result    = MFW_SIMOP_WRITE_ERR;
 	    cphs_signal(E_CPHS_SET_DV_STAT, &result);
@@ -2777,7 +2777,7 @@
 			      length,
 			      data,
 			      cphs_write_sim_dat_cb);
-#endif  
+#endif
 
   if (res NEQ AT_EXCT)
     return FALSE;
@@ -2811,7 +2811,7 @@
       if ( simShrdPrm.atb[table_id].errCode EQ CAUSE_SIM_NO_ERROR )
 #else
       if ( simShrdPrm.atb[table_id].errCode EQ SIM_NO_ERROR )
-#endif          
+#endif
       {
 	result = MFW_SIMOP_WRITE_OK;
 	cphs_signal(E_CPHS_SET_VC_STAT, &result);
@@ -2828,7 +2828,7 @@
       if ( simShrdPrm.atb[table_id].errCode EQ CAUSE_SIM_NO_ERROR )
 #else
       if ( simShrdPrm.atb[table_id].errCode EQ SIM_NO_ERROR )
-#endif          
+#endif
       {
 	result = MFW_SIMOP_WRITE_OK;
 	cphs_signal(E_CPHS_SET_DV_STAT, &result);
@@ -2839,7 +2839,7 @@
 	cphs_signal(E_CPHS_SET_DV_STAT, &result);
       }
       break;
-   
+
     default:
       break;
   }
@@ -2890,7 +2890,7 @@
 			      dataLen,
 			      NULL,
 			      cphs_read_sim_rcd_cb);
-#endif  
+#endif
 
   if (res NEQ AT_EXCT)
     return FALSE;
@@ -2917,23 +2917,23 @@
   //Aug 16, 2004    REF: CRR 24323   Deepa M.D
   TRACE_EVENT_P1("SIM Error code!!!%d", simShrdPrm.atb[table_id].errCode);
 
-  
+
   TRACE_EVENT_P1("tableid: %d", table_id);
   /***************************Go-lite Optimization changes end***********************/
   switch (simShrdPrm.atb[table_id].reqDataFld)
   {
 		case SIM_CPHS_MBXN: /* mailbox numbers */
-		if (simStatus EQ MFW_SIMOP_WRITE_OK) 
+		if (simStatus EQ MFW_SIMOP_WRITE_OK)
 		{
 			/* Determine the size of record, and write a new record.
-			When the writing is not possible, write this mailbox 
+			When the writing is not possible, write this mailbox
 			number in EEPROM.				     */
 			simStatus = MFW_SIMOP_UNKNOWN;
 #ifdef FF_2TO1_PS
 			if ( simShrdPrm.atb[table_id].errCode EQ CAUSE_SIM_NO_ERROR )
 #else
 			if ( simShrdPrm.atb[table_id].errCode EQ SIM_NO_ERROR )
-#endif        
+#endif
 			{
 				dataLen = simShrdPrm.atb[table_id].dataLen;
 				/* allocate mbnData (sizeof(dataLen)) */
@@ -2948,15 +2948,15 @@
 					ubCphsMbExtRecNo = 0;
 
 					cphs_build_mbn_data(mbnData, dataLen);
-					
-					if (!cphs_write_sim_rcd(SIM_CPHS_MBXN, vcEntry->index, 
-						mbnData, dataLen)) 
+
+					if (!cphs_write_sim_rcd(SIM_CPHS_MBXN, vcEntry->index,
+						mbnData, dataLen))
 					{
 						cphs_write_eeprom_mailbox(vcEntry);
 					}
-#ifdef FF_MMI_OPTIM      
+#ifdef FF_MMI_OPTIM
 				}
-#endif      
+#endif
 			}
 			else
 				cphs_write_eeprom_mailbox(vcEntry);
@@ -2969,7 +2969,7 @@
       if (simShrdPrm.atb[table_id].recNr EQ 1)
       {
 	/* VO patch 150501 */
-	if ((startIdx EQ 1) AND (simStatus EQ MFW_SIMOP_READ_OK)) 
+	if ((startIdx EQ 1) AND (simStatus EQ MFW_SIMOP_READ_OK))
 	  cphs_read_info_num(table_id);
 	else
 	/* VO patch 150501 end */
@@ -2978,14 +2978,14 @@
       else
 	cphs_read_info_num(table_id);
       break;
-  
+
     case SIM_CPHS_INFN2:	 /* information numbers 2 - 7F10 'EA01' selected if SIM_CPHS_INFN '6F19' isn't there*/
       if (simShrdPrm.atb[table_id].recNr EQ 1)
       {
-	/* VO patch 150501 */ 
-	if ((startIdx EQ 1) AND (simStatus EQ MFW_SIMOP_READ_OK)) 
-	  cphs_read_info_num(table_id); 
-	else 
+	/* VO patch 150501 */
+	if ((startIdx EQ 1) AND (simStatus EQ MFW_SIMOP_READ_OK))
+	  cphs_read_info_num(table_id);
+	else
 	/* VO patch end */
 	cphs_read_first_info_num(table_id);
       }
@@ -2994,13 +2994,13 @@
       break;
 /*June 27,2007 OMAPS00134788 x0066814(Geetha)*/
 	  case SIM_EXT1:
-	  	
+
 	  		cphs_read_ext1(table_id);
-		
-		
-		
+
+
+
 	  	break;
-    
+
     default:
       break;
   }
@@ -3046,7 +3046,7 @@
 			      dataLen,
 			      data,
 			      cphs_write_sim_rcd_cb);
-#endif  
+#endif
 
   if (res NEQ AT_EXCT)
     return FALSE;
@@ -3082,12 +3082,12 @@
 
 	TRACE_FUNCTION ( "cphs_build_ext1()" );
 
-	memset( pData, MFW_INVALID_SIM_DATA, 13); 
-
-	
-	*pData = 0x02; //implies that the EF contains additional data 
+	memset( pData, MFW_INVALID_SIM_DATA, 13);
+
+
+	*pData = 0x02; //implies that the EF contains additional data
 	temp_data = pData;
-	
+
 	/* number data and TON/NPI data */
 	if ( vcEntry->number[0] EQ '+' )
 	{
@@ -3103,10 +3103,10 @@
 
 	for(i=0; i < strlen((CHAR *)pNumber); i++)
 	{
-		TRACE_EVENT_P2("pNumber[%d] : %c", i,pNumber[i]);  
+		TRACE_EVENT_P2("pNumber[%d] : %c", i,pNumber[i]);
 	}
-	
-	
+
+
 	length_no = numLen; //strlen( (CHAR *)pNumber );
 	byteno = numLen; //( length_no / 2 ) + ( length_no % 2 );
 
@@ -3114,7 +3114,7 @@
 
 	TRACE_EVENT_P1("length_no: %d", length_no);
 	TRACE_EVENT_P1("indx: %d", indx);
-	
+
 	if ( ( byteno - indx ) > 10 )
 	{
 		 count = 10;
@@ -3128,16 +3128,16 @@
 
 	if ( count != 0 )
 	{
-		memcpy ( (void *)(pData + 2), (void *)&(ext1num[indx]), 
+		memcpy ( (void *)(pData + 2), (void *)&(ext1num[indx]),
 			       ( count ) );
 	}
 
 	for(i=0; i < count; i++)
 	{
-		TRACE_EVENT_P2("pData + 2 + %d : %x", i, *(pData + 2+i));  
+		TRACE_EVENT_P2("pData + 2 + %d : %x", i, *(pData + 2+i));
 	}
 
-	
+
 	*(pData+1)  = ( count );
 
 	pData += 12;
@@ -3149,35 +3149,35 @@
 	TRACE_EVENT_P1("mbNum...ext_rec_idx[ubCurrExtRcWrite]: %d", mbNum.entries[vcEntry->list_index].ext_rec_idx[ubCurrExtRcWrite]);
 
 	ubCurrExtRcWrite++;
-	
+
 	if ( ubCphsMbExtRecNo <= ubCurrExtRcWrite )
 	{
 		if (  ( sFreeRec <= 0 ) || ( sFreeRec == 0xFF ) )
-		{		
+		{
 		  TRACE_FUNCTION ("cphs_build_ext1() : ubCphsMbExtRecNo <= ubCurrExtRcWrite; no free rec");
 		   *(pData) = 0xFF;
 		   return FALSE;
 		}
-	
+
   	   rec_no_to_write = sFreeRec;
-	   
+
 	  *(pData) = 0xFF;
 	}
 	else
 	{
 	  rec_no_to_write = sFreeRec;
-	  	
+
 	  sFreeRec = 0;
 
 	  if ( mbNum.entries[vcEntry->list_index].ext_rec_number > ubCurrExtRcWrite )
 	  {
-	  	
+
 	  	TRACE_FUNCTION("ext rec taken from within");
 		sFreeRec = mbNum.entries[vcEntry->list_index].ext_rec_idx[ubCurrExtRcWrite];
 	  }
 	  else
 	  {
-	  
+
 		  TRACE_FUNCTION("ext rec taken from cmh");
 #ifdef TI_PS_FFS_PHB
 		  sFreeRec = cmh_Query_free_ext_record();
@@ -3185,9 +3185,9 @@
 	  }
 
 	  TRACE_EVENT_P1("sFreeRec : %d", sFreeRec);
-		
+
  	  if (  ( sFreeRec <= 0 ) || ( sFreeRec == 0xFF ) )
-	  { 	  
+	  {
 		TRACE_FUNCTION ("cphs_build_ext1() : No free records available");
 		 *(pData) = 0xFF;
 	  }
@@ -3197,16 +3197,16 @@
 		*(pData) = sFreeRec;
 		TRACE_FUNCTION("cmh_PHB_update_ext_record to be");
 #ifdef TI_PS_FFS_PHB
-		cmh_PHB_update_ext_record(sFreeRec,TRUE);		
+		cmh_PHB_update_ext_record(sFreeRec,TRUE);
 #endif
 	  }
 
- 	  mbNum.entries[vcEntry->list_index].ext_rec_idx[ubCurrExtRcWrite] = *(pData);	  
+ 	  mbNum.entries[vcEntry->list_index].ext_rec_idx[ubCurrExtRcWrite] = *(pData);
 	}
 
 	TRACE_EVENT_P1("rec_no_to_write : %d", rec_no_to_write);
 	cphs_write_sim_rcd(SIM_EXT1, rec_no_to_write, temp_data, 13);
-	
+
 	return TRUE;
 }
 
@@ -3222,49 +3222,49 @@
 	TRACE_EVENT_P2("idx, ext_rec_number : %d, %d", vcEntry->list_index, mbNum.entries[vcEntry->list_index].ext_rec_number);
 
 	if (  ( ubCphsMbExtRecNo == 0 ) || ( ubCphsMbExtRecNo <= ubCurrExtRcWrite ) )
-	{	
+	{
 
 		TRACE_FUNCTION("inside if!");
-		
+
 		/* Flush any EXT Records, if any */
 		if ( mbNum.entries[vcEntry->list_index].ext_rec_number > ubCphsMbExtRecNo )
 		{
 
-		
+
 			TRACE_FUNCTION("flush needed!--");
-			
+
 			if ( ubFlushRecords == 0 )
 			{
 				ubFlushRecords = 1;
 			}
 
 			TRACE_EVENT_P1("ubFlushRecords : %d", ubFlushRecords);
-			TRACE_EVENT_P1("i : %d", (ubCphsMbExtRecNo + ubFlushRecords - 1));			
+			TRACE_EVENT_P1("i : %d", (ubCphsMbExtRecNo + ubFlushRecords - 1));
 			TRACE_EVENT_P1("ext_rec_idx[i] : %d", mbNum.entries[vcEntry->list_index].ext_rec_idx[ubCphsMbExtRecNo + ubFlushRecords - 1]);
-			
+
 			memset ( (void *)&flush_data[0], 0xFF, 13 );
-#ifdef TI_PS_FFS_PHB			
+#ifdef TI_PS_FFS_PHB
 			cmh_PHB_update_ext_record(mbNum.entries[vcEntry->list_index].ext_rec_idx[ubCphsMbExtRecNo + ubFlushRecords - 1],
 				FALSE);
-#endif			
-			cphs_write_sim_rcd(SIM_EXT1, 
-				 mbNum.entries[vcEntry->list_index].ext_rec_idx[ubCphsMbExtRecNo + ubFlushRecords - 1], 
-				 flush_data, 13);	
-			
+#endif
+			cphs_write_sim_rcd(SIM_EXT1,
+				 mbNum.entries[vcEntry->list_index].ext_rec_idx[ubCphsMbExtRecNo + ubFlushRecords - 1],
+				 flush_data, 13);
+
 			mbNum.entries[vcEntry->list_index].ext_rec_idx[ubCphsMbExtRecNo + ubFlushRecords - 1] = 0xFF;
 			mbNum.entries[vcEntry->list_index].ext_rec_number--;
 			ubFlushRecords++;
 			return 1;
 		}
-	
+
 		ubFlushRecords = 0;
 
 		result = MFW_SIMOP_WRITE_OK;
 
-		
+
 		TRACE_FUNCTION("mfw_cphs_vm_write_cb_ext: write OK");
 		cphs_signal(E_CPHS_SET_VC_NUM, &result);
-	
+
 		//	Mar 30, 2005	REF: CRR 29986	xpradipg
 		//	mbnData is deallocated, on successfull write operation
 	#ifdef FF_MMI_OPTIM
@@ -3273,27 +3273,27 @@
 	#endif
 
 		  return 0;
-		
+
 	}
 	else
 	{
-		ret_internal = cphs_build_ext1(ubExtRecData);	
+		ret_internal = cphs_build_ext1(ubExtRecData);
 		if ( ret_internal == FALSE )
 		{
 			TRACE_FUNCTION("mfw_cphs_vm_write_cb_ext: cphs_build_ext1 returns FALSE");
 
 			result = MFW_SIMOP_WRITE_OK;
-			
+
 			cphs_signal(E_CPHS_SET_VC_NUM, &result);
-		
+
 			//	Mar 30, 2005	REF: CRR 29986	xpradipg
 			//	mbnData is deallocated, on successfull write operation
 #ifdef FF_MMI_OPTIM
 			  if(mbnData)
 				 mfwFree(mbnData,200);
 #endif
-		
-			  return 0;		
+
+			  return 0;
 		}
 	}
 
@@ -3317,7 +3317,7 @@
   UBYTE *data_write;
   UBYTE dataLen = 0;
   UBYTE ret_internal = 0;
-  
+
   TRACE_FUNCTION ("cphs_write_sim_rcd_cb()");
   /***************************Go-lite Optimization changes Start***********************/
   //Aug 16, 2004    REF: CRR 24323   Deepa M.D
@@ -3326,12 +3326,12 @@
   switch (simShrdPrm.atb[table_id].reqDataFld)
   {
     case SIM_CPHS_MBXN: /* mailbox numbers */
-		
+
 #ifdef FF_2TO1_PS
       if ( simShrdPrm.atb[table_id].errCode EQ CAUSE_SIM_NO_ERROR )
 #else
       if ( simShrdPrm.atb[table_id].errCode EQ SIM_NO_ERROR )
-#endif          
+#endif
       {
 	  	result = MFW_SIMOP_WRITE_OK;
 
@@ -3345,19 +3345,19 @@
       {
 	    cphs_write_eeprom_mailbox(vcEntry);
       }
-	  
+
       break;
 
 	case SIM_EXT1: /* mailbox ext numbers */
-		
+
 #ifdef FF_2TO1_PS
 		  if ( simShrdPrm.atb[table_id].errCode EQ CAUSE_SIM_NO_ERROR )
 #else
 		  if ( simShrdPrm.atb[table_id].errCode EQ SIM_NO_ERROR )
-#endif          
+#endif
 		  {
 			result = MFW_SIMOP_WRITE_OK;
-	
+
 			ret_internal = mfw_cphs_vm_write_cb_ext();
 			if ( ret_internal == 1 )
 			{
@@ -3368,14 +3368,14 @@
 		  {
 			cphs_write_eeprom_mailbox(vcEntry);
 		  }
-		  
+
 		  break;
 
-	
+
     default:
       break;
   }
-  
+
   simShrdPrm.atb[table_id].ntryUsdFlg = FALSE;
 }
 
@@ -3412,7 +3412,7 @@
 
   for ( j = 0; j < i; j++ )
     data[j] = vcEntry->alpha.data[j];
-  
+
   data += alphaLen;
 
   /* number data and TON/NPI data */
@@ -3426,15 +3426,15 @@
 
   for(i=0; i < strlen((CHAR *)pNumber); i++)
   {
-	  TRACE_EVENT_P2("pNumber[%d] : %c", i,pNumber[i]);  
+	  TRACE_EVENT_P2("pNumber[%d] : %c", i,pNumber[i]);
   }
-  
+
   cmhPHB_getAdrBcd ( data + 2, &numLen,
 		     PHB_MAX_LEN - 1, (CHAR *)pNumber );
 
   for(i=0; i < numLen; i++)
   {
-	  TRACE_EVENT_P2("data + 2 + %d : %x", i, *(data + 2+i));  
+	  TRACE_EVENT_P2("data + 2 + %d : %x", i, *(data + 2+i));
   }
 
   if ( numLen < 11 )
@@ -3445,8 +3445,8 @@
   {
   	*data = 11;
   }
-  
-  
+
+
   *(data + 1) = ((( vcEntry -> ton << 4 ) & 0xF0 ) + ( vcEntry -> npi & 0x0F )) | 0x80;
 
   data += 12;
@@ -3462,7 +3462,7 @@
   TRACE_EVENT_P1("length_no : %d", length_no);
   TRACE_EVENT_P1("byteno : %d", byteno);
   TRACE_EVENT_P1("ubCphsMbExtRecNo : %d", ubCphsMbExtRecNo);
-  TRACE_EVENT_P1("vcEntry->index : %d", vcEntry->index);  
+  TRACE_EVENT_P1("vcEntry->index : %d", vcEntry->index);
   TRACE_EVENT_P1("vcEntry->list_index : %d", vcEntry->list_index);
   TRACE_EVENT_P1("dataLen : %d", len);
   TRACE_EVENT_P1("ext_rec_number : %d", mbNum.entries[vcEntry->list_index].ext_rec_number);
@@ -3473,7 +3473,7 @@
 
   /*    Check if enough EXT1 Records are available for storing the current number; If not, return FALSE    */
 
-  if (  ( ubCphsMbExtRecNo > 0 ) && 
+  if (  ( ubCphsMbExtRecNo > 0 ) &&
   	    ( mbNum.entries[vcEntry->list_index].ext_rec_number < ubCphsMbExtRecNo ) )
   {
   	for ( i = mbNum.entries[vcEntry->list_index].ext_rec_number; i < ubCphsMbExtRecNo; i++ )
@@ -3496,7 +3496,7 @@
   /**************************************************************************************/
   /**************************************************************************************/
 
-  
+
   /* capability/configuration identifier data and EXT identifier data */
   *data  = 0xFF;
 
@@ -3523,9 +3523,9 @@
 	}
 
 	TRACE_EVENT_P1("sFreeRec: %d", sFreeRec);
-	
+
 	if ( ( sFreeRec <= 0 ) || ( sFreeRec == 0xFF ) )
-	{		
+	{
 	  TRACE_FUNCTION ("cphs_build_mbn_data() : No free records available");
 	  *(data + 1) = 0xFF;
 	  mbNum.entries[vcEntry->list_index].ext_rec_idx[ubCurrExtRcWrite] = 0xFF;
@@ -3534,10 +3534,10 @@
 	{
   	  *(data + 1) = 0x00;
    	  *(data + 1) = sFreeRec;
-	  TRACE_FUNCTION("cmh_PHB_update_ext_record to be");	  
+	  TRACE_FUNCTION("cmh_PHB_update_ext_record to be");
 	#ifdef TI_PS_FFS_PHB
 	   cmh_PHB_update_ext_record(sFreeRec,TRUE);
-	#endif   
+	#endif
 	   TRACE_EVENT_P1(" *(data + 1) : %d",  *(data + 1) );
 	}
 
@@ -3569,7 +3569,7 @@
 
   value = value >> (((nr-1) & 3) * 2);
   value = value & 3;
- 
+
   return value;
 }
 
@@ -3636,7 +3636,7 @@
 | STATE   : code		   ROUTINE : cphs_update_info_cnf     |
 +---------------------------------------------------------------------+
 
-  PURPOSE : call back for SIM file read 
+  PURPOSE : call back for SIM file read
 
 */
 void cphs_update_info_cnf (USHORT errCode, UBYTE *data, UBYTE dataLen)
@@ -3651,7 +3651,7 @@
   if ( errCode NEQ CAUSE_SIM_NO_ERROR    OR
 #else
   if ( errCode NEQ SIM_NO_ERROR    OR
-#endif          
+#endif
        ptr EQ NULL		   OR
        dataLen < MFW_CPHS_INFO_SIZE)
   {
@@ -3659,7 +3659,7 @@
   }
   else
   {
-    cphsPhase = *ptr; 
+    cphsPhase = *ptr;
     ptr++;
     memcpy (cphsServTab, ptr, CPHS_SERVICE_TABLE*sizeof(UBYTE));
 		//x0pleela 11 June, 2006  DR:OMAPS00079692
@@ -3683,7 +3683,7 @@
 BOOL Read_Sim(USHORT dat_id, USHORT offset, UBYTE max_len, UBYTE *exDat)
 {
   T_ACI_RETURN res;
- /* 
+ /*
   * x0047685 Added path_info to support R99 SIM Interface changes.
   */
   T_path_info  tmp_path;
@@ -3713,8 +3713,8 @@
             max_len,
             exDat,
             cphs_read_sim_default_cb);
-#endif  
-  
+#endif
+
   if (res NEQ AT_EXCT)
     return FALSE;
 
@@ -3737,11 +3737,11 @@
 {
   T_ACI_RETURN res;
   UBYTE        dataLen;
- /* 
+ /*
   * x0047685 Added path_info to support R99 SIM Interface changes.
   */
   T_path_info  tmp_path;
-  
+
     if (record EQ 1)
       dataLen  = UCHAR_MAX;
     else
@@ -3751,7 +3751,7 @@
 
   tmp_path.df_level1   = SIM_DF_VI;
   tmp_path.v_df_level2 = FALSE;
-  
+
 #ifdef FF_2TO1_PS
   res = cmhSIM_ReadRecordEF ( CMD_SRC_NONE,
             AT_CMD_NONE,
@@ -3772,7 +3772,7 @@
             dataLen,
             exDat,
             cphs_read_sim_default_cb);
-#endif  
+#endif
   if (res NEQ AT_EXCT)
     return FALSE;
 
@@ -3813,7 +3813,7 @@
             len,
             exDat,
             cphs_write_sim_default_cb);
-#endif  
+#endif
 
   if (res NEQ AT_EXCT)
     return FALSE;
@@ -3836,7 +3836,7 @@
 BOOL Write_Sim_Record(USHORT dat_id, USHORT record, UBYTE len, UBYTE *exDat)
 {
   T_ACI_RETURN res;
- /* 
+ /*
   * x0047685 Added path_info to support R99 SIM Interface changes.
   */
   T_path_info  tmp_path;
@@ -3866,7 +3866,7 @@
             len,
             exDat,
             cphs_write_sim_default_cb);
-#endif  
+#endif
 
   if (res NEQ AT_EXCT)
     return FALSE;
@@ -3881,12 +3881,12 @@
 +----------------------------------------------------------------------+
 
 
-   PURPOSE :   Sends event to MMI 
+   PURPOSE :   Sends event to MMI
 
 */
 void cphs_read_sim_default_cb(SHORT table_id)
 {
- 
+
 	read_sim_entry.requested_field = simShrdPrm.atb[table_id].reqDataFld;
 	read_sim_entry.exchange_data = simShrdPrm.atb[table_id].exchData;
 	read_sim_entry.sim_result = simShrdPrm.atb[table_id].errCode;
@@ -3896,11 +3896,11 @@
 	if (read_sim_entry.sim_result != CAUSE_SIM_NO_ERROR)
 #else
 	if (read_sim_entry.sim_result != SIM_NO_ERROR)
-#endif        
+#endif
 	{	read_sim_entry.exchange_data = NULL;
 		read_sim_entry.data_len = 0;
 	}
-		
+
 	cphs_signal(E_CPHS_GET_SIM_FIELD, &read_sim_entry);
   simShrdPrm.atb[table_id].ntryUsdFlg = FALSE;
 }
@@ -3913,12 +3913,12 @@
 +----------------------------------------------------------------------+
 
 
-   PURPOSE :   Sends event to MMI 
+   PURPOSE :   Sends event to MMI
 
 */
 void cphs_write_sim_default_cb(SHORT table_id)
 {
- 
+
 	read_sim_entry.requested_field = simShrdPrm.atb[table_id].reqDataFld;
 	read_sim_entry.exchange_data = simShrdPrm.atb[table_id].exchData;
 	read_sim_entry.sim_result = simShrdPrm.atb[table_id].errCode;
@@ -3927,11 +3927,11 @@
 	if (read_sim_entry.sim_result != CAUSE_SIM_NO_ERROR)
 #else
 	if (read_sim_entry.sim_result != SIM_NO_ERROR)
-#endif        
+#endif
 	{	read_sim_entry.exchange_data = NULL;
 		read_sim_entry.data_len = 0;
 	}
-		
+
 	cphs_signal(E_CPHS_SET_SIM_FIELD, &read_sim_entry);
   simShrdPrm.atb[table_id].ntryUsdFlg = FALSE;
 }
@@ -3970,7 +3970,7 @@
 {
 	TRACE_FUNCTION("mfw_cphs_get_msp");
 	TRACE_EVENT_P3("msp count  - %d, def profile  - %d, reg profile  - %d ",mspinfo.count, mspinfo.default_profile, mspinfo.registered_profile);
-	
+
 	return &mspinfo;
 }
 
@@ -4055,10 +4055,10 @@
 	T_ACI_ALS_MOD ALSmode = ALS_MOD_NOTPRESENT; /*a0393213 compiler warnings removal - 0 changed to ALS_MOD_NOTPRESENT*/
 	TRACE_FUNCTION("mfw_cphs_get_als_info");
 
-	if( qAT_PercentALS( CMD_SRC_LCL, &ALSmode )!= AT_CMPL ) 
+	if( qAT_PercentALS( CMD_SRC_LCL, &ALSmode )!= AT_CMPL )
 		return ALS_MOD_NOTPRESENT;
 	else
-		return ALSmode;		
+		return ALSmode;
 }
 #endif