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

src/ui/mfw/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 06:10:27 +0000
parents 67bfe9f274f6
children
comparison
equal deleted inserted replaced
187:a33dd8a5dcc9 188:92abb46dc1ba
14 $History:: mfw_nm.c 14 $History:: mfw_nm.c
15 15
16 Aug 07, 2007 DR:OMAPS00137726 x0066814(Geetha) 16 Aug 07, 2007 DR:OMAPS00137726 x0066814(Geetha)
17 Description:HPLMN Manual Selection at power on - 17 Description:HPLMN Manual Selection at power on -
18 unable to perform manual selection at power ON 18 unable to perform manual selection at power ON
19 Solution: Added a new function nm_get_plmn_list_during_bootup() 19 Solution: Added a new function nm_get_plmn_list_during_bootup()
20 to get the PLMN list during boot up. 20 to get the PLMN list during boot up.
21 21
22 22
23 Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha) 23 Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha)
24 Description: With Orange SIM card, once attached (at+cgatt=1), "5201" is displayed instead of "Orange" 24 Description: With Orange SIM card, once attached (at+cgatt=1), "5201" is displayed instead of "Orange"
25 Solution: In nm_nitz_info_ind(), commented the code to copy mnc, mcc, long name and short anme 25 Solution: In nm_nitz_info_ind(), commented the code to copy mnc, mcc, long name and short anme
26 to net_ind from mmr_info_ind. 26 to net_ind from mmr_info_ind.
27 May 31, 2007 DR: OMAPS00133201 x0pleela 27 May 31, 2007 DR: OMAPS00133201 x0pleela
28 Description: MS keeps searching networks and doesn't list available PLMNs after 28 Description: MS keeps searching networks and doesn't list available PLMNs after
29 performing manual selection 29 performing manual selection
30 Solution : Modified the function nm_error_cops() to check for 30 Solution : Modified the function nm_error_cops() to check for
31 CME_ERR_AbortedByNetwork error and send event 31 CME_ERR_AbortedByNetwork error and send event
32 E_NM_ABORT_NETWORK to BMI to destroy the n/w searching dialog 32 E_NM_ABORT_NETWORK to BMI to destroy the n/w searching dialog
33 33
34 Mar 12 2007 ,x0061088 (Prachi) 34 Mar 12 2007 ,x0061088 (Prachi)
35 Removed function nm_restrict_bands()as function pl_pei_config() is no 35 Removed function nm_restrict_bands()as function pl_pei_config() is no
36 more avalilable in g23m. 36 more avalilable in g23m.
37 37
38 38
39 Oct 30 2006, OMAPS00098881 x0039928(sumanth) 39 Oct 30 2006, OMAPS00098881 x0039928(sumanth)
40 Removal of power variant 40 Removal of power variant
41 41
42 Sep 18,2006 DRT: OMAPS0090268 x0061088(Prachi) 42 Sep 18,2006 DRT: OMAPS0090268 x0061088(Prachi)
43 Description : To check for Forbidden network (for denied services),it takes long time. 43 Description : To check for Forbidden network (for denied services),it takes long time.
44 Solution : Function rAT_PercentCREG() has now be implemented to handle CREG_STAT_Denied, 44 Solution : Function rAT_PercentCREG() has now be implemented to handle CREG_STAT_Denied,
45 which sends nm_signal(NETWORK_FORBIDDEN_NETWORK) to Bmi . 45 which sends nm_signal(NETWORK_FORBIDDEN_NETWORK) to Bmi .
46 46
47 June 02, 2006 DR: OMAPS00078005 x0021334 47 June 02, 2006 DR: OMAPS00078005 x0021334
48 Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed 48 Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed
49 Solution: New Time/Date received from network is sent to MFW by lower layer by invoking 'rAT_PercentCTZV' 49 Solution: New Time/Date received from network is sent to MFW by lower layer by invoking 'rAT_PercentCTZV'
50 function. This function has now been implemented to pass on the received values to MMI 50 function. This function has now been implemented to pass on the received values to MMI
51 for user confirmation and RTC updation. 51 for user confirmation and RTC updation.
52 52
53 Jun 23, 2006 DR: OMAPS00082374 x0pleela 53 Jun 23, 2006 DR: OMAPS00082374 x0pleela
54 Description: EONS Failures - unexpected output from the MMI: 2 carriers; on the top always T-Mobile 54 Description: EONS Failures - unexpected output from the MMI: 2 carriers; on the top always T-Mobile
55 Solution: a) Removed the usage of globals gEons_alloc_active and opn_sel_done 55 Solution: a) Removed the usage of globals gEons_alloc_active and opn_sel_done
56 b) Removed the check if( plmn_ident->opn_read_from EQ NM_EONS ) in function nm_update_plmn_data 56 b) Removed the check if( plmn_ident->opn_read_from EQ NM_EONS ) in function nm_update_plmn_data
57 c) Updating the long name and short name lengths in function nm_update_plmn_data 57 c) Updating the long name and short name lengths in function nm_update_plmn_data
58 d) Removed the code where plmn_ident was updated with new MNC and MCC after qat_%COPN in function nm_update_plmn_data 58 d) Removed the code where plmn_ident was updated with new MNC and MCC after qat_%COPN in function nm_update_plmn_data
59 e) Updated function nm_get_opername() by calling only sat_%CNIV() 59 e) Updated function nm_get_opername() by calling only sat_%CNIV()
60 f) Removed the function definitions of set_opn_sel_done and get_opn_sel_done 60 f) Removed the function definitions of set_opn_sel_done and get_opn_sel_done
61 61
62 May 15, 2006 OMAPS00075777 a0393213 (R.Prabakar) 62 May 15, 2006 OMAPS00075777 a0393213 (R.Prabakar)
63 Description : It is supposed that the sample register itself automatically (in Manual Mode) 63 Description : It is supposed that the sample register itself automatically (in Manual Mode)
64 to the last manual selected HPLMN cell before the power cycle, and this does not happen; 64 to the last manual selected HPLMN cell before the power cycle, and this does not happen;
65 instead this, the sample shows up the available networks list 65 instead this, the sample shows up the available networks list
66 Fix : call to nm_avail_plmn_list() is changed to call to sAT_PercentNRG() 66 Fix : call to nm_avail_plmn_list() is changed to call to sAT_PercentNRG()
67 67
68 Feb 15, 2006 ER: OMAPS00065203 x0pleela 68 Feb 15, 2006 ER: OMAPS00065203 x0pleela
69 Description: Cingular Operator Name Prioritization implementation required 69 Description: Cingular Operator Name Prioritization implementation required
70 Solution: Incorporated review comments 70 Solution: Incorporated review comments
71 - Changed from NEQ NM_CPHS to EQ NM_ROM as we know %CNIV will 71 - Changed from NEQ NM_CPHS to EQ NM_ROM as we know %CNIV will
72 be called only if source id is ROM or CPHS and not roaming in nm_get_opername() 72 be called only if source id is ROM or CPHS and not roaming in nm_get_opername()
73 - set_opn_sel_done(): sets opn_sel_done flag to TRUE or FALSE. 73 - set_opn_sel_done(): sets opn_sel_done flag to TRUE or FALSE.
74 - get_opn_sel_done(): returns the current value of flag opn_sel_done. 74 - get_opn_sel_done(): returns the current value of flag opn_sel_done.
75 75
76 Feb 09, 2006 ER: OMAPS00065203 x0pleela 76 Feb 09, 2006 ER: OMAPS00065203 x0pleela
77 Description: Cingular Operator Name Prioritization implementation required 77 Description: Cingular Operator Name Prioritization implementation required
78 Solution: Handling E_NM_OPN for operator name display 78 Solution: Handling E_NM_OPN for operator name display
79 Query for COPN in rAT_PlusCREG and update plmn data 79 Query for COPN in rAT_PlusCREG and update plmn data
80 Defined following new functions: 80 Defined following new functions:
81 nm_decodeSourceId:to convert the source id used by ACI to the source id used by MFW 81 nm_decodeSourceId:to convert the source id used by ACI to the source id used by MFW
82 nm_update_plmn_data: update plmn data after querying COPN 82 nm_update_plmn_data: update plmn data after querying COPN
83 nm_get_COPN: query COPN 83 nm_get_COPN: query COPN
84 nm_get_opername: updates operator name based on cingular's prioritization requirement. 84 nm_get_opername: updates operator name based on cingular's prioritization requirement.
85 Priority would be in order ONS->NITZ->ROM 85 Priority would be in order ONS->NITZ->ROM
86 nm_get_network_data: gets operator name from network 86 nm_get_network_data: gets operator name from network
87 87
88 Nov 24, 2005 DR: OMAPS00045909 - Shashi Shekar B.S. 88 Nov 24, 2005 DR: OMAPS00045909 - Shashi Shekar B.S.
89 Description: Improve IMEI control mechanism 89 Description: Improve IMEI control mechanism
91 we will block on that screen & will not allow the user to browse menus further, 91 we will block on that screen & will not allow the user to browse menus further,
92 since the PS will not be booted at all!!! 92 since the PS will not be booted at all!!!
93 93
94 July 14, 2005 REF: CRR 31916 x0021334 94 July 14, 2005 REF: CRR 31916 x0021334
95 Description: rCI_PercentCOPS() and rAT_PercentCOPS() is not implemented 95 Description: rCI_PercentCOPS() and rAT_PercentCOPS() is not implemented
96 Solution: rAT_PercentCOPS() is implemented. 96 Solution: rAT_PercentCOPS() is implemented.
97 97
98 Mar 01, 2005 REF: ENH 29327 xdeepadh 98 Mar 01, 2005 REF: ENH 29327 xdeepadh
99 Bug:Locosto MMI Optimization 99 Bug:Locosto MMI Optimization
100 Fix:The changes done for the Golite optimization have been utilised for color build. 100 Fix:The changes done for the Golite optimization have been utilised for color build.
101 This is done by removing the functions under #ifndef MMI_LITE. 101 This is done by removing the functions under #ifndef MMI_LITE.
102 The static vaiable T_MFW_PLMN_LIST plmn_list has been made local variable. 102 The static vaiable T_MFW_PLMN_LIST plmn_list has been made local variable.
103 It has been dynamically allocated and deallocated. 103 It has been dynamically allocated and deallocated.
104 104
105 Aug 16, 2004 REF: CRR 24293 Deepa M.D 105 Aug 16, 2004 REF: CRR 24293 Deepa M.D
106 Bug:Go-lite optimisation dynamic allocation of variable 'plmn_list' 106 Bug:Go-lite optimisation dynamic allocation of variable 'plmn_list'
107 Fix:The static vaiable T_MFW_PLMN_LIST plmn_list has been made local variable. 107 Fix:The static vaiable T_MFW_PLMN_LIST plmn_list has been made local variable.
108 It has been dynamically allocated and deallocated. 108 It has been dynamically allocated and deallocated.
109 109
110 110
111 Aug 16, 2004 REF: CRR 24323 Deepa M.D 111 Aug 16, 2004 REF: CRR 24323 Deepa M.D
112 Bug:Clenup of sprintf used for tracing 112 Bug:Clenup of sprintf used for tracing
113 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX $ 113 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX $
114 114
115 Sep 23, 2004 REF: CRR 24562 xvilliva 115 Sep 23, 2004 REF: CRR 24562 xvilliva
116 Bug: Enable/disable the manual network selection option depending 116 Bug: Enable/disable the manual network selection option depending
117 on ENS. 117 on ENS.
118 Fix: If the manual network selection is disabled we check if an 118 Fix: If the manual network selection is disabled we check if an
119 error is returned and set the global g_ensErr. 119 error is returned and set the global g_ensErr.
120 120
121 121
122 May 22, 2006 X0047685 122 May 22, 2006 X0047685
123 Removed pref_plmn for if not defined FF_2TO1_PS 123 Removed pref_plmn for if not defined FF_2TO1_PS
124 124
125 125
126 * 126 *
127 * ***************** Version 39 ***************** 127 * ***************** Version 39 *****************
128 * User: Es Date: 2.03.00 Time: 16:31 128 * User: Es Date: 2.03.00 Time: 16:31
129 * Updated in $/GSM/Condat/MS/SRC/MFW 129 * Updated in $/GSM/Condat/MS/SRC/MFW
130 * use 'aci_delete()' to clear the primitive routing for mfw_nm. 130 * use 'aci_delete()' to clear the primitive routing for mfw_nm.
358 #endif 358 #endif
359 359
360 #ifndef NEPTUNE_BOARD 360 #ifndef NEPTUNE_BOARD
361 361
362 #ifdef TI_PS_OP_OPN_TAB_ROMBASED 362 #ifdef TI_PS_OP_OPN_TAB_ROMBASED
363 /* Changes for ROM data */ 363 /* Changes for ROM data */
364 /* Operator List size in ROM. Should go to where the decompression algo is present*/ 364 /* Operator List size in ROM. Should go to where the decompression algo is present*/
365 #define PLMN_OPER_LST_SIZE_ROM 628 365 #define PLMN_OPER_LST_SIZE_ROM 628
366 /* Changes for ROM data 366 /* Changes for ROM data
367 extern const T_OPER_NTRY_FIXED operListFixed[]; 367 extern const T_OPER_NTRY_FIXED operListFixed[];
368 Side access into cus_aci.h 368 Side access into cus_aci.h
369 Above decl no more required */ 369 Above decl no more required */
370 EXTERN const UBYTE *ptr_plmn_compressed; 370 EXTERN const UBYTE *ptr_plmn_compressed;
371 EXTERN SHORT cmhMM_decodePlmn (T_OPER_ENTRY *oper, const UBYTE *plmn_comp_entry); 371 EXTERN SHORT cmhMM_decodePlmn (T_OPER_ENTRY *oper, const UBYTE *plmn_comp_entry);
372 EXTERN USHORT cmhMM_PlmnEntryLength (const UBYTE *plmn_comp_entry); 372 EXTERN USHORT cmhMM_PlmnEntryLength (const UBYTE *plmn_comp_entry);
373 #else 373 #else
473 MfwHnd nm_create (MfwHnd hWin, MfwEvt event, MfwCb cbfunc) 473 MfwHnd nm_create (MfwHnd hWin, MfwEvt event, MfwCb cbfunc)
474 { 474 {
475 MfwHdr *hdr; 475 MfwHdr *hdr;
476 T_MFW_NM *nm_para; 476 T_MFW_NM *nm_para;
477 MfwHdr *insert_status =0; 477 MfwHdr *insert_status =0;
478 478
479 TRACE_FUNCTION("nm_create()"); 479 TRACE_FUNCTION("nm_create()");
480 480
481 hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr)); 481 hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr));
482 nm_para = (T_MFW_NM *) mfwAlloc(sizeof(T_MFW_NM)); 482 nm_para = (T_MFW_NM *) mfwAlloc(sizeof(T_MFW_NM));
483 483
484 if (!hdr || !nm_para) 484 if (!hdr || !nm_para)
485 { 485 {
486 TRACE_ERROR("ERROR: nm_create() Mem Alloc Failed."); 486 TRACE_ERROR("ERROR: nm_create() Mem Alloc Failed.");
487 487
488 if(hdr) 488 if(hdr)
489 mfwFree((U8*)hdr,sizeof(MfwHdr)); 489 mfwFree((U8*)hdr,sizeof(MfwHdr));
490 if(nm_para) 490 if(nm_para)
491 mfwFree((U8*)nm_para,sizeof(T_MFW_NM)); 491 mfwFree((U8*)nm_para,sizeof(T_MFW_NM));
492 492
493 return FALSE; 493 return FALSE;
494 } 494 }
495 495
496 nm_para->emask = event; 496 nm_para->emask = event;
497 nm_para->handler = cbfunc; 497 nm_para->handler = cbfunc;
643 { 643 {
644 if (mfwFocus) 644 if (mfwFocus)
645 if (nm_sign_exec(mfwFocus,event,para)) 645 if (nm_sign_exec(mfwFocus,event,para))
646 { 646 {
647 #ifndef FF_POWER_MANAGEMENT 647 #ifndef FF_POWER_MANAGEMENT
648 dspl_Enable(temp); 648 dspl_Enable(temp);
649 #else 649 #else
650 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) 650 /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
651 display is enabled only when lcd refresh is needed*/ 651 display is enabled only when lcd refresh is needed*/
652 if(FFS_flashData.refresh == 1) 652 if(FFS_flashData.refresh == 1)
653 dspl_Enable(temp); 653 dspl_Enable(temp);
684 * Signal consumed, then return 684 * Signal consumed, then return
685 */ 685 */
686 if (nm_sign_exec (h, event, para)) 686 if (nm_sign_exec (h, event, para))
687 { 687 {
688 #ifndef FF_POWER_MANAGEMENT 688 #ifndef FF_POWER_MANAGEMENT
689 dspl_Enable(temp); 689 dspl_Enable(temp);
690 #else 690 #else
691 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) 691 /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
692 display is enabled only when lcd refresh is needed*/ 692 display is enabled only when lcd refresh is needed*/
693 if(FFS_flashData.refresh == 1) 693 if(FFS_flashData.refresh == 1)
694 dspl_Enable(temp); 694 dspl_Enable(temp);
700 * All windows tried inclusive root 700 * All windows tried inclusive root
701 */ 701 */
702 if (h == mfwRoot) 702 if (h == mfwRoot)
703 { 703 {
704 #ifndef FF_POWER_MANAGEMENT 704 #ifndef FF_POWER_MANAGEMENT
705 dspl_Enable(temp); 705 dspl_Enable(temp);
706 #else 706 #else
707 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) 707 /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
708 display is enabled only when lcd refresh is needed*/ 708 display is enabled only when lcd refresh is needed*/
709 if(FFS_flashData.refresh == 1) 709 if(FFS_flashData.refresh == 1)
710 dspl_Enable(temp); 710 dspl_Enable(temp);
720 h = ((MfwWin * )(h->data))->elems; 720 h = ((MfwWin * )(h->data))->elems;
721 } 721 }
722 nm_sign_exec (mfwRoot, event, para); 722 nm_sign_exec (mfwRoot, event, para);
723 } 723 }
724 #ifndef FF_POWER_MANAGEMENT 724 #ifndef FF_POWER_MANAGEMENT
725 dspl_Enable(temp); 725 dspl_Enable(temp);
726 #else 726 #else
727 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) 727 /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
728 display is enabled only when lcd refresh is needed*/ 728 display is enabled only when lcd refresh is needed*/
729 if(FFS_flashData.refresh == 1) 729 if(FFS_flashData.refresh == 1)
730 dspl_Enable(temp); 730 dspl_Enable(temp);
1080 1080
1081 TRACE_FUNCTION("nm_change_pref_plmn()"); 1081 TRACE_FUNCTION("nm_change_pref_plmn()");
1082 1082
1083 switch (mode) 1083 switch (mode)
1084 { 1084 {
1085 1085
1086 case REPLACE_PREF_PLMN: 1086 case REPLACE_PREF_PLMN:
1087 idx = index; 1087 idx = index;
1088 idx2 = -1; 1088 idx2 = -1;
1089 format = CPOL_FRMT_Long; 1089 format = CPOL_FRMT_Long;
1090 oper = (CHAR *)network_long; 1090 oper = (CHAR *)network_long;
1176 memset(plmn->network_numeric, 0, NUMERIC_LENGTH); 1176 memset(plmn->network_numeric, 0, NUMERIC_LENGTH);
1177 1177
1178 if (operLst->longOper) 1178 if (operLst->longOper)
1179 { 1179 {
1180 USHORT length=strlen((const char *)operLst->longOper); 1180 USHORT length=strlen((const char *)operLst->longOper);
1181 plmn->network_long.len = MINIMUM(LONG_NAME-1, length); 1181 plmn->network_long.len = MINIMUM(LONG_NAME-1, length);
1182 memcpy (plmn->network_long.data, operLst->longOper, plmn->network_long.len); 1182 memcpy (plmn->network_long.data, operLst->longOper, plmn->network_long.len);
1183 plmn->network_long.data[plmn->network_long.len] = '\0'; 1183 plmn->network_long.data[plmn->network_long.len] = '\0';
1184 plmn->network_long.dcs = MFW_ASCII; 1184 plmn->network_long.dcs = MFW_ASCII;
1185 } 1185 }
1186 1186
1187 if (operLst->shortOper) 1187 if (operLst->shortOper)
1188 { 1188 {
1189 USHORT length=strlen((const char *)operLst->shortOper); 1189 USHORT length=strlen((const char *)operLst->shortOper);
1190 plmn->network_short.len = MINIMUM(SHORT_NAME-1, length); 1190 plmn->network_short.len = MINIMUM(SHORT_NAME-1, length);
1191 memcpy (plmn->network_short.data, operLst->shortOper, plmn->network_short.len); 1191 memcpy (plmn->network_short.data, operLst->shortOper, plmn->network_short.len);
1192 plmn->network_short.data[plmn->network_short.len] = '\0'; 1192 plmn->network_short.data[plmn->network_short.len] = '\0';
1193 plmn->network_short.dcs = MFW_ASCII; 1193 plmn->network_short.dcs = MFW_ASCII;
1194 } 1194 }
1195 #else 1195 #else
1299 return SIM_NOT_ACTIVE; 1299 return SIM_NOT_ACTIVE;
1300 1300
1301 1301
1302 if (mode == NM_MANUAL) 1302 if (mode == NM_MANUAL)
1303 { 1303 {
1304 /* 1304 /*
1305 Apr 13, 2004 REF: CRR 16303 JuanVi Jativa-Villoldo 1305 Apr 13, 2004 REF: CRR 16303 JuanVi Jativa-Villoldo
1306 sim_spn_req(); Moved to the function rAT_PlusCFUNP 1306 sim_spn_req(); Moved to the function rAT_PlusCFUNP
1307 */ 1307 */
1308 /* May 15, 2006, a0393213 (R.Prabakar), OMAPS00075777 1308 /* May 15, 2006, a0393213 (R.Prabakar), OMAPS00075777
1309 Description : It is supposed that the sample register itself automatically (in Manual Mode) 1309 Description : It is supposed that the sample register itself automatically (in Manual Mode)
1310 to the last manual selected HPLMN cell before the power cycle, and this does not happen; 1310 to the last manual selected HPLMN cell before the power cycle, and this does not happen;
1311 instead this, the sample shows up the available networks list 1311 instead this, the sample shows up the available networks list
1312 Fix : call to nm_avail_plmn_list() is changed to call to sAT_PercentNRG() */ 1312 Fix : call to nm_avail_plmn_list() is changed to call to sAT_PercentNRG() */
1313 if (sAT_PercentNRG(CMD_SRC_LCL, 1313 if (sAT_PercentNRG(CMD_SRC_LCL,
1314 NRG_RGMD_Manual, 1314 NRG_RGMD_Manual,
1315 NRG_SVMD_Full, 1315 NRG_SVMD_Full,
1316 NRG_FRMT_Numeric, 1316 NRG_FRMT_Numeric,
1317 NULL) != AT_EXCT) 1317 NULL) != AT_EXCT)
1327 NRG_FRMT_Numeric, 1327 NRG_FRMT_Numeric,
1328 NULL) != AT_EXCT) 1328 NULL) != AT_EXCT)
1329 { 1329 {
1330 TRACE_ERROR("sAT_PercentNRG error"); 1330 TRACE_ERROR("sAT_PercentNRG error");
1331 } 1331 }
1332 /* 1332 /*
1333 Apr 13, 2004 REF: CRR 16303 JuanVi Jativa-Villoldo 1333 Apr 13, 2004 REF: CRR 16303 JuanVi Jativa-Villoldo
1334 sim_spn_req(); Moved to the function rAT_PlusCFUNP 1334 sim_spn_req(); Moved to the function rAT_PlusCFUNP
1335 */ } 1335 */ }
1336 return SIM_ACTIVE; 1336 return SIM_ACTIVE;
1337 } 1337 }
1338 1338
1339 1339
1362 plmn_list = (T_MFW_PLMN_LIST*)mfwAlloc(sizeof(T_MFW_PLMN_LIST)); 1362 plmn_list = (T_MFW_PLMN_LIST*)mfwAlloc(sizeof(T_MFW_PLMN_LIST));
1363 if(plmn_list == NULL) 1363 if(plmn_list == NULL)
1364 { 1364 {
1365 TRACE_EVENT("plmn_list malloc failed"); 1365 TRACE_EVENT("plmn_list malloc failed");
1366 return ; 1366 return ;
1367 } 1367 }
1368 1368
1369 TRACE_FUNCTION("nm_avail_plmn_list()"); 1369 TRACE_FUNCTION("nm_avail_plmn_list()");
1370 1370
1371 /* Dynamically allocate operator list buffer */ 1371 /* Dynamically allocate operator list buffer */
1372 oper_list = (T_ACI_COPS_OPDESC*)mfwAlloc(sizeof(T_ACI_COPS_OPDESC)*MAX_OPER); 1372 oper_list = (T_ACI_COPS_OPDESC*)mfwAlloc(sizeof(T_ACI_COPS_OPDESC)*MAX_OPER);
1381 mfwFree((U8*)plmn_list,sizeof(T_MFW_PLMN_LIST)); 1381 mfwFree((U8*)plmn_list,sizeof(T_MFW_PLMN_LIST));
1382 plmn_list=NULL; 1382 plmn_list=NULL;
1383 } 1383 }
1384 return; 1384 return;
1385 } 1385 }
1386 1386
1387 1387
1388 // PATCH JVU - PLMN selection during registration 1388 // PATCH JVU - PLMN selection during registration
1389 sAT_Abort(CMD_SRC_LCL, AT_CMD_NRG); 1389 sAT_Abort(CMD_SRC_LCL, AT_CMD_NRG);
1390 // END PATCH JVU - PLMN selection during registration 1390 // END PATCH JVU - PLMN selection during registration
1391 1391
1394 if (result == AT_FAIL || result == AT_BUSY) 1394 if (result == AT_FAIL || result == AT_BUSY)
1395 { 1395 {
1396 TRACE_ERROR("ERROR: tAT_PlusCOPS error"); 1396 TRACE_ERROR("ERROR: tAT_PlusCOPS error");
1397 //Sep 23, 2004 REF: CRR 24562 xvilliva 1397 //Sep 23, 2004 REF: CRR 24562 xvilliva
1398 //If AT_FAIL is returned, we query for the exact error 1398 //If AT_FAIL is returned, we query for the exact error
1399 //and set a variable accordingly. 1399 //and set a variable accordingly.
1400 if(result == AT_FAIL) 1400 if(result == AT_FAIL)
1401 { 1401 {
1402 ULONG err; 1402 ULONG err;
1403 1403
1404 err = qAT_ErrDesc(); 1404 err = qAT_ErrDesc();
1405 switch (ACI_ERR_DESC_CLASS( err )) 1405 switch (ACI_ERR_DESC_CLASS( err ))
1406 { 1406 {
1407 case ACI_ERR_CLASS_Cme: 1407 case ACI_ERR_CLASS_Cme:
1408 if (ACI_ERR_DESC_NR( err ) == CME_ERR_OpNotAllow) 1408 if (ACI_ERR_DESC_NR( err ) == CME_ERR_OpNotAllow)
1409 { 1409 {
1410 g_ensErr = 1; 1410 g_ensErr = 1;
1411 } 1411 }
1412 break; 1412 break;
1413 } 1413 }
1414 } 1414 }
1415 1415
1416 /* Deallocate operator list buffer */ 1416 /* Deallocate operator list buffer */
1417 if (oper_list != NULL) 1417 if (oper_list != NULL)
1418 { 1418 {
1419 mfwFree((U8*)oper_list, sizeof(T_ACI_COPS_OPDESC)*MAX_OPER); 1419 mfwFree((U8*)oper_list, sizeof(T_ACI_COPS_OPDESC)*MAX_OPER);
1420 oper_list = NULL; 1420 oper_list = NULL;
1421 } 1421 }
1422 1422
1423 nm_signal(E_NM_PLMN_LIST,plmn_list); 1423 nm_signal(E_NM_PLMN_LIST,plmn_list);
1424 //Mar 01, 2005 REF: ENH 29327 xdeepadh 1424 //Mar 01, 2005 REF: ENH 29327 xdeepadh
1425 //Deallocate the plmn_list 1425 //Deallocate the plmn_list
1426 if(plmn_list !=NULL) 1426 if(plmn_list !=NULL)
1427 { 1427 {
1513 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM | 1513 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM |
1514 | STATE : code ROUTINE : nm_plmn_list | 1514 | STATE : code ROUTINE : nm_plmn_list |
1515 +--------------------------------------------------------------------+ 1515 +--------------------------------------------------------------------+
1516 1516
1517 PURPOSE : Request existing network list 1517 PURPOSE : Request existing network list
1518 1518
1519 */ 1519 */
1520 #ifndef NEPTUNE_BOARD 1520 #ifndef NEPTUNE_BOARD
1521 #ifdef TI_PS_OP_OPN_TAB_ROMBASED 1521 #ifdef TI_PS_OP_OPN_TAB_ROMBASED
1522 int nm_plnm_list(T_MFW_NETWORK_STRUCT *plmn_list, int start, int count) 1522 int nm_plnm_list(T_MFW_NETWORK_STRUCT *plmn_list, int start, int count)
1523 { 1523 {
1524 int i; 1524 int i;
1525 1525
1526 /* Changes for ROM data */ 1526 /* Changes for ROM data */
1527 const UBYTE *plmn_comp_entry; /* get a local pointer holder */ 1527 const UBYTE *plmn_comp_entry; /* get a local pointer holder */
1528 T_OPER_ENTRY oper; 1528 T_OPER_ENTRY oper;
1529 1529
1530 1530
1531 TRACE_FUNCTION("nm_plnm_list()"); 1531 TRACE_FUNCTION("nm_plnm_list()");
1532 1532
1533 /* 1533 /*
1534 PLMN_OPER_LST_SIZE_ROM is size of the PLMN operlist 1534 PLMN_OPER_LST_SIZE_ROM is size of the PLMN operlist
1535 */ 1535 */
1536 1536
1537 if (start >= PLMN_OPER_LST_SIZE_ROM) 1537 if (start >= PLMN_OPER_LST_SIZE_ROM)
1538 return 0; 1538 return 0;
1539 1539
1540 1540
1541 /* Changes for ROM data */ 1541 /* Changes for ROM data */
1542 plmn_comp_entry = ptr_plmn_compressed; 1542 plmn_comp_entry = ptr_plmn_compressed;
1543 1543
1544 1544
1545 /* skip the first (start-1) number of plmn entries. */ 1545 /* skip the first (start-1) number of plmn entries. */
1546 i=0; 1546 i=0;
1549 i+=1; 1549 i+=1;
1550 } 1550 }
1551 1551
1552 /* for each pointer in the list plmn_list */ 1552 /* for each pointer in the list plmn_list */
1553 i=0; 1553 i=0;
1554 do 1554 do
1555 { 1555 {
1556 /* Get first compressed PLMN entry */ 1556 /* Get first compressed PLMN entry */
1557 cmhMM_decodePlmn (&oper, plmn_comp_entry); 1557 cmhMM_decodePlmn (&oper, plmn_comp_entry);
1558 1558
1559 if (oper.longName NEQ NULL) 1559 if (oper.longName NEQ NULL)
1588 break; 1588 break;
1589 } 1589 }
1590 1590
1591 /* Next compressed PLMN entry */ 1591 /* Next compressed PLMN entry */
1592 plmn_comp_entry += cmhMM_PlmnEntryLength (plmn_comp_entry); 1592 plmn_comp_entry += cmhMM_PlmnEntryLength (plmn_comp_entry);
1593 1593
1594 i+=1; 1594 i+=1;
1595 } while (i < count); 1595 } while (i < count);
1596 1596
1597 return PLMN_OPER_LST_SIZE_ROM; 1597 return PLMN_OPER_LST_SIZE_ROM;
1598 } 1598 }
1706 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM | 1706 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM |
1707 | STATE : code ROUTINE : nm_plmn_list_longnames | 1707 | STATE : code ROUTINE : nm_plmn_list_longnames |
1708 +--------------------------------------------------------------------+ 1708 +--------------------------------------------------------------------+
1709 1709
1710 PURPOSE : Request existing network list longnames. added for SPR 2635. 1710 PURPOSE : Request existing network list longnames. added for SPR 2635.
1711 1711
1712 */ 1712 */
1713 1713
1714 #ifndef NEPTUNE_BOARD 1714 #ifndef NEPTUNE_BOARD
1715 #ifdef TI_PS_OP_OPN_TAB_ROMBASED 1715 #ifdef TI_PS_OP_OPN_TAB_ROMBASED
1716 int nm_plnm_list_longnames(char**plmn_ln_list, int start, int count) 1716 int nm_plnm_list_longnames(char**plmn_ln_list, int start, int count)
1717 { 1717 {
1718 int i; 1718 int i;
1719 /* Changes for ROM data */ 1719 /* Changes for ROM data */
1720 const UBYTE *plmn_comp_entry; /* get a local pointer holder */ 1720 const UBYTE *plmn_comp_entry; /* get a local pointer holder */
1721 T_OPER_ENTRY oper; 1721 T_OPER_ENTRY oper;
1722 1722
1723 1723
1724 TRACE_FUNCTION("nm_plnm_list_longnames()"); 1724 TRACE_FUNCTION("nm_plnm_list_longnames()");
1725 1725
1726 /* 1726 /*
1727 PLMN_OPER_LST_SIZE_ROM is size of the PLMN operlist 1727 PLMN_OPER_LST_SIZE_ROM is size of the PLMN operlist
1728 */ 1728 */
1729 1729
1730 if (start >= PLMN_OPER_LST_SIZE_ROM) 1730 if (start >= PLMN_OPER_LST_SIZE_ROM)
1731 return 0; 1731 return 0;
1737 i+=1; 1737 i+=1;
1738 } 1738 }
1739 1739
1740 /* for each pointer in the list plmn_list */ 1740 /* for each pointer in the list plmn_list */
1741 i=0; 1741 i=0;
1742 do 1742 do
1743 { 1743 {
1744 /* Get first compressed PLMN entry */ 1744 /* Get first compressed PLMN entry */
1745 cmhMM_decodePlmn (&oper, plmn_comp_entry); 1745 cmhMM_decodePlmn (&oper, plmn_comp_entry);
1746 1746
1747 if (oper.longName NEQ NULL) 1747 if (oper.longName NEQ NULL)
1748 { 1748 {
1749 /*just set pointer to point at longname in ROM in ACI*/ 1749 /*just set pointer to point at longname in ROM in ACI*/
1750 plmn_ln_list[i] = (char*)oper.longName; 1750 plmn_ln_list[i] = (char*)oper.longName;
1751 1751
1752 start++; 1752 start++;
1753 } 1753 }
1754 else 1754 else
1755 { 1755 {
1756 plmn_ln_list[i] = NULL; 1756 plmn_ln_list[i] = NULL;
1757 break; 1757 break;
1758 } 1758 }
1759 1759
1760 /* Next compressed PLMN entry */ 1760 /* Next compressed PLMN entry */
1761 plmn_comp_entry += cmhMM_PlmnEntryLength (plmn_comp_entry); 1761 plmn_comp_entry += cmhMM_PlmnEntryLength (plmn_comp_entry);
1762 1762
1763 i+=1; 1763 i+=1;
1764 } while (i < count); 1764 } while (i < count);
1765 1765
1766 return PLMN_OPER_LST_SIZE_ROM; 1766 return PLMN_OPER_LST_SIZE_ROM;
1767 } 1767 }
1770 1770
1771 int nm_plnm_list_longnames(char**plmn_ln_list, int start, int count) 1771 int nm_plnm_list_longnames(char**plmn_ln_list, int start, int count)
1772 { 1772 {
1773 int i; 1773 int i;
1774 int sum; 1774 int sum;
1775 1775
1776 TRACE_FUNCTION("nm_plnm_list_longnames()"); 1776 TRACE_FUNCTION("nm_plnm_list_longnames()");
1777 1777
1778 sum = 0; 1778 sum = 0;
1779 1779
1780 /*count the number of longnames*/ 1780 /*count the number of longnames*/
1781 while (operListFixed[sum].longName != NULL) 1781 while (operListFixed[sum].longName != NULL)
1782 sum++; 1782 sum++;
1789 { 1789 {
1790 if (operListFixed[start].longName != NULL) 1790 if (operListFixed[start].longName != NULL)
1791 { 1791 {
1792 /*just set pointer to point at longname in ROM in ACI*/ 1792 /*just set pointer to point at longname in ROM in ACI*/
1793 plmn_ln_list[i] = (char*)operListFixed[start].longName; 1793 plmn_ln_list[i] = (char*)operListFixed[start].longName;
1794 1794
1795 start++; 1795 start++;
1796 } 1796 }
1797 else 1797 else
1798 { 1798 {
1799 plmn_ln_list[i] = NULL; 1799 plmn_ln_list[i] = NULL;
1807 #else 1807 #else
1808 int nm_plnm_list_longnames(char**plmn_ln_list, int start, int count) 1808 int nm_plnm_list_longnames(char**plmn_ln_list, int start, int count)
1809 { 1809 {
1810 int i; 1810 int i;
1811 int sum; 1811 int sum;
1812 1812
1813 TRACE_FUNCTION("nm_plnm_list_longnames()"); 1813 TRACE_FUNCTION("nm_plnm_list_longnames()");
1814 1814
1815 sum = 0; 1815 sum = 0;
1816 1816
1817 /*count the number of longnames*/ 1817 /*count the number of longnames*/
1818 while (operList[sum].longName != NULL) 1818 while (operList[sum].longName != NULL)
1819 sum++; 1819 sum++;
1826 { 1826 {
1827 if (operList[start].longName != NULL) 1827 if (operList[start].longName != NULL)
1828 { 1828 {
1829 /*just set pointer to point at longname in ROM in ACI*/ 1829 /*just set pointer to point at longname in ROM in ACI*/
1830 plmn_ln_list[i] = (char*)operList[start].longName; 1830 plmn_ln_list[i] = (char*)operList[start].longName;
1831 1831
1832 start++; 1832 start++;
1833 } 1833 }
1834 else 1834 else
1835 { 1835 {
1836 plmn_ln_list[i] = NULL; 1836 plmn_ln_list[i] = NULL;
1865 if (result != AT_EXCT) 1865 if (result != AT_EXCT)
1866 { 1866 {
1867 TRACE_ERROR("sAT_PercentNRG error"); 1867 TRACE_ERROR("sAT_PercentNRG error");
1868 //Sep 23, 2004 REF: CRR 24562 xvilliva 1868 //Sep 23, 2004 REF: CRR 24562 xvilliva
1869 //If AT_FAIL is returned, we query for the exact error 1869 //If AT_FAIL is returned, we query for the exact error
1870 //and set a variable accordingly. 1870 //and set a variable accordingly.
1871 if(result == AT_FAIL) 1871 if(result == AT_FAIL)
1872 { 1872 {
1873 ULONG err; 1873 ULONG err;
1874 1874
1875 err = qAT_ErrDesc(); 1875 err = qAT_ErrDesc();
1876 switch (ACI_ERR_DESC_CLASS( err )) 1876 switch (ACI_ERR_DESC_CLASS( err ))
1877 { 1877 {
1878 case ACI_ERR_CLASS_Cme: 1878 case ACI_ERR_CLASS_Cme:
1879 if (ACI_ERR_DESC_NR( err ) == CME_ERR_OpNotAllow) 1879 if (ACI_ERR_DESC_NR( err ) == CME_ERR_OpNotAllow)
1880 { 1880 {
1881 g_ensErr = 1; 1881 g_ensErr = 1;
1882 } 1882 }
1883 break; 1883 break;
1884 } 1884 }
1885 } 1885 }
1886 } 1886 }
1912 #endif 1912 #endif
1913 1913
1914 #ifdef NO_ASCIIZ 1914 #ifdef NO_ASCIIZ
1915 memset (service_provider_name.data, 0, sizeof(service_provider_name.data)); 1915 memset (service_provider_name.data, 0, sizeof(service_provider_name.data));
1916 service_provider_name.len = 0; 1916 service_provider_name.len = 0;
1917 1917
1918 if (error EQ simErr) 1918 if (error EQ simErr)
1919 { 1919 {
1920 for (i=0; (efspn->service_provider[i] != 0xFF) && (i < SP_NAME); i++) 1920 for (i=0; (efspn->service_provider[i] != 0xFF) && (i < SP_NAME); i++)
1921 service_provider_name.data[i] = efspn->service_provider[i]; 1921 service_provider_name.data[i] = efspn->service_provider[i];
1922 1922
2046 */ 2046 */
2047 2047
2048 void nm_ok_band (void) 2048 void nm_ok_band (void)
2049 { 2049 {
2050 TRACE_FUNCTION("nm_ok_band()"); 2050 TRACE_FUNCTION("nm_ok_band()");
2051 2051
2052 nm_signal(E_NM_BAND, 0); 2052 nm_signal(E_NM_BAND, 0);
2053 } 2053 }
2054 2054
2055 2055
2056 2056
2103 +--------------------------------------------------------------------+ 2103 +--------------------------------------------------------------------+
2104 2104
2105 PURPOSE : Notify about available PLMN list 2105 PURPOSE : Notify about available PLMN list
2106 NOTE : oper_list defines as char * 2106 NOTE : oper_list defines as char *
2107 Every operator (PLMN) uses 3 bytes 2107 Every operator (PLMN) uses 3 bytes
2108 2108
2109 // July 14, 2005 REF: CRR 31916 x0021334 2109 // July 14, 2005 REF: CRR 31916 x0021334
2110 // The functionality in rAT_PlusCOPS has been moved to new function 'nm_Plus_Percent_COPS()' 2110 // The functionality in rAT_PlusCOPS has been moved to new function 'nm_Plus_Percent_COPS()'
2111 which is common for rAT_PercentCOPS as well. 2111 which is common for rAT_PercentCOPS as well.
2112 2112
2113 //SPR#0777 - DS - Added check to make sure last_ind is valid. If invalid set to 0. 2113 //SPR#0777 - DS - Added check to make sure last_ind is valid. If invalid set to 0.
2114 // - Changed check to make last_ind equal to MAX_OPER-1 if last_ind is greater than MAX_OPER. 2114 // - Changed check to make last_ind equal to MAX_OPER-1 if last_ind is greater than MAX_OPER.
2115 // - Changed <= to < in nm_copy_plmn_list for loop. 2115 // - Changed <= to < in nm_copy_plmn_list for loop.
2116 2116
2117 */ 2117 */
2132 2132
2133 PURPOSE : Notify about available PLMN list. Call is made to nm_Plus_Percent_COPS(). 2133 PURPOSE : Notify about available PLMN list. Call is made to nm_Plus_Percent_COPS().
2134 2134
2135 // July 14, 2005 REF: CRR 31916 x0021334 2135 // July 14, 2005 REF: CRR 31916 x0021334
2136 // New function 'rAT_PercentCOPS()' implemented. 2136 // New function 'rAT_PercentCOPS()' implemented.
2137 2137
2138 */ 2138 */
2139 2139
2140 void rAT_PercentCOPS (S16 last_ind, T_ACI_COPS_OPDESC *operLst) 2140 void rAT_PercentCOPS (S16 last_ind, T_ACI_COPS_OPDESC *operLst)
2141 { 2141 {
2142 TRACE_FUNCTION ("rAT_PercentCOPS()"); 2142 TRACE_FUNCTION ("rAT_PercentCOPS()");
2163 { 2163 {
2164 int i; 2164 int i;
2165 //Mar 01, 2005 REF: ENH 29327 xdeepadh 2165 //Mar 01, 2005 REF: ENH 29327 xdeepadh
2166 //Dynamically allocate the plmn_list 2166 //Dynamically allocate the plmn_list
2167 T_MFW_PLMN_LIST *plmn_list; 2167 T_MFW_PLMN_LIST *plmn_list;
2168 /* Aug 09, 2007 REF: OMAPS00140507 x0045876 2168 /* Aug 09, 2007 REF: OMAPS00140507 x0045876
2169 Added patch given by Dong Feng */ 2169 Added patch given by Dong Feng */
2170 char longName[MAX_ALPHA_OPER_LEN] = { '\0' }; 2170 char longName[MAX_ALPHA_OPER_LEN] = { '\0' };
2171 char shrtName[MAX_ALPHA_OPER_LEN] = { '\0' }; 2171 char shrtName[MAX_ALPHA_OPER_LEN] = { '\0' };
2172 plmn_list=(T_MFW_PLMN_LIST*)mfwAlloc(sizeof(T_MFW_PLMN_LIST)); 2172 plmn_list=(T_MFW_PLMN_LIST*)mfwAlloc(sizeof(T_MFW_PLMN_LIST));
2173 if(plmn_list==NULL) 2173 if(plmn_list==NULL)
2174 { 2174 {
2192 return; 2192 return;
2193 } 2193 }
2194 /***************************Go-lite Optimization changes Start***********************/ 2194 /***************************Go-lite Optimization changes Start***********************/
2195 // Aug 16, 2004 REF: CRR 24323 Deepa M.D 2195 // Aug 16, 2004 REF: CRR 24323 Deepa M.D
2196 TRACE_EVENT_P1("rAT_PlusCOPS: last_ind: %d",last_ind); 2196 TRACE_EVENT_P1("rAT_PlusCOPS: last_ind: %d",last_ind);
2197 /***************************Go-lite Optimization changes END***********************/ 2197 /***************************Go-lite Optimization changes END***********************/
2198 if (last_ind > 128) //Invalid index passed in. 2198 if (last_ind > 128) //Invalid index passed in.
2199 { 2199 {
2200 last_ind = -1; 2200 last_ind = -1;
2201 } 2201 }
2202 else 2202 else
2204 if (last_ind >= MAX_OPER) //Index is larger than max number of operators. 2204 if (last_ind >= MAX_OPER) //Index is larger than max number of operators.
2205 { 2205 {
2206 last_ind = MAX_OPER-1; 2206 last_ind = MAX_OPER-1;
2207 } 2207 }
2208 } 2208 }
2209 2209
2210 2210
2211 //DS 27/5/2002 - changed <= to < 2211 //DS 27/5/2002 - changed <= to <
2212 for (i = 0; i <= last_ind; i++) /* operLst == oper_list !! */ 2212 for (i = 0; i <= last_ind; i++) /* operLst == oper_list !! */
2213 { 2213 {
2214 nm_copy_plmn_list(&plmn_list->plmn[i], &operLst[i]); 2214 nm_copy_plmn_list(&plmn_list->plmn[i], &operLst[i]);
2215 } 2215 }
2216 2216
2217 2217
2218 /* BEGIN: Aug 09, 2007 REF: OMAPS00140507 x0045876 2218 /* BEGIN: Aug 09, 2007 REF: OMAPS00140507 x0045876
2219 Added patch given by Dong Feng */ 2219 Added patch given by Dong Feng */
2220 for(i=0; i < MAX_OPER; i++) 2220 for(i=0; i < MAX_OPER; i++)
2221 { 2221 {
2222 if (operLst[i].status < 0) 2222 if (operLst[i].status < 0)
2223 { 2223 {
2224 break; 2224 break;
2235 operLst[i].long_ext_dcs, 2235 operLst[i].long_ext_dcs,
2236 (UBYTE *)longName); 2236 (UBYTE *)longName);
2237 #ifdef NO_ASCIIZ 2237 #ifdef NO_ASCIIZ
2238 plmn_list->plmn[i].network_long.len = 0; 2238 plmn_list->plmn[i].network_long.len = 0;
2239 plmn_list->plmn[i].network_short.len = 0; 2239 plmn_list->plmn[i].network_short.len = 0;
2240 2240
2241 if (operLst->longOper) 2241 if (operLst->longOper)
2242 { 2242 {
2243 plmn_list->plmn[i].network_long.len = MINIMUM(LONG_NAME-1, strlen((char *)longName)); 2243 plmn_list->plmn[i].network_long.len = MINIMUM(LONG_NAME-1, strlen((char *)longName));
2244 memcpy (plmn_list->plmn[i].network_long.data, longName, plmn_list->plmn[i].network_long.len); 2244 memcpy (plmn_list->plmn[i].network_long.data, longName, plmn_list->plmn[i].network_long.len);
2245 plmn_list->plmn[i].network_long.data[plmn_list->plmn[i].network_long.len] = '\0'; 2245 plmn_list->plmn[i].network_long.data[plmn_list->plmn[i].network_long.len] = '\0';
2246 plmn_list->plmn[i].network_long.dcs = MFW_ASCII; 2246 plmn_list->plmn[i].network_long.dcs = MFW_ASCII;
2247 } 2247 }
2248 #else 2248 #else
2249 memset(plmn_list->plmn[i].network_long, 0, LONG_NAME); 2249 memset(plmn_list->plmn[i].network_long, 0, LONG_NAME);
2250 2250
2251 if (operLst->longOper) 2251 if (operLst->longOper)
2252 strncpy((char *)plmn_list->plmn[i].network_long, (char *)longName, LONG_NAME-1); 2252 strncpy((char *)plmn_list->plmn[i].network_long, (char *)longName, LONG_NAME-1);
2253 #endif 2253 #endif
2254 break; 2254 break;
2255 case 0x01: /* UCS2 */ 2255 case 0x01: /* UCS2 */
2267 case 0x00: /* GSM default alphabet */ 2267 case 0x00: /* GSM default alphabet */
2268 utl_cvtPnn7To8((UBYTE *)operLst[i].shortOper, 2268 utl_cvtPnn7To8((UBYTE *)operLst[i].shortOper,
2269 operLst[i].shrt_len, 2269 operLst[i].shrt_len,
2270 operLst[i].shrt_ext_dcs, 2270 operLst[i].shrt_ext_dcs,
2271 (UBYTE *)shrtName); 2271 (UBYTE *)shrtName);
2272 2272
2273 #ifdef NO_ASCIIZ 2273 #ifdef NO_ASCIIZ
2274 plmn_list->plmn[i].network_short.len = 0; 2274 plmn_list->plmn[i].network_short.len = 0;
2275 2275
2276 if (operLst->shortOper) 2276 if (operLst->shortOper)
2277 { 2277 {
2278 plmn_list->plmn[i].network_short.len = MINIMUM(SHORT_NAME-1, strlen((char *)shrtName)); 2278 plmn_list->plmn[i].network_short.len = MINIMUM(SHORT_NAME-1, strlen((char *)shrtName));
2279 memcpy (plmn_list->plmn[i].network_short.data, shrtName, plmn_list->plmn[i].network_short.len); 2279 memcpy (plmn_list->plmn[i].network_short.data, shrtName, plmn_list->plmn[i].network_short.len);
2280 plmn_list->plmn[i].network_short.data[plmn_list->plmn[i].network_short.len] = '\0'; 2280 plmn_list->plmn[i].network_short.data[plmn_list->plmn[i].network_short.len] = '\0';
2281 plmn_list->plmn[i].network_short.dcs = MFW_ASCII; 2281 plmn_list->plmn[i].network_short.dcs = MFW_ASCII;
2282 } 2282 }
2283 #else 2283 #else
2284 memset(plmn_list->plmn[i].network_short, 0, SHORT_NAME); 2284 memset(plmn_list->plmn[i].network_short, 0, SHORT_NAME);
2285 2285
2286 if (operLst->shortOper) 2286 if (operLst->shortOper)
2287 strncpy((char *)plmn_list->plmn[i].network_short, (char *)shrtName, SHORT_NAME-1); 2287 strncpy((char *)plmn_list->plmn[i].network_short, (char *)shrtName, SHORT_NAME-1);
2288 #endif 2288 #endif
2289 break; 2289 break;
2290 case 0x01: /* UCS2 */ 2290 case 0x01: /* UCS2 */
2295 break; 2295 break;
2296 } 2296 }
2297 } 2297 }
2298 } 2298 }
2299 } 2299 }
2300 /* END: Aug 09, 2007 REF: OMAPS00140507 x0045876 2300 /* END: Aug 09, 2007 REF: OMAPS00140507 x0045876
2301 Added patch given by Dong Feng */ 2301 Added patch given by Dong Feng */
2302 /***************************Go-lite Optimization changes Start***********************/ 2302 /***************************Go-lite Optimization changes Start***********************/
2303 // Aug 16, 2004 REF: CRR 24323 Deepa M.D 2303 // Aug 16, 2004 REF: CRR 24323 Deepa M.D
2304 TRACE_EVENT_P1("rAT_PlusCOPS: Loop i val is %d",i); 2304 TRACE_EVENT_P1("rAT_PlusCOPS: Loop i val is %d",i);
2305 /***************************Go-lite Optimization changes END***********************/ 2305 /***************************Go-lite Optimization changes END***********************/
2306 plmn_list->count = i; 2306 plmn_list->count = i;
2307 2307
2308 nm_signal(E_NM_PLMN_LIST,plmn_list); 2308 nm_signal(E_NM_PLMN_LIST,plmn_list);
2309 //Mar 01, 2005 REF: ENH 29327 xdeepadh 2309 //Mar 01, 2005 REF: ENH 29327 xdeepadh
2310 //Deallocate the plmn_list 2310 //Deallocate the plmn_list
2311 if(plmn_list !=NULL) 2311 if(plmn_list !=NULL)
2312 { 2312 {
2410 plmn_ident.display_condition = display_condition & 0x01; 2410 plmn_ident.display_condition = display_condition & 0x01;
2411 if (stat == CREG_STAT_Reg) 2411 if (stat == CREG_STAT_Reg)
2412 plmn_ident.roaming_indicator = 0; 2412 plmn_ident.roaming_indicator = 0;
2413 if (stat == CREG_STAT_Roam) 2413 if (stat == CREG_STAT_Roam)
2414 plmn_ident.roaming_indicator = 1; 2414 plmn_ident.roaming_indicator = 1;
2415 2415
2416 //x0pleela 08 Feb, 2006 ER: OMAPS00065203 2416 //x0pleela 08 Feb, 2006 ER: OMAPS00065203
2417 nm_get_COPN( &plmn_ident ); 2417 nm_get_COPN( &plmn_ident );
2418 2418
2419 nm_signal(E_NM_FULL_SERVICE,&plmn_ident); 2419 nm_signal(E_NM_FULL_SERVICE,&plmn_ident);
2420 2420
2421 /* Cell ReSelection Code */ 2421 /* Cell ReSelection Code */
2422 cell.ci = cid; 2422 cell.ci = cid;
2423 cell.lid = lac; 2423 cell.lid = lac;
2424 nm_signal(E_NM_CELL_SELECT,&cell); 2424 nm_signal(E_NM_CELL_SELECT,&cell);
2425 break; 2425 break;
2426 2426
2427 case CREG_STAT_NoSearch: 2427 case CREG_STAT_NoSearch:
2428 case CREG_STAT_NotPresent: 2428 case CREG_STAT_NotPresent:
2429 if (!reg_flag) 2429 if (!reg_flag)
2430 nm_search_reg_status(); 2430 nm_search_reg_status();
2431 break; 2431 break;
2560 tim_ind.timezone = mmr_info_ind->local_time_zone.time_zone; 2560 tim_ind.timezone = mmr_info_ind->local_time_zone.time_zone;
2561 } 2561 }
2562 2562
2563 #else 2563 #else
2564 /* END ADD: Sumit */ 2564 /* END ADD: Sumit */
2565 2565
2566 //Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha) 2566 //Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha)
2567 #if(0) 2567 #if(0)
2568 /* copy country code and network code */ 2568 /* copy country code and network code */
2569 memset (net_ind.mcc, 0, PS_SIZE_MCC); 2569 memset (net_ind.mcc, 0, PS_SIZE_MCC);
2570 memset (net_ind.mnc, 0, PS_SIZE_MNC_MAX); 2570 memset (net_ind.mnc, 0, PS_SIZE_MNC_MAX);
2637 void nm_nitz_info_ind(T_MMR_INFO_IND * mmr_info_ind) 2637 void nm_nitz_info_ind(T_MMR_INFO_IND * mmr_info_ind)
2638 { 2638 {
2639 UBYTE flag; 2639 UBYTE flag;
2640 2640
2641 TRACE_FUNCTION("nm_nitz_info_ind() "); 2641 TRACE_FUNCTION("nm_nitz_info_ind() ");
2642 //Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha) 2642 //Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha)
2643 #if(0) 2643 #if(0)
2644 flag = 0; 2644 flag = 0;
2645 /* copy country code and network code */ 2645 /* copy country code and network code */
2646 memset (net_ind.mcc, 0, SIZE_MCC); 2646 memset (net_ind.mcc, 0, SIZE_MCC);
2647 memset (net_ind.mnc, 0, SIZE_MNC); 2647 memset (net_ind.mnc, 0, SIZE_MNC);
2814 int nm_decodeSourceId( UBYTE sourceId) 2814 int nm_decodeSourceId( UBYTE sourceId)
2815 { 2815 {
2816 TRACE_FUNCTION("nm_decodeSourceId()"); 2816 TRACE_FUNCTION("nm_decodeSourceId()");
2817 #ifndef NEPTUNE_BOARD 2817 #ifndef NEPTUNE_BOARD
2818 switch (sourceId) 2818 switch (sourceId)
2819 { 2819 {
2820 case Read_ROM_TABLE: return NM_ROM; 2820 case Read_ROM_TABLE: return NM_ROM;
2821 case Read_EONS: return NM_EONS; 2821 case Read_EONS: return NM_EONS;
2822 case Read_CPHS: return NM_CPHS; 2822 case Read_CPHS: return NM_CPHS;
2823 case Read_INVALID: 2823 case Read_INVALID:
2824 default: return NM_NONE; 2824 default: return NM_NONE;
2825 } 2825 }
2826 #endif 2826 #endif
2827 /* to remove warning Aug -11 */ 2827 /* to remove warning Aug -11 */
2828 #ifdef NEPTUNE_BOARD 2828 #ifdef NEPTUNE_BOARD
2837 +--------------------------------------------------------------------+ 2837 +--------------------------------------------------------------------+
2838 2838
2839 PURPOSE : This function is used to update plmn data after querying COPN 2839 PURPOSE : This function is used to update plmn data after querying COPN
2840 */ 2840 */
2841 //x0pleela 09 Feb, 2006 ER: OMAPS00065203 2841 //x0pleela 09 Feb, 2006 ER: OMAPS00065203
2842 void nm_update_plmn_data( T_MFW_NETWORK_STRUCT *plmn_ident, 2842 void nm_update_plmn_data( T_MFW_NETWORK_STRUCT *plmn_ident,
2843 T_ACI_OPER_NTRY oper_ntry) 2843 T_ACI_OPER_NTRY oper_ntry)
2844 { 2844 {
2845 TRACE_FUNCTION("nm_update_plmn_data()"); 2845 TRACE_FUNCTION("nm_update_plmn_data()");
2846 2846
2847 #ifndef NEPTUNE_BOARD 2847 #ifndef NEPTUNE_BOARD
2848 plmn_ident->opn_read_from = (T_MFW_NM_OPN)nm_decodeSourceId(oper_ntry.source); /*a0393213 compiler warnings removal - explicit typecast done*/ 2848 plmn_ident->opn_read_from = (T_MFW_NM_OPN)nm_decodeSourceId(oper_ntry.source); /*a0393213 compiler warnings removal - explicit typecast done*/
2849 #endif 2849 #endif
2850 2850
2851 2851
2852 //update plmn_ident with EONS 2852 //update plmn_ident with EONS
2853 #ifdef NO_ASCIIZ 2853 #ifdef NO_ASCIIZ
2854 memset(plmn_ident->network_long.data, 0, LONG_NAME); 2854 memset(plmn_ident->network_long.data, 0, LONG_NAME);
2855 memset(plmn_ident->network_short.data, 0, SHORT_NAME); 2855 memset(plmn_ident->network_short.data, 0, SHORT_NAME);
2856 memcpy( plmn_ident->network_long.data, 2856 memcpy( plmn_ident->network_long.data,
2857 oper_ntry.longName, 2857 oper_ntry.longName,
2858 strlen(oper_ntry.longName) ); 2858 strlen(oper_ntry.longName) );
2859 2859
2860 memcpy( plmn_ident->network_short.data, 2860 memcpy( plmn_ident->network_short.data,
2861 oper_ntry.shrtName, 2861 oper_ntry.shrtName,
2862 strlen(oper_ntry.shrtName)); 2862 strlen(oper_ntry.shrtName));
2863 2863
2864 plmn_ident->network_long.len = strlen((const char*)(plmn_ident->network_long.data)); /*a0393213 warnings removal - explicit typecasting done*/ 2864 plmn_ident->network_long.len = strlen((const char*)(plmn_ident->network_long.data)); /*a0393213 warnings removal - explicit typecasting done*/
2865 plmn_ident->network_short.len = strlen((const char*)(plmn_ident->network_short.data)); 2865 plmn_ident->network_short.len = strlen((const char*)(plmn_ident->network_short.data));
2866 2866
2867 #else 2867 #else
2868 memset(plmn_ident->network_long, 0, LONG_NAME); 2868 memset(plmn_ident->network_long, 0, LONG_NAME);
2869 memset(plmn_ident->network_short, 0, SHORT_NAME); 2869 memset(plmn_ident->network_short, 0, SHORT_NAME);
2870 strcpy( plmn_ident->network_long, 2870 strcpy( plmn_ident->network_long,
2871 oper_ntry.longName); 2871 oper_ntry.longName);
2872 strcpy( plmn_ident->network_short, 2872 strcpy( plmn_ident->network_short,
2873 oper_ntry.shrtName); 2873 oper_ntry.shrtName);
2874 #endif 2874 #endif
2875 } 2875 }
2876 2876
2877 /* 2877 /*
2878 +--------------------------------------------------------------------+ 2878 +--------------------------------------------------------------------+
2879 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM | 2879 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM |
2880 | STATE : code ROUTINE : nm_get_COPN | 2880 | STATE : code ROUTINE : nm_get_COPN |
2881 +--------------------------------------------------------------------+ 2881 +--------------------------------------------------------------------+
2882 2882
2883 PURPOSE : This function is used to query for COPS and COPN which will indicate from 2883 PURPOSE : This function is used to query for COPS and COPN which will indicate from
2884 where the operator name was read 2884 where the operator name was read
2885 */ 2885 */
2886 //x0pleela 09 Feb, 2006 ER: OMAPS00065203 2886 //x0pleela 09 Feb, 2006 ER: OMAPS00065203
2887 void nm_get_COPN( T_MFW_NETWORK_STRUCT *plmn_ident ) 2887 void nm_get_COPN( T_MFW_NETWORK_STRUCT *plmn_ident )
2888 { 2888 {
2897 //Check where MS is registered 2897 //Check where MS is registered
2898 if( qAT_PlusCOPS ( CMD_SRC_LCL, &mode, 2898 if( qAT_PlusCOPS ( CMD_SRC_LCL, &mode,
2899 &format, (char *)opername ) EQ AT_CMPL ) 2899 &format, (char *)opername ) EQ AT_CMPL )
2900 { 2900 {
2901 //Request info about operator name 2901 //Request info about operator name
2902 if(qAT_PercentCOPN(CMD_SRC_LCL, 2902 if(qAT_PercentCOPN(CMD_SRC_LCL,
2903 format, 2903 format,
2904 (char *)opername, 2904 (char *)opername,
2905 &oper_ntry) EQ AT_CMPL ) 2905 &oper_ntry) EQ AT_CMPL )
2906 { 2906 {
2907 nm_update_plmn_data(plmn_ident, oper_ntry); 2907 nm_update_plmn_data(plmn_ident, oper_ntry);
2908 } 2908 }
2909 } 2909 }
2910 } 2910 }
2911 2911
2912 /* 2912 /*
2913 +--------------------------------------------------------------------+ 2913 +--------------------------------------------------------------------+
2914 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM | 2914 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM |
2915 | STATE : code ROUTINE : nm_get_opername | 2915 | STATE : code ROUTINE : nm_get_opername |
2916 +--------------------------------------------------------------------+ 2916 +--------------------------------------------------------------------+
2917 2917
2918 PURPOSE : This function updates operator name based on cingular's prioritization requirement. 2918 PURPOSE : This function updates operator name based on cingular's prioritization requirement.
2919 Priority would be in order ONS->NITZ->ROM 2919 Priority would be in order ONS->NITZ->ROM
2920 2920
2921 */ 2921 */
2922 //x0pleela 09 Feb, 2006 ER: OMAPS00065203 2922 //x0pleela 09 Feb, 2006 ER: OMAPS00065203
2923 void nm_get_opername(T_MFW_NETWORK_STRUCT * plmn_ident) 2923 void nm_get_opername(T_MFW_NETWORK_STRUCT * plmn_ident)
2924 { 2924 {
2925 TRACE_FUNCTION("nm_get_opername()"); 2925 TRACE_FUNCTION("nm_get_opername()");
2926 sAT_PercentCNIV(CMD_SRC_LCL, CNIV_MODE_ON); 2926 sAT_PercentCNIV(CMD_SRC_LCL, CNIV_MODE_ON);
2927 2927
2928 return; 2928 return;
2929 } 2929 }
2930 2930
2931 2931
2932 // June 02, 2006 DR: OMAPS00078005 x0021334 2932 // June 02, 2006 DR: OMAPS00078005 x0021334
2955 +--------------------------------------------------------------------+ 2955 +--------------------------------------------------------------------+
2956 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM | 2956 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM |
2957 | STATE : code ROUTINE : nm_get_opername | 2957 | STATE : code ROUTINE : nm_get_opername |
2958 +--------------------------------------------------------------------+ 2958 +--------------------------------------------------------------------+
2959 2959
2960 PURPOSE : This function gets operator name from network. 2960 PURPOSE : This function gets operator name from network.
2961 */ 2961 */
2962 //x0pleela 09 Feb, 2006 ER: OMAPS00065203 2962 //x0pleela 09 Feb, 2006 ER: OMAPS00065203
2963 2963
2964 void nm_get_network_data(T_MFW_NETWORK_STRUCT *plmn_netw_data) 2964 void nm_get_network_data(T_MFW_NETWORK_STRUCT *plmn_netw_data)
2965 { 2965 {
2966 TRACE_FUNCTION("nm_get_network_data()"); 2966 TRACE_FUNCTION("nm_get_network_data()");
2967 2967
2968 //send E_NM_OPN event 2968 //send E_NM_OPN event
2969 nm_signal(E_NM_OPN, plmn_netw_data); 2969 nm_signal(E_NM_OPN, plmn_netw_data);
2970 } 2970 }
2971 2971
2972 2972
2973 // June 02, 2006 DR: OMAPS00078005 x0021334 2973 // June 02, 2006 DR: OMAPS00078005 x0021334
2974 /* 2974 /*
2975 +--------------------------------------------------------------------+ 2975 +--------------------------------------------------------------------+
2976 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM | 2976 | PROJECT : MMI-Framework (8417) MODULE : MFW_NM |
2977 | STATE : code ROUTINE : nm_set_network_time | 2977 | STATE : code ROUTINE : nm_set_network_time |
2978 +--------------------------------------------------------------------+ 2978 +--------------------------------------------------------------------+
2979 2979
2980 PURPOSE : This function sets time and date info received from network. 2980 PURPOSE : This function sets time and date info received from network.
2981 */ 2981 */
2982 #ifdef FF_TIMEZONE 2982 #ifdef FF_TIMEZONE
2983 void nm_set_network_time(T_MFW_TIME_IND *currclock) 2983 void nm_set_network_time(T_MFW_TIME_IND *currclock)
2984 { 2984 {
2985 TRACE_FUNCTION("nm_set_network_time()"); 2985 TRACE_FUNCTION("nm_set_network_time()");
2986 2986
2987 //send E_MFW_TIME_IND event 2987 //send E_MFW_TIME_IND event
2988 nm_signal(E_MFW_TIME_IND, currclock); 2988 nm_signal(E_MFW_TIME_IND, currclock);
2989 } 2989 }
2990 #endif 2990 #endif
2991 2991
2992 /* Aug 07, 2007 DR:OMAPS00137726 x0066814(Geetha)*/ 2992 /* Aug 07, 2007 DR:OMAPS00137726 x0066814(Geetha)*/
2993 /* 2993 /*
3000 */ 3000 */
3001 void nm_get_plmn_list_during_bootup(void) 3001 void nm_get_plmn_list_during_bootup(void)
3002 { 3002 {
3003 TRACE_FUNCTION ("nm_get_plmn_list_during_bootup()"); 3003 TRACE_FUNCTION ("nm_get_plmn_list_during_bootup()");
3004 nm_signal(E_NM_PLMN_LIST_BOOTUP,0); 3004 nm_signal(E_NM_PLMN_LIST_BOOTUP,0);
3005 3005
3006 } 3006 }