FreeCalypso > hg > fc-tourmaline
comparison src/ui/mfw/mfw_sms.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 |
---|---|
21 Solution : Earlier, index alone was sufficient to identify messages. Now memory should also be taken care of. | 21 Solution : Earlier, index alone was sufficient to identify messages. Now memory should also be taken care of. |
22 | 22 |
23 July 27, 2006 DR: OMAPS00085347 x0021334 | 23 July 27, 2006 DR: OMAPS00085347 x0021334 |
24 Description: The display freeze when reading a stored concatenated SMS (This concatenated | 24 Description: The display freeze when reading a stored concatenated SMS (This concatenated |
25 SMS consists of 3 SMS) from SIM. | 25 SMS consists of 3 SMS) from SIM. |
26 Solution: Added code to free the allocated memory after concatenated SMS has been read. | 26 Solution: Added code to free the allocated memory after concatenated SMS has been read. |
27 | 27 |
28 May 18, 2006 DR: OMAPS00070657 x0pleela | 28 May 18, 2006 DR: OMAPS00070657 x0pleela |
29 Description: CPHS feature on Locosto-Lite | 29 Description: CPHS feature on Locosto-Lite |
30 Solution: Enabling the voice mail indication if there are any voice mails | 30 Solution: Enabling the voice mail indication if there are any voice mails |
31 | 31 |
32 Feb 07, 2006 DR: OMAPS00059261 x0pleela | 32 Feb 07, 2006 DR: OMAPS00059261 x0pleela |
33 Description: SMS is not forwarding STATUS reports that are read from SIM storage to ACI | 33 Description: SMS is not forwarding STATUS reports that are read from SIM storage to ACI |
34 Solution: sms_decode_status(): removed the code added for handling pending status of a status report | 34 Solution: sms_decode_status(): removed the code added for handling pending status of a status report |
35 rat_plusCMGR(): updating sms_str based on tp_status of a status report | 35 rat_plusCMGR(): updating sms_str based on tp_status of a status report |
36 Removed macros STAT_MIN_VALUE and STAT_MAX_VALUE added earlier | 36 Removed macros STAT_MIN_VALUE and STAT_MAX_VALUE added earlier |
37 Replaced MT_STATUS_RPT with MFW_SMS_STATRPT as MT_STATUS_RPT is removed | 37 Replaced MT_STATUS_RPT with MFW_SMS_STATRPT as MT_STATUS_RPT is removed |
38 | 38 |
39 Feb 01, 2006 DR: OMAPS00059261 x0pleela | 39 Feb 01, 2006 DR: OMAPS00059261 x0pleela |
40 Description: SMS is not forwarding STATUS reports that are read from SIM storage to ACI | 40 Description: SMS is not forwarding STATUS reports that are read from SIM storage to ACI |
41 Solution: Added two macros to check the range of status of status report | 41 Solution: Added two macros to check the range of status of status report |
42 Used enums for the hardcoded values for MFW_MSG_DELIVER(MT), MFW_MSG_SUBMIT (MO) and MFW_MSG_STATUS_REPORT (STATUS REPORT) types while reading the messages | 42 Used enums for the hardcoded values for MFW_MSG_DELIVER(MT), MFW_MSG_SUBMIT (MO) and MFW_MSG_STATUS_REPORT (STATUS REPORT) types while reading the messages |
43 Added a check in "sms_decodeStatus" to support pending status of the status report | 43 Added a check in "sms_decodeStatus" to support pending status of the status report |
44 Made changes as per review comments | 44 Made changes as per review comments |
45 | 45 |
46 Jan 30, 2006 DR: OMAPS00059261 x0pleela | 46 Jan 30, 2006 DR: OMAPS00059261 x0pleela |
47 Description: SMS is not forwarding STATUS reports that are read from SIM storage to ACI | 47 Description: SMS is not forwarding STATUS reports that are read from SIM storage to ACI |
48 Solution: Added code to read MT Status report | 48 Solution: Added code to read MT Status report |
49 | 49 |
50 | 50 |
51 Jan 20, 2006 REF: DRT OMAPS00053377 xdeepadh | 51 Jan 20, 2006 REF: DRT OMAPS00053377 xdeepadh |
52 Description: SMS Validity Period - using MMI - Failure, MS not able to set SMS validity | 52 Description: SMS Validity Period - using MMI - Failure, MS not able to set SMS validity |
53 Solution: While setting the validity period, the validity period format also has been set in the | 53 Solution: While setting the validity period, the validity period format also has been set in the |
54 frst octet. | 54 frst octet. |
55 | 55 |
56 Nov 15,2005 DR : OMAPS00057280 - x0034700 | 56 Nov 15,2005 DR : OMAPS00057280 - x0034700 |
57 Description: Compilation Errors in Neptune build while integrating latest MMI Changes | 57 Description: Compilation Errors in Neptune build while integrating latest MMI Changes |
58 Solution: Included the compilation FLAG "NEPTUNE_BOARD" for un wanted code for Neptune build | 58 Solution: Included the compilation FLAG "NEPTUNE_BOARD" for un wanted code for Neptune build |
59 | 59 |
60 Feb 22, 2006 REF: MMI-FIX-OMAPS00058684 x0035544(Sudha) | 60 Feb 22, 2006 REF: MMI-FIX-OMAPS00058684 x0035544(Sudha) |
61 Description: Can't send a SMS with a specific SIM card | 61 Description: Can't send a SMS with a specific SIM card |
62 Solution: Check the PID(Protocol ID) value for an MO SMS and Set the PID(Protocol ID) accordingly. | 62 Solution: Check the PID(Protocol ID) value for an MO SMS and Set the PID(Protocol ID) accordingly. |
63 | 63 |
64 Dec 15, 2005 REF: MMI-FIX-OMAPS00058684 x0035544 | 64 Dec 15, 2005 REF: MMI-FIX-OMAPS00058684 x0035544 |
65 Description: OMAPS00045726 / MMI-FIX-30439 Follow-Up : ifdef for FF Home Zone forgotten. | 65 Description: OMAPS00045726 / MMI-FIX-30439 Follow-Up : ifdef for FF Home Zone forgotten. |
66 Solution: Added Feature flag FF_HOMEZONE for the function sms_homezoneCBToggle(U8 Activate_CB) | 66 Solution: Added Feature flag FF_HOMEZONE for the function sms_homezoneCBToggle(U8 Activate_CB) |
67 | 67 |
68 Nov 8, 2005 REF: OMAPS00050772, a0876501 (Shashi) | 68 Nov 8, 2005 REF: OMAPS00050772, a0876501 (Shashi) |
69 Issue description: CMGD merge from tcs4.0 to g23m. | 69 Issue description: CMGD merge from tcs4.0 to g23m. |
70 Solution: New parameter is added to sAT_PlusCMGD function. Migrating the MFW changes. | 70 Solution: New parameter is added to sAT_PlusCMGD function. Migrating the MFW changes. |
71 | 71 |
72 | 72 |
73 Oct 18, 2005 REF: SPR 34678 xdeepadh | 73 Oct 18, 2005 REF: SPR 34678 xdeepadh |
74 Description: MMI Screen – shows garbled characters for Cell Information | 74 Description: MMI Screen – shows garbled characters for Cell Information |
75 Solution: The CB messages with DCS 242(class-2,default alphabet) are discarded. | 75 Solution: The CB messages with DCS 242(class-2,default alphabet) are discarded. |
76 | 76 |
77 May 27, 2005 MMI-FIX-29869 x0018858 | 77 May 27, 2005 MMI-FIX-29869 x0018858 |
78 Description: There is a limitation on the number of messages that can be downloaded from | 78 Description: There is a limitation on the number of messages that can be downloaded from |
79 server even though there is space on the sim. | 79 server even though there is space on the sim. |
80 Solution: The limitation has been removed and the number of messages that can be dowloaded | 80 Solution: The limitation has been removed and the number of messages that can be dowloaded |
81 has been modified to the masimum number that can be stored. | 81 has been modified to the masimum number that can be stored. |
82 | 82 |
83 Jun 14, 2005 REF: MMI-FIX-30439 x0018858 | 83 Jun 14, 2005 REF: MMI-FIX-30439 x0018858 |
84 Description: The homezone/cityzone tags were not being displayed properly. | 84 Description: The homezone/cityzone tags were not being displayed properly. |
85 Solution: Modified to save the tags properly in caches and also made the | 85 Solution: Modified to save the tags properly in caches and also made the |
86 appropriate modifications to update the same properly during mobility. | 86 appropriate modifications to update the same properly during mobility. |
87 | 87 |
88 July 7, 2005 REF: CRR MMI-SPR-32179 x0018858 | 88 July 7, 2005 REF: CRR MMI-SPR-32179 x0018858 |
89 Issue description: PS crashed while performing call Forwarding. | 89 Issue description: PS crashed while performing call Forwarding. |
90 Solution: Since this is related to memory leaks which occur, the code has been added to | 90 Solution: Since this is related to memory leaks which occur, the code has been added to |
91 free certain memory based on a a checking condition and also by cleaning the buffer. | 91 free certain memory based on a a checking condition and also by cleaning the buffer. |
92 | 92 |
93 xrashmic 9 May, 2005 MMI-SPR-30159 | 93 xrashmic 9 May, 2005 MMI-SPR-30159 |
94 Concat PUSH msg are stored and sent to wap client once all parts are received | 94 Concat PUSH msg are stored and sent to wap client once all parts are received |
95 | 95 |
97 Issue Description :- If the inbox is full and a new message is receivd, no indication is received. | 97 Issue Description :- If the inbox is full and a new message is receivd, no indication is received. |
98 Fix: Added support for handling indication when message box is full and | 98 Fix: Added support for handling indication when message box is full and |
99 there is a pending message. | 99 there is a pending message. |
100 | 100 |
101 March 31, 2005 REF: CRR MMI-SPR-24511 x0012852 | 101 March 31, 2005 REF: CRR MMI-SPR-24511 x0012852 |
102 Bug:The phone crashes when the user selects the 'Delete All' option | 102 Bug:The phone crashes when the user selects the 'Delete All' option |
103 almost the same time as there's an incoming message. | 103 almost the same time as there's an incoming message. |
104 Fix:Check added for part message before deleting all messages. | 104 Fix:Check added for part message before deleting all messages. |
105 | 105 |
106 March 2, 2005 REF: CRR 11536 x0018858 | 106 March 2, 2005 REF: CRR 11536 x0018858 |
107 Description: Reply path not supported while sending a reply. | 107 Description: Reply path not supported while sending a reply. |
113 Fix:The static T_MFW_SMS_MO sms_mo variable, is made a local pointer variable. | 113 Fix:The static T_MFW_SMS_MO sms_mo variable, is made a local pointer variable. |
114 It is dynamically allocated and deallocated. | 114 It is dynamically allocated and deallocated. |
115 The Optimization changes done for golite build have been incorpaorated to color build. | 115 The Optimization changes done for golite build have been incorpaorated to color build. |
116 The MMI_LITE flag used for rAT_PlusCMGR has been removed. | 116 The MMI_LITE flag used for rAT_PlusCMGR has been removed. |
117 | 117 |
118 Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar | 118 Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar |
119 Issue description: BMI: using the tool nowSMS the voicemail indication via sms does not work | 119 Issue description: BMI: using the tool nowSMS the voicemail indication via sms does not work |
120 Solution: Instead of identifying voice using addr[0] and pid, we use dcs. Also, messages belonging | 120 Solution: Instead of identifying voice using addr[0] and pid, we use dcs. Also, messages belonging |
121 to group "1100" are deleted when voicemail icon is displayed. | 121 to group "1100" are deleted when voicemail icon is displayed. |
122 | 122 |
123 Dec 23, 2004 REF: CRR MMI-SPR-27741 xkundadu | 123 Dec 23, 2004 REF: CRR MMI-SPR-27741 xkundadu |
124 Issue description: BMI: crashing when using the function : sms_index_list() located in mfw | 124 Issue description: BMI: crashing when using the function : sms_index_list() located in mfw |
125 Solution: Changed the msg_list variable to array of T_MFW_SMS_IDX. | 125 Solution: Changed the msg_list variable to array of T_MFW_SMS_IDX. |
126 | 126 |
127 Aug 18, 2004 REF: CRR 24282 Deepa M.D | 127 Aug 18, 2004 REF: CRR 24282 Deepa M.D |
128 Bug:Go-lite Optimization Dynamic allocation of sms_mo | 128 Bug:Go-lite Optimization Dynamic allocation of sms_mo |
129 Fix:static T_MFW_SMS_MO sms_mo has been made a local variable. | 129 Fix:static T_MFW_SMS_MO sms_mo has been made a local variable. |
130 It is allocated/deallocated dynamically. | 130 It is allocated/deallocated dynamically. |
131 | 131 |
142 Fix:For E_SMS_MT_RECEIVED event,sms_id_wait is passed. | 142 Fix:For E_SMS_MT_RECEIVED event,sms_id_wait is passed. |
143 | 143 |
144 Jul 07, 2004 REF: CRR 15846 Deepa M.D | 144 Jul 07, 2004 REF: CRR 15846 Deepa M.D |
145 Bug : Concatenated SMT : SMS present but not displayed !!! | 145 Bug : Concatenated SMT : SMS present but not displayed !!! |
146 Fix : Check has been made before freeing the memory. | 146 Fix : Check has been made before freeing the memory. |
147 | 147 |
148 SPR 2260: Merged in bugfixes 1833, 1669, 872,1830, 1828, 2031, and 2007 | 148 SPR 2260: Merged in bugfixes 1833, 1669, 872,1830, 1828, 2031, and 2007 |
149 fom the 1.6.3 branch into this file. | 149 fom the 1.6.3 branch into this file. |
150 | 150 |
151 Apr 12, 2004 REF: CRR 13370 Deepa M.D | 151 Apr 12, 2004 REF: CRR 13370 Deepa M.D |
152 Bug : The Sender name was not displayed properly in the status report. | 152 Bug : The Sender name was not displayed properly in the status report. |
153 Fix : The sendername had garbage values when the corresponding number was not | 153 Fix : The sendername had garbage values when the corresponding number was not |
154 present in the Phonebook.So when the name was not present, only the number is displayed. | 154 present in the Phonebook.So when the name was not present, only the number is displayed. |
155 | 155 |
156 | 156 |
157 | 157 |
158 */ | 158 */ |
159 | 159 |
160 #define ENTITY_MFW | 160 #define ENTITY_MFW |
161 | 161 |
225 /********* current define *******************************************/ | 225 /********* current define *******************************************/ |
226 /*SPR 2260 added definitions*/ | 226 /*SPR 2260 added definitions*/ |
227 #define FIRST_READ_OF_MEMORY_USE 1 | 227 #define FIRST_READ_OF_MEMORY_USE 1 |
228 #define POST_DELETE_CHECK 2 | 228 #define POST_DELETE_CHECK 2 |
229 // Feb 22, 2006 DR:OMAPS00068268 x0035544 | 229 // Feb 22, 2006 DR:OMAPS00068268 x0035544 |
230 //Added the #defines for the bits 7, 6 and 5 | 230 //Added the #defines for the bits 7, 6 and 5 |
231 #define BIT_7 0x80 | 231 #define BIT_7 0x80 |
232 #define BIT_6 0x40 | 232 #define BIT_6 0x40 |
233 #define BIT_5 0x20 | 233 #define BIT_5 0x20 |
234 | 234 |
235 //May 27, 2005 MMI-FIX-29869 x0018858 - Added the #defines | 235 //May 27, 2005 MMI-FIX-29869 x0018858 - Added the #defines |
252 | 252 |
253 static T_MFW_MEM_INFO memory; | 253 static T_MFW_MEM_INFO memory; |
254 static T_MFW_MEM_INFO sim_memory; /*a0393213 OMAPS00109953 - To keep track of sms memory in SIM*/ | 254 static T_MFW_MEM_INFO sim_memory; /*a0393213 OMAPS00109953 - To keep track of sms memory in SIM*/ |
255 static T_MFW_MEM_INFO ffs_memory; /*a0393213 OMAPS00109953 - To keep track of sms memory in ME*/ | 255 static T_MFW_MEM_INFO ffs_memory; /*a0393213 OMAPS00109953 - To keep track of sms memory in ME*/ |
256 /*a0393213 OMAPS00109953 - state machine for index retrieval - first retrieve all SIM indexes then all ME indexes*/ | 256 /*a0393213 OMAPS00109953 - state machine for index retrieval - first retrieve all SIM indexes then all ME indexes*/ |
257 static T_MFW_SMS_INDEX_RETRIEVE_STATE index_retrieve_state; | 257 static T_MFW_SMS_INDEX_RETRIEVE_STATE index_retrieve_state; |
258 | 258 |
259 static SHORT status_change_index; | 259 static SHORT status_change_index; |
260 /*a0393213 - To store the memory(SIM/ME) where the message, whose status is to be changed, resides*/ | 260 /*a0393213 - To store the memory(SIM/ME) where the message, whose status is to be changed, resides*/ |
261 static T_MFW_SMS_MEM status_change_memory=MFW_MEM_NOTPRESENT; | 261 static T_MFW_SMS_MEM status_change_memory=MFW_MEM_NOTPRESENT; |
262 | 262 |
263 static SHORT deleting_index; | 263 static SHORT deleting_index; |
264 /*a0393213 OMAPS00109953 - To store the memory where the SMS, which is to be deleted, resides*/ | 264 /*a0393213 OMAPS00109953 - To store the memory where the SMS, which is to be deleted, resides*/ |
265 static T_MFW_SMS_MEM deleting_memory=MFW_MEM_NOTPRESENT; | 265 static T_MFW_SMS_MEM deleting_memory=MFW_MEM_NOTPRESENT; |
266 | 266 |
267 static UBYTE f_update; | 267 static UBYTE f_update; |
268 static UBYTE int_req; | 268 static UBYTE int_req; |
269 static UBYTE smsReady; | 269 static UBYTE smsReady; |
270 static UBYTE phbReady; | 270 static UBYTE phbReady; |
293 static BOOL cmgr_awaiting_ok = FALSE; // Marcus: Issue 2260: 03/10/2002 | 293 static BOOL cmgr_awaiting_ok = FALSE; // Marcus: Issue 2260: 03/10/2002 |
294 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 294 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
295 static UBYTE sms_wap_sent_flag = FALSE; /* SPR#2086 - SH - TRUE if SMS is sent */ | 295 static UBYTE sms_wap_sent_flag = FALSE; /* SPR#2086 - SH - TRUE if SMS is sent */ |
296 #endif | 296 #endif |
297 | 297 |
298 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar | 298 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar |
299 // Added this variable to identify voice mail message to be deleted | 299 // Added this variable to identify voice mail message to be deleted |
300 BOOL invalidVm = FALSE; | 300 BOOL invalidVm = FALSE; |
301 | 301 |
302 //x0pleela 30 Jan, 2006 DR: OMAPS00059261 | 302 //x0pleela 30 Jan, 2006 DR: OMAPS00059261 |
303 //SMS buffer storage size | 303 //SMS buffer storage size |
304 #define MAX_STAT_MSG_LEN 30 | 304 #define MAX_STAT_MSG_LEN 30 |
305 | 305 |
306 extern UBYTE reply_path_bit ; | 306 extern UBYTE reply_path_bit ; |
307 /*********************Prototypes****************************************/ | 307 /*********************Prototypes****************************************/ |
308 | 308 |
309 //Feb 22, 2006 DR:OMAPS00068268 x0035544 | 309 //Feb 22, 2006 DR:OMAPS00068268 x0035544 |
310 BOOL Sms_Check_PID(SHORT pid); | 310 BOOL Sms_Check_PID(SHORT pid); |
311 /*SPR2260 added prototype for new function*/ | 311 /*SPR2260 added prototype for new function*/ |
312 /*a0393213 OMAPS00109953 - memory added as new parameter*/ | 312 /*a0393213 OMAPS00109953 - memory added as new parameter*/ |
313 BOOL delete_sms_from_table (SHORT index, T_MFW_SMS_MEM memory); | 313 BOOL delete_sms_from_table (SHORT index, T_MFW_SMS_MEM memory); |
314 //Dec 14, 2005 REF: MMI-FIX-OMAPS00058684 x0035544 | 314 //Dec 14, 2005 REF: MMI-FIX-OMAPS00058684 x0035544 |
327 +--------------------------------------------------------------------+ | 327 +--------------------------------------------------------------------+ |
328 | PROJECT : MMI-Framework (8417) MODULE : MFW_SMS | | 328 | PROJECT : MMI-Framework (8417) MODULE : MFW_SMS | |
329 | STATE : code ROUTINE : Check_max_sms_allowed | | 329 | STATE : code ROUTINE : Check_max_sms_allowed | |
330 +--------------------------------------------------------------------+ | 330 +--------------------------------------------------------------------+ |
331 | 331 |
332 PURPOSE : Check for the max number of messages that can be stored and aloocate | 332 PURPOSE : Check for the max number of messages that can be stored and aloocate |
333 memory accordingly. | 333 memory accordingly. |
334 | 334 |
335 */ | 335 */ |
336 void Check_max_sms_allowed(void) | 336 void Check_max_sms_allowed(void) |
337 { | 337 { |
397 } | 397 } |
398 #endif | 398 #endif |
399 /* PATCH-6363 VO 30.01.01 */ | 399 /* PATCH-6363 VO 30.01.01 */ |
400 /*a0393213 OMAPS00109953 - SMS memory related variables updated*/ | 400 /*a0393213 OMAPS00109953 - SMS memory related variables updated*/ |
401 /*This member indicates the preferred memory - the memory, which is considered first for saving the incoming messages/drafts*/ | 401 /*This member indicates the preferred memory - the memory, which is considered first for saving the incoming messages/drafts*/ |
402 memory.mem=(UBYTE)MFW_MEM_NOTPRESENT; | 402 memory.mem=(UBYTE)MFW_MEM_NOTPRESENT; |
403 memory.used=0; | 403 memory.used=0; |
404 memory.total=0; | 404 memory.total=0; |
405 ffs_memory.mem = MFW_MEM_ME; | 405 ffs_memory.mem = MFW_MEM_ME; |
406 ffs_memory.used = 0; | 406 ffs_memory.used = 0; |
407 ffs_memory.total = 0; | 407 ffs_memory.total = 0; |
427 | 427 |
428 T_MFW sms_set_cind_values( T_ACI_MM_CIND_VAL_TYPE *cind_Settings) | 428 T_MFW sms_set_cind_values( T_ACI_MM_CIND_VAL_TYPE *cind_Settings) |
429 { | 429 { |
430 if(0 == cind_Settings) | 430 if(0 == cind_Settings) |
431 return MFW_SMS_FAIL; | 431 return MFW_SMS_FAIL; |
432 | 432 |
433 | 433 |
434 if(sAT_PlusCIND(CMD_SRC_LCL,CIND_SIGNAL_INDICATOR_LVL0,CIND_SMSFULL_INDICATOR_MEMFULL)NEQ AT_CMPL) | 434 if(sAT_PlusCIND(CMD_SRC_LCL,CIND_SIGNAL_INDICATOR_LVL0,CIND_SMSFULL_INDICATOR_MEMFULL)NEQ AT_CMPL) |
435 { | 435 { |
436 TRACE_EVENT(" The indication couldnt not be set"); | 436 TRACE_EVENT(" The indication couldnt not be set"); |
437 return MFW_SMS_FAIL; | 437 return MFW_SMS_FAIL; |
438 } | 438 } |
455 | 455 |
456 // ADDED BY RAVI - ACI CHANGES - 6-10-2005 | 456 // ADDED BY RAVI - ACI CHANGES - 6-10-2005 |
457 #if (BOARD==61) | 457 #if (BOARD==61) |
458 if(sAT_PlusCMER(CMD_SRC_LCL,CMER_MODE_2,(T_ACI_CMER_KEYP_TYPE)CMER_INDICATOR_2, | 458 if(sAT_PlusCMER(CMD_SRC_LCL,CMER_MODE_2,(T_ACI_CMER_KEYP_TYPE)CMER_INDICATOR_2, |
459 (T_ACI_CMER_IND_TYPE)CMER_BFR_1, (T_ACI_CMER_BFR_TYPE)0)NEQ AT_CMPL) /* typecast to remove warning Aug - 11 */ | 459 (T_ACI_CMER_IND_TYPE)CMER_BFR_1, (T_ACI_CMER_BFR_TYPE)0)NEQ AT_CMPL) /* typecast to remove warning Aug - 11 */ |
460 #else | 460 #else |
461 if(sAT_PlusCMER(CMD_SRC_LCL,CMER_MODE_2,CMER_INDICATOR_2,CMER_BFR_1)NEQ AT_CMPL) | 461 if(sAT_PlusCMER(CMD_SRC_LCL,CMER_MODE_2,CMER_INDICATOR_2,CMER_BFR_1)NEQ AT_CMPL) |
462 #endif | 462 #endif |
463 // END ADDITION RAVI - 6-10-2005 | 463 // END ADDITION RAVI - 6-10-2005 |
464 { | 464 { |
465 TRACE_EVENT(" The indication couldnt not be set"); | 465 TRACE_EVENT(" The indication couldnt not be set"); |
575 T_MFW_HND sms_create(T_MFW_HND hWin, T_MFW_EVENT event, T_MFW_CB cbfunc) | 575 T_MFW_HND sms_create(T_MFW_HND hWin, T_MFW_EVENT event, T_MFW_CB cbfunc) |
576 { | 576 { |
577 T_MFW_HDR *hdr; | 577 T_MFW_HDR *hdr; |
578 T_MFW_SMS *sms_para; | 578 T_MFW_SMS *sms_para; |
579 MfwHdr *insert_status =0; | 579 MfwHdr *insert_status =0; |
580 | 580 |
581 TRACE_FUNCTION ("sms_create()"); | 581 TRACE_FUNCTION ("sms_create()"); |
582 | 582 |
583 hdr = (T_MFW_HDR *) mfwAlloc(sizeof(T_MFW_HDR)); | 583 hdr = (T_MFW_HDR *) mfwAlloc(sizeof(T_MFW_HDR)); |
584 sms_para = (T_MFW_SMS *) mfwAlloc(sizeof(T_MFW_SMS)); | 584 sms_para = (T_MFW_SMS *) mfwAlloc(sizeof(T_MFW_SMS)); |
585 | 585 |
586 if (!hdr OR !sms_para) | 586 if (!hdr OR !sms_para) |
587 { | 587 { |
588 TRACE_ERROR("ERROR: sms_create() Mem Alloc Failed."); | 588 TRACE_ERROR("ERROR: sms_create() Mem Alloc Failed."); |
589 | 589 |
590 if(hdr) | 590 if(hdr) |
591 mfwFree((U8*)hdr,sizeof(MfwHdr)); | 591 mfwFree((U8*)hdr,sizeof(MfwHdr)); |
592 | 592 |
593 if(sms_para) | 593 if(sms_para) |
594 mfwFree((U8*)sms_para,sizeof(T_MFW_SMS)); | 594 mfwFree((U8*)sms_para,sizeof(T_MFW_SMS)); |
595 | 595 |
596 return FALSE; | 596 return FALSE; |
597 } | 597 } |
598 /* initialisation of the handler */ | 598 /* initialisation of the handler */ |
599 sms_para->emask = event; | 599 sms_para->emask = event; |
600 sms_para->handler = cbfunc; | 600 sms_para->handler = cbfunc; |
603 hdr->type = MFW_TYP_SMS; /* store type of event handler */ | 603 hdr->type = MFW_TYP_SMS; /* store type of event handler */ |
604 | 604 |
605 /* installation of the handler */ | 605 /* installation of the handler */ |
606 | 606 |
607 insert_status = mfwInsert((T_MFW_HDR *)hWin, hdr);/*SPR 1968, inserted inadvertently deleted function call*/ | 607 insert_status = mfwInsert((T_MFW_HDR *)hWin, hdr);/*SPR 1968, inserted inadvertently deleted function call*/ |
608 | 608 |
609 if(!insert_status) | 609 if(!insert_status) |
610 { | 610 { |
611 TRACE_ERROR("ERROR: sms_create() Failed to Install Handler. "); | 611 TRACE_ERROR("ERROR: sms_create() Failed to Install Handler. "); |
612 mfwFree((U8*)hdr,sizeof(MfwHdr)); | 612 mfwFree((U8*)hdr,sizeof(MfwHdr)); |
613 mfwFree((U8*)sms_para,sizeof(T_MFW_SIM)); | 613 mfwFree((U8*)sms_para,sizeof(T_MFW_SIM)); |
614 return 0; | 614 return 0; |
615 } | 615 } |
616 return insert_status; | 616 return insert_status; |
617 } | 617 } |
618 | 618 |
868 msg_info[i].mem=MFW_MEM_NOTPRESENT; | 868 msg_info[i].mem=MFW_MEM_NOTPRESENT; |
869 | 869 |
870 } | 870 } |
871 | 871 |
872 /*a0393213 OMAPS00109953 - set preferred memory before calling sAT_PlusCMGL | 872 /*a0393213 OMAPS00109953 - set preferred memory before calling sAT_PlusCMGL |
873 Retrieve SMS indexes in SIM first*/ | 873 Retrieve SMS indexes in SIM first*/ |
874 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) | 874 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) |
875 { | 875 { |
876 TRACE_ERROR("sms_read_msg_info():Not able to set pref memory"); | 876 TRACE_ERROR("sms_read_msg_info():Not able to set pref memory"); |
877 return; | 877 return; |
878 } | 878 } |
906 | 906 |
907 void rAT_PlusCMGL ( T_ACI_CMGL_SM * smLst ) | 907 void rAT_PlusCMGL ( T_ACI_CMGL_SM * smLst ) |
908 { | 908 { |
909 T_SMS_TYPE received_sms_type; | 909 T_SMS_TYPE received_sms_type; |
910 T_CONC_ASSEMBLY_RETURN concatenated_status=CONC_ERR_UNKN; | 910 T_CONC_ASSEMBLY_RETURN concatenated_status=CONC_ERR_UNKN; |
911 #ifdef TI_PS_FF_CONC_SMS | 911 #ifdef TI_PS_FF_CONC_SMS |
912 T_SM_DATA_EXT conc_data_ext={NULL,0}; | 912 T_SM_DATA_EXT conc_data_ext={NULL,0}; |
913 #endif /*TI_PS_FF_CONC_SMS*/ | 913 #endif /*TI_PS_FF_CONC_SMS*/ |
914 | 914 |
915 TRACE_FUNCTION ("rAT_PlusCMGL()"); | 915 TRACE_FUNCTION ("rAT_PlusCMGL()"); |
916 /*a0393213 OMAPS00109953 - third parameter added for SMS_getSMSType()*/ | 916 /*a0393213 OMAPS00109953 - third parameter added for SMS_getSMSType()*/ |
917 if(initialising_flag == TRUE) | 917 if(initialising_flag == TRUE) |
918 { | 918 { |
919 received_sms_type = SMS_getSMSType( &smLst->udh, smLst->adress, MODE3); | 919 received_sms_type = SMS_getSMSType( &smLst->udh, smLst->adress, MODE3); |
938 /*a0393213 OMAPS00109953*/ | 938 /*a0393213 OMAPS00109953*/ |
939 concatenated_status =concSMS_Collect(&conc_data_ext, smLst, TRUE, sms_mem_cvt(memory.mem)); | 939 concatenated_status =concSMS_Collect(&conc_data_ext, smLst, TRUE, sms_mem_cvt(memory.mem)); |
940 } | 940 } |
941 TRACE_EVENT_P2("conc status: %d, conc length: %d", concatenated_status, conc_data_ext.len); | 941 TRACE_EVENT_P2("conc status: %d, conc length: %d", concatenated_status, conc_data_ext.len); |
942 | 942 |
943 | 943 |
944 } | 944 } |
945 // July 27, 2006 DR: OMAPS00085347 x0021334 | 945 // July 27, 2006 DR: OMAPS00085347 x0021334 |
946 // Free the allocated memory after concatenated SMS has been read. | 946 // Free the allocated memory after concatenated SMS has been read. |
947 if (concatenated_status EQ CONC_COMPLETED) | 947 if (concatenated_status EQ CONC_COMPLETED) |
948 { | 948 { |
949 if (conc_data_ext.data != NULL) | 949 if (conc_data_ext.data != NULL) |
950 { | 950 { |
951 MFREE (conc_data_ext.data); | 951 MFREE (conc_data_ext.data); |
952 } | 952 } |
953 } | 953 } |
954 #endif /*TI_PS_FF_CONC_SMS*/ | 954 #endif /*TI_PS_FF_CONC_SMS*/ |
955 | 955 |
956 /*a0393213 OMAPS00109953 - memory added as parameter*/ | 956 /*a0393213 OMAPS00109953 - memory added as parameter*/ |
957 sms_store_new_msg_info(smLst->msg_ref, smLst, TRUE/*MC SPR 2260*/, concatenated_status,received_sms_type,(T_MFW_SMS_MEM)memory.mem); | 957 sms_store_new_msg_info(smLst->msg_ref, smLst, TRUE/*MC SPR 2260*/, concatenated_status,received_sms_type,(T_MFW_SMS_MEM)memory.mem); |
958 | 958 |
959 | 959 |
960 f_update = MFW_SMS_NEW; | 960 f_update = MFW_SMS_NEW; |
961 { | 961 { |
962 TRACE_EVENT_P4("CMGL Msg table: %d,%d,%d, %d", msg_info[0].index, msg_info[1].index,msg_info[2].index,msg_info[3].index); | 962 TRACE_EVENT_P4("CMGL Msg table: %d,%d,%d, %d", msg_info[0].index, msg_info[1].index,msg_info[2].index,msg_info[3].index); |
963 TRACE_EVENT_P4("CMGL Msg table: %d,%d,%d, %d", msg_info[4].index, msg_info[5].index,msg_info[6].index,msg_info[7].index); | 963 TRACE_EVENT_P4("CMGL Msg table: %d,%d,%d, %d", msg_info[4].index, msg_info[5].index,msg_info[6].index,msg_info[7].index); |
1004 for (i=0; i<g_max_messages; i++) | 1004 for (i=0; i<g_max_messages; i++) |
1005 #else | 1005 #else |
1006 for (i=0; i<MAX_MESSAGES; i++) | 1006 for (i=0; i<MAX_MESSAGES; i++) |
1007 #endif | 1007 #endif |
1008 { | 1008 { |
1009 if (msg_info[i].index EQ status_change_index && | 1009 if (msg_info[i].index EQ status_change_index && |
1010 msg_info[i].mem EQ status_change_memory) /*a0393213 OMAPS00109953 - memory also taken into consideration*/ | 1010 msg_info[i].mem EQ status_change_memory) /*a0393213 OMAPS00109953 - memory also taken into consideration*/ |
1011 { | 1011 { |
1012 msg_info[i].stat = stat; | 1012 msg_info[i].stat = stat; |
1013 } | 1013 } |
1014 } | 1014 } |
1160 #else | 1160 #else |
1161 for (i=0; i<MAX_MESSAGES; i++) | 1161 for (i=0; i<MAX_MESSAGES; i++) |
1162 #endif | 1162 #endif |
1163 { | 1163 { |
1164 /*a0393213 OMAPS00109953 - memory also taken into consideration*/ | 1164 /*a0393213 OMAPS00109953 - memory also taken into consideration*/ |
1165 if (msg_info[i].index == index && msg_info[i].mem == sms_memory) | 1165 if (msg_info[i].index == index && msg_info[i].mem == sms_memory) |
1166 { | 1166 { |
1167 if ((msg_info[i].stat == MFW_SMS_UNREAD) || | 1167 if ((msg_info[i].stat == MFW_SMS_UNREAD) || |
1168 (msg_info[i].stat == MFW_SMS_STOR_UNSENT)) | 1168 (msg_info[i].stat == MFW_SMS_STOR_UNSENT)) |
1169 { | 1169 { |
1170 fg = 1; | 1170 fg = 1; |
1189 { | 1189 { |
1190 TRACE_EVENT("sms_change_read_status No index match-ERROR"); | 1190 TRACE_EVENT("sms_change_read_status No index match-ERROR"); |
1191 return 0; | 1191 return 0; |
1192 } | 1192 } |
1193 | 1193 |
1194 /*a0393213 OMAPS00109953 - set preferred memory before calling sAT_PlusCMGR*/ | 1194 /*a0393213 OMAPS00109953 - set preferred memory before calling sAT_PlusCMGR*/ |
1195 if(sms_set_pref_memory(sms_memory)!=MFW_SMS_OK) | 1195 if(sms_set_pref_memory(sms_memory)!=MFW_SMS_OK) |
1196 { | 1196 { |
1197 TRACE_ERROR("sms_change_read_status():Not able to set pref memory"); | 1197 TRACE_ERROR("sms_change_read_status():Not able to set pref memory"); |
1198 return 0; | 1198 return 0; |
1199 } | 1199 } |
1200 | 1200 |
1201 sms_type = MFW_NO_MESSAGE;/* SPR 2260 Don't do anything scary in rAT_PlusCMGR callback func*/ | 1201 sms_type = MFW_NO_MESSAGE;/* SPR 2260 Don't do anything scary in rAT_PlusCMGR callback func*/ |
1202 /*CONQUEST 5991- MC- Changed third parameter in function call*/ | 1202 /*CONQUEST 5991- MC- Changed third parameter in function call*/ |
1203 ret = sAT_PlusCMGR(CMD_SRC_LCL, (UBYTE)index, SMS_READ_StatusChange); | 1203 ret = sAT_PlusCMGR(CMD_SRC_LCL, (UBYTE)index, SMS_READ_StatusChange); |
1204 | 1204 |
1205 if (ret NEQ AT_CMPL AND ret NEQ AT_EXCT) | 1205 if (ret NEQ AT_CMPL AND ret NEQ AT_EXCT) |
1239 */ | 1239 */ |
1240 | 1240 |
1241 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 1241 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
1242 /* NM, 27.5.04 | 1242 /* NM, 27.5.04 |
1243 | 1243 |
1244 the sms_submit function with the parameters : addr_type and sca | 1244 the sms_submit function with the parameters : addr_type and sca |
1245 has been taken out as it does not send SMS ?! | 1245 has been taken out as it does not send SMS ?! |
1246 | 1246 |
1247 */ | 1247 */ |
1248 #endif | 1248 #endif |
1249 | 1249 |
1284 SHORT rp; | 1284 SHORT rp; |
1285 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 1285 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
1286 T_ACI_TOA toa; | 1286 T_ACI_TOA toa; |
1287 T_ACI_TOA tosca; | 1287 T_ACI_TOA tosca; |
1288 #endif | 1288 #endif |
1289 //Mar 22 2007 ER:OMAPS00113882 x0061088 (Prachi) | 1289 //Mar 22 2007 ER:OMAPS00113882 x0061088 (Prachi) |
1290 T_ACI_TOA set_toa; | 1290 T_ACI_TOA set_toa; |
1291 int addr_type; | 1291 int addr_type; |
1292 T_ACI_RETURN ACI_MFW_return; | 1292 T_ACI_RETURN ACI_MFW_return; |
1293 | 1293 |
1294 TRACE_FUNCTION ("sms_submit()"); | 1294 TRACE_FUNCTION ("sms_submit()"); |
1327 //sending toa instead of NULL | 1327 //sending toa instead of NULL |
1328 if ( addr_type == TRUE ) | 1328 if ( addr_type == TRUE ) |
1329 { | 1329 { |
1330 set_toa.ton = TON_Alphanumeric; | 1330 set_toa.ton = TON_Alphanumeric; |
1331 set_toa.npi = NPI_NotPresent; | 1331 set_toa.npi = NPI_NotPresent; |
1332 ACI_MFW_return = sAT_PlusCMGS(CMD_SRC_LCL, dest_addr, &set_toa, &conc_data_ext, sca, NULL, rp); | 1332 ACI_MFW_return = sAT_PlusCMGS(CMD_SRC_LCL, dest_addr, &set_toa, &conc_data_ext, sca, NULL, rp); |
1333 | 1333 |
1334 } | 1334 } |
1335 else | 1335 else |
1336 ACI_MFW_return = sAT_PlusCMGS(CMD_SRC_LCL, dest_addr, NULL, &conc_data_ext, sca, NULL, rp); | 1336 ACI_MFW_return = sAT_PlusCMGS(CMD_SRC_LCL, dest_addr, NULL, &conc_data_ext, sca, NULL, rp); |
1337 | 1337 |
1338 if(ACI_MFW_return != AT_EXCT) | 1338 if(ACI_MFW_return != AT_EXCT) |
1339 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 1339 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
1340 //NM if (sAT_PlusCMGS(CMD_SRC_LCL, dest_addr, &toa, &conc_data_ext, sca, &tosca, rp) NEQ AT_EXCT) | 1340 //NM if (sAT_PlusCMGS(CMD_SRC_LCL, dest_addr, &toa, &conc_data_ext, sca, &tosca, rp) NEQ AT_EXCT) |
1341 #endif | 1341 #endif |
1342 return MFW_SMS_FAIL; | 1342 return MFW_SMS_FAIL; |
1343 return MFW_SMS_OK; | 1343 return MFW_SMS_OK; |
1344 | 1344 |
1345 } | 1345 } |
1346 | 1346 |
1347 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 1347 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
1348 | 1348 |
1364 USHORT msg_len, | 1364 USHORT msg_len, |
1365 CHAR *sca, | 1365 CHAR *sca, |
1366 T_MFW_PHB_TON sc_type) | 1366 T_MFW_PHB_TON sc_type) |
1367 { | 1367 { |
1368 TRACE_FUNCTION ("sms_submit_wap_sms()"); | 1368 TRACE_FUNCTION ("sms_submit_wap_sms()"); |
1369 | 1369 |
1370 sms_wap_sent_flag = TRUE; | 1370 sms_wap_sent_flag = TRUE; |
1371 | 1371 |
1372 /* NM, 27.5.04 | 1372 /* NM, 27.5.04 |
1373 | 1373 |
1374 the sms_submit function with the parameters : addr_type and sca | 1374 the sms_submit function with the parameters : addr_type and sca |
1375 has been taken out as it does not send SMS ?! | 1375 has been taken out as it does not send SMS ?! |
1376 | 1376 |
1377 */ | 1377 */ |
1378 | 1378 |
1379 //NM return sms_submit(type, dest_addr, addr_type, msg, msg_len, sca, sc_type); | 1379 //NM return sms_submit(type, dest_addr, addr_type, msg, msg_len, sca, sc_type); |
1380 } | 1380 } |
1381 | 1381 |
1382 #endif /* #if defined (FF_WAP) && defined (FF_GPF_TCPIP) */ | 1382 #endif /* #if defined (FF_WAP) && defined (FF_GPF_TCPIP) */ |
1383 | 1383 |
1435 */ | 1435 */ |
1436 | 1436 |
1437 void rAT_PlusCMT(T_ACI_CMGL_SM* sm) | 1437 void rAT_PlusCMT(T_ACI_CMGL_SM* sm) |
1438 { T_SMS_TYPE received_sms_type; | 1438 { T_SMS_TYPE received_sms_type; |
1439 T_CONC_ASSEMBLY_RETURN concatenated_status; | 1439 T_CONC_ASSEMBLY_RETURN concatenated_status; |
1440 #ifdef TI_PS_FF_CONC_SMS | 1440 #ifdef TI_PS_FF_CONC_SMS |
1441 T_SM_DATA_EXT conc_data_ext; | 1441 T_SM_DATA_EXT conc_data_ext; |
1442 #endif /*TI_PS_FF_CONC_SMS*/ | 1442 #endif /*TI_PS_FF_CONC_SMS*/ |
1443 int i; | 1443 int i; |
1444 TRACE_FUNCTION ("rAT_PlusCMT()"); | 1444 TRACE_FUNCTION ("rAT_PlusCMT()"); |
1445 | 1445 |
1517 memset(sms_mt.sms_msg, 0, sm->data.len); | 1517 memset(sms_mt.sms_msg, 0, sm->data.len); |
1518 /*copy all data from concat SMS*/ | 1518 /*copy all data from concat SMS*/ |
1519 memcpy(sms_mt.sms_msg, (char*)conc_data_ext.data, conc_data_ext.len); | 1519 memcpy(sms_mt.sms_msg, (char*)conc_data_ext.data, conc_data_ext.len); |
1520 sms_mt.udh_len = sm->udh.len; | 1520 sms_mt.udh_len = sm->udh.len; |
1521 memcpy((char *)sms_mt.udh, (char *)sm->udh.data, sm->udh.len); | 1521 memcpy((char *)sms_mt.udh, (char *)sm->udh.data, sm->udh.len); |
1522 | 1522 |
1523 /*SPR#1408 - DS - Now done at end of function | 1523 /*SPR#1408 - DS - Now done at end of function |
1524 *sms_signal(E_SMS_MT, &sms_mt); | 1524 *sms_signal(E_SMS_MT, &sms_mt); |
1525 */ | 1525 */ |
1526 | 1526 |
1527 } | 1527 } |
1530 } | 1530 } |
1531 else | 1531 else |
1532 #endif /*TI_PS_FF_CONC_SMS*/ | 1532 #endif /*TI_PS_FF_CONC_SMS*/ |
1533 { | 1533 { |
1534 | 1534 |
1535 | 1535 |
1536 memset(&sms_mt, 0, sizeof(sms_mt)); | 1536 memset(&sms_mt, 0, sizeof(sms_mt)); |
1537 | 1537 |
1538 #ifdef NO_ASCIIZ | 1538 #ifdef NO_ASCIIZ |
1539 memcpy(sms_mt.orig_addr.tag, | 1539 memcpy(sms_mt.orig_addr.tag, |
1540 sm->alpha.data, | 1540 sm->alpha.data, |
1578 | 1578 |
1579 sms_mt.msg_len = sm->data.len; | 1579 sms_mt.msg_len = sm->data.len; |
1580 memcpy(sms_mt.sms_msg, (char *)sm->data.data, sm->data.len); | 1580 memcpy(sms_mt.sms_msg, (char *)sm->data.data, sm->data.len); |
1581 sms_mt.udh_len = sm->udh.len; | 1581 sms_mt.udh_len = sm->udh.len; |
1582 memcpy((char *)sms_mt.udh, (char *)sm->udh.data, sm->udh.len); | 1582 memcpy((char *)sms_mt.udh, (char *)sm->udh.data, sm->udh.len); |
1583 | 1583 |
1584 /*SPR#1408 - DS - Now done at end of function | 1584 /*SPR#1408 - DS - Now done at end of function |
1585 *sms_signal(E_SMS_MT, &sms_mt); | 1585 *sms_signal(E_SMS_MT, &sms_mt); |
1586 */ | 1586 */ |
1587 } | 1587 } |
1588 | 1588 |
1589 /*MC SPR 1364, need to call this function to update CPHS voicemail data*/ | 1589 /*MC SPR 1364, need to call this function to update CPHS voicemail data*/ |
1590 /*SPR#1408 - DS - Modified to store voicemail status in SMS structure. Port of 1669 */ | 1590 /*SPR#1408 - DS - Modified to store voicemail status in SMS structure. Port of 1669 */ |
1591 if (sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, | 1591 if (sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, |
1592 &sm->toa, &sm->udh) == MFW_SMS_VOICE) | 1592 &sm->toa, &sm->udh) == MFW_SMS_VOICE) |
1593 { | 1593 { |
1594 sms_mt.voicemail = TRUE; | 1594 sms_mt.voicemail = TRUE; |
1597 else | 1597 else |
1598 { | 1598 { |
1599 sms_mt.voicemail = FALSE; | 1599 sms_mt.voicemail = FALSE; |
1600 } | 1600 } |
1601 sms_signal(E_SMS_MT, &sms_mt); | 1601 sms_signal(E_SMS_MT, &sms_mt); |
1602 | 1602 |
1603 } | 1603 } |
1604 | 1604 |
1605 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 1605 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
1606 #define SMS_PUSH_PDU_OFFSET 1 | 1606 #define SMS_PUSH_PDU_OFFSET 1 |
1607 #define PUSH_METHOD_PDU 0x06 | 1607 #define PUSH_METHOD_PDU 0x06 |
1671 if(!(MMS_pdu=mfwAlloc(MAX_SM_LEN<<1))) | 1671 if(!(MMS_pdu=mfwAlloc(MAX_SM_LEN<<1))) |
1672 return; | 1672 return; |
1673 | 1673 |
1674 header_len=sm->data.data[SMS_PUSH_PDU_OFFSET+1]; | 1674 header_len=sm->data.data[SMS_PUSH_PDU_OFFSET+1]; |
1675 | 1675 |
1676 pdu_len=sm->data.len-(header_len+1)-(SMS_PUSH_PDU_OFFSET+1); | 1676 pdu_len=sm->data.len-(header_len+1)-(SMS_PUSH_PDU_OFFSET+1); |
1677 memcpy(MMS_pdu,sm->data.data+SMS_PUSH_PDU_OFFSET+2+header_len,pdu_len); | 1677 memcpy(MMS_pdu,sm->data.data+SMS_PUSH_PDU_OFFSET+2+header_len,pdu_len); |
1678 | 1678 |
1679 TRACE_EVENT("First SMS been recorded"); | 1679 TRACE_EVENT("First SMS been recorded"); |
1680 TRACE_EVENT_P3("bgein=%x,end=%x,len=%d",MMS_pdu[0],MMS_pdu[pdu_len-1],pdu_len); | 1680 TRACE_EVENT_P3("bgein=%x,end=%x,len=%d",MMS_pdu[0],MMS_pdu[pdu_len-1],pdu_len); |
1681 } | 1681 } |
1701 // T_ACI_RETURN ret; // RAVI | 1701 // T_ACI_RETURN ret; // RAVI |
1702 // int i, j; // RAVI | 1702 // int i, j; // RAVI |
1703 #endif | 1703 #endif |
1704 T_SMS_TYPE received_sms_type; | 1704 T_SMS_TYPE received_sms_type; |
1705 T_CONC_ASSEMBLY_RETURN concatenated_status=CONC_ERR_UNKN; | 1705 T_CONC_ASSEMBLY_RETURN concatenated_status=CONC_ERR_UNKN; |
1706 #ifdef TI_PS_FF_CONC_SMS | 1706 #ifdef TI_PS_FF_CONC_SMS |
1707 T_SM_DATA_EXT conc_data_ext={NULL,0}; | 1707 T_SM_DATA_EXT conc_data_ext={NULL,0}; |
1708 #endif /*TI_PS_FF_CONC_SMS*/ | 1708 #endif /*TI_PS_FF_CONC_SMS*/ |
1709 | 1709 |
1710 if (initialising_flag == FALSE) | 1710 if (initialising_flag == FALSE) |
1711 { | 1711 { |
1712 /* Ignore CMTI if initialising */ | 1712 /* Ignore CMTI if initialising */ |
1713 | 1713 |
1714 | 1714 |
1715 TRACE_FUNCTION ("rAT_PlusCMTI()"); | 1715 TRACE_FUNCTION ("rAT_PlusCMTI()"); |
1716 TRACE_EVENT_P1("f_update is = % in CMTI", f_update); | 1716 TRACE_EVENT_P1("f_update is = % in CMTI", f_update); |
1717 | 1717 |
1718 /*a0393213 OMAPS00109953 - new parameter added to SMS_getSMSType()*/ | 1718 /*a0393213 OMAPS00109953 - new parameter added to SMS_getSMSType()*/ |
1724 { | 1724 { |
1725 received_sms_type = SMS_getSMSType( &sm->udh, sm->adress, MODE2); | 1725 received_sms_type = SMS_getSMSType( &sm->udh, sm->adress, MODE2); |
1726 } | 1726 } |
1727 TRACE_EVENT_P1("SMS Type is = %d", received_sms_type); | 1727 TRACE_EVENT_P1("SMS Type is = %d", received_sms_type); |
1728 TRACE_EVENT_P2("msg_ref: %d, index: %d", sm->msg_ref, index); | 1728 TRACE_EVENT_P2("msg_ref: %d, index: %d", sm->msg_ref, index); |
1729 | 1729 |
1730 #ifdef TI_PS_FF_CONC_SMS | 1730 #ifdef TI_PS_FF_CONC_SMS |
1731 if (received_sms_type == CONCATE) | 1731 if (received_sms_type == CONCATE) |
1732 { | 1732 { |
1733 if(initialising_flag == TRUE) | 1733 if(initialising_flag == TRUE) |
1734 { | 1734 { |
1740 /*a0393213 OMAPS00109953*/ | 1740 /*a0393213 OMAPS00109953*/ |
1741 concatenated_status =concSMS_Collect(&conc_data_ext, sm, TRUE, mem); | 1741 concatenated_status =concSMS_Collect(&conc_data_ext, sm, TRUE, mem); |
1742 } | 1742 } |
1743 TRACE_EVENT_P2("conc status: %d, conc length: %d", concatenated_status, conc_data_ext.len); | 1743 TRACE_EVENT_P2("conc status: %d, conc length: %d", concatenated_status, conc_data_ext.len); |
1744 } | 1744 } |
1745 // July 7, 2005 REF: CRR MMI-SPR-32179 x0018858 | 1745 // July 7, 2005 REF: CRR MMI-SPR-32179 x0018858 |
1746 // Added a check to free the variable only when CONC_COMPLETED status is encountered. | 1746 // Added a check to free the variable only when CONC_COMPLETED status is encountered. |
1747 if (concatenated_status EQ CONC_COMPLETED) | 1747 if (concatenated_status EQ CONC_COMPLETED) |
1748 { | 1748 { |
1749 if(conc_data_ext.data != NULL) | 1749 if(conc_data_ext.data != NULL) |
1750 { | 1750 { |
1751 MFREE(conc_data_ext.data); | 1751 MFREE(conc_data_ext.data); |
1752 } | 1752 } |
1753 } | 1753 } |
1754 #else /*TI_PS_FF_CONC_SMS*/ | 1754 #else /*TI_PS_FF_CONC_SMS*/ |
1755 concatenated_status = CONC_ERR_UNKN; | 1755 concatenated_status = CONC_ERR_UNKN; |
1756 #endif /*TI_PS_FF_CONC_SMS*/ | 1756 #endif /*TI_PS_FF_CONC_SMS*/ |
1757 sms_store_new_msg_info(index,sm,TRUE, concatenated_status, received_sms_type, (T_MFW_SMS_MEM)mem); | 1757 sms_store_new_msg_info(index,sm,TRUE, concatenated_status, received_sms_type, (T_MFW_SMS_MEM)mem); |
1758 | 1758 |
1782 f_update = MFW_SMS_FREE; | 1782 f_update = MFW_SMS_FREE; |
1783 if(memory.total == memory.used) | 1783 if(memory.total == memory.used) |
1784 { | 1784 { |
1785 TRACE_EVENT_P2("memory used is = %d, of %d", memory.used, memory.total); | 1785 TRACE_EVENT_P2("memory used is = %d, of %d", memory.used, memory.total); |
1786 sms_signal(E_SMS_MEM_FULL, NULL); | 1786 sms_signal(E_SMS_MEM_FULL, NULL); |
1787 } | |
1788 } | 1787 } |
1789 if(msg_info != NULL) | 1788 } |
1789 if(msg_info != NULL) | |
1790 { | 1790 { |
1791 TRACE_EVENT_P4("CMTI Msg table: %d,%d,%d, %d", msg_info[0].index, msg_info[1].index,msg_info[2].index,msg_info[3].index); | 1791 TRACE_EVENT_P4("CMTI Msg table: %d,%d,%d, %d", msg_info[0].index, msg_info[1].index,msg_info[2].index,msg_info[3].index); |
1792 TRACE_EVENT_P4("CMTI Msg table: %d,%d,%d, %d", msg_info[4].index, msg_info[5].index,msg_info[6].index,msg_info[7].index); | 1792 TRACE_EVENT_P4("CMTI Msg table: %d,%d,%d, %d", msg_info[4].index, msg_info[5].index,msg_info[6].index,msg_info[7].index); |
1793 } | 1793 } |
1794 /*MC SPR 1364, need to call this function to update CPHS voicemail data*/ | 1794 /*MC SPR 1364, need to call this function to update CPHS voicemail data*/ |
1795 sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, | 1795 sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, |
1796 &sm->toa, &sm->udh); | 1796 &sm->toa, &sm->udh); |
1797 /*SPR 2260, this is already called in sms_store_new_msg_info, BUT we need it in for initialisation*/ | 1797 /*SPR 2260, this is already called in sms_store_new_msg_info, BUT we need it in for initialisation*/ |
1798 } | 1798 } |
1799 #endif | 1799 #endif |
1806 If not port id, the out put id will be 0 | 1806 If not port id, the out put id will be 0 |
1807 */ | 1807 */ |
1808 void sms_getPortId(UBYTE* data, UBYTE length, USHORT * destinatorPort, USHORT *originatorPort) | 1808 void sms_getPortId(UBYTE* data, UBYTE length, USHORT * destinatorPort, USHORT *originatorPort) |
1809 { | 1809 { |
1810 UBYTE ucOffset = 0; | 1810 UBYTE ucOffset = 0; |
1811 USHORT usTempOffset; | 1811 USHORT usTempOffset; |
1812 UBYTE i; | 1812 UBYTE i; |
1813 | 1813 |
1814 *destinatorPort = 0; | 1814 *destinatorPort = 0; |
1815 *originatorPort = 0; | 1815 *originatorPort = 0; |
1816 | 1816 |
1817 if (length == 0) | 1817 if (length == 0) |
1818 { | 1818 { |
1819 return; | 1819 return; |
1820 } | 1820 } |
1821 | 1821 |
1822 for (i = 0 ; i < 47; i++)//140/3=47 | 1822 for (i = 0 ; i < 47; i++)//140/3=47 |
1823 { | 1823 { |
1824 /*3GPP protocal 23040 clause 9.2.3.24*/ | 1824 /*3GPP protocal 23040 clause 9.2.3.24*/ |
1825 //0x05 the IE is port id, length should be 4 | 1825 //0x05 the IE is port id, length should be 4 |
1826 if ((data[ucOffset] == 0x05) && (data[ucOffset + 1] == 4)) | 1826 if ((data[ucOffset] == 0x05) && (data[ucOffset + 1] == 4)) |
1836 //port information 6 bytes | 1836 //port information 6 bytes |
1837 if (((usTempOffset + 6) > MAX_SM_LEN) ||((usTempOffset + 6) > length)) | 1837 if (((usTempOffset + 6) > MAX_SM_LEN) ||((usTempOffset + 6) > length)) |
1838 { | 1838 { |
1839 break; | 1839 break; |
1840 } | 1840 } |
1841 | 1841 |
1842 ucOffset = usTempOffset; | 1842 ucOffset = usTempOffset; |
1843 } | 1843 } |
1844 } | 1844 } |
1845 | 1845 |
1846 return; | 1846 return; |
1847 } | 1847 } |
1848 | 1848 |
1849 | 1849 |
1850 /* | 1850 /* |
1852 */ | 1852 */ |
1853 BOOL sms_is_ems_type(UBYTE* UdhData, UBYTE UdhLength) | 1853 BOOL sms_is_ems_type(UBYTE* UdhData, UBYTE UdhLength) |
1854 { | 1854 { |
1855 BOOL Ret = FALSE; | 1855 BOOL Ret = FALSE; |
1856 UBYTE ucOffset = 0; | 1856 UBYTE ucOffset = 0; |
1857 USHORT usTempOffset; | 1857 USHORT usTempOffset; |
1858 | 1858 |
1859 UBYTE i; | 1859 UBYTE i; |
1860 | 1860 |
1861 if (UdhLength == 0) | 1861 if (UdhLength == 0) |
1862 { | 1862 { |
1863 return Ret; | 1863 return Ret; |
1864 } | 1864 } |
1865 | 1865 |
1866 for (i = 0 ; i < 47; i++) | 1866 for (i = 0 ; i < 47; i++) |
1867 { | 1867 { |
1868 /*3GPP protocal 23040 clause 9.2.3.24*/ | 1868 /*3GPP protocal 23040 clause 9.2.3.24*/ |
1869 if ( (UdhData[ucOffset] >= 0X0A) && (UdhData[ucOffset] <= 0X1F) ) | 1869 if ( (UdhData[ucOffset] >= 0X0A) && (UdhData[ucOffset] <= 0X1F) ) |
1870 { | 1870 { |
1877 break; | 1877 break; |
1878 } | 1878 } |
1879 else | 1879 else |
1880 { | 1880 { |
1881 usTempOffset = ucOffset + UdhData[ucOffset + 1] + 2; | 1881 usTempOffset = ucOffset + UdhData[ucOffset + 1] + 2; |
1882 | 1882 |
1883 if ((usTempOffset >= MAX_SM_LEN) ||(usTempOffset >= UdhLength)) | 1883 if ((usTempOffset >= MAX_SM_LEN) ||(usTempOffset >= UdhLength)) |
1884 { | 1884 { |
1885 break; | 1885 break; |
1886 } | 1886 } |
1887 | 1887 |
1888 ucOffset = usTempOffset; | 1888 ucOffset = usTempOffset; |
1889 } | 1889 } |
1890 } | 1890 } |
1891 | 1891 |
1892 return Ret; | 1892 return Ret; |
1905 | 1905 |
1906 #if defined (FF_MMI_MMS) || defined (FF_MMI_EMS) | 1906 #if defined (FF_MMI_MMS) || defined (FF_MMI_EMS) |
1907 EXTERN void sms_save_to_m4(U8* pSmsPud); | 1907 EXTERN void sms_save_to_m4(U8* pSmsPud); |
1908 #endif | 1908 #endif |
1909 | 1909 |
1910 BOOL sms_save_to_m4_in_Mfw( T_MNSMS_MESSAGE_IND *mnsms_message_ind ) | 1910 BOOL sms_save_to_m4_in_Mfw( T_MNSMS_MESSAGE_IND *mnsms_message_ind ) |
1911 { | 1911 { |
1912 T_sms_sdu * sms_sdu = &mnsms_message_ind->sms_sdu; | 1912 T_sms_sdu * sms_sdu = &mnsms_message_ind->sms_sdu; |
1913 U8 align_pdu[SIM_PDU_LEN]; | 1913 U8 align_pdu[SIM_PDU_LEN]; |
1914 U8* pSmsPud; | 1914 U8* pSmsPud; |
1915 U8 *pAligned = align_pdu; | 1915 U8 *pAligned = align_pdu; |
1920 #if 0 | 1920 #if 0 |
1921 /* First align data on byte boundry */ | 1921 /* First align data on byte boundry */ |
1922 pData += sms_sdu->o_buf / EIGHT_BITS; | 1922 pData += sms_sdu->o_buf / EIGHT_BITS; |
1923 offset = sms_sdu->o_buf % EIGHT_BITS; | 1923 offset = sms_sdu->o_buf % EIGHT_BITS; |
1924 | 1924 |
1925 | 1925 |
1926 | 1926 |
1927 if (offset) | 1927 if (offset) |
1928 { | 1928 { |
1929 for ( i=0; i < sms_sdu->l_buf; i += EIGHT_BITS) | 1929 for ( i=0; i < sms_sdu->l_buf; i += EIGHT_BITS) |
1930 { | 1930 { |
1944 } | 1944 } |
1945 else | 1945 else |
1946 { | 1946 { |
1947 ByteLength = (sms_sdu->l_buf/8) + 1; | 1947 ByteLength = (sms_sdu->l_buf/8) + 1; |
1948 } | 1948 } |
1949 | 1949 |
1950 //NM sms_save_tpdu_ffs(pSmsPud, ByteLength); | 1950 //NM sms_save_tpdu_ffs(pSmsPud, ByteLength); |
1951 | 1951 |
1952 #if defined (FF_MMI_MMS) || defined (FF_MMI_EMS) | 1952 #if defined (FF_MMI_MMS) || defined (FF_MMI_EMS) |
1953 sms_save_to_m4(pSmsPud); | 1953 sms_save_to_m4(pSmsPud); |
1954 #endif | 1954 #endif |
1955 | 1955 |
1956 return TRUE; | 1956 return TRUE; |
1957 } | 1957 } |
1958 | 1958 |
1959 | 1959 |
1960 | 1960 |
1973 /* MZ 2007 Handset displays Message Full on receiving an SMS. */ | 1973 /* MZ 2007 Handset displays Message Full on receiving an SMS. */ |
1974 //T_MFW_MEM_INFO memory; | 1974 //T_MFW_MEM_INFO memory; |
1975 T_ACI_RETURN ret; | 1975 T_ACI_RETURN ret; |
1976 T_SMS_TYPE received_sms_type; | 1976 T_SMS_TYPE received_sms_type; |
1977 T_CONC_ASSEMBLY_RETURN concatenated_status; | 1977 T_CONC_ASSEMBLY_RETURN concatenated_status; |
1978 #ifdef TI_PS_FF_CONC_SMS | 1978 #ifdef TI_PS_FF_CONC_SMS |
1979 T_SM_DATA_EXT conc_data_ext; | 1979 T_SM_DATA_EXT conc_data_ext; |
1980 #endif /*TI_PS_FF_CONC_SMS*/ | 1980 #endif /*TI_PS_FF_CONC_SMS*/ |
1981 int i, j; | 1981 int i, j; |
1982 static int fileid=0; | 1982 static int fileid=0; |
1983 | 1983 |
1984 if (initialising_flag == FALSE) | 1984 if (initialising_flag == FALSE) |
1985 { | 1985 { |
1986 /* Ignore CMTI if initialising */ | 1986 /* Ignore CMTI if initialising */ |
1987 | 1987 |
1988 | 1988 |
1989 TRACE_FUNCTION ("rAT_PlusCMTI()"); | 1989 TRACE_FUNCTION ("rAT_PlusCMTI()"); |
1990 | 1990 |
1991 #if 0 | 1991 #if 0 |
1992 /////////////////////////////////////////////////////////added by ellen | 1992 /////////////////////////////////////////////////////////added by ellen |
1993 { | 1993 { |
1994 char temp[120]; | 1994 char temp[120]; |
1995 char* temp2; | 1995 char* temp2; |
2009 { | 2009 { |
2010 sprintf(temp2,"%02X ",sm->udh.data[i]); | 2010 sprintf(temp2,"%02X ",sm->udh.data[i]); |
2011 temp2+=3; | 2011 temp2+=3; |
2012 i_sum ++; | 2012 i_sum ++; |
2013 if(i_sum > 30) break; | 2013 if(i_sum > 30) break; |
2014 | 2014 |
2015 } | 2015 } |
2016 TRACE_EVENT(temp); | 2016 TRACE_EVENT(temp); |
2017 | 2017 |
2018 sprintf(temp," %d bytes of DATA", sm->data.len); | 2018 sprintf(temp," %d bytes of DATA", sm->data.len); |
2019 TRACE_EVENT(temp); | 2019 TRACE_EVENT(temp); |
2027 { | 2027 { |
2028 sprintf(temp2,"%02X ",sm->data.data[i]); | 2028 sprintf(temp2,"%02X ",sm->data.data[i]); |
2029 temp2+=3; | 2029 temp2+=3; |
2030 i_sum ++; | 2030 i_sum ++; |
2031 if(i_sum > 30) break; | 2031 if(i_sum > 30) break; |
2032 | 2032 |
2033 } | 2033 } |
2034 TRACE_EVENT(temp); | 2034 TRACE_EVENT(temp); |
2035 | 2035 |
2036 } | 2036 } |
2037 ///////////////////////////////////////////////////////// | 2037 ///////////////////////////////////////////////////////// |
2038 #endif | 2038 #endif |
2039 | 2039 |
2040 /* SPR#2086 - SH - Intercept a WAP SMS *///TISHMMS Project | 2040 /* SPR#2086 - SH - Intercept a WAP SMS *///TISHMMS Project |
2041 { | 2041 { |
2042 | 2042 |
2043 USHORT destinatorPort; | 2043 USHORT destinatorPort; |
2044 USHORT originatorPort; | 2044 USHORT originatorPort; |
2045 | 2045 |
2046 sms_getPortId(sm->udh.data, sm->udh.len, &destinatorPort, &originatorPort); | 2046 sms_getPortId(sm->udh.data, sm->udh.len, &destinatorPort, &originatorPort); |
2047 | 2047 |
2048 //xmzhou_trace_string_value("New Msg arrived,desti port=",destinatorPort); | 2048 //xmzhou_trace_string_value("New Msg arrived,desti port=",destinatorPort); |
2049 //xmzhou_trace_string_value("New Msg arrived,orig port=",originatorPort); | 2049 //xmzhou_trace_string_value("New Msg arrived,orig port=",originatorPort); |
2050 | 2050 |
2051 //xmzhou_trace_string_value("CMTI new msg udh length=",sm->udh.len); | 2051 //xmzhou_trace_string_value("CMTI new msg udh length=",sm->udh.len); |
2052 //xmzhou_trace_n_bytes(sm->udh.data,sm->udh.len); | 2052 //xmzhou_trace_n_bytes(sm->udh.data,sm->udh.len); |
2053 | 2053 |
2054 TRACE_EVENT_P2("+++++ In rAT_PlusCMTI ready to judge PUSH or not DestP=%d,OrgP=%d +++++",destinatorPort,originatorPort); | 2054 TRACE_EVENT_P2("+++++ In rAT_PlusCMTI ready to judge PUSH or not DestP=%d,OrgP=%d +++++",destinatorPort,originatorPort); |
2055 if (destinatorPort==2948 | 2055 if (destinatorPort==2948 |
2056 || destinatorPort==2949 | 2056 || destinatorPort==2949 |
2057 || destinatorPort==49999 /*OTA Provisioning*/ | 2057 || destinatorPort==49999 /*OTA Provisioning*/ |
2058 || destinatorPort==49996 /*OTA SyncML*/ | 2058 || destinatorPort==49996 /*OTA SyncML*/ |
2059 || originatorPort==9200 | 2059 || originatorPort==9200 |
2060 || originatorPort==9201 | 2060 || originatorPort==9201 |
2061 || originatorPort==9202 | 2061 || originatorPort==9202 |
2062 || originatorPort==9203) | 2062 || originatorPort==9203) |
2063 | 2063 |
2064 { | 2064 { |
2065 USHORT index_i; | 2065 USHORT index_i; |
2066 | 2066 |
2067 //xmzhou_trace_string_value("CMTI new msg data length=",sm->data.len); | 2067 //xmzhou_trace_string_value("CMTI new msg data length=",sm->data.len); |
2068 //xmzhou_trace_string("WAP SMS be identified!!!!!!!"); | 2068 //xmzhou_trace_string("WAP SMS be identified!!!!!!!"); |
2069 //xmzhou_trace_n_bytes(sm->data.data,sm->data.len); | 2069 //xmzhou_trace_n_bytes(sm->data.data,sm->data.len); |
2070 #if 0 | 2070 #if 0 |
2071 fileid++; | 2071 fileid++; |
2072 | 2072 |
2073 if(fileid==1){ | 2073 if(fileid==1){ |
2074 xmzhou_trace_string_value("CMTI new msg data1 length=",sm->data.len); | 2074 xmzhou_trace_string_value("CMTI new msg data1 length=",sm->data.len); |
2075 if((sm->data.len)<2048) ffs_fwrite("/mms/data1", sm->data.data, sm->data.len); | 2075 if((sm->data.len)<2048) ffs_fwrite("/mms/data1", sm->data.data, sm->data.len); |
2076 | 2076 |
2077 rvf_delay(500); | 2077 rvf_delay(500); |
2078 | 2078 |
2079 xmzhou_trace_string_value("CMTI new msg udh1 length=",sm->udh.len); | 2079 xmzhou_trace_string_value("CMTI new msg udh1 length=",sm->udh.len); |
2080 if((sm->udh.len)<2048) ffs_fwrite("/mms/udh1", sm->udh.data, sm->udh.len); | 2080 if((sm->udh.len)<2048) ffs_fwrite("/mms/udh1", sm->udh.data, sm->udh.len); |
2081 | 2081 |
2082 } | 2082 } |
2083 | 2083 |
2090 xmzhou_trace_string_value("CMTI new msg udh2 length=",sm->udh.len); | 2090 xmzhou_trace_string_value("CMTI new msg udh2 length=",sm->udh.len); |
2091 if((sm->udh.len)<2048) ffs_fwrite("/mms/udh2", sm->udh.data, sm->udh.len); | 2091 if((sm->udh.len)<2048) ffs_fwrite("/mms/udh2", sm->udh.data, sm->udh.len); |
2092 } | 2092 } |
2093 | 2093 |
2094 rvf_delay(1000); | 2094 rvf_delay(1000); |
2095 #endif | 2095 #endif |
2096 /*a0393213 OMAPS00109953 - memory added as parameter*/ | 2096 /*a0393213 OMAPS00109953 - memory added as parameter*/ |
2097 sms_msg_delete(index,mem); | 2097 sms_msg_delete(index,mem); |
2098 #if 0 | 2098 #if 0 |
2099 ////////////////////////////////////////////////////////////////////////////////// | 2099 ////////////////////////////////////////////////////////////////////////////////// |
2100 TRACE_EVENT("MMS Notification"); | 2100 TRACE_EVENT("MMS Notification"); |
2101 if(sm->udh.len > 8){ | 2101 if(sm->udh.len > 8){ |
2102 redirectMMSNotification(sm); | 2102 redirectMMSNotification(sm); |
2103 } | 2103 } |
2104 else { | 2104 else { |
2105 ///////////////////////////////////////////////////////////////////////////////// | 2105 ///////////////////////////////////////////////////////////////////////////////// |
2106 #endif | 2106 #endif |
2107 memset(&sms_mt, 0, sizeof(sms_mt)); | 2107 memset(&sms_mt, 0, sizeof(sms_mt)); |
2108 | 2108 |
2109 for (index_i=0; index_i<12; index_i++) | 2109 for (index_i=0; index_i<12; index_i++) |
2110 { | 2110 { |
2111 TRACE_EVENT_P2("Adress: %X (%c)", sm->adress[index_i], sm->adress[index_i]); | 2111 TRACE_EVENT_P2("Adress: %X (%c)", sm->adress[index_i], sm->adress[index_i]); |
2112 } | 2112 } |
2113 | 2113 |
2114 memcpy(sms_mt.orig_addr.tag, sm->alpha.data, sm->alpha.len); | 2114 memcpy(sms_mt.orig_addr.tag, sm->alpha.data, sm->alpha.len); |
2115 sms_mt.orig_addr.len = sm->alpha.len; | 2115 sms_mt.orig_addr.len = sm->alpha.len; |
2116 strcpy(sms_mt.orig_addr.number, sm->adress); | 2116 strcpy(sms_mt.orig_addr.number, sm->adress); |
2117 sms_mt.orig_addr.ton = phb_cvtTon(sm->toa.ton); | 2117 sms_mt.orig_addr.ton = phb_cvtTon(sm->toa.ton); |
2118 sms_mt.orig_addr.npi = phb_cvtNpi(sm->toa.npi); | 2118 sms_mt.orig_addr.npi = phb_cvtNpi(sm->toa.npi); |
2133 memcpy(&sms_mt.sctp,&sm->scts,sizeof(T_ACI_VP_ABS)); | 2133 memcpy(&sms_mt.sctp,&sm->scts,sizeof(T_ACI_VP_ABS)); |
2134 | 2134 |
2135 sms_signal(E_SMS_WAP_MT_RECEIVED, &sms_mt); | 2135 sms_signal(E_SMS_WAP_MT_RECEIVED, &sms_mt); |
2136 | 2136 |
2137 /* Delete the message */ | 2137 /* Delete the message */ |
2138 | 2138 |
2139 return; | 2139 return; |
2140 #if 0 | 2140 #if 0 |
2141 }/*end of else*/ | 2141 }/*end of else*/ |
2142 #endif | 2142 #endif |
2143 } | 2143 } |
2144 } | 2144 } |
2145 | 2145 |
2146 { | 2146 { |
2147 //BOOL sms_is_ems_type(UBYTE* UdhData, UBYTE UdhLength) | 2147 //BOOL sms_is_ems_type(UBYTE* UdhData, UBYTE UdhLength) |
2148 BOOL bIsEms = FALSE; | 2148 BOOL bIsEms = FALSE; |
2149 | 2149 |
2150 bIsEms = sms_is_ems_type(sm->udh.data, sm->udh.len); | 2150 bIsEms = sms_is_ems_type(sm->udh.data, sm->udh.len); |
2151 | 2151 |
2152 if (bIsEms == TRUE) | 2152 if (bIsEms == TRUE) |
2153 { | 2153 { |
2154 //xmzhou_trace_string("EMS SMS received!!!!!!!!!!!!");//proc EMS message | 2154 //xmzhou_trace_string("EMS SMS received!!!!!!!!!!!!");//proc EMS message |
2155 /*a0393213 OMAPS00109953 - memory added as parameter*/ | 2155 /*a0393213 OMAPS00109953 - memory added as parameter*/ |
2156 sms_msg_delete(index,mem); | 2156 sms_msg_delete(index,mem); |
2157 sms_save_to_m4_in_Mfw( &gTpduData ); | 2157 sms_save_to_m4_in_Mfw( &gTpduData ); |
2158 } | 2158 } |
2159 | 2159 |
2160 | 2160 |
2161 } | 2161 } |
2162 | 2162 |
2163 TRACE_EVENT_P1("f_update is = % in CMTI", f_update); | 2163 TRACE_EVENT_P1("f_update is = % in CMTI", f_update); |
2164 /*a0393213 OMAPS00109953 - new parameter added to SMS_getSMSType()*/ | 2164 /*a0393213 OMAPS00109953 - new parameter added to SMS_getSMSType()*/ |
2165 if(initialising_flag == TRUE) | 2165 if(initialising_flag == TRUE) |
2166 { | 2166 { |
2167 received_sms_type = SMS_getSMSType( &sm->udh, sm->adress, MODE3); | 2167 received_sms_type = SMS_getSMSType( &sm->udh, sm->adress, MODE3); |
2170 { | 2170 { |
2171 received_sms_type = SMS_getSMSType( &sm->udh, sm->adress, MODE2); | 2171 received_sms_type = SMS_getSMSType( &sm->udh, sm->adress, MODE2); |
2172 } | 2172 } |
2173 TRACE_EVENT_P1("SMS Type is = %d", received_sms_type); | 2173 TRACE_EVENT_P1("SMS Type is = %d", received_sms_type); |
2174 TRACE_EVENT_P2("msg_ref: %d, index: %d", sm->msg_ref, index); | 2174 TRACE_EVENT_P2("msg_ref: %d, index: %d", sm->msg_ref, index); |
2175 | 2175 |
2176 #ifdef TI_PS_FF_CONC_SMS | 2176 #ifdef TI_PS_FF_CONC_SMS |
2177 | 2177 |
2178 if (received_sms_type == CONCATE) | 2178 if (received_sms_type == CONCATE) |
2179 { | 2179 { |
2180 if(initialising_flag == TRUE) | 2180 if(initialising_flag == TRUE) |
2187 /*a0393213 OMAPS00109953*/ | 2187 /*a0393213 OMAPS00109953*/ |
2188 concatenated_status =concSMS_Collect(&conc_data_ext, sm, TRUE, mem); | 2188 concatenated_status =concSMS_Collect(&conc_data_ext, sm, TRUE, mem); |
2189 } | 2189 } |
2190 TRACE_EVENT_P2("conc status: %d, conc length: %d", concatenated_status, conc_data_ext.len); | 2190 TRACE_EVENT_P2("conc status: %d, conc length: %d", concatenated_status, conc_data_ext.len); |
2191 } | 2191 } |
2192 #else /*TI_PS_FF_CONC_SMS*/ | 2192 #else /*TI_PS_FF_CONC_SMS*/ |
2193 concatenated_status = CONC_ERR_UNKN; | 2193 concatenated_status = CONC_ERR_UNKN; |
2194 #endif /*TI_PS_FF_CONC_SMS*/ | 2194 #endif /*TI_PS_FF_CONC_SMS*/ |
2195 | 2195 |
2196 /*a0393213 OMAPS00109953 - memory added as parameter*/ | 2196 /*a0393213 OMAPS00109953 - memory added as parameter*/ |
2197 sms_store_new_msg_info(index,sm,TRUE, concatenated_status, received_sms_type, mem); | 2197 sms_store_new_msg_info(index,sm,TRUE, concatenated_status, received_sms_type, mem); |
2222 f_update = MFW_SMS_FREE; | 2222 f_update = MFW_SMS_FREE; |
2223 if(memory.total == memory.used) | 2223 if(memory.total == memory.used) |
2224 { | 2224 { |
2225 TRACE_EVENT_P2("memory used is = %d, of %d", memory.used, memory.total); | 2225 TRACE_EVENT_P2("memory used is = %d, of %d", memory.used, memory.total); |
2226 sms_signal(E_SMS_MEM_FULL, NULL); | 2226 sms_signal(E_SMS_MEM_FULL, NULL); |
2227 } | |
2228 } | 2227 } |
2229 if(msg_info != NULL) | 2228 } |
2230 { | 2229 if(msg_info != NULL) |
2230 { | |
2231 TRACE_EVENT_P4("CMTI Msg table: %d,%d,%d, %d", msg_info[0].index, msg_info[1].index,msg_info[2].index,msg_info[3].index); | 2231 TRACE_EVENT_P4("CMTI Msg table: %d,%d,%d, %d", msg_info[0].index, msg_info[1].index,msg_info[2].index,msg_info[3].index); |
2232 TRACE_EVENT_P4("CMTI Msg table: %d,%d,%d, %d", msg_info[4].index, msg_info[5].index,msg_info[6].index,msg_info[7].index); | 2232 TRACE_EVENT_P4("CMTI Msg table: %d,%d,%d, %d", msg_info[4].index, msg_info[5].index,msg_info[6].index,msg_info[7].index); |
2233 } | 2233 } |
2234 /*MC SPR 1366, need to call this function to update CPHS voicemail data*/ | 2234 /*MC SPR 1366, need to call this function to update CPHS voicemail data*/ |
2235 sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, | 2235 sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, |
2236 &sm->toa, &sm->udh); | 2236 &sm->toa, &sm->udh); |
2237 /*SPR 1833, this is already called in sms_store_new_msg_info, BUT we need it in for initialisation*/ | 2237 /*SPR 1833, this is already called in sms_store_new_msg_info, BUT we need it in for initialisation*/ |
2238 } | 2238 } |
2239 | 2239 |
2252 { | 2252 { |
2253 int ret = -1; | 2253 int ret = -1; |
2254 int i; | 2254 int i; |
2255 | 2255 |
2256 TRACE_FUNCTION("find_slot_in_msg_info"); | 2256 TRACE_FUNCTION("find_slot_in_msg_info"); |
2257 | 2257 |
2258 if (index >= 1) | 2258 if (index >= 1) |
2259 { | 2259 { |
2260 /* A valid index, so look for it already being in msg_info */ | 2260 /* A valid index, so look for it already being in msg_info */ |
2261 #ifdef FF_MMI_SMS_DYNAMIC | 2261 #ifdef FF_MMI_SMS_DYNAMIC |
2262 for (i = 0; (i < g_max_messages) && (ret == -1); i++) | 2262 for (i = 0; (i < g_max_messages) && (ret == -1); i++) |
2263 #else | 2263 #else |
2264 for (i = 0; (i < MAX_MESSAGES) && (ret == -1); i++) | 2264 for (i = 0; (i < MAX_MESSAGES) && (ret == -1); i++) |
2265 #endif | 2265 #endif |
2266 { | 2266 { |
2267 /*a0393213 OMAPS00109953 - mem also taken into consideration*/ | 2267 /*a0393213 OMAPS00109953 - mem also taken into consideration*/ |
2268 if (msg_info[i].index == index && msg_info[i].mem==mem) | 2268 if (msg_info[i].index == index && msg_info[i].mem==mem) |
2269 { | 2269 { |
2270 /* Index already in msg_info, so replace */ | 2270 /* Index already in msg_info, so replace */ |
2271 ret = i; | 2271 ret = i; |
2272 } | 2272 } |
2273 } | 2273 } |
2317 /*a0393213 OMAPS00109953 - memory added as parameter*/ | 2317 /*a0393213 OMAPS00109953 - memory added as parameter*/ |
2318 T_MFW sms_store_new_msg_info(UBYTE index, T_ACI_CMGL_SM* sm, UBYTE update_mem, T_CONC_ASSEMBLY_RETURN conc_stat , | 2318 T_MFW sms_store_new_msg_info(UBYTE index, T_ACI_CMGL_SM* sm, UBYTE update_mem, T_CONC_ASSEMBLY_RETURN conc_stat , |
2319 T_SMS_TYPE received_sms_type, T_MFW_SMS_MEM mem) | 2319 T_SMS_TYPE received_sms_type, T_MFW_SMS_MEM mem) |
2320 { | 2320 { |
2321 int j; | 2321 int j; |
2322 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar | 2322 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar |
2323 // Added this variable to store the voice mail status | 2323 // Added this variable to store the voice mail status |
2324 T_MFW status; | 2324 T_MFW status; |
2325 | 2325 |
2326 #ifndef MMI_LITE | 2326 #ifndef MMI_LITE |
2327 //T_CONC_ASSEMBLY_RETURN concatenated_status; // RAVI | 2327 //T_CONC_ASSEMBLY_RETURN concatenated_status; // RAVI |
2328 // T_SM_DATA_EXT conc_data_ext; // RAVI | 2328 // T_SM_DATA_EXT conc_data_ext; // RAVI |
2329 #endif | 2329 #endif |
2330 int i; | 2330 int i; |
2331 | 2331 |
2332 | 2332 |
2333 TRACE_EVENT("sms_store_new_msg_info"); | 2333 TRACE_EVENT("sms_store_new_msg_info"); |
2334 | 2334 |
2335 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 2335 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
2336 sms_type = MFW_SMS_MESSAGE; | 2336 sms_type = MFW_SMS_MESSAGE; |
2337 #else | 2337 #else |
2338 /*SPR 2530 removed setting of sms_type flag*/ | 2338 /*SPR 2530 removed setting of sms_type flag*/ |
2339 #endif | 2339 #endif |
2340 /*a0393213 OMAPS00109953 - memory added as parameter*/ | 2340 /*a0393213 OMAPS00109953 - memory added as parameter*/ |
2341 if ((j = find_slot_in_msg_info(index, update_mem,mem)) != -1) | 2341 if ((j = find_slot_in_msg_info(index, update_mem,mem)) != -1) |
2342 { | 2342 { |
2343 //x0pleela 07 Feb, 2006 DR: OMAPS00059261 | 2343 //x0pleela 07 Feb, 2006 DR: OMAPS00059261 |
2344 //Initial value of msg_type is set to not voice | 2344 //Initial value of msg_type is set to not voice |
2345 msg_info[j].msg_type = MFW_SMS_NotVOICE; | 2345 msg_info[j].msg_type = MFW_SMS_NotVOICE; |
2346 | 2346 |
2347 TRACE_EVENT_P1("SMS Type is = %d", received_sms_type); | 2347 TRACE_EVENT_P1("SMS Type is = %d", received_sms_type); |
2348 | 2348 |
2349 | 2349 |
2350 #ifdef TI_PS_FF_CONC_SMS | 2350 #ifdef TI_PS_FF_CONC_SMS |
2351 /*SPR 2260*/ | 2351 /*SPR 2260*/ |
2352 if (received_sms_type == CONCATE) | 2352 if (received_sms_type == CONCATE) |
2353 { | 2353 { |
2354 /*a0393213 OMAPS00109953 - code cleanup done*/ | 2354 /*a0393213 OMAPS00109953 - code cleanup done*/ |
2355 UBYTE first_index=0; | 2355 UBYTE first_index=0; |
2356 T_MFW_SMS_MEM first_mem=MFW_MEM_NOTPRESENT; | 2356 T_MFW_SMS_MEM first_mem=MFW_MEM_NOTPRESENT; |
2357 T_CONC_BUF_ELEM* conc_buf_elem; | 2357 T_CONC_BUF_ELEM* conc_buf_elem; |
2358 conc_buf_elem=concSMS_GetFirstIndex_ext(concSMS_GetMsgRef ( sm ), sm->adress); | 2358 conc_buf_elem=concSMS_GetFirstIndex_ext(concSMS_GetMsgRef ( sm ), sm->adress); |
2359 /*a0393213 OMAPS00109953 - The memory type returned by concSMS_GetFirstIndex_ext | 2359 /*a0393213 OMAPS00109953 - The memory type returned by concSMS_GetFirstIndex_ext |
2360 if of psa type. It should be changed to cmh type. Clean solution would be to move this conversion to ACI */ | 2360 if of psa type. It should be changed to cmh type. Clean solution would be to move this conversion to ACI */ |
2361 if(conc_buf_elem) | 2361 if(conc_buf_elem) |
2362 { | 2362 { |
2363 first_index=conc_buf_elem->rec_num; | 2363 first_index=conc_buf_elem->rec_num; |
2364 cmhSMS_getMemCmh(conc_buf_elem->mem,(T_ACI_SMS_STOR*)(&first_mem)); | 2364 cmhSMS_getMemCmh(conc_buf_elem->mem,(T_ACI_SMS_STOR*)(&first_mem)); |
2365 } | 2365 } |
2366 /*a0393213 OMAPS00109953 - Msg Ref (unique number to each message, don't confuse with index) is stored*/ | 2366 /*a0393213 OMAPS00109953 - Msg Ref (unique number to each message, don't confuse with index) is stored*/ |
2367 msg_info[j].msg_ref=concSMS_GetMsgRef ( sm ); | 2367 msg_info[j].msg_ref=concSMS_GetMsgRef ( sm ); |
2368 | 2368 |
2369 if (conc_stat == CONC_COMPLETED) | 2369 if (conc_stat == CONC_COMPLETED) |
2370 { /*replace index withat of first message*/ | 2370 { /*replace index withat of first message*/ |
2371 index = first_index; | 2371 index = first_index; |
2372 /*a0393213 OMAPS00109953 - first_mem is the memory where the first segment of the cSMS resides*/ | 2372 /*a0393213 OMAPS00109953 - first_mem is the memory where the first segment of the cSMS resides*/ |
2373 mem=first_mem; | 2373 mem=first_mem; |
2374 | 2374 |
2375 msg_info[j].concat_status = MFW_SMS_CONC_WHOLE; | 2375 msg_info[j].concat_status = MFW_SMS_CONC_WHOLE; |
2376 TRACE_EVENT("Setting to WHOLE"); | 2376 TRACE_EVENT("Setting to WHOLE"); |
2377 } | 2377 } |
2378 else /*otherwise leave index as it is*/ | 2378 else /*otherwise leave index as it is*/ |
2379 { /*check if message already complete*/ | 2379 { /*check if message already complete*/ |
2387 && msg_info[i].first_mem == first_mem /*a0393213 OMAPS00109953*/ | 2387 && msg_info[i].first_mem == first_mem /*a0393213 OMAPS00109953*/ |
2388 && msg_info[i].concat_status == MFW_SMS_CONC_WHOLE) | 2388 && msg_info[i].concat_status == MFW_SMS_CONC_WHOLE) |
2389 return 1;/*don't bother copying this message into the table*/ // RAVI - Changed return to return 1 | 2389 return 1;/*don't bother copying this message into the table*/ // RAVI - Changed return to return 1 |
2390 } | 2390 } |
2391 } | 2391 } |
2392 | 2392 |
2393 msg_info[j].concat_status = MFW_SMS_CONC_PART; | 2393 msg_info[j].concat_status = MFW_SMS_CONC_PART; |
2394 TRACE_EVENT("Setting to PART"); | 2394 TRACE_EVENT("Setting to PART"); |
2395 } | 2395 } |
2396 | 2396 |
2397 TRACE_EVENT_P1("index = %d",index); | 2397 TRACE_EVENT_P1("index = %d",index); |
2398 | 2398 |
2399 msg_info[j].first_index =first_index; | 2399 msg_info[j].first_index =first_index; |
2400 /*a0393213 OMAPS00109953*/ | 2400 /*a0393213 OMAPS00109953*/ |
2401 msg_info[j].first_mem=first_mem; | 2401 msg_info[j].first_mem=first_mem; |
2402 | 2402 |
2403 /*if complete SMS, delete old fragments*/ | 2403 /*if complete SMS, delete old fragments*/ |
2404 if (conc_stat == CONC_COMPLETED) | 2404 if (conc_stat == CONC_COMPLETED) |
2405 #ifdef FF_MMI_SMS_DYNAMIC | 2405 #ifdef FF_MMI_SMS_DYNAMIC |
2406 for (i=0; i<g_max_messages; i++) | 2406 for (i=0; i<g_max_messages; i++) |
2407 #else | 2407 #else |
2408 for (i=0; i<MAX_MESSAGES; i++) | 2408 for (i=0; i<MAX_MESSAGES; i++) |
2409 #endif | 2409 #endif |
2410 { | 2410 { |
2411 if (msg_info[i].index != -1) | 2411 if (msg_info[i].index != -1) |
2412 { | 2412 { |
2413 /*a0393213 OMAPS00109953*/ | 2413 /*a0393213 OMAPS00109953*/ |
2414 if (msg_info[i].msg_ref==concSMS_GetMsgRef ( sm ) | 2414 if (msg_info[i].msg_ref==concSMS_GetMsgRef ( sm ) |
2415 &&(msg_info[i].concat_status == MFW_SMS_CONC_PART )) | 2415 &&(msg_info[i].concat_status == MFW_SMS_CONC_PART )) |
2416 { | 2416 { |
2417 TRACE_EVENT_P1("Deleting index number:%d", msg_info[i].index); | 2417 TRACE_EVENT_P1("Deleting index number:%d", msg_info[i].index); |
2418 delete_sms_from_table(msg_info[i].index, msg_info[i].mem);/*a0393213 OMAPS00109953*/ | 2418 delete_sms_from_table(msg_info[i].index, msg_info[i].mem);/*a0393213 OMAPS00109953*/ |
2419 } | 2419 } |
2420 } | 2420 } |
2421 | 2421 |
2422 } | 2422 } |
2423 } | 2423 } |
2424 /*a0393213 OMAPS00109953 - new case added - it's the case where segments of cSMS are treated as normal SMS*/ | 2424 /*a0393213 OMAPS00109953 - new case added - it's the case where segments of cSMS are treated as normal SMS*/ |
2425 else if (received_sms_type == NORMAL_IND_CSMS) | 2425 else if (received_sms_type == NORMAL_IND_CSMS) |
2426 { | 2426 { |
2427 TRACE_EVENT( "sms_store_new_msg_info Incomplete sms!!!!"); | 2427 TRACE_EVENT( "sms_store_new_msg_info Incomplete sms!!!!"); |
2428 msg_info[j].first_index = 0xFF;/*invalid index*/ | 2428 msg_info[j].first_index = 0xFF;/*invalid index*/ |
2429 msg_info[j].first_mem=MFW_MEM_NOTPRESENT;/*a0393213 OMAPS00109953*/ | 2429 msg_info[j].first_mem=MFW_MEM_NOTPRESENT;/*a0393213 OMAPS00109953*/ |
2430 msg_info[j].concat_status = MFW_SMS_CONC_PART; | 2430 msg_info[j].concat_status = MFW_SMS_CONC_PART; |
2431 } | 2431 } |
2432 else | 2432 else |
2433 #endif /*TI_PS_FF_CONC_SMS*/ | 2433 #endif /*TI_PS_FF_CONC_SMS*/ |
2434 { | 2434 { |
2435 msg_info[j].first_index = 0xFF;/*invalid index*/ | 2435 msg_info[j].first_index = 0xFF;/*invalid index*/ |
2436 msg_info[j].first_mem=MFW_MEM_NOTPRESENT;/*a0393213 OMAPS00109953*/ | 2436 msg_info[j].first_mem=MFW_MEM_NOTPRESENT;/*a0393213 OMAPS00109953*/ |
2437 msg_info[j].concat_status = MFW_SMS_NO_CONC; | 2437 msg_info[j].concat_status = MFW_SMS_NO_CONC; |
2438 TRACE_EVENT("Setting to NO CONC"); | 2438 TRACE_EVENT("Setting to NO CONC"); |
2439 } | 2439 } |
2440 | 2440 |
2441 | 2441 |
2442 sm->index = index; | 2442 sm->index = index; |
2443 msg_info[j].index = index; | 2443 msg_info[j].index = index; |
2444 msg_info[j].mem=mem;/*a0393213 OMAPS00109953*/ | 2444 msg_info[j].mem=mem;/*a0393213 OMAPS00109953*/ |
2445 | 2445 |
2446 //x0pleela 08 Feb, 2006 DR: OMAPS00059261 | 2446 //x0pleela 08 Feb, 2006 DR: OMAPS00059261 |
2447 //Replacing MT_STATUS_RPT with MFW_SMS_STATRPT as MT_STATUS_RPT is removed | 2447 //Replacing MT_STATUS_RPT with MFW_SMS_STATRPT as MT_STATUS_RPT is removed |
2448 | 2448 |
2449 //x0pleela 07 Feb, 2006 DR: OMAPS00059261 | 2449 //x0pleela 07 Feb, 2006 DR: OMAPS00059261 |
2450 //Update msg_info's message type for STATUS REPORT | 2450 //Update msg_info's message type for STATUS REPORT |
2451 if(( 0x03 & sm->fo ) EQ MFW_MSG_STATUS_REPORT ) | 2451 if(( 0x03 & sm->fo ) EQ MFW_MSG_STATUS_REPORT ) |
2452 { | 2452 { |
2453 msg_info[j].msg_type = MFW_SMS_STATRPT; | 2453 msg_info[j].msg_type = MFW_SMS_STATRPT; |
2454 } | 2454 } |
2455 msg_info[j].stat = sms_decodeStatus(sm->stat); | 2455 msg_info[j].stat = sms_decodeStatus(sm->stat); |
2456 | 2456 |
2457 strcpy((char *)msg_info[j].addr.number, sm->adress); | 2457 strcpy((char *)msg_info[j].addr.number, sm->adress); |
2458 msg_info[j].addr.ton = phb_cvtTon(sm->toa.ton); | 2458 msg_info[j].addr.ton = phb_cvtTon(sm->toa.ton); |
2459 msg_info[j].addr.npi = (T_MFW_PHB_NPI)phb_cvtNpi(sm->toa.npi); | 2459 msg_info[j].addr.npi = (T_MFW_PHB_NPI)phb_cvtNpi(sm->toa.npi); |
2460 | 2460 |
2461 | 2461 |
2462 #ifdef NO_ASCIIZ | 2462 #ifdef NO_ASCIIZ |
2463 memcpy(msg_info[j].addr.tag, | 2463 memcpy(msg_info[j].addr.tag, |
2464 sm->alpha.data, | 2464 sm->alpha.data, |
2465 sm->alpha.len); | 2465 sm->alpha.len); |
2466 msg_info[j].addr.len = sm->alpha.len; | 2466 msg_info[j].addr.len = sm->alpha.len; |
2467 #else | 2467 #else |
2468 phb_Alpha2Gsm(&sm->alpha, | 2468 phb_Alpha2Gsm(&sm->alpha, |
2469 (UBYTE *)msg_info[j].addr.tag); | 2469 (UBYTE *)msg_info[j].addr.tag); |
2470 #endif | 2470 #endif |
2471 | 2471 |
2472 memcpy(&msg_info[j].rctp, &sm->scts, sizeof(T_MFW_SMS_SCTP)); | 2472 memcpy(&msg_info[j].rctp, &sm->scts, sizeof(T_MFW_SMS_SCTP)); |
2473 | 2473 |
2474 // check voice mail status | 2474 // check voice mail status |
2475 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar | 2475 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar |
2476 // Commented the 'if' condition below. | 2476 // Commented the 'if' condition below. |
2477 /* if (sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, | 2477 /* if (sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, |
2478 &sm->toa, &sm->udh) EQ MFW_SMS_VOICE) | 2478 &sm->toa, &sm->udh) EQ MFW_SMS_VOICE) |
2479 msg_info[j].msg_type = MFW_SMS_VOICE;*/ | 2479 msg_info[j].msg_type = MFW_SMS_VOICE;*/ |
2480 status = sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, | 2480 status = sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, |
2482 // Check if it is a voice mail message | 2482 // Check if it is a voice mail message |
2483 if(status == MFW_SMS_VOICE || status == MFW_SMS_VOICEMSG_DELETE) | 2483 if(status == MFW_SMS_VOICE || status == MFW_SMS_VOICEMSG_DELETE) |
2484 { | 2484 { |
2485 // If voicemail message is from group "1100" | 2485 // If voicemail message is from group "1100" |
2486 if(status == MFW_SMS_VOICEMSG_DELETE) | 2486 if(status == MFW_SMS_VOICEMSG_DELETE) |
2487 { | 2487 { |
2488 // Mark this message for deletion | 2488 // Mark this message for deletion |
2489 msg_info[j].stat= MFW_SMS_VOICEMSG_DELETE; | 2489 msg_info[j].stat= MFW_SMS_VOICEMSG_DELETE; |
2490 } | 2490 } |
2491 msg_info[j].msg_type = MFW_SMS_VOICE; | 2491 msg_info[j].msg_type = MFW_SMS_VOICE; |
2492 } | 2492 } |
2493 | 2493 |
2494 coll_sms_read = MFW_SMS_FREE; | 2494 coll_sms_read = MFW_SMS_FREE; |
2495 f_update = MFW_SMS_FREE; | 2495 f_update = MFW_SMS_FREE; |
2496 TRACE_EVENT_P1("UDH Length is = %d", sm->udh.len); | 2496 TRACE_EVENT_P1("UDH Length is = %d", sm->udh.len); |
2497 } | 2497 } |
2498 /*SPR 2260, check if memory full*/ | 2498 /*SPR 2260, check if memory full*/ |
2499 TRACE_EVENT_P2("memory used is = %d, of %d", memory.used, memory.total); | 2499 TRACE_EVENT_P2("memory used is = %d, of %d", memory.used, memory.total); |
2500 if(memory.total == memory.used) | 2500 if(memory.total == memory.used) |
2501 { | 2501 { |
2502 | 2502 |
2503 sms_signal(E_SMS_MEM_FULL, NULL); | 2503 sms_signal(E_SMS_MEM_FULL, NULL); |
2504 } | 2504 } |
2505 return 1; // RAVI | 2505 return 1; // RAVI |
2506 } | 2506 } |
2507 | 2507 |
2508 | 2508 |
2509 | 2509 |
2545 if(initialising_flag == TRUE) | 2545 if(initialising_flag == TRUE) |
2546 sms_signal(E_SMS_MT, &sms_mt); | 2546 sms_signal(E_SMS_MT, &sms_mt); |
2547 else | 2547 else |
2548 { | 2548 { |
2549 //Aug 26, 2004 REF: CRR 23287 Deepa M.D | 2549 //Aug 26, 2004 REF: CRR 23287 Deepa M.D |
2550 //The second parameter is not used in case of | 2550 //The second parameter is not used in case of |
2551 //E_SMS_MT_RECEIVED event.sms_id_wait is the variable | 2551 //E_SMS_MT_RECEIVED event.sms_id_wait is the variable |
2552 //used for MT SMS, which is ignored anyway. | 2552 //used for MT SMS, which is ignored anyway. |
2553 sms_signal(E_SMS_MT_RECEIVED, &sms_id_wait); | 2553 sms_signal(E_SMS_MT_RECEIVED, &sms_id_wait); |
2554 } | 2554 } |
2555 } | 2555 } |
2563 if(initialising_flag == TRUE) | 2563 if(initialising_flag == TRUE) |
2564 sms_signal(E_SMS_MT, &sms_mt); | 2564 sms_signal(E_SMS_MT, &sms_mt); |
2565 else | 2565 else |
2566 { | 2566 { |
2567 //Aug 26, 2004 REF: CRR 23287 Deepa M.D | 2567 //Aug 26, 2004 REF: CRR 23287 Deepa M.D |
2568 //The second parameter is not used in case of | 2568 //The second parameter is not used in case of |
2569 //E_SMS_MT_RECEIVED event.sms_id_wait is the variable | 2569 //E_SMS_MT_RECEIVED event.sms_id_wait is the variable |
2570 //used for MT SMS, which is ignored anyway. | 2570 //used for MT SMS, which is ignored anyway. |
2571 sms_signal(E_SMS_MT_RECEIVED, &sms_id_wait); | 2571 sms_signal(E_SMS_MT_RECEIVED, &sms_id_wait); |
2572 } | 2572 } |
2573 } | 2573 } |
2687 { | 2687 { |
2688 memcpy(sms_status.addr.tag, | 2688 memcpy(sms_status.addr.tag, |
2689 phb_list.entry->name.data, | 2689 phb_list.entry->name.data, |
2690 phb_list.entry->name.len); | 2690 phb_list.entry->name.len); |
2691 sms_status.addr.len = phb_list.entry->name.len; | 2691 sms_status.addr.len = phb_list.entry->name.len; |
2692 | 2692 |
2693 } | 2693 } |
2694 // Apr 12, 2004 REF: CRR 13370 Deepa M.D | 2694 // Apr 12, 2004 REF: CRR 13370 Deepa M.D |
2695 else | 2695 else |
2696 { | 2696 { |
2697 sms_status.addr.tag[0]='\0'; | 2697 sms_status.addr.tag[0]='\0'; |
2698 sms_status.addr.len = 0; | 2698 sms_status.addr.len = 0; |
2699 | 2699 |
2700 } | 2700 } |
2701 } | 2701 } |
2702 #else | 2702 #else |
2703 if (phb_find_entries (PHB_ADN, &phb_index, | 2703 if (phb_find_entries (PHB_ADN, &phb_index, |
2704 MFW_PHB_NUMBER, | 2704 MFW_PHB_NUMBER, |
2705 1, | 2705 1, |
2706 st->ra, | 2706 st->ra, |
2707 &phb_list) EQ MFW_PHB_OK) | 2707 &phb_list) EQ MFW_PHB_OK) |
2708 { | 2708 { |
2709 | 2709 |
2710 if (phb_list.num_entries) | 2710 if (phb_list.num_entries) |
2711 { | 2711 { |
2712 strcpy((char *)sms_status.addr.tag, (char *)phb_list.entry->name); | 2712 strcpy((char *)sms_status.addr.tag, (char *)phb_list.entry->name); |
2713 | 2713 |
2714 } | 2714 } |
2715 } | 2715 } |
2716 #endif | 2716 #endif |
2717 | 2717 |
2718 sms_status.status = st->tp_status; | 2718 sms_status.status = st->tp_status; |
2743 T_MFW sms_set_pref_memory(UBYTE mem) | 2743 T_MFW sms_set_pref_memory(UBYTE mem) |
2744 { | 2744 { |
2745 TRACE_FUNCTION ("sms_set_pref_memory()"); | 2745 TRACE_FUNCTION ("sms_set_pref_memory()"); |
2746 | 2746 |
2747 /*a0393213 OMAPS00109953 - The pref memory is already same as mem*/ | 2747 /*a0393213 OMAPS00109953 - The pref memory is already same as mem*/ |
2748 if(memory.mem==mem) | 2748 if(memory.mem==mem) |
2749 return MFW_SMS_OK; | 2749 return MFW_SMS_OK; |
2750 | 2750 |
2751 if (sAT_PlusCPMS(CMD_SRC_LCL, | 2751 if (sAT_PlusCPMS(CMD_SRC_LCL, |
2752 sms_mem_cvt(mem), | 2752 sms_mem_cvt(mem), |
2753 sms_mem_cvt(mem), | 2753 sms_mem_cvt(mem), |
2769 /*a0393213 OMAPS00109953 - memory added as parameter*/ | 2769 /*a0393213 OMAPS00109953 - memory added as parameter*/ |
2770 T_MFW sms_read(UBYTE type, UBYTE index, T_MFW_SMS_MEM sms_memory) | 2770 T_MFW sms_read(UBYTE type, UBYTE index, T_MFW_SMS_MEM sms_memory) |
2771 { | 2771 { |
2772 TRACE_EVENT_P1("sms_read():%d",index); | 2772 TRACE_EVENT_P1("sms_read():%d",index); |
2773 | 2773 |
2774 /*a0393213 OMAPS00109953 - set preferred memory before calling sAT_PlusCMGR*/ | 2774 /*a0393213 OMAPS00109953 - set preferred memory before calling sAT_PlusCMGR*/ |
2775 if(sms_set_pref_memory(sms_memory)!=MFW_SMS_OK) | 2775 if(sms_set_pref_memory(sms_memory)!=MFW_SMS_OK) |
2776 { | 2776 { |
2777 TRACE_ERROR("sms_read_msg_info():Not able to set pref memory"); | 2777 TRACE_ERROR("sms_read_msg_info():Not able to set pref memory"); |
2778 return MFW_SMS_FAIL; | 2778 return MFW_SMS_FAIL; |
2779 } | 2779 } |
2815 #ifdef TI_PS_FF_CONC_SMS | 2815 #ifdef TI_PS_FF_CONC_SMS |
2816 T_SM_DATA_EXT conc_data_ext; | 2816 T_SM_DATA_EXT conc_data_ext; |
2817 #endif /*TI_PS_FF_CONC_SMS*/ | 2817 #endif /*TI_PS_FF_CONC_SMS*/ |
2818 //Feb 28, 2004 REF: CRR 28809 Deepa M.D | 2818 //Feb 28, 2004 REF: CRR 28809 Deepa M.D |
2819 //sms_mo is made a local variable.It will be allocated /deallocated dynamically. | 2819 //sms_mo is made a local variable.It will be allocated /deallocated dynamically. |
2820 T_MFW_SMS_MO *sms_mo=NULL; | 2820 T_MFW_SMS_MO *sms_mo=NULL; |
2821 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 2821 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
2822 UBYTE wap_sms = FALSE; | 2822 UBYTE wap_sms = FALSE; |
2823 #endif | 2823 #endif |
2824 TRACE_FUNCTION ("rAT_PlusCMGR()"); | 2824 TRACE_FUNCTION ("rAT_PlusCMGR()"); |
2825 TRACE_EVENT_P2("messagepointer:%d, Cellbroadcast pointer:%d", sm, cbm); | 2825 TRACE_EVENT_P2("messagepointer:%d, Cellbroadcast pointer:%d", sm, cbm); |
2826 cmgr_awaiting_ok = TRUE; // Marcus: Issue 2260: 03/10/2002 | 2826 cmgr_awaiting_ok = TRUE; // Marcus: Issue 2260: 03/10/2002 |
2827 #ifdef TI_PS_FF_CONC_SMS | 2827 #ifdef TI_PS_FF_CONC_SMS |
2828 conc_data_ext.data = NULL; // Jul 07, 2004 REF: CRR 15846 Deepa M.D | 2828 conc_data_ext.data = NULL; // Jul 07, 2004 REF: CRR 15846 Deepa M.D |
2829 #endif /*TI_PS_FF_CONC_SMS*/ | 2829 #endif /*TI_PS_FF_CONC_SMS*/ |
2830 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 2830 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
2831 /* SPR#2086 - SH - Intercept a WAP SMS */ | 2831 /* SPR#2086 - SH - Intercept a WAP SMS */ |
2832 { | 2832 { |
2833 USHORT destinatorPort = sm->udh.data[3]+sm->udh.data[2]*0x100; | 2833 USHORT destinatorPort = sm->udh.data[3]+sm->udh.data[2]*0x100; |
2834 USHORT originatorPort = sm->udh.data[5]+sm->udh.data[4]*0x100; | 2834 USHORT originatorPort = sm->udh.data[5]+sm->udh.data[4]*0x100; |
2835 | 2835 |
2836 if (destinatorPort==2948 | 2836 if (destinatorPort==2948 |
2837 || destinatorPort==2949 | 2837 || destinatorPort==2949 |
2838 || originatorPort==9200 | 2838 || originatorPort==9200 |
2839 || originatorPort==9201 | 2839 || originatorPort==9201 |
2840 || originatorPort==9202 | 2840 || originatorPort==9202 |
2841 || originatorPort==9203) | 2841 || originatorPort==9203) |
2842 { | 2842 { |
2843 wap_sms = TRUE; | 2843 wap_sms = TRUE; |
2844 } | 2844 } |
2845 } | 2845 } |
2846 #endif | 2846 #endif |
2847 switch (sms_type) | 2847 switch (sms_type) |
2849 case MFW_SMS_MESSAGE: | 2849 case MFW_SMS_MESSAGE: |
2850 { if (sm != NULL) /*SPR2260 make sure we have a valid pointer*/ | 2850 { if (sm != NULL) /*SPR2260 make sure we have a valid pointer*/ |
2851 { switch (0x03 & sm->fo) | 2851 { switch (0x03 & sm->fo) |
2852 { | 2852 { |
2853 case MFW_MSG_DELIVER: //x0pleela 01 Feb, 2006 DR: OMAPS00059261 /* SMS type: MT */ | 2853 case MFW_MSG_DELIVER: //x0pleela 01 Feb, 2006 DR: OMAPS00059261 /* SMS type: MT */ |
2854 { | 2854 { |
2855 #ifdef TI_PS_FF_CONC_SMS | 2855 #ifdef TI_PS_FF_CONC_SMS |
2856 USHORT conc_msg_ref; | 2856 USHORT conc_msg_ref; |
2857 UBYTE conc_index; | 2857 UBYTE conc_index; |
2858 T_CONC_BUF_ELEM* conc_buf_elem=NULL;/*a0393213 OMAPS00109953*/ | 2858 T_CONC_BUF_ELEM* conc_buf_elem=NULL;/*a0393213 OMAPS00109953*/ |
2859 int i;/*SPR2260*/ | 2859 int i;/*SPR2260*/ |
2860 BOOL continue_flag=FALSE;/*SPR2260*/ | 2860 BOOL continue_flag=FALSE;/*SPR2260*/ |
2861 #endif /*TI_PS_FF_CONC_SMS*/ | 2861 #endif /*TI_PS_FF_CONC_SMS*/ |
2862 | 2862 |
2863 | 2863 |
2864 TRACE_EVENT_P1("UDH Length is = %d", sm->udh.len); | 2864 TRACE_EVENT_P1("UDH Length is = %d", sm->udh.len); |
2865 received_sms_type = SMS_getSMSType( &sm->udh, sm->adress, MODE3);/*a0393213 OMAPS00109953*/ | 2865 received_sms_type = SMS_getSMSType( &sm->udh, sm->adress, MODE3);/*a0393213 OMAPS00109953*/ |
2866 TRACE_EVENT_P1("SMS Type is = %d", received_sms_type); | 2866 TRACE_EVENT_P1("SMS Type is = %d", received_sms_type); |
2867 | 2867 |
2868 #ifdef TI_PS_FF_CONC_SMS | 2868 #ifdef TI_PS_FF_CONC_SMS |
2869 if (received_sms_type == CONCATE) | 2869 if (received_sms_type == CONCATE) |
2870 { | 2870 { |
2871 /*a0393213 OMAPS00109953*/ | 2871 /*a0393213 OMAPS00109953*/ |
2872 concatenated_status =concSMS_Collect(&conc_data_ext, sm, FALSE, SMS_STOR_NotPresent); | 2872 concatenated_status =concSMS_Collect(&conc_data_ext, sm, FALSE, SMS_STOR_NotPresent); |
2873 TRACE_EVENT_P2("conc status: %d, conc length: %d", concatenated_status, conc_data_ext.len); | 2873 TRACE_EVENT_P2("conc status: %d, conc length: %d", concatenated_status, conc_data_ext.len); |
2874 | 2874 |
2875 switch (concatenated_status) | 2875 switch (concatenated_status) |
2876 { | 2876 { |
2877 | 2877 |
2878 case CONC_ERR_BUF_FULL: | 2878 case CONC_ERR_BUF_FULL: |
2879 TRACE_EVENT("Concatented SMS buffer Full Error"); | 2879 TRACE_EVENT("Concatented SMS buffer Full Error"); |
2880 sms_signal(E_SMS_ERR, NULL); | 2880 sms_signal(E_SMS_ERR, NULL); |
2881 break; | 2881 break; |
2882 case CONC_ERR_UNKN: | 2882 case CONC_ERR_UNKN: |
2883 TRACE_EVENT("Concatenated SMS error"); | 2883 TRACE_EVENT("Concatenated SMS error"); |
2884 case CONC_CONTINUED: //not last SMS | 2884 case CONC_CONTINUED: //not last SMS |
2885 TRACE_EVENT("Concatenation Continued"); | 2885 TRACE_EVENT("Concatenation Continued"); |
2886 /*SPR 2260*/ | 2886 /*SPR 2260*/ |
2887 cmgr_awaiting_ok = FALSE; // Marcus: Issue 2260: 03/10/2002 | 2887 cmgr_awaiting_ok = FALSE; // Marcus: Issue 2260: 03/10/2002 |
2888 | 2888 |
2889 /*if the index exists in the message table, process the message*/ | 2889 /*if the index exists in the message table, process the message*/ |
2890 #ifdef FF_MMI_SMS_DYNAMIC | 2890 #ifdef FF_MMI_SMS_DYNAMIC |
2891 for (i=0; i <g_max_messages;i++) | 2891 for (i=0; i <g_max_messages;i++) |
2892 #else | 2892 #else |
2893 for (i=0; i <MAX_MESSAGES;i++) | 2893 for (i=0; i <MAX_MESSAGES;i++) |
2894 #endif | 2894 #endif |
2895 if (msg_info[i].index == sm->msg_ref && msg_info[i].concat_status == MFW_SMS_CONC_PART) | 2895 if (msg_info[i].index == sm->msg_ref && msg_info[i].concat_status == MFW_SMS_CONC_PART) |
2896 continue_flag = TRUE; | 2896 continue_flag = TRUE; |
2897 if (!continue_flag) | 2897 if (!continue_flag) |
2898 break; | 2898 break; |
2899 | 2899 |
2900 case CONC_COMPLETED: | 2900 case CONC_COMPLETED: |
2901 { | 2901 { |
2902 TRACE_EVENT("Concatenation Completed"); | 2902 TRACE_EVENT("Concatenation Completed"); |
2903 memset(&sms_mt, 0, sizeof(sms_mt)); | 2903 memset(&sms_mt, 0, sizeof(sms_mt)); |
2904 /*a0393213 OMAPS00109953*/ | 2904 /*a0393213 OMAPS00109953*/ |
2905 conc_msg_ref=concSMS_GetMsgRef(sm); | 2905 conc_msg_ref=concSMS_GetMsgRef(sm); |
2906 conc_buf_elem=concSMS_GetFirstIndex_ext(conc_msg_ref,sm->adress); | 2906 conc_buf_elem=concSMS_GetFirstIndex_ext(conc_msg_ref,sm->adress); |
2907 conc_index=conc_buf_elem->rec_num; | 2907 conc_index=conc_buf_elem->rec_num; |
2908 #ifdef NO_ASCIIZ | 2908 #ifdef NO_ASCIIZ |
2909 memcpy(sms_mt.orig_addr.tag, | 2909 memcpy(sms_mt.orig_addr.tag, |
2910 sm->alpha.data, | 2910 sm->alpha.data, |
2911 sm->alpha.len); | 2911 sm->alpha.len); |
2930 sms_mt.index = conc_index; | 2930 sms_mt.index = conc_index; |
2931 else | 2931 else |
2932 sms_mt.index = sm->msg_ref; | 2932 sms_mt.index = sm->msg_ref; |
2933 /*a0393213 OMAPS00109953 - the memory is of psa type. It should be converted to cmh type | 2933 /*a0393213 OMAPS00109953 - the memory is of psa type. It should be converted to cmh type |
2934 Clean solution would be to move this conversion to ACI*/ | 2934 Clean solution would be to move this conversion to ACI*/ |
2935 cmhSMS_getMemCmh(conc_buf_elem->mem,(T_ACI_SMS_STOR*)(&(sms_mt.memory))); | 2935 cmhSMS_getMemCmh(conc_buf_elem->mem,(T_ACI_SMS_STOR*)(&(sms_mt.memory))); |
2936 sms_mt.rp = sm->fo >> 7 & 1; | 2936 sms_mt.rp = sm->fo >> 7 & 1; |
2937 | 2937 |
2938 /* SBH */ | 2938 /* SBH */ |
2939 if (sm->dcs & 0x10) /* Bit 5 indicates that we should get message class from bits 0 & 1 */ | 2939 if (sm->dcs & 0x10) /* Bit 5 indicates that we should get message class from bits 0 & 1 */ |
2940 { | 2940 { |
2943 else /* Otherwise, set to default value */ | 2943 else /* Otherwise, set to default value */ |
2944 { | 2944 { |
2945 sms_mt.ti = 1; | 2945 sms_mt.ti = 1; |
2946 } | 2946 } |
2947 /* SBH end */ | 2947 /* SBH end */ |
2948 | 2948 |
2949 memcpy((char *)sms_mt.sctp.year, (char *)sm->scts.year, MAX_SCTP_DIGITS); | 2949 memcpy((char *)sms_mt.sctp.year, (char *)sm->scts.year, MAX_SCTP_DIGITS); |
2950 memcpy((char *)sms_mt.sctp.month, (char *)sm->scts.month, MAX_SCTP_DIGITS); | 2950 memcpy((char *)sms_mt.sctp.month, (char *)sm->scts.month, MAX_SCTP_DIGITS); |
2951 memcpy((char *)sms_mt.sctp.day, (char *)sm->scts.day, MAX_SCTP_DIGITS); | 2951 memcpy((char *)sms_mt.sctp.day, (char *)sm->scts.day, MAX_SCTP_DIGITS); |
2952 memcpy((char *)sms_mt.sctp.hour, (char *)sm->scts.hour, MAX_SCTP_DIGITS); | 2952 memcpy((char *)sms_mt.sctp.hour, (char *)sm->scts.hour, MAX_SCTP_DIGITS); |
2953 memcpy((char *)sms_mt.sctp.minute, (char *)sm->scts.minute, MAX_SCTP_DIGITS); | 2953 memcpy((char *)sms_mt.sctp.minute, (char *)sm->scts.minute, MAX_SCTP_DIGITS); |
2954 memcpy((char *)sms_mt.sctp.second, (char *)sm->scts.second, MAX_SCTP_DIGITS); | 2954 memcpy((char *)sms_mt.sctp.second, (char *)sm->scts.second, MAX_SCTP_DIGITS); |
2955 sms_mt.sctp.timezone = sm->scts.timezone; | 2955 sms_mt.sctp.timezone = sm->scts.timezone; |
2956 | 2956 |
2957 /* copy length of whole concat SMS*/ | 2957 /* copy length of whole concat SMS*/ |
2958 if (conc_data_ext.len > MAX_MSG_LEN) | 2958 if (conc_data_ext.len > MAX_MSG_LEN) |
2959 sms_mt.msg_len = MAX_MSG_LEN; | 2959 sms_mt.msg_len = MAX_MSG_LEN; |
2960 else | 2960 else |
2961 sms_mt.msg_len = conc_data_ext.len; | 2961 sms_mt.msg_len = conc_data_ext.len; |
2978 { | 2978 { |
2979 MFREE(conc_data_ext.data); | 2979 MFREE(conc_data_ext.data); |
2980 } | 2980 } |
2981 sms_mt.udh_len = sm->udh.len; | 2981 sms_mt.udh_len = sm->udh.len; |
2982 memcpy((char *)sms_mt.udh, (char *)sm->udh.data, sm->udh.len); | 2982 memcpy((char *)sms_mt.udh, (char *)sm->udh.data, sm->udh.len); |
2983 | 2983 |
2984 /*MC SPR 2260, need to call this function to update CPHS voicemail data*/ | 2984 /*MC SPR 2260, need to call this function to update CPHS voicemail data*/ |
2985 if (sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, | 2985 if (sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, |
2986 &sm->toa, &sm->udh) == MFW_SMS_VOICE) | 2986 &sm->toa, &sm->udh) == MFW_SMS_VOICE) |
2987 sms_mt.voicemail = TRUE; | 2987 sms_mt.voicemail = TRUE; |
2988 else | 2988 else |
2989 sms_mt.voicemail = FALSE; | 2989 sms_mt.voicemail = FALSE; |
2990 | 2990 |
2991 sms_type = MFW_NO_MESSAGE; | 2991 sms_type = MFW_NO_MESSAGE; |
2992 | 2992 |
2993 coll_sms_read = MFW_SMS_FREE; | 2993 coll_sms_read = MFW_SMS_FREE; |
2994 /*whenever some operation is done the pref memory should be set back to SIM*/ | 2994 /*whenever some operation is done the pref memory should be set back to SIM*/ |
2995 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) | 2995 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) |
2996 { | 2996 { |
2997 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); | 2997 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); |
2998 } | 2998 } |
2999 sms_signal(E_SMS_MT, &sms_mt); | 2999 sms_signal(E_SMS_MT, &sms_mt); |
3000 } | 3000 } |
3001 } | 3001 } |
3002 } | 3002 } |
3003 else | 3003 else |
3013 phb_Alpha2Gsm(&sm->alpha, (UBYTE *)sms_mt.orig_addr.tag); | 3013 phb_Alpha2Gsm(&sm->alpha, (UBYTE *)sms_mt.orig_addr.tag); |
3014 #endif | 3014 #endif |
3015 | 3015 |
3016 if (sm->toa.ton == TON_International) | 3016 if (sm->toa.ton == TON_International) |
3017 sprintf(sms_mt.orig_addr.number, "+%s", sm->adress); | 3017 sprintf(sms_mt.orig_addr.number, "+%s", sm->adress); |
3018 else | 3018 else |
3019 strcpy(sms_mt.orig_addr.number, sm->adress); | 3019 strcpy(sms_mt.orig_addr.number, sm->adress); |
3020 | 3020 |
3021 sms_mt.orig_addr.ton = phb_cvtTon(sm->toa.ton); | 3021 sms_mt.orig_addr.ton = phb_cvtTon(sm->toa.ton); |
3022 sms_mt.orig_addr.npi = (T_MFW_PHB_NPI)phb_cvtNpi(sm->toa.npi); | 3022 sms_mt.orig_addr.npi = (T_MFW_PHB_NPI)phb_cvtNpi(sm->toa.npi); |
3023 | 3023 |
3024 if (sm->tosca.ton == TON_International) | 3024 if (sm->tosca.ton == TON_International) |
3025 sprintf(sms_mt.sc_addr, "+%s", sm->sca); | 3025 sprintf(sms_mt.sc_addr, "+%s", sm->sca); |
3026 else | 3026 else |
3027 strcpy(sms_mt.sc_addr, sm->sca); | 3027 strcpy(sms_mt.sc_addr, sm->sca); |
3028 | 3028 |
3029 sms_mt.prot_id = (UBYTE)sm->pid; | 3029 sms_mt.prot_id = (UBYTE)sm->pid; |
3030 sms_mt.dcs = (UBYTE)sm->dcs & 0xFC; /* Ignore message class */ | 3030 sms_mt.dcs = (UBYTE)sm->dcs & 0xFC; /* Ignore message class */ |
3031 sms_mt.rp = sm->fo >> 7 & 1; | 3031 sms_mt.rp = sm->fo >> 7 & 1; |
3032 | 3032 |
3033 // PATCH JPS 04.10 END | 3033 // PATCH JPS 04.10 END |
3041 sms_mt.ti = 1; | 3041 sms_mt.ti = 1; |
3042 } | 3042 } |
3043 /* SBH end */ | 3043 /* SBH end */ |
3044 | 3044 |
3045 TRACE_EVENT_P2("dcs: %d, ti: %d", sms_mt.dcs, sms_mt.ti); | 3045 TRACE_EVENT_P2("dcs: %d, ti: %d", sms_mt.dcs, sms_mt.ti); |
3046 | 3046 |
3047 memcpy((char *)sms_mt.sctp.year, (char *)sm->scts.year, MAX_SCTP_DIGITS); | 3047 memcpy((char *)sms_mt.sctp.year, (char *)sm->scts.year, MAX_SCTP_DIGITS); |
3048 memcpy((char *)sms_mt.sctp.month, (char *)sm->scts.month, MAX_SCTP_DIGITS); | 3048 memcpy((char *)sms_mt.sctp.month, (char *)sm->scts.month, MAX_SCTP_DIGITS); |
3049 memcpy((char *)sms_mt.sctp.day, (char *)sm->scts.day, MAX_SCTP_DIGITS); | 3049 memcpy((char *)sms_mt.sctp.day, (char *)sm->scts.day, MAX_SCTP_DIGITS); |
3050 memcpy((char *)sms_mt.sctp.hour, (char *)sm->scts.hour, MAX_SCTP_DIGITS); | 3050 memcpy((char *)sms_mt.sctp.hour, (char *)sm->scts.hour, MAX_SCTP_DIGITS); |
3051 memcpy((char *)sms_mt.sctp.minute, (char *)sm->scts.minute, MAX_SCTP_DIGITS); | 3051 memcpy((char *)sms_mt.sctp.minute, (char *)sm->scts.minute, MAX_SCTP_DIGITS); |
3054 sms_mt.msg_len = sm->data.len; | 3054 sms_mt.msg_len = sm->data.len; |
3055 TRACE_EVENT_P2("msg_len %d, data.len %d", sms_mt.msg_len, sm->data.len); | 3055 TRACE_EVENT_P2("msg_len %d, data.len %d", sms_mt.msg_len, sm->data.len); |
3056 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 3056 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
3057 /* SPR#2086 - SH - If we've got a WAP SMS, replace the message | 3057 /* SPR#2086 - SH - If we've got a WAP SMS, replace the message |
3058 * with a string */ | 3058 * with a string */ |
3059 | 3059 |
3060 if (wap_sms) | 3060 if (wap_sms) |
3061 { | 3061 { |
3062 char *message = "WAP SMS"; | 3062 char *message = "WAP SMS"; |
3063 | 3063 |
3064 strcpy(sms_mt.sms_msg, message); | 3064 strcpy(sms_mt.sms_msg, message); |
3065 sms_mt.msg_len = strlen(message); | 3065 sms_mt.msg_len = strlen(message); |
3066 } | 3066 } |
3067 else | 3067 else |
3068 { | 3068 { |
3069 | 3069 |
3070 /*SPR 2260, if invalid message just set text to NULL*/ | 3070 /*SPR 2260, if invalid message just set text to NULL*/ |
3071 #endif | 3071 #endif |
3072 if (sm->stat == SMS_STAT_Invalid) | 3072 if (sm->stat == SMS_STAT_Invalid) |
3073 memset(sms_mt.sms_msg, NULL, MAX_MSG_LEN_ARRAY); | 3073 memset(sms_mt.sms_msg, NULL, MAX_MSG_LEN_ARRAY); |
3074 else | 3074 else |
3075 { | 3075 { |
3076 memcpy(sms_mt.sms_msg, (char*)sm->data.data, sm->data.len); | 3076 memcpy(sms_mt.sms_msg, (char*)sm->data.data, sm->data.len); |
3077 sms_mt.msg_len = sm->data.len; | 3077 sms_mt.msg_len = sm->data.len; |
3078 | 3078 |
3079 } | 3079 } |
3080 /*SPR 2260 end*/ | 3080 /*SPR 2260 end*/ |
3081 sms_mt.udh_len = sm->udh.len; | 3081 sms_mt.udh_len = sm->udh.len; |
3082 memcpy((char *)sms_mt.udh, (char *)sm->udh.data, sm->udh.len); | 3082 memcpy((char *)sms_mt.udh, (char *)sm->udh.data, sm->udh.len); |
3083 sms_type = MFW_NO_MESSAGE; | 3083 sms_type = MFW_NO_MESSAGE; |
3085 coll_sms_read = MFW_SMS_FREE; | 3085 coll_sms_read = MFW_SMS_FREE; |
3086 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 3086 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
3087 } | 3087 } |
3088 #endif | 3088 #endif |
3089 | 3089 |
3090 /*MC SPR 2260, need to call this function to update CPHS voicemail data*/ | 3090 /*MC SPR 2260, need to call this function to update CPHS voicemail data*/ |
3091 if (sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, | 3091 if (sms_check_voice_mail(sm->pid, sm->dcs, sm->adress, |
3092 &sm->toa, &sm->udh) == MFW_SMS_VOICE) | 3092 &sm->toa, &sm->udh) == MFW_SMS_VOICE) |
3093 sms_mt.voicemail = TRUE; | 3093 sms_mt.voicemail = TRUE; |
3094 else | 3094 else |
3095 sms_mt.voicemail = FALSE; | 3095 sms_mt.voicemail = FALSE; |
3096 /*whenever some operation is done the pref memory should be set back to SIM*/ | 3096 /*whenever some operation is done the pref memory should be set back to SIM*/ |
3097 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) | 3097 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) |
3098 { | 3098 { |
3099 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); | 3099 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); |
3100 } | 3100 } |
3101 sms_signal(E_SMS_MT, &sms_mt); | 3101 sms_signal(E_SMS_MT, &sms_mt); |
3102 } | 3102 } |
3103 } | 3103 } |
3104 break; | 3104 break; |
3105 | 3105 |
3106 case MFW_MSG_SUBMIT://x0pleela 01 Feb, 2006 DR: OMAPS00059261 /* SMS type: MO */ | 3106 case MFW_MSG_SUBMIT://x0pleela 01 Feb, 2006 DR: OMAPS00059261 /* SMS type: MO */ |
3107 { | 3107 { |
3108 #ifdef TI_PS_FF_CONC_SMS | 3108 #ifdef TI_PS_FF_CONC_SMS |
3109 int i;/*SPR2260*/ | 3109 int i;/*SPR2260*/ |
3110 BOOL continue_flag=FALSE; | 3110 BOOL continue_flag=FALSE; |
3111 USHORT conc_msg_ref;/*SPR 2260*/ | 3111 USHORT conc_msg_ref;/*SPR 2260*/ |
3112 UBYTE conc_index; | 3112 UBYTE conc_index; |
3113 /*a0393213 OMAPS00109953*/ | 3113 /*a0393213 OMAPS00109953*/ |
3114 T_CONC_BUF_ELEM* conc_buf_elem=NULL; | 3114 T_CONC_BUF_ELEM* conc_buf_elem=NULL; |
3115 #endif /*TI_PS_FF_CONC_SMS*/ | 3115 #endif /*TI_PS_FF_CONC_SMS*/ |
3116 | 3116 |
3117 //Feb 28, 2004 REF: CRR 28809 Deepa M.D | 3117 //Feb 28, 2004 REF: CRR 28809 Deepa M.D |
3118 //Allocate sms_mo dynamically | 3118 //Allocate sms_mo dynamically |
3119 sms_mo = (T_MFW_SMS_MO*)mfwAlloc(sizeof(T_MFW_SMS_MO)); | 3119 sms_mo = (T_MFW_SMS_MO*)mfwAlloc(sizeof(T_MFW_SMS_MO)); |
3120 if (sms_mo == NULL) | 3120 if (sms_mo == NULL) |
3121 { | 3121 { |
3122 TRACE_EVENT("sms_mo alloc failed"); | 3122 TRACE_EVENT("sms_mo alloc failed"); |
3123 return ; | 3123 return ; |
3124 } | 3124 } |
3129 if (received_sms_type == CONCATE) | 3129 if (received_sms_type == CONCATE) |
3130 { | 3130 { |
3131 /*a0393213 OMAPS00109953 - memory added as parameter*/ | 3131 /*a0393213 OMAPS00109953 - memory added as parameter*/ |
3132 concatenated_status =concSMS_Collect(&conc_data_ext, sm, FALSE, SMS_STOR_NotPresent); | 3132 concatenated_status =concSMS_Collect(&conc_data_ext, sm, FALSE, SMS_STOR_NotPresent); |
3133 TRACE_EVENT_P2("conc status: %d, conc length: %d", concatenated_status, conc_data_ext.len); | 3133 TRACE_EVENT_P2("conc status: %d, conc length: %d", concatenated_status, conc_data_ext.len); |
3134 | 3134 |
3135 | 3135 |
3136 TRACE_EVENT_P1("UDH Length is = %d", sm->udh.len); | 3136 TRACE_EVENT_P1("UDH Length is = %d", sm->udh.len); |
3137 | 3137 |
3138 | 3138 |
3139 | 3139 |
3140 switch (concatenated_status) | 3140 switch (concatenated_status) |
3141 { | 3141 { |
3142 | 3142 |
3143 case CONC_ERR_BUF_FULL: | 3143 case CONC_ERR_BUF_FULL: |
3144 TRACE_EVENT("Concatented SMS buffer Full Error"); | 3144 TRACE_EVENT("Concatented SMS buffer Full Error"); |
3145 sms_signal(E_SMS_ERR, NULL); | 3145 sms_signal(E_SMS_ERR, NULL); |
3146 break; | 3146 break; |
3147 case CONC_ERR_UNKN: | 3147 case CONC_ERR_UNKN: |
3158 if (msg_info[i].index == sm->msg_ref && msg_info[i].concat_status == MFW_SMS_CONC_PART) | 3158 if (msg_info[i].index == sm->msg_ref && msg_info[i].concat_status == MFW_SMS_CONC_PART) |
3159 continue_flag = TRUE; | 3159 continue_flag = TRUE; |
3160 if (!continue_flag) | 3160 if (!continue_flag) |
3161 break; | 3161 break; |
3162 case CONC_COMPLETED: | 3162 case CONC_COMPLETED: |
3163 { | 3163 { |
3164 | 3164 |
3165 TRACE_EVENT("Concatenation Completed"); | 3165 TRACE_EVENT("Concatenation Completed"); |
3166 | 3166 |
3167 memset(sms_mo, 0, sizeof(T_MFW_SMS_MO)); | 3167 memset(sms_mo, 0, sizeof(T_MFW_SMS_MO)); |
3168 /*SPR 2260*/ | 3168 /*SPR 2260*/ |
3169 /*a0393213 OMAPS00109953*/ | 3169 /*a0393213 OMAPS00109953*/ |
3170 conc_msg_ref=concSMS_GetMsgRef(sm); | 3170 conc_msg_ref=concSMS_GetMsgRef(sm); |
3171 conc_buf_elem=concSMS_GetFirstIndex_ext(conc_msg_ref,sm->adress); | 3171 conc_buf_elem=concSMS_GetFirstIndex_ext(conc_msg_ref,sm->adress); |
3172 conc_index=conc_buf_elem->rec_num; | 3172 conc_index=conc_buf_elem->rec_num; |
3173 TRACE_EVENT_P2("msg_len: %d conc len: %d", sms_mo->msg_len, conc_data_ext.len); | 3173 TRACE_EVENT_P2("msg_len: %d conc len: %d", sms_mo->msg_len, conc_data_ext.len); |
3174 | 3174 |
3175 #ifdef NO_ASCIIZ | 3175 #ifdef NO_ASCIIZ |
3176 memcpy(sms_mo->dest_addr.tag, | 3176 memcpy(sms_mo->dest_addr.tag, |
3177 sm->alpha.data, | 3177 sm->alpha.data, |
3178 sm->alpha.len); | 3178 sm->alpha.len); |
3179 sms_mo->dest_addr.len = sm->alpha.len; | 3179 sms_mo->dest_addr.len = sm->alpha.len; |
3185 sms_mo->dest_addr.npi = (T_MFW_PHB_NPI)phb_cvtNpi(sm->toa.npi); | 3185 sms_mo->dest_addr.npi = (T_MFW_PHB_NPI)phb_cvtNpi(sm->toa.npi); |
3186 if (sm->tosca.ton == TON_International) | 3186 if (sm->tosca.ton == TON_International) |
3187 sprintf(sms_mo->sc_addr, "+%s", sm->sca); | 3187 sprintf(sms_mo->sc_addr, "+%s", sm->sca); |
3188 else | 3188 else |
3189 strcpy((char *)sms_mo->sc_addr, sm->sca); | 3189 strcpy((char *)sms_mo->sc_addr, sm->sca); |
3190 | 3190 |
3191 sms_mo->prot_id = (UBYTE)sm->pid; | 3191 sms_mo->prot_id = (UBYTE)sm->pid; |
3192 sms_mo->dcs = sm->dcs; | 3192 sms_mo->dcs = sm->dcs; |
3193 | 3193 |
3194 /*MC SPR 2260, message index should be set to that of first index in | 3194 /*MC SPR 2260, message index should be set to that of first index in |
3195 concatenated message if this is a complete message*/ | 3195 concatenated message if this is a complete message*/ |
3196 if (concatenated_status == CONC_COMPLETED) | 3196 if (concatenated_status == CONC_COMPLETED) |
3197 sms_mo->msg_ref = conc_index; | 3197 sms_mo->msg_ref = conc_index; |
3198 else | 3198 else |
3199 sms_mo->msg_ref = sm->msg_ref; | 3199 sms_mo->msg_ref = sm->msg_ref; |
3200 /*a0393213 OMAPS00109953 - the memory is of psa type. It should be converted to cmh type. | 3200 /*a0393213 OMAPS00109953 - the memory is of psa type. It should be converted to cmh type. |
3201 Clean solution would be to move this ACI*/ | 3201 Clean solution would be to move this ACI*/ |
3202 cmhSMS_getMemCmh(conc_buf_elem->mem,(T_ACI_SMS_STOR*)(&(sms_mo->memory ))); | 3202 cmhSMS_getMemCmh(conc_buf_elem->mem,(T_ACI_SMS_STOR*)(&(sms_mo->memory ))); |
3203 | 3203 |
3204 sms_mo->vp_mode = 0x03 & sm->fo << 2; | 3204 sms_mo->vp_mode = 0x03 & sm->fo << 2; |
3205 sms_mo->vp_rel = (UBYTE)sm->vp_rel; | 3205 sms_mo->vp_rel = (UBYTE)sm->vp_rel; |
3206 | 3206 |
3207 memcpy((char *)sms_mo->vp_abs.year, (char *)sm->scts.year, MAX_SCTP_DIGITS); | 3207 memcpy((char *)sms_mo->vp_abs.year, (char *)sm->scts.year, MAX_SCTP_DIGITS); |
3208 memcpy((char *)sms_mo->vp_abs.month, (char *)sm->scts.month, MAX_SCTP_DIGITS); | 3208 memcpy((char *)sms_mo->vp_abs.month, (char *)sm->scts.month, MAX_SCTP_DIGITS); |
3209 memcpy((char *)sms_mo->vp_abs.day, (char *)sm->scts.day, MAX_SCTP_DIGITS); | 3209 memcpy((char *)sms_mo->vp_abs.day, (char *)sm->scts.day, MAX_SCTP_DIGITS); |
3210 memcpy((char *)sms_mo->vp_abs.hour, (char *)sm->scts.hour, MAX_SCTP_DIGITS); | 3210 memcpy((char *)sms_mo->vp_abs.hour, (char *)sm->scts.hour, MAX_SCTP_DIGITS); |
3211 memcpy((char *)sms_mo->vp_abs.minute, (char *)sm->scts.minute, MAX_SCTP_DIGITS); | 3211 memcpy((char *)sms_mo->vp_abs.minute, (char *)sm->scts.minute, MAX_SCTP_DIGITS); |
3212 memcpy((char *)sms_mo->vp_abs.second, (char *)sm->scts.second, MAX_SCTP_DIGITS); | 3212 memcpy((char *)sms_mo->vp_abs.second, (char *)sm->scts.second, MAX_SCTP_DIGITS); |
3213 sms_mo->vp_abs.timezone = sm->scts.timezone; | 3213 sms_mo->vp_abs.timezone = sm->scts.timezone; |
3214 | 3214 |
3215 /* copy length of whole concat SMS*/ | 3215 /* copy length of whole concat SMS*/ |
3216 if (conc_data_ext.len > MAX_MSG_LEN) | 3216 if (conc_data_ext.len > MAX_MSG_LEN) |
3217 sms_mo->msg_len = MAX_MSG_LEN; | 3217 sms_mo->msg_len = MAX_MSG_LEN; |
3218 else | 3218 else |
3219 sms_mo->msg_len = conc_data_ext.len; | 3219 sms_mo->msg_len = conc_data_ext.len; |
3226 else | 3226 else |
3227 { memcpy(sms_mo->sms_msg, (char*)sm->data.data, sm->data.len); | 3227 { memcpy(sms_mo->sms_msg, (char*)sm->data.data, sm->data.len); |
3228 sms_mo->msg_len = sm->data.len; | 3228 sms_mo->msg_len = sm->data.len; |
3229 } | 3229 } |
3230 } | 3230 } |
3231 | 3231 |
3232 /* Free memory allocated by the ACI */ | 3232 /* Free memory allocated by the ACI */ |
3233 // Jul 07, 2004 REF: CRR 15846 Deepa M.D | 3233 // Jul 07, 2004 REF: CRR 15846 Deepa M.D |
3234 //Free the memory only if conc_data_ext.data is not NULL. | 3234 //Free the memory only if conc_data_ext.data is not NULL. |
3235 if(conc_data_ext.data != NULL) | 3235 if(conc_data_ext.data != NULL) |
3236 { | 3236 { |
3238 } | 3238 } |
3239 sms_type = MFW_NO_MESSAGE; | 3239 sms_type = MFW_NO_MESSAGE; |
3240 /*whenever some operation is done the pref memory should be set back to SIM*/ | 3240 /*whenever some operation is done the pref memory should be set back to SIM*/ |
3241 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) | 3241 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) |
3242 { | 3242 { |
3243 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); | 3243 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); |
3244 } | 3244 } |
3245 sms_signal(E_SMS_MO, sms_mo); | 3245 sms_signal(E_SMS_MO, sms_mo); |
3246 } | 3246 } |
3247 } | 3247 } |
3248 } | 3248 } |
3249 else | 3249 else |
3250 #endif /*TI_PS_FF_CONC_SMS*/ | 3250 #endif /*TI_PS_FF_CONC_SMS*/ |
3251 { | 3251 { |
3252 #ifdef NO_ASCIIZ | 3252 #ifdef NO_ASCIIZ |
3253 memcpy(sms_mo->dest_addr.tag, | 3253 memcpy(sms_mo->dest_addr.tag, |
3254 sm->alpha.data, | 3254 sm->alpha.data, |
3255 sm->alpha.len); | 3255 sm->alpha.len); |
3262 sms_mo->dest_addr.npi = (T_MFW_PHB_NPI)phb_cvtNpi(sm->toa.npi); | 3262 sms_mo->dest_addr.npi = (T_MFW_PHB_NPI)phb_cvtNpi(sm->toa.npi); |
3263 if (sm->tosca.ton == TON_International) | 3263 if (sm->tosca.ton == TON_International) |
3264 sprintf(sms_mo->sc_addr, "+%s", sm->sca); | 3264 sprintf(sms_mo->sc_addr, "+%s", sm->sca); |
3265 else | 3265 else |
3266 strcpy((char *)sms_mo->sc_addr, sm->sca); | 3266 strcpy((char *)sms_mo->sc_addr, sm->sca); |
3267 | 3267 |
3268 sms_mo->prot_id = (UBYTE)sm->pid; | 3268 sms_mo->prot_id = (UBYTE)sm->pid; |
3269 sms_mo->dcs = sm->dcs; | 3269 sms_mo->dcs = sm->dcs; |
3270 sms_mo->msg_ref = sm->msg_ref; | 3270 sms_mo->msg_ref = sm->msg_ref; |
3271 sms_mo->vp_mode = 0x03 & sm->fo << 2; | 3271 sms_mo->vp_mode = 0x03 & sm->fo << 2; |
3272 sms_mo->vp_rel = (UBYTE)sm->vp_rel; | 3272 sms_mo->vp_rel = (UBYTE)sm->vp_rel; |
3273 /*a0393213 OMAPS00109953 - for normal sms the memory, from where the message is read, | 3273 /*a0393213 OMAPS00109953 - for normal sms the memory, from where the message is read, |
3274 would be the preferred memory, which is set just before calling sAT_PlusCMGR*/ | 3274 would be the preferred memory, which is set just before calling sAT_PlusCMGR*/ |
3275 sms_mo->memory=(T_MFW_SMS_MEM)memory.mem; | 3275 sms_mo->memory=(T_MFW_SMS_MEM)memory.mem; |
3276 | 3276 |
3277 memcpy((char *)sms_mo->vp_abs.year, (char *)sm->scts.year, MAX_SCTP_DIGITS); | 3277 memcpy((char *)sms_mo->vp_abs.year, (char *)sm->scts.year, MAX_SCTP_DIGITS); |
3278 memcpy((char *)sms_mo->vp_abs.month, (char *)sm->scts.month, MAX_SCTP_DIGITS); | 3278 memcpy((char *)sms_mo->vp_abs.month, (char *)sm->scts.month, MAX_SCTP_DIGITS); |
3279 memcpy((char *)sms_mo->vp_abs.day, (char *)sm->scts.day, MAX_SCTP_DIGITS); | 3279 memcpy((char *)sms_mo->vp_abs.day, (char *)sm->scts.day, MAX_SCTP_DIGITS); |
3280 memcpy((char *)sms_mo->vp_abs.hour, (char *)sm->scts.hour, MAX_SCTP_DIGITS); | 3280 memcpy((char *)sms_mo->vp_abs.hour, (char *)sm->scts.hour, MAX_SCTP_DIGITS); |
3281 memcpy((char *)sms_mo->vp_abs.minute, (char *)sm->scts.minute, MAX_SCTP_DIGITS); | 3281 memcpy((char *)sms_mo->vp_abs.minute, (char *)sm->scts.minute, MAX_SCTP_DIGITS); |
3282 memcpy((char *)sms_mo->vp_abs.second, (char *)sm->scts.second, MAX_SCTP_DIGITS); | 3282 memcpy((char *)sms_mo->vp_abs.second, (char *)sm->scts.second, MAX_SCTP_DIGITS); |
3283 sms_mo->vp_abs.timezone = sm->scts.timezone; | 3283 sms_mo->vp_abs.timezone = sm->scts.timezone; |
3284 | 3284 |
3285 TRACE_EVENT("Normal MO Message"); | 3285 TRACE_EVENT("Normal MO Message"); |
3286 sms_mo->msg_len = sm->data.len; | 3286 sms_mo->msg_len = sm->data.len; |
3287 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 3287 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
3288 /* SPR#2086 - SH - If we've got a WAP SMS, replace the message | 3288 /* SPR#2086 - SH - If we've got a WAP SMS, replace the message |
3289 * with a string */ | 3289 * with a string */ |
3293 strcpy(sms_mt.sms_msg, message); | 3293 strcpy(sms_mt.sms_msg, message); |
3294 sms_mt.msg_len = strlen(message); | 3294 sms_mt.msg_len = strlen(message); |
3295 } | 3295 } |
3296 else | 3296 else |
3297 { | 3297 { |
3298 #endif | 3298 #endif |
3299 /* CQ:16780 clear the buffer before reading in the retrieved SMS, prevents residual characters | 3299 /* CQ:16780 clear the buffer before reading in the retrieved SMS, prevents residual characters |
3300 from previous message being displayed. 15-01-04 MZ*/ | 3300 from previous message being displayed. 15-01-04 MZ*/ |
3301 | 3301 |
3302 memset(sms_mo->sms_msg, NULL, MAX_MSG_LEN_ARRAY); | 3302 memset(sms_mo->sms_msg, NULL, MAX_MSG_LEN_ARRAY); |
3303 | 3303 |
3304 /*SPR 2260 if invalid message just set text to NULL*/ | 3304 /*SPR 2260 if invalid message just set text to NULL*/ |
3305 if (sm->stat != SMS_STAT_Invalid) | 3305 if (sm->stat != SMS_STAT_Invalid) |
3306 memcpy(sms_mo->sms_msg, (char *)sm->data.data, sm->data.len); | 3306 memcpy(sms_mo->sms_msg, (char *)sm->data.data, sm->data.len); |
3307 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 3307 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
3308 } | 3308 } |
3309 #endif | 3309 #endif |
3310 sms_type = MFW_NO_MESSAGE; | 3310 sms_type = MFW_NO_MESSAGE; |
3311 /*whenever some operation is done the pref memory should be set back to SIM*/ | 3311 /*whenever some operation is done the pref memory should be set back to SIM*/ |
3312 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) | 3312 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) |
3313 { | 3313 { |
3314 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); | 3314 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); |
3315 } | 3315 } |
3316 sms_signal(E_SMS_MO, sms_mo); | 3316 sms_signal(E_SMS_MO, sms_mo); |
3317 } | 3317 } |
3318 } | 3318 } |
3319 //Feb 28, 2004 REF: CRR 28809 Deepa M.D | 3319 //Feb 28, 2004 REF: CRR 28809 Deepa M.D |
3320 //Deallocate the variable | 3320 //Deallocate the variable |
3321 if(sms_mo!=NULL) | 3321 if(sms_mo!=NULL) |
3322 { | 3322 { |
3323 mfwFree((U8*)sms_mo, sizeof(T_MFW_SMS_MO)); | 3323 mfwFree((U8*)sms_mo, sizeof(T_MFW_SMS_MO)); |
3324 sms_mo=NULL; | 3324 sms_mo=NULL; |
3325 } | 3325 } |
3326 | 3326 |
3327 break; | 3327 break; |
3328 | 3328 |
3329 //x0pleela 30 Jan, 2006 DR: OMAPS00059261 | 3329 //x0pleela 30 Jan, 2006 DR: OMAPS00059261 |
3330 //Store the status report message into sms_mt | 3330 //Store the status report message into sms_mt |
3331 #ifndef NEPTUNE_BOARD | 3331 #ifndef NEPTUNE_BOARD |
3332 case MFW_MSG_STATUS_REPORT://x0pleela 01 Feb, 2006 DR: OMAPS00059261 /* SMS type: STATUS REPORT */ | 3332 case MFW_MSG_STATUS_REPORT://x0pleela 01 Feb, 2006 DR: OMAPS00059261 /* SMS type: STATUS REPORT */ |
3333 { | 3333 { |
3341 #else | 3341 #else |
3342 phb_Alpha2Gsm(&sm->alpha, (UBYTE *)sms_mt.orig_addr.tag); | 3342 phb_Alpha2Gsm(&sm->alpha, (UBYTE *)sms_mt.orig_addr.tag); |
3343 #endif | 3343 #endif |
3344 if (sm->toa.ton == TON_International) | 3344 if (sm->toa.ton == TON_International) |
3345 sprintf(sms_mt.orig_addr.number, "+%s", sm->adress); | 3345 sprintf(sms_mt.orig_addr.number, "+%s", sm->adress); |
3346 else | 3346 else |
3347 strcpy(sms_mt.orig_addr.number, sm->adress); | 3347 strcpy(sms_mt.orig_addr.number, sm->adress); |
3348 | 3348 |
3349 sms_mt.orig_addr.ton = phb_cvtTon(sm->toa.ton); | 3349 sms_mt.orig_addr.ton = phb_cvtTon(sm->toa.ton); |
3350 sms_mt.orig_addr.npi = (T_MFW_PHB_NPI)phb_cvtNpi(sm->toa.npi); | 3350 sms_mt.orig_addr.npi = (T_MFW_PHB_NPI)phb_cvtNpi(sm->toa.npi); |
3351 | 3351 |
3382 sms_mt.msg_len = sm->data.len; | 3382 sms_mt.msg_len = sm->data.len; |
3383 TRACE_EVENT_P2("msg_len %d, data.len %d", sms_mt.msg_len, sm->data.len); | 3383 TRACE_EVENT_P2("msg_len %d, data.len %d", sms_mt.msg_len, sm->data.len); |
3384 | 3384 |
3385 memset(sms_str, 0, MAX_STAT_MSG_LEN); | 3385 memset(sms_str, 0, MAX_STAT_MSG_LEN); |
3386 memset(sms_mt.sms_msg, NULL, MAX_MSG_LEN_ARRAY); | 3386 memset(sms_mt.sms_msg, NULL, MAX_MSG_LEN_ARRAY); |
3387 | 3387 |
3388 //x0pleela 01 Feb, 2006 DR: OMAPS00059261 | 3388 //x0pleela 01 Feb, 2006 DR: OMAPS00059261 |
3389 //To display the message as "Delivered" or "Pending" as per the status | 3389 //To display the message as "Delivered" or "Pending" as per the status |
3390 TRACE_EVENT_P1("sm->stat: %d", sm->tp_status); | 3390 TRACE_EVENT_P1("sm->stat: %d", sm->tp_status); |
3391 //x0pleela 06 Feb, 2006 DR: OMAPS00059261 | 3391 //x0pleela 06 Feb, 2006 DR: OMAPS00059261 |
3392 //To display the message as "Delivered" or "Pending" as per the tp_status | 3392 //To display the message as "Delivered" or "Pending" as per the tp_status |
3393 if( !sm->tp_status ) | 3393 if( !sm->tp_status ) |
3394 { | 3394 { |
3395 strcpy(sms_str, "Delivered:"); | 3395 strcpy(sms_str, "Delivered:"); |
3396 } | 3396 } |
3397 else | 3397 else |
3398 { | 3398 { |
3400 } | 3400 } |
3401 strcat(sms_str, sm->adress); | 3401 strcat(sms_str, sm->adress); |
3402 memcpy(sms_mt.sms_msg, sms_str, strlen(sms_str)); | 3402 memcpy(sms_mt.sms_msg, sms_str, strlen(sms_str)); |
3403 sms_mt.msg_len = strlen(sms_str); | 3403 sms_mt.msg_len = strlen(sms_str); |
3404 TRACE_EVENT_P2("sm->adress:%s, sms_str:%s ",sm->adress,sms_str); | 3404 TRACE_EVENT_P2("sm->adress:%s, sms_str:%s ",sm->adress,sms_str); |
3405 | 3405 |
3406 /*SPR 2260 end*/ | 3406 /*SPR 2260 end*/ |
3407 sms_mt.udh_len = sm->udh.len; | 3407 sms_mt.udh_len = sm->udh.len; |
3408 memcpy((char *)sms_mt.udh, (char *)sm->udh.data, sm->udh.len); | 3408 memcpy((char *)sms_mt.udh, (char *)sm->udh.data, sm->udh.len); |
3409 sms_type = MFW_NO_MESSAGE; | 3409 sms_type = MFW_NO_MESSAGE; |
3410 TRACE_EVENT("read=free1"); | 3410 TRACE_EVENT("read=free1"); |
3411 coll_sms_read = MFW_SMS_FREE; | 3411 coll_sms_read = MFW_SMS_FREE; |
3412 | 3412 |
3413 //x0pleela 08 Feb, 2006 DR: OMAPS00059261 | 3413 //x0pleela 08 Feb, 2006 DR: OMAPS00059261 |
3414 //Replacing MT_STATUS_RPT with MFW_SMS_STATRPT as MT_STATUS_RPT is removed | 3414 //Replacing MT_STATUS_RPT with MFW_SMS_STATRPT as MT_STATUS_RPT is removed |
3415 | 3415 |
3416 //x0pleela 30 Jan, 2006 DR: OMAPS00059261 | 3416 //x0pleela 30 Jan, 2006 DR: OMAPS00059261 |
3417 //Store sms message type | 3417 //Store sms message type |
3418 sms_mt.sms_msg_type = MFW_SMS_STATRPT; | 3418 sms_mt.sms_msg_type = MFW_SMS_STATRPT; |
3419 sms_mt.voicemail = FALSE; | 3419 sms_mt.voicemail = FALSE; |
3420 /*whenever some operation is done the pref memory should be set back to SIM*/ | 3420 /*whenever some operation is done the pref memory should be set back to SIM*/ |
3421 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) | 3421 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) |
3422 { | 3422 { |
3423 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); | 3423 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); |
3424 } | 3424 } |
3425 sms_signal(E_SMS_MT, &sms_mt); | 3425 sms_signal(E_SMS_MT, &sms_mt); |
3426 } | 3426 } |
3427 break; | 3427 break; |
3428 #endif | 3428 #endif |
3429 default: | 3429 default: |
3430 sms_signal(E_SMS_ERR, NULL); | 3430 sms_signal(E_SMS_ERR, NULL); |
3431 } | 3431 } |
3432 } | 3432 } |
3433 | 3433 |
3434 else | 3434 else |
3435 { TRACE_EVENT("rAT_plusCMGR: SMS pointer error"); | 3435 { TRACE_EVENT("rAT_plusCMGR: SMS pointer error"); |
3436 | 3436 |
3437 } | 3437 } |
3438 } | 3438 } |
3439 break; | 3439 break; |
3440 | 3440 |
3441 case MFW_CB_MESSAGE: | 3441 case MFW_CB_MESSAGE: |
3446 sms_cb.dcs = cbm->dcs; | 3446 sms_cb.dcs = cbm->dcs; |
3447 sms_cb.page = cbm->page; | 3447 sms_cb.page = cbm->page; |
3448 sms_cb.pages = cbm->pages; | 3448 sms_cb.pages = cbm->pages; |
3449 sms_cb.msg_len = cbm->data.len; | 3449 sms_cb.msg_len = cbm->data.len; |
3450 memcpy((char *)sms_cb.cb_msg, (char *)cbm->data.data, cbm->data.len); | 3450 memcpy((char *)sms_cb.cb_msg, (char *)cbm->data.data, cbm->data.len); |
3451 | 3451 |
3452 /* send cell broadcast message event */ | 3452 /* send cell broadcast message event */ |
3453 sms_type = MFW_NO_MESSAGE; | 3453 sms_type = MFW_NO_MESSAGE; |
3454 sms_signal(E_SMS_CB, &sms_cb); | 3454 sms_signal(E_SMS_CB, &sms_cb); |
3455 } | 3455 } |
3456 else | 3456 else |
3457 TRACE_EVENT("rAT_plusCMGR: SMS CB pointer error"); | 3457 TRACE_EVENT("rAT_plusCMGR: SMS CB pointer error"); |
3458 break; | 3458 break; |
3459 | 3459 |
3460 case MFW_NO_MESSAGE: | 3460 case MFW_NO_MESSAGE: |
3461 TRACE_EVENT("read=free no msg"); | 3461 TRACE_EVENT("read=free no msg"); |
3462 coll_sms_read = MFW_SMS_FREE; | 3462 coll_sms_read = MFW_SMS_FREE; |
3463 if(coll_sms_read EQ MFW_SMS_WAIT) | 3463 if(coll_sms_read EQ MFW_SMS_WAIT) |
3464 coll_sms_read = MFW_SMS_FREE; | 3464 coll_sms_read = MFW_SMS_FREE; |
3465 break; | 3465 break; |
3466 } | 3466 } |
3467 | 3467 |
3468 sms_check_mt_update(); | 3468 sms_check_mt_update(); |
3469 | 3469 |
3470 { | 3470 { |
3471 TRACE_EVENT_P4("CMGR Msg table: %d,%d,%d, %d", msg_info[0].index, msg_info[1].index,msg_info[2].index,msg_info[3].index); | 3471 TRACE_EVENT_P4("CMGR Msg table: %d,%d,%d, %d", msg_info[0].index, msg_info[1].index,msg_info[2].index,msg_info[3].index); |
3472 TRACE_EVENT_P4("CMGR Msg table: %d,%d,%d, %d", msg_info[4].index, msg_info[5].index,msg_info[6].index,msg_info[7].index); | 3472 TRACE_EVENT_P4("CMGR Msg table: %d,%d,%d, %d", msg_info[4].index, msg_info[5].index,msg_info[6].index,msg_info[7].index); |
3473 } | 3473 } |
3474 } | 3474 } |
3475 | 3475 |
3534 T_ACI_SM_DATA conc_data_ext; | 3534 T_ACI_SM_DATA conc_data_ext; |
3535 #endif /*TI_PS_FF_CONC_SMS*/ | 3535 #endif /*TI_PS_FF_CONC_SMS*/ |
3536 SHORT rp; | 3536 SHORT rp; |
3537 /*a0393213 OMAPS00109953*/ | 3537 /*a0393213 OMAPS00109953*/ |
3538 T_MFW_SMS_MEM pref_mem=MFW_MEM_NOTPRESENT; | 3538 T_MFW_SMS_MEM pref_mem=MFW_MEM_NOTPRESENT; |
3539 //Mar 22 2007 ER:OMAPS00113882 x0061088 (Prachi) | 3539 //Mar 22 2007 ER:OMAPS00113882 x0061088 (Prachi) |
3540 T_ACI_TOA set_toa; | 3540 T_ACI_TOA set_toa; |
3541 int addr_type; | 3541 int addr_type; |
3542 T_ACI_RETURN ACI_MFW_return; | 3542 T_ACI_RETURN ACI_MFW_return; |
3543 | 3543 |
3544 TRACE_FUNCTION ("sms_store()"); | 3544 TRACE_FUNCTION ("sms_store()"); |
3547 if(sim_memory.used==sim_memory.total) | 3547 if(sim_memory.used==sim_memory.total) |
3548 { | 3548 { |
3549 if(ffs_memory.used==ffs_memory.total) | 3549 if(ffs_memory.used==ffs_memory.total) |
3550 { | 3550 { |
3551 sms_signal(E_SMS_MEM_FULL, 0); | 3551 sms_signal(E_SMS_MEM_FULL, 0); |
3552 return MFW_SMS_FAIL; | 3552 return MFW_SMS_FAIL; |
3553 } | 3553 } |
3554 else | 3554 else |
3555 { | 3555 { |
3556 pref_mem=MFW_MEM_ME; | 3556 pref_mem=MFW_MEM_ME; |
3557 } | 3557 } |
3602 | 3602 |
3603 if ( addr_type == TRUE ) | 3603 if ( addr_type == TRUE ) |
3604 { | 3604 { |
3605 set_toa.ton = TON_Alphanumeric; | 3605 set_toa.ton = TON_Alphanumeric; |
3606 set_toa.npi = NPI_NotPresent; | 3606 set_toa.npi = NPI_NotPresent; |
3607 ACI_MFW_return = sAT_PlusCMGW(CMD_SRC_LCL, 0, addr, &set_toa, | 3607 ACI_MFW_return = sAT_PlusCMGW(CMD_SRC_LCL, 0, addr, &set_toa, |
3608 sentStatus, 0xFF, | 3608 sentStatus, 0xFF, |
3609 &conc_data_ext, sca, | 3609 &conc_data_ext, sca, |
3610 NULL, rp); | 3610 NULL, rp); |
3611 | 3611 |
3612 } | 3612 } |
3613 else | 3613 else |
3614 ACI_MFW_return = sAT_PlusCMGW(CMD_SRC_LCL, 0, addr, NULL, | 3614 ACI_MFW_return = sAT_PlusCMGW(CMD_SRC_LCL, 0, addr, NULL, |
3615 sentStatus, 0xFF, | 3615 sentStatus, 0xFF, |
3616 &conc_data_ext, sca, | 3616 &conc_data_ext, sca, |
3617 NULL, rp); | 3617 NULL, rp); |
3618 | 3618 |
3619 if(ACI_MFW_return != AT_EXCT) | 3619 if(ACI_MFW_return != AT_EXCT) |
3620 { | 3620 { |
3624 | 3624 |
3625 wr_addr = addr; | 3625 wr_addr = addr; |
3626 sms_type = MFW_WR_NEW_MESSAGE; | 3626 sms_type = MFW_WR_NEW_MESSAGE; |
3627 return MFW_SMS_OK; | 3627 return MFW_SMS_OK; |
3628 | 3628 |
3629 | 3629 |
3630 } | 3630 } |
3631 | 3631 |
3632 | 3632 |
3633 | 3633 |
3634 | 3634 |
3661 if(sim_memory.used==sim_memory.total) | 3661 if(sim_memory.used==sim_memory.total) |
3662 { | 3662 { |
3663 if(ffs_memory.used==ffs_memory.total) | 3663 if(ffs_memory.used==ffs_memory.total) |
3664 { | 3664 { |
3665 sms_signal(E_SMS_MEM_FULL, 0); | 3665 sms_signal(E_SMS_MEM_FULL, 0); |
3666 return MFW_SMS_FAIL; | 3666 return MFW_SMS_FAIL; |
3667 } | 3667 } |
3668 else | 3668 else |
3669 { | 3669 { |
3670 pref_mem=MFW_MEM_ME; | 3670 pref_mem=MFW_MEM_ME; |
3671 } | 3671 } |
3793 TRACE_FUNCTION ("rAT_PlusCMGW()"); | 3793 TRACE_FUNCTION ("rAT_PlusCMGW()"); |
3794 TRACE_EVENT_P2("Index: %d, numseg: %d", index, numSeg); | 3794 TRACE_EVENT_P2("Index: %d, numseg: %d", index, numSeg); |
3795 /*whenever some operation is done the pref memory should be set back to SIM*/ | 3795 /*whenever some operation is done the pref memory should be set back to SIM*/ |
3796 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) | 3796 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) |
3797 { | 3797 { |
3798 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); | 3798 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); |
3799 } | 3799 } |
3800 memset(&phb_entry, 0, sizeof(phb_entry)); | 3800 memset(&phb_entry, 0, sizeof(phb_entry)); |
3801 memset(&phb_list, 0, sizeof(phb_list)); | 3801 memset(&phb_list, 0, sizeof(phb_list)); |
3802 phb_list.entry = &phb_entry; | 3802 phb_list.entry = &phb_entry; |
3803 | 3803 |
3861 msg_info[i].stat = MFW_SMS_STOR_SENT; | 3861 msg_info[i].stat = MFW_SMS_STOR_SENT; |
3862 /*SPR 2260, we're making the assumption that only complete concat SMSs or single SMSs | 3862 /*SPR 2260, we're making the assumption that only complete concat SMSs or single SMSs |
3863 can be saved successfully*/ | 3863 can be saved successfully*/ |
3864 if (numSeg == 1) | 3864 if (numSeg == 1) |
3865 msg_info[i].concat_status = MFW_SMS_NO_CONC; | 3865 msg_info[i].concat_status = MFW_SMS_NO_CONC; |
3866 #ifdef TI_PS_FF_CONC_SMS | 3866 #ifdef TI_PS_FF_CONC_SMS |
3867 else | 3867 else |
3868 msg_info[i].concat_status = MFW_SMS_CONC_WHOLE; | 3868 msg_info[i].concat_status = MFW_SMS_CONC_WHOLE; |
3869 #endif /*TI_PS_FF_CONC_SMS*/ | 3869 #endif /*TI_PS_FF_CONC_SMS*/ |
3870 | 3870 |
3871 msg_info[i].first_index = index;/*SPR 2260*/ | 3871 msg_info[i].first_index = index;/*SPR 2260*/ |
3881 /*a0393213 OMAPS00109953*/ | 3881 /*a0393213 OMAPS00109953*/ |
3882 sms_update_memory(); | 3882 sms_update_memory(); |
3883 TRACE_EVENT_P2("memory used is = %d, of %d", memory.used, memory.total); | 3883 TRACE_EVENT_P2("memory used is = %d, of %d", memory.used, memory.total); |
3884 if(memory.total == memory.used) | 3884 if(memory.total == memory.used) |
3885 { | 3885 { |
3886 | 3886 |
3887 sms_signal(E_SMS_MEM_FULL, NULL); | 3887 sms_signal(E_SMS_MEM_FULL, NULL); |
3888 } | 3888 } |
3889 sms_type = MFW_NO_MESSAGE; | 3889 sms_type = MFW_NO_MESSAGE; |
3890 | 3890 |
3891 sms_check_mt_update(); | 3891 sms_check_mt_update(); |
3892 | 3892 |
3893 sms_signal(E_SMS_SAVE_AVAIL, &index); | 3893 sms_signal(E_SMS_SAVE_AVAIL, &index); |
3903 | 3903 |
3904 PURPOSE : Delete a short message. | 3904 PURPOSE : Delete a short message. |
3905 | 3905 |
3906 */ | 3906 */ |
3907 /*a0393213 OMAPS00109953 - memory added as parameter*/ | 3907 /*a0393213 OMAPS00109953 - memory added as parameter*/ |
3908 T_MFW sms_msg_delete(UBYTE index, T_MFW_SMS_MEM sms_memory) | 3908 T_MFW sms_msg_delete(UBYTE index, T_MFW_SMS_MEM sms_memory) |
3909 { | 3909 { |
3910 TRACE_FUNCTION ("sms_msg_delete()"); | 3910 TRACE_FUNCTION ("sms_msg_delete()"); |
3911 | 3911 |
3912 /*a0393213 OMAPS00109953 - set preferred memory before calling sAT_PlusCMGD*/ | 3912 /*a0393213 OMAPS00109953 - set preferred memory before calling sAT_PlusCMGD*/ |
3913 if(sms_set_pref_memory(sms_memory)!=MFW_SMS_OK) | 3913 if(sms_set_pref_memory(sms_memory)!=MFW_SMS_OK) |
3945 void sms_ok_change() | 3945 void sms_ok_change() |
3946 { | 3946 { |
3947 | 3947 |
3948 | 3948 |
3949 | 3949 |
3950 // Dec 23, 2004 REF: CRR MMI-SPR-27741 xkundadu | 3950 // Dec 23, 2004 REF: CRR MMI-SPR-27741 xkundadu |
3951 // Issue description: BMI: crashing when using the function : sms_index_list() located in mfw | 3951 // Issue description: BMI: crashing when using the function : sms_index_list() located in mfw |
3952 // Solution: Changed the msg_list variable to array of T_MFW_SMS_IDX. | 3952 // Solution: Changed the msg_list variable to array of T_MFW_SMS_IDX. |
3953 | 3953 |
3954 // May 27, 2005 MMI-FIX-29869 x0018858 - Modified from static to dynamic variable | 3954 // May 27, 2005 MMI-FIX-29869 x0018858 - Modified from static to dynamic variable |
3955 #ifdef FF_MMI_SMS_DYNAMIC | 3955 #ifdef FF_MMI_SMS_DYNAMIC |
3960 int noOfVMSMS = 0; // stores number of VM sms | 3960 int noOfVMSMS = 0; // stores number of VM sms |
3961 int i; | 3961 int i; |
3962 // May 27, 2005 MMI-FIX-29869 x0018858 - Modified from static to dynamic variable | 3962 // May 27, 2005 MMI-FIX-29869 x0018858 - Modified from static to dynamic variable |
3963 #ifdef FF_MMI_SMS_DYNAMIC | 3963 #ifdef FF_MMI_SMS_DYNAMIC |
3964 msg_list = (T_MFW_SMS_IDX*)ALLOC_MEMORY(g_max_messages*sizeof(T_MFW_SMS_IDX)); | 3964 msg_list = (T_MFW_SMS_IDX*)ALLOC_MEMORY(g_max_messages*sizeof(T_MFW_SMS_IDX)); |
3965 #endif | 3965 #endif |
3966 | 3966 |
3967 TRACE_FUNCTION ("sms_ok_change()"); | 3967 TRACE_FUNCTION ("sms_ok_change()"); |
3968 | 3968 |
3969 /* Marcus: Issue 2260: 03/10/2002: Start */ | 3969 /* Marcus: Issue 2260: 03/10/2002: Start */ |
3970 if (cmgr_awaiting_ok == TRUE) | 3970 if (cmgr_awaiting_ok == TRUE) |
3979 sms_signal(E_SMS_OK, 0); | 3979 sms_signal(E_SMS_OK, 0); |
3980 } | 3980 } |
3981 | 3981 |
3982 sms_check_mt_update(); | 3982 sms_check_mt_update(); |
3983 | 3983 |
3984 | 3984 |
3985 // Dec 23, 2004 REF: CRR MMI-SPR-27741 xkundadu | 3985 // Dec 23, 2004 REF: CRR MMI-SPR-27741 xkundadu |
3986 // Issue description: BMI: crashing when using the function : sms_index_list() located in mfw | 3986 // Issue description: BMI: crashing when using the function : sms_index_list() located in mfw |
3987 // Solution: Changed the msg_list variable to array of T_MFW_SMS_IDX. | 3987 // Solution: Changed the msg_list variable to array of T_MFW_SMS_IDX. |
3988 #ifdef FF_MMI_SMS_DYNAMIC | 3988 #ifdef FF_MMI_SMS_DYNAMIC |
3989 noOfVMSMS = sms_index_list(MFW_SMS_VOICE, msg_list, g_max_messages) ; | 3989 noOfVMSMS = sms_index_list(MFW_SMS_VOICE, msg_list, g_max_messages) ; |
3990 #else | 3990 #else |
3999 { | 3999 { |
4000 //Find out the VM sms which is already read and delete it. | 4000 //Find out the VM sms which is already read and delete it. |
4001 if(msg_list[i].stat == MFW_SMS_READ) | 4001 if(msg_list[i].stat == MFW_SMS_READ) |
4002 { | 4002 { |
4003 /*a0393213 OMAPS00109953 - memory type passed as parameter*/ | 4003 /*a0393213 OMAPS00109953 - memory type passed as parameter*/ |
4004 sms_msg_delete(msg_list[i].index,msg_list[i].memory); | 4004 sms_msg_delete(msg_list[i].index,msg_list[i].memory); |
4005 break; | 4005 break; |
4006 } | 4006 } |
4007 } | 4007 } |
4008 } | 4008 } |
4009 | 4009 |
4010 /* Marcus: Issue 2260: 03/10/2002: Start */ | 4010 /* Marcus: Issue 2260: 03/10/2002: Start */ |
4011 } | 4011 } |
4012 else | 4012 else |
4013 { | 4013 { |
4014 TRACE_EVENT("Ignoring unexpected OK"); | 4014 TRACE_EVENT("Ignoring unexpected OK"); |
4031 | 4031 |
4032 */ | 4032 */ |
4033 | 4033 |
4034 void sms_ok_delete() | 4034 void sms_ok_delete() |
4035 { | 4035 { |
4036 | 4036 |
4037 TRACE_FUNCTION ("sms_ok_delete()"); | 4037 TRACE_FUNCTION ("sms_ok_delete()"); |
4038 /*SPR2530, moved flag claering code here from delete_sms_from_table*/ | 4038 /*SPR2530, moved flag claering code here from delete_sms_from_table*/ |
4039 | 4039 |
4040 if(coll_sms_delete EQ MFW_SMS_WAIT) | 4040 if(coll_sms_delete EQ MFW_SMS_WAIT) |
4041 coll_sms_delete = MFW_SMS_FREE; | 4041 coll_sms_delete = MFW_SMS_FREE; |
4042 /*whenever some operation is done the pref memory should be set back to SIM*/ | 4042 /*whenever some operation is done the pref memory should be set back to SIM*/ |
4043 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) | 4043 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) |
4044 { | 4044 { |
4045 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); | 4045 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); |
4046 } | 4046 } |
4047 /*SPR 1833, replaces section of code with function call*/ | 4047 /*SPR 1833, replaces section of code with function call*/ |
4048 /*a0393213 OMAPS00109953 - memory type passed as parameter*/ | 4048 /*a0393213 OMAPS00109953 - memory type passed as parameter*/ |
4049 if (delete_sms_from_table (deleting_index, deleting_memory)) | 4049 if (delete_sms_from_table (deleting_index, deleting_memory)) |
4050 { | 4050 { |
4051 deleting_index = -1; /*Hope this fixes multiple deletions*/ | 4051 deleting_index = -1; /*Hope this fixes multiple deletions*/ |
4062 | 4062 |
4063 sms_signal(E_SMS_MEM_FREE, 0); | 4063 sms_signal(E_SMS_MEM_FREE, 0); |
4064 | 4064 |
4065 sms_check_mt_update(); | 4065 sms_check_mt_update(); |
4066 } | 4066 } |
4067 { | 4067 { |
4068 TRACE_EVENT_P4("CMGD Msg table: %d,%d,%d, %d", msg_info[0].index, msg_info[1].index,msg_info[2].index,msg_info[3].index); | 4068 TRACE_EVENT_P4("CMGD Msg table: %d,%d,%d, %d", msg_info[0].index, msg_info[1].index,msg_info[2].index,msg_info[3].index); |
4069 TRACE_EVENT_P4("CMGD Msg table: %d,%d,%d, %d", msg_info[4].index, msg_info[5].index,msg_info[6].index,msg_info[7].index); | 4069 TRACE_EVENT_P4("CMGD Msg table: %d,%d,%d, %d", msg_info[4].index, msg_info[5].index,msg_info[6].index,msg_info[7].index); |
4070 } | 4070 } |
4071 } | 4071 } |
4072 /* | 4072 /* |
4082 */ | 4082 */ |
4083 /*a0393213 OMAPS00109953 - memory type added as a parameter*/ | 4083 /*a0393213 OMAPS00109953 - memory type added as a parameter*/ |
4084 BOOL delete_sms_from_table (SHORT index, T_MFW_SMS_MEM memory) | 4084 BOOL delete_sms_from_table (SHORT index, T_MFW_SMS_MEM memory) |
4085 { | 4085 { |
4086 int i; | 4086 int i; |
4087 | 4087 |
4088 TRACE_FUNCTION ("delete_sms_from_table()"); | 4088 TRACE_FUNCTION ("delete_sms_from_table()"); |
4089 | 4089 |
4090 /*SPR2530, removed flag clearing code*/ | 4090 /*SPR2530, removed flag clearing code*/ |
4091 #ifdef FF_MMI_SMS_DYNAMIC | 4091 #ifdef FF_MMI_SMS_DYNAMIC |
4092 for (i=0; i<g_max_messages; i++) | 4092 for (i=0; i<g_max_messages; i++) |
4093 #else | 4093 #else |
4094 for (i=0; i<MAX_MESSAGES; i++) | 4094 for (i=0; i<MAX_MESSAGES; i++) |
4095 #endif | 4095 #endif |
4096 { | 4096 { |
4097 /*a0393213 OMAPS00109953 - memory is also taken into consideration*/ | 4097 /*a0393213 OMAPS00109953 - memory is also taken into consideration*/ |
4098 if (msg_info[i].index == index&& msg_info[i].mem == memory) | 4098 if (msg_info[i].index == index&& msg_info[i].mem == memory) |
4099 { | 4099 { |
4100 msg_info[i].index = -1; | 4100 msg_info[i].index = -1; |
4101 /*a0393213 OMAPS00109953*/ | 4101 /*a0393213 OMAPS00109953*/ |
4102 msg_info[i].mem = MFW_MEM_NOTPRESENT; | 4102 msg_info[i].mem = MFW_MEM_NOTPRESENT; |
4103 msg_info[i].stat = MFW_SMS_UNKNOWN; | 4103 msg_info[i].stat = MFW_SMS_UNKNOWN; |
4112 msg_info[i].first_mem=MFW_MEM_NOTPRESENT; | 4112 msg_info[i].first_mem=MFW_MEM_NOTPRESENT; |
4113 msg_info[i].concat_status = MFW_SMS_NO_CONC; | 4113 msg_info[i].concat_status = MFW_SMS_NO_CONC; |
4114 return TRUE; | 4114 return TRUE; |
4115 } | 4115 } |
4116 } | 4116 } |
4117 | 4117 |
4118 return FALSE; | 4118 return FALSE; |
4119 } | 4119 } |
4120 /* | 4120 /* |
4121 +--------------------------------------------------------------------+ | 4121 +--------------------------------------------------------------------+ |
4122 | PROJECT: MMI-Framework (8417) MODULE: MFW_SMS | | 4122 | PROJECT: MMI-Framework (8417) MODULE: MFW_SMS | |
4292 /*Jan 20, 2006 REF: DRT OMAPS00053377 xdeepadh | 4292 /*Jan 20, 2006 REF: DRT OMAPS00053377 xdeepadh |
4293 MMI supports only the relative validity period format. | 4293 MMI supports only the relative validity period format. |
4294 Hence, set the validity period format to relative for all the cases*/ | 4294 Hence, set the validity period format to relative for all the cases*/ |
4295 if ((sms_info->vp_mode EQ SMS_VPF_NUMERICAL) ||(sms_info->vp_mode EQ SMS_VPF_STRING) ||(sms_info->vp_mode EQ SMS_VPF_NOTPRESENT)) | 4295 if ((sms_info->vp_mode EQ SMS_VPF_NUMERICAL) ||(sms_info->vp_mode EQ SMS_VPF_STRING) ||(sms_info->vp_mode EQ SMS_VPF_NOTPRESENT)) |
4296 { | 4296 { |
4297 | 4297 |
4298 TRACE_EVENT_P1("sms_info->vp_mode %d",sms_info->vp_mode); | 4298 TRACE_EVENT_P1("sms_info->vp_mode %d",sms_info->vp_mode); |
4299 TRACE_EVENT("MMI supports only the relative validity period format "); | 4299 TRACE_EVENT("MMI supports only the relative validity period format "); |
4300 | 4300 |
4301 /*Set the TP-Validity-Period-Format (TP-VPF) bits to relative format */ | 4301 /*Set the TP-Validity-Period-Format (TP-VPF) bits to relative format */ |
4302 sms_info->first_oct = sms_info->first_oct | 0x10 ; | 4302 sms_info->first_oct = sms_info->first_oct | 0x10 ; |
4303 | 4303 |
4304 } | 4304 } |
4305 | 4305 |
4306 TRACE_EVENT_P1("first_oct is %d",sms_info->first_oct); | 4306 TRACE_EVENT_P1("first_oct is %d",sms_info->first_oct); |
4307 | 4307 |
4308 //Send text mode parameters to ACI | 4308 //Send text mode parameters to ACI |
4309 if (sAT_PlusCSMP(CMD_SRC_LCL, sms_info->first_oct, sms_info->vp_rel, | 4309 if (sAT_PlusCSMP(CMD_SRC_LCL, sms_info->first_oct, sms_info->vp_rel, |
4310 NULL, NULL, ACI_NumParmNotPresent, | 4310 NULL, NULL, ACI_NumParmNotPresent, |
4311 ACI_NumParmNotPresent) NEQ AT_CMPL) | 4311 ACI_NumParmNotPresent) NEQ AT_CMPL) |
4312 return MFW_SMS_FAIL; | 4312 return MFW_SMS_FAIL; |
4313 | 4313 |
4314 return MFW_SMS_OK; | 4314 return MFW_SMS_OK; |
4315 } | 4315 } |
4316 | 4316 |
4317 //Feb 22, 2006 DR:OMAPS00068268 x0035544 | 4317 //Feb 22, 2006 DR:OMAPS00068268 x0035544 |
4318 BOOL Sms_Check_PID(SHORT pid) | 4318 BOOL Sms_Check_PID(SHORT pid) |
4319 { | 4319 { |
4320 TRACE_FUNCTION("Sms_Check_PID()"); | 4320 TRACE_FUNCTION("Sms_Check_PID()"); |
4321 | 4321 |
4322 if(pid & BIT_7) | 4322 if(pid & BIT_7) |
4323 { | 4323 { |
4324 if(!(pid & BIT_6)) // Bit 7 = 1 and Bit 6 = 0 | 4324 if(!(pid & BIT_6)) // Bit 7 = 1 and Bit 6 = 0 |
4325 return TRUE; | 4325 return TRUE; |
4326 } | 4326 } |
4327 else | 4327 else |
4328 { | 4328 { |
4329 if(pid & BIT_6) // Bit 7 = 0 and Bit 6 = 1, Bits 5...0 some values are reserved | 4329 if(pid & BIT_6) // Bit 7 = 0 and Bit 6 = 1, Bits 5...0 some values are reserved |
4330 { | 4330 { |
4331 if(((pid >= 0x48) AND (pid <= 0x5E)) OR | 4331 if(((pid >= 0x48) AND (pid <= 0x5E)) OR |
4332 ((pid >= 0x60) AND (pid <= 0x7B))) | 4332 ((pid >= 0x60) AND (pid <= 0x7B))) |
4333 return TRUE; | 4333 return TRUE; |
4334 } | 4334 } |
4335 else | 4335 else |
4336 { | 4336 { |
4337 if(pid & BIT_5) // Bit 7 = 0, Bit 6 = 0 and Bit 5 = 1, Bits 4...0 some values are reserved | 4337 if(pid & BIT_5) // Bit 7 = 0, Bit 6 = 0 and Bit 5 = 1, Bits 4...0 some values are reserved |
4338 { | 4338 { |
4339 if((pid EQ 0x2E) OR (pid EQ 0x2F) OR | 4339 if((pid EQ 0x2E) OR (pid EQ 0x2F) OR |
4340 ((pid >= 0x33) AND (pid <= 0x37))) | 4340 ((pid >= 0x33) AND (pid <= 0x37))) |
4341 return TRUE; | 4341 return TRUE; |
4342 } | 4342 } |
4343 } | 4343 } |
4344 } | 4344 } |
4345 | 4345 |
4346 return FALSE; | 4346 return FALSE; |
4347 } | 4347 } |
4348 | 4348 |
4349 | 4349 |
4350 /* | 4350 /* |
4400 | 4400 |
4401 if (sc_typ.ton == TON_International) | 4401 if (sc_typ.ton == TON_International) |
4402 sprintf(sms_info->sc_addr, "+%s", sca); | 4402 sprintf(sms_info->sc_addr, "+%s", sca); |
4403 else | 4403 else |
4404 strcpy((char *)sms_info->sc_addr, (char *)sca); | 4404 strcpy((char *)sms_info->sc_addr, (char *)sca); |
4405 //x0035544 Feb 22, 2006 DR:OMAPS00068268 | 4405 //x0035544 Feb 22, 2006 DR:OMAPS00068268 |
4406 PIDReserved = Sms_Check_PID(pid); | 4406 PIDReserved = Sms_Check_PID(pid); |
4407 /* If pid value falls in to any of Reserved category then set it to 0 */ | 4407 /* If pid value falls in to any of Reserved category then set it to 0 */ |
4408 if(PIDReserved) | 4408 if(PIDReserved) |
4409 pid = 0; | 4409 pid = 0; |
4410 sms_info->prot_id = pid; | 4410 sms_info->prot_id = pid; |
4411 sms_info->dcs = dcs; | 4411 sms_info->dcs = dcs; |
4412 sms_info->vp_rel = (UBYTE)vprel; | 4412 sms_info->vp_rel = (UBYTE)vprel; |
4413 memcpy(&sms_info->vp_abs, &vpabs, sizeof(T_MFW_SMS_SCTP)); | 4413 memcpy(&sms_info->vp_abs, &vpabs, sizeof(T_MFW_SMS_SCTP)); |
4501 T_MFW sms_set_cell_broadcast_info(UBYTE mode, T_MFW_SMS_CB_INFO *sms_cb_info) | 4501 T_MFW sms_set_cell_broadcast_info(UBYTE mode, T_MFW_SMS_CB_INFO *sms_cb_info) |
4502 { | 4502 { |
4503 T_ACI_RETURN res; | 4503 T_ACI_RETURN res; |
4504 | 4504 |
4505 TRACE_FUNCTION ("sms_set_cell_broadcast_info()"); | 4505 TRACE_FUNCTION ("sms_set_cell_broadcast_info()"); |
4506 /*SPR 2470, if the Channel ID list is empty, the mode logic is inverted due to the warped logic of | 4506 /*SPR 2470, if the Channel ID list is empty, the mode logic is inverted due to the warped logic of |
4507 AT commands*/ | 4507 AT commands*/ |
4508 | 4508 |
4509 /*if we are disabling cell broadcast*/ | 4509 /*if we are disabling cell broadcast*/ |
4510 if (mode == 1) | 4510 if (mode == 1) |
4511 { /* and the channel ID list is empty*/ | 4511 { /* and the channel ID list is empty*/ |
4512 if (sms_cb_info->msg_id[0] == 0xFFFF) | 4512 if (sms_cb_info->msg_id[0] == 0xFFFF) |
4513 mode =0; | 4513 mode =0; |
4688 case AT_CMD_CMSS: | 4688 case AT_CMD_CMSS: |
4689 cmd_ind = CMD_SMS_SUBMIT; | 4689 cmd_ind = CMD_SMS_SUBMIT; |
4690 coll_sms_send = MFW_SMS_FREE; | 4690 coll_sms_send = MFW_SMS_FREE; |
4691 | 4691 |
4692 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 4692 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
4693 | 4693 |
4694 /* SPR#2086 - SH - Check if it's a WAP SMS */ | 4694 /* SPR#2086 - SH - Check if it's a WAP SMS */ |
4695 if (sms_wap_sent_flag) | 4695 if (sms_wap_sent_flag) |
4696 { | 4696 { |
4697 sms_wap_sent_flag = FALSE; | 4697 sms_wap_sent_flag = FALSE; |
4698 sms_signal(E_SMS_WAP_ERR, &cmd_ind); | 4698 sms_signal(E_SMS_WAP_ERR, &cmd_ind); |
4804 ffs_memory.used=mem1->used; | 4804 ffs_memory.used=mem1->used; |
4805 break; | 4805 break; |
4806 default: | 4806 default: |
4807 TRACE_ERROR("rAT_PlusCPMS():Unknown memory"); | 4807 TRACE_ERROR("rAT_PlusCPMS():Unknown memory"); |
4808 } | 4808 } |
4809 | 4809 |
4810 memory.mem=sms_mem.mem=mem1->mem; | 4810 memory.mem=sms_mem.mem=mem1->mem; |
4811 memory.total=sms_mem.total=sim_memory.total+ffs_memory.total; | 4811 memory.total=sms_mem.total=sim_memory.total+ffs_memory.total; |
4812 memory.used=sms_mem.used=sim_memory.used+ffs_memory.used; | 4812 memory.used=sms_mem.used=sim_memory.used+ffs_memory.used; |
4813 /* HLE temp for testing iface and for WIN32 simulation */ | 4813 /* HLE temp for testing iface and for WIN32 simulation */ |
4814 | 4814 |
4824 | 4824 |
4825 if (int_req ==FIRST_READ_OF_MEMORY_USE) | 4825 if (int_req ==FIRST_READ_OF_MEMORY_USE) |
4826 sms_signal(E_SMS_READY, 0); | 4826 sms_signal(E_SMS_READY, 0); |
4827 int_req = 0; | 4827 int_req = 0; |
4828 int_init_req = 0; | 4828 int_init_req = 0; |
4829 /*a0393213 OMAPS00109953*/ | 4829 /*a0393213 OMAPS00109953*/ |
4830 if(memory.used==memory.total) | 4830 if(memory.used==memory.total) |
4831 sms_signal(E_SMS_MEM_FULL, 0); | 4831 sms_signal(E_SMS_MEM_FULL, 0); |
4832 | 4832 |
4833 #ifdef SIM_TOOLKIT | 4833 #ifdef SIM_TOOLKIT |
4834 if (sms_update) | 4834 if (sms_update) |
5169 msg_list->addr.ton = msg_info[num].addr.ton; | 5169 msg_list->addr.ton = msg_info[num].addr.ton; |
5170 msg_list->addr.npi = msg_info[num].addr.npi; | 5170 msg_list->addr.npi = msg_info[num].addr.npi; |
5171 // March 31, 2005 REF: CRR MMI-SPR-24511 x0012852 | 5171 // March 31, 2005 REF: CRR MMI-SPR-24511 x0012852 |
5172 // first_index, concat_status are also added to use it later on. | 5172 // first_index, concat_status are also added to use it later on. |
5173 msg_list->concat_status = msg_info[num].concat_status; | 5173 msg_list->concat_status = msg_info[num].concat_status; |
5174 msg_list->first_index = msg_info[num].first_index; | 5174 msg_list->first_index = msg_info[num].first_index; |
5175 /*a0393213 OMAPS00109953*/ | 5175 /*a0393213 OMAPS00109953*/ |
5176 msg_list->first_mem=msg_info[num].first_mem; | 5176 msg_list->first_mem=msg_info[num].first_mem; |
5177 #ifdef NO_ASCIIZ | 5177 #ifdef NO_ASCIIZ |
5178 memcpy(msg_list->addr.tag, | 5178 memcpy(msg_list->addr.tag, |
5179 msg_info[num].addr.tag, | 5179 msg_info[num].addr.tag, |
5261 case SMS_STAT_RecUnread: return MFW_SMS_UNREAD; | 5261 case SMS_STAT_RecUnread: return MFW_SMS_UNREAD; |
5262 case SMS_STAT_RecRead: return MFW_SMS_READ; | 5262 case SMS_STAT_RecRead: return MFW_SMS_READ; |
5263 case SMS_STAT_StoUnsent: return MFW_SMS_STOR_UNSENT; | 5263 case SMS_STAT_StoUnsent: return MFW_SMS_STOR_UNSENT; |
5264 case SMS_STAT_StoSent: return MFW_SMS_STOR_SENT; | 5264 case SMS_STAT_StoSent: return MFW_SMS_STOR_SENT; |
5265 case SMS_STAT_All: return MFW_SMS_ALL; | 5265 case SMS_STAT_All: return MFW_SMS_ALL; |
5266 default: | 5266 default: |
5267 return MFW_SMS_UNKNOWN; | 5267 return MFW_SMS_UNKNOWN; |
5268 } | 5268 } |
5269 } | 5269 } |
5270 | 5270 |
5271 | 5271 |
5402 OR dcs == 0xD0 | 5402 OR dcs == 0xD0 |
5403 OR dcs == 0xD8 | 5403 OR dcs == 0xD8 |
5404 OR dcs == 0xE0 | 5404 OR dcs == 0xE0 |
5405 OR dcs == 0xE8) | 5405 OR dcs == 0xE8) |
5406 { | 5406 { |
5407 | 5407 |
5408 status = MFW_SMS_VOICE; | 5408 status = MFW_SMS_VOICE; |
5409 } | 5409 } |
5410 | 5410 |
5411 else if (udh->len > 0 AND udh->data[0] == 0x01 | 5411 else if (udh->len > 0 AND udh->data[0] == 0x01 |
5412 AND (udh->data[2] == 0x80 OR udh->data[2] == 0x00)) /* check user data header */ | 5412 AND (udh->data[2] == 0x80 OR udh->data[2] == 0x00)) /* check user data header */ |
5413 { | 5413 { |
5414 status = MFW_SMS_VOICE; | 5414 status = MFW_SMS_VOICE; |
5415 //x0pleela 24 Mar, 2006 ER OMAPS00070657 | 5415 //x0pleela 24 Mar, 2006 ER OMAPS00070657 |
5416 /*If message count is zero, so delete icon */ | 5416 /*If message count is zero, so delete icon */ |
5417 #ifdef FF_CPHS | 5417 #ifdef FF_CPHS |
5418 if( udh->data[3] == 0x00 ) | 5418 if( udh->data[3] == 0x00 ) |
5419 { | 5419 { |
5420 TRACE_EVENT("message count is zero" ); | 5420 TRACE_EVENT("message count is zero" ); |
5421 udh_flag = TRUE; | 5421 udh_flag = TRUE; |
5422 } | 5422 } |
5423 #endif | 5423 #endif |
5424 } | 5424 } |
5425 | 5425 |
5426 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar | 5426 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar |
5427 // Voice mail identification is already done using dcs. Identification should not be done using pid. Check commented | 5427 // Voice mail identification is already done using dcs. Identification should not be done using pid. Check commented |
5428 // else if (pid == 0x5F OR pid ==0x42 /*On power-up check pid to determine SMS VM */) /* check message identifier */ | 5428 // else if (pid == 0x5F OR pid ==0x42 /*On power-up check pid to determine SMS VM */) /* check message identifier */ |
5429 /* { status = MFW_SMS_VOICE; | 5429 /* { status = MFW_SMS_VOICE; |
5430 | 5430 |
5431 } */ | 5431 } */ |
5432 else if (toa->ton == TON_Alphanumeric | 5432 else if (toa->ton == TON_Alphanumeric |
5433 // 0x30 special case for one-2-one when voice mail has been deleted. | 5433 // 0x30 special case for one-2-one when voice mail has been deleted. |
5434 AND (addr[0] == 0x10 OR addr[0] == 0x11 OR addr[0]==0x31 OR addr[0]==0x30)) /* check CPHS */ | 5434 AND (addr[0] == 0x10 OR addr[0] == 0x11 OR addr[0]==0x31 OR addr[0]==0x30)) /* check CPHS */ |
5435 { | 5435 { |
5441 } | 5441 } |
5442 else if(addr[0]==0x31 && Delete_1_2_1_vm_icon == FALSE) | 5442 else if(addr[0]==0x31 && Delete_1_2_1_vm_icon == FALSE) |
5443 Display_1_2_1_vm_icon = TRUE; | 5443 Display_1_2_1_vm_icon = TRUE; |
5444 | 5444 |
5445 status = MFW_SMS_VOICE; | 5445 status = MFW_SMS_VOICE; |
5446 | 5446 |
5447 } | 5447 } |
5448 TRACE_EVENT_P2("Addr[0]:%x, Addr[1]:%x", addr[0], addr[1]); | 5448 TRACE_EVENT_P2("Addr[0]:%x, Addr[1]:%x", addr[0], addr[1]); |
5449 TRACE_EVENT_P2("Addr[2]:%x, Addr[3]:%x", addr[2], addr[3]); | 5449 TRACE_EVENT_P2("Addr[2]:%x, Addr[3]:%x", addr[2], addr[3]); |
5450 /*MC1364, improved this to check if voicemail indicator to be set or cleared*/ | 5450 /*MC1364, improved this to check if voicemail indicator to be set or cleared*/ |
5451 | 5451 |
5452 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar | 5452 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar |
5453 // Instead of identifying voice mail ON (indication)/OFF(deletion) using addr[0], we use dcs. | 5453 // Instead of identifying voice mail ON (indication)/OFF(deletion) using addr[0], we use dcs. |
5454 // (addr[0]&0x01) condition replaced with (dcs & 0x08) | 5454 // (addr[0]&0x01) condition replaced with (dcs & 0x08) |
5455 | 5455 |
5456 //x0pleela 24 Mar, 2006 ER OMAPS00070657 | 5456 //x0pleela 24 Mar, 2006 ER OMAPS00070657 |
5457 #ifdef FF_CPHS | 5457 #ifdef FF_CPHS |
5458 if ((status == MFW_SMS_VOICE) && (dcs & 0x08)&& (!udh_flag)) //if a voicemail indication | 5458 if ((status == MFW_SMS_VOICE) && (dcs & 0x08)&& (!udh_flag)) //if a voicemail indication |
5459 #else | 5459 #else |
5460 if ((status == MFW_SMS_VOICE) && (dcs & 0x08)) | 5460 if ((status == MFW_SMS_VOICE) && (dcs & 0x08)) |
5461 #endif | 5461 #endif |
5462 { | 5462 { |
5463 Delete_1_2_1_vm_icon = FALSE;/*SPR2260*/ | 5463 Delete_1_2_1_vm_icon = FALSE;/*SPR2260*/ |
5464 Display_1_2_1_vm_icon = TRUE; | 5464 Display_1_2_1_vm_icon = TRUE; |
5465 | 5465 |
5466 //x0pleela 09 June, 2006 DR: OMAPS00079692 | 5466 //x0pleela 09 June, 2006 DR: OMAPS00079692 |
5467 //following code is commented as MMI need not set the VMWI flag | 5467 //following code is commented as MMI need not set the VMWI flag |
5468 #if 0 | 5468 #if 0 |
5469 | 5469 |
5470 /*MC, if MSB set, bit 0 of second char in 7-bit encoding)*/ | 5470 /*MC, if MSB set, bit 0 of second char in 7-bit encoding)*/ |
5471 if (addr[1] & 0x08) /*SPR 2260 experimentally, bit set by orange*/ | 5471 if (addr[1] & 0x08) /*SPR 2260 experimentally, bit set by orange*/ |
5472 cphs_set_mailbox_status(0,MFW_CFLAG_SET , 0, 0);/*set line2*/ | 5472 cphs_set_mailbox_status(0,MFW_CFLAG_SET , 0, 0);/*set line2*/ |
5473 else | 5473 else |
5476 } | 5476 } |
5477 //x0pleela 24 Mar, 2006 ER OMAPS00070657 | 5477 //x0pleela 24 Mar, 2006 ER OMAPS00070657 |
5478 #ifdef FF_CPHS | 5478 #ifdef FF_CPHS |
5479 if ( ((status == MFW_SMS_VOICE) && !(dcs & 0x08)) OR(udh_flag)) //if a voicemail deletion | 5479 if ( ((status == MFW_SMS_VOICE) && !(dcs & 0x08)) OR(udh_flag)) //if a voicemail deletion |
5480 #else | 5480 #else |
5481 if ((status == MFW_SMS_VOICE) && !(dcs & 0x08)) | 5481 if ((status == MFW_SMS_VOICE) && !(dcs & 0x08)) |
5482 #endif | 5482 #endif |
5483 { | 5483 { |
5484 Delete_1_2_1_vm_icon = TRUE;/*SPR2260*/ | 5484 Delete_1_2_1_vm_icon = TRUE;/*SPR2260*/ |
5485 Display_1_2_1_vm_icon = FALSE; | 5485 Display_1_2_1_vm_icon = FALSE; |
5486 | 5486 |
5487 //x0pleela 09 June, 2006 DR: OMAPS00079692 | 5487 //x0pleela 09 June, 2006 DR: OMAPS00079692 |
5488 //following code is commented as MMI need not set the VMWI flag | 5488 //following code is commented as MMI need not set the VMWI flag |
5489 #if 0 | 5489 #if 0 |
5490 /*MC, if MSB set, bit 0 of second char in 7-bit encoding)*/ | 5490 /*MC, if MSB set, bit 0 of second char in 7-bit encoding)*/ |
5491 if (addr[1] & 0x08) /*SPR 2260 experimentally, bit set by orange*/ | 5491 if (addr[1] & 0x08) /*SPR 2260 experimentally, bit set by orange*/ |
5492 cphs_set_mailbox_status(0,MFW_CFLAG_NOTSet , 0, 0);/*clear line2*/ | 5492 cphs_set_mailbox_status(0,MFW_CFLAG_NOTSet , 0, 0);/*clear line2*/ |
5493 else | 5493 else |
5494 cphs_set_mailbox_status(MFW_CFLAG_NOTSet, 0, 0, 0);/*clear line1*/ | 5494 cphs_set_mailbox_status(MFW_CFLAG_NOTSet, 0, 0, 0);/*clear line1*/ |
5495 #endif | 5495 #endif |
5496 } | 5496 } |
5497 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar | 5497 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar |
5498 // If voicemail message is from group "1100", update status as MFW_SMS_VOICEMSG_DELETE | 5498 // If voicemail message is from group "1100", update status as MFW_SMS_VOICEMSG_DELETE |
5499 if ((status == MFW_SMS_VOICE) && ((dcs & 0xF0) == 0xC0)) | 5499 if ((status == MFW_SMS_VOICE) && ((dcs & 0xF0) == 0xC0)) |
5500 { | 5500 { |
5501 status = MFW_SMS_VOICEMSG_DELETE; | 5501 status = MFW_SMS_VOICEMSG_DELETE; |
5502 invalidVm = TRUE; // set this flag to TRUE to indicate that this voice mail sms is to be deleted | 5502 invalidVm = TRUE; // set this flag to TRUE to indicate that this voice mail sms is to be deleted |
5503 } | 5503 } |
5504 | 5504 |
5505 return status; | 5505 return status; |
5506 } | 5506 } |
5507 | 5507 |
5508 #ifdef SIM_TOOLKIT | 5508 #ifdef SIM_TOOLKIT |
5509 /* | 5509 /* |
5752 */ | 5752 */ |
5753 msg_list->stat = msg_info[num].stat; | 5753 msg_list->stat = msg_info[num].stat; |
5754 msg_list->msg_type = msg_info[num].msg_type; | 5754 msg_list->msg_type = msg_info[num].msg_type; |
5755 /*a0393213 OMAPS00109953*/ | 5755 /*a0393213 OMAPS00109953*/ |
5756 msg_list->memory=msg_info[num].mem; | 5756 msg_list->memory=msg_info[num].mem; |
5757 | 5757 |
5758 } | 5758 } |
5759 /*a0393213 OMAPS00109953 - memory type added as a parameter*/ | 5759 /*a0393213 OMAPS00109953 - memory type added as a parameter*/ |
5760 void sms_copy_idx(UBYTE index, T_MFW_SMS_IDX *msg_list, T_MFW_SMS_MEM sms_memory) | 5760 void sms_copy_idx(UBYTE index, T_MFW_SMS_IDX *msg_list, T_MFW_SMS_MEM sms_memory) |
5761 {int i; | 5761 {int i; |
5762 TRACE_FUNCTION("sms_copy_idx()"); | 5762 TRACE_FUNCTION("sms_copy_idx()"); |
5766 #else | 5766 #else |
5767 for (i=0;i<MAX_MESSAGES; i++) | 5767 for (i=0;i<MAX_MESSAGES; i++) |
5768 #endif | 5768 #endif |
5769 { | 5769 { |
5770 /*a0393213 OMAPS00109953 - memory is also taken into consideration*/ | 5770 /*a0393213 OMAPS00109953 - memory is also taken into consideration*/ |
5771 if (index==msg_info[i].index && sms_memory==msg_info[i].mem) | 5771 if (index==msg_info[i].index && sms_memory==msg_info[i].mem) |
5772 /* | 5772 /* |
5773 * forward message reference to MMI | 5773 * forward message reference to MMI |
5774 */ | 5774 */ |
5775 { | 5775 { |
5776 msg_list->concat_status = msg_info[i].concat_status;/*SPR 2260*/ | 5776 msg_list->concat_status = msg_info[i].concat_status;/*SPR 2260*/ |
5777 msg_list->stat = msg_info[i].stat; | 5777 msg_list->stat = msg_info[i].stat; |
5778 msg_list->msg_type = msg_info[i].msg_type; | 5778 msg_list->msg_type = msg_info[i].msg_type; |
5779 break; | 5779 break; |
5780 } | 5780 } |
5793 | 5793 |
5794 */ | 5794 */ |
5795 void sms_ok_CMGL (void) | 5795 void sms_ok_CMGL (void) |
5796 { | 5796 { |
5797 TRACE_FUNCTION("sms_ok_CMGL: rAT_PlusCMGL cmpl"); | 5797 TRACE_FUNCTION("sms_ok_CMGL: rAT_PlusCMGL cmpl"); |
5798 /*a0393213 OMAPS00109953*/ | 5798 /*a0393213 OMAPS00109953*/ |
5799 if(index_retrieve_state==MFW_SMS_SIM_INDEX_RETRIEVING) | 5799 if(index_retrieve_state==MFW_SMS_SIM_INDEX_RETRIEVING) |
5800 { | 5800 { |
5801 /*all the indexes of SMes residing in SIM has been got - now get indexes from ME*/ | 5801 /*all the indexes of SMes residing in SIM has been got - now get indexes from ME*/ |
5802 if(sms_set_pref_memory(MFW_MEM_ME)!=MFW_SMS_OK) | 5802 if(sms_set_pref_memory(MFW_MEM_ME)!=MFW_SMS_OK) |
5803 { | 5803 { |
5804 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); | 5804 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); |
5805 } | 5805 } |
5806 else | 5806 else |
5807 { | 5807 { |
5808 f_update=MFW_SMS_NEW; | 5808 f_update=MFW_SMS_NEW; |
5809 if (sAT_PlusCMGL (CMD_SRC_LCL, SMS_STAT_All, | 5809 if (sAT_PlusCMGL (CMD_SRC_LCL, SMS_STAT_All, |
5811 0, (T_ACI_SMS_READ)MNSMS_READ_PREVIEW) NEQ AT_EXCT) /* typecast to remove warning Aug - 11 */ | 5811 0, (T_ACI_SMS_READ)MNSMS_READ_PREVIEW) NEQ AT_EXCT) /* typecast to remove warning Aug - 11 */ |
5812 #else | 5812 #else |
5813 0, SMS_READ_Preview) NEQ AT_EXCT)/*a0393213 warnings removal-READ_PREVIEW changed to SMS_READ_Preview*/ | 5813 0, SMS_READ_Preview) NEQ AT_EXCT)/*a0393213 warnings removal-READ_PREVIEW changed to SMS_READ_Preview*/ |
5814 #endif | 5814 #endif |
5815 { | 5815 { |
5816 TRACE_EVENT("sAT_PlusCMGL error"); | 5816 TRACE_EVENT("sAT_PlusCMGL error"); |
5817 } | 5817 } |
5818 else | 5818 else |
5819 { | 5819 { |
5820 index_retrieve_state=MFW_SMS_FFS_INDEX_RETRIEVING; | 5820 index_retrieve_state=MFW_SMS_FFS_INDEX_RETRIEVING; |
5821 return; | 5821 return; |
5822 } | 5822 } |
5823 } | 5823 } |
5824 } | 5824 } |
5827 /*all the indexes of SMes residing in FFS has been got - so all the indexes has been got*/ | 5827 /*all the indexes of SMes residing in FFS has been got - so all the indexes has been got*/ |
5828 index_retrieve_state=MFW_SMS_INDEX_RETRIEVED; | 5828 index_retrieve_state=MFW_SMS_INDEX_RETRIEVED; |
5829 /*setting the pref memory back to SIM*/ | 5829 /*setting the pref memory back to SIM*/ |
5830 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) | 5830 if(sms_set_pref_memory(MFW_MEM_SIM)!=MFW_SMS_OK) |
5831 { | 5831 { |
5832 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); | 5832 TRACE_ERROR("sms_ok_CMGL():Not able to set pref memory"); |
5833 } | 5833 } |
5834 } | 5834 } |
5835 else | 5835 else |
5836 { | 5836 { |
5837 TRACE_ERROR("sms_ok_CMGL() : Improper index retrieving state"); | 5837 TRACE_ERROR("sms_ok_CMGL() : Improper index retrieving state"); |
5839 /* request default memory */ | 5839 /* request default memory */ |
5840 f_update = MFW_SMS_FREE; | 5840 f_update = MFW_SMS_FREE; |
5841 int_req = FIRST_READ_OF_MEMORY_USE;/*SPR2260*/ | 5841 int_req = FIRST_READ_OF_MEMORY_USE;/*SPR2260*/ |
5842 | 5842 |
5843 qAT_PlusCPMS(CMD_SRC_LCL); | 5843 qAT_PlusCPMS(CMD_SRC_LCL); |
5844 | 5844 |
5845 } | 5845 } |
5846 | 5846 |
5847 | 5847 |
5848 | 5848 |
5849 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858 | 5849 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858 |
5852 +---------------------------------------------------------------------------+ | 5852 +---------------------------------------------------------------------------+ |
5853 | PROJECT : MMI-Framework (8417) MODULE : MFW_SMS | | 5853 | PROJECT : MMI-Framework (8417) MODULE : MFW_SMS | |
5854 | STATE : code ROUTINE : sms_homezoneCBToggle | | 5854 | STATE : code ROUTINE : sms_homezoneCBToggle | |
5855 +---------------------------------------------------------------------------+ | 5855 +---------------------------------------------------------------------------+ |
5856 | 5856 |
5857 PURPOSE : | 5857 PURPOSE : |
5858 | 5858 |
5859 */ | 5859 */ |
5860 #ifndef NEPTUNE_BOARD | 5860 #ifndef NEPTUNE_BOARD |
5861 | 5861 |
5862 //Dec 14, 2005 REF: MMI-FIX-OMAPS00058684 x0035544 | 5862 //Dec 14, 2005 REF: MMI-FIX-OMAPS00058684 x0035544 |
5874 ret = qAT_PercentCBHZ(CMD_SRC_LCL , &mode, &dcs, &timeout); | 5874 ret = qAT_PercentCBHZ(CMD_SRC_LCL , &mode, &dcs, &timeout); |
5875 | 5875 |
5876 if (ret EQ AT_FAIL) | 5876 if (ret EQ AT_FAIL) |
5877 { | 5877 { |
5878 //Aug 16, 2005 REF: MMI-FIX-30439 x0018858 | 5878 //Aug 16, 2005 REF: MMI-FIX-30439 x0018858 |
5879 //Incase the querying fails, we still wil have to activate/ de-activate with default | 5879 //Incase the querying fails, we still wil have to activate/ de-activate with default |
5880 //values for dcs and timeout | 5880 //values for dcs and timeout |
5881 if(1 == Activate_CB ) | 5881 if(1 == Activate_CB ) |
5882 { | 5882 { |
5883 TRACE_FUNCTION("ACTIVATING HOMEZONE"); | 5883 TRACE_FUNCTION("ACTIVATING HOMEZONE"); |
5884 /*a0393213 warnings removal-CS_GsmDef used instead of 0*/ | 5884 /*a0393213 warnings removal-CS_GsmDef used instead of 0*/ |
5886 } | 5886 } |
5887 else | 5887 else |
5888 { | 5888 { |
5889 TRACE_FUNCTION("DE-ACTIVATING HOMEZONE"); | 5889 TRACE_FUNCTION("DE-ACTIVATING HOMEZONE"); |
5890 /*a0393213 warnings removal-CS_GsmDef used instead of 0*/ | 5890 /*a0393213 warnings removal-CS_GsmDef used instead of 0*/ |
5891 ret = sAT_PercentCBHZ(CMD_SRC_LCL , CBHZ_MOD_NotActive,CS_GsmDef,def_timeout); | 5891 ret = sAT_PercentCBHZ(CMD_SRC_LCL , CBHZ_MOD_NotActive,CS_GsmDef,def_timeout); |
5892 } | 5892 } |
5893 return; | 5893 return; |
5894 } | 5894 } |
5895 | 5895 |
5896 | 5896 |
5900 ret = sAT_PercentCBHZ(CMD_SRC_LCL , CBHZ_MOD_Active,dcs,timeout); | 5900 ret = sAT_PercentCBHZ(CMD_SRC_LCL , CBHZ_MOD_Active,dcs,timeout); |
5901 } | 5901 } |
5902 else | 5902 else |
5903 { | 5903 { |
5904 TRACE_FUNCTION("DE-ACTIVATING HOMEZONE"); | 5904 TRACE_FUNCTION("DE-ACTIVATING HOMEZONE"); |
5905 ret = sAT_PercentCBHZ(CMD_SRC_LCL , CBHZ_MOD_NotActive,dcs,timeout); | 5905 ret = sAT_PercentCBHZ(CMD_SRC_LCL , CBHZ_MOD_NotActive,dcs,timeout); |
5906 } | 5906 } |
5907 return; | 5907 return; |
5908 | 5908 |
5909 } | 5909 } |
5910 //end 30439 | 5910 //end 30439 |
5915 /******************************************************************************* | 5915 /******************************************************************************* |
5916 | 5916 |
5917 $Function: is_alphanumeric_addr | 5917 $Function: is_alphanumeric_addr |
5918 | 5918 |
5919 $Description: check whether the address entered by user is alphanumeric or numeric. | 5919 $Description: check whether the address entered by user is alphanumeric or numeric. |
5920 | 5920 |
5921 $Returns: None | 5921 $Returns: None |
5922 | 5922 |
5923 $Arguments: win | 5923 $Arguments: win |
5924 | 5924 |
5925 *******************************************************************************/ | 5925 *******************************************************************************/ |
5932 { | 5932 { |
5933 if ( ((*dest_addr) >= '0') && ( (*dest_addr) <= '9')) | 5933 if ( ((*dest_addr) >= '0') && ( (*dest_addr) <= '9')) |
5934 { | 5934 { |
5935 dest_addr++; | 5935 dest_addr++; |
5936 index++; /* address is numeric */ | 5936 index++; /* address is numeric */ |
5937 } | 5937 } |
5938 else | 5938 else |
5939 return TRUE; /*alphanumeric address*/ | 5939 return TRUE; /*alphanumeric address*/ |
5940 | 5940 |
5941 } | 5941 } |
5942 return FALSE; | 5942 return FALSE; |
5943 } | 5943 } |
5944 | 5944 |