FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/g23m-gsm/sms/sms_tlf.c @ 673:2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 28 Sep 2014 23:20:04 +0000 |
parents | |
children | 2d8cb1c85e01 |
rev | line source |
---|---|
673
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 | Project : GSM-F&D (8411) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 | Modul : SMS_TLF |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 +----------------------------------------------------------------------------- |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 | All rights reserved. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 | This file is confidential and a trade secret of Texas |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 | Instruments Berlin, AG |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 | The receipt of or possession of this file does not convey |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 | any rights to reproduce or disclose its contents or to |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 | whole, or in part, without the specific written consent of |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 +----------------------------------------------------------------------------- |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 | Purpose : This Modul defines the functions for the transfer layer |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 | capability of the module Short Message Service. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 +----------------------------------------------------------------------------- |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 #ifndef SMS_TLF_C |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 #define SMS_TLF_C |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 #define ENTITY_SMS |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 /*==== INCLUDES ===================================================*/ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 #include <string.h> |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 #include <stdlib.h> |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 #include <stddef.h> |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 #include "typedefs.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 #include "pcm.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #include "vsi.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 #include "custom.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 #include "gsm.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 #include "message.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 #include "ccdapi.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 #include "prim.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 #include "cus_sms.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 #include "cnf_sms.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 #include "mon_sms.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 #include "pei.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 #include "tok.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 #include "sms.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 #include "gdi.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 #include "sms_em.h" |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 /*==== EXPORT ======================================================*/ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 /*==== PRIVAT ======================================================*/ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 static const UBYTE ref_nr_23430[] = { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 0xE, 0x3, 0x8, 0x7, 0x9, 0x5, 0xE, 0x3, 0x7}; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 /*==== VARIABLES ===================================================*/ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 /* Implements Measure#32: Row 84, 96, 87, 89, 95, 97, 104, 109 & 113 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 const char * const ef_sms_id = EF_SMS_ID; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 /*==== FUNCTIONS ===================================================*/ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 /* Implements Measure# 14 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 +---------------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 | STATE : code ROUTINE : tl_send_sim_update_req | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 +---------------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 PURPOSE : This routine process SIM update request and SMS memo resume request |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 LOCAL void tl_send_sim_update_req(UBYTE trans_data, USHORT offset) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 UBYTE sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 TRACE_FUNCTION("tl_send_sim_update_req()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 * update sim notification flag |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 if (sms_data->sim_phase >= PHASE_2_SIM) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 if (tl_sms_reserve_req_id(&sim_acc_ix)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 PALLOC (update_req, SIM_UPDATE_REQ); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 update_req->source = SRC_SMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 update_req->req_id = sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 update_req->v_path_info = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 update_req->datafield = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 sms_data->sms_sim_access_info[sim_acc_ix].datafield = SIM_SMSS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 update_req->length = 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 update_req->trans_data[0] = trans_data; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 update_req->offset = offset; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 PSENDX (SIM, update_req); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 if(sms_data->inst == INST_MO) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 tl_set_access_fifo (ACCESS_BY_MMI); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 tl_set_access_fifo (ACCESS_BY_NET); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 | STATE : code ROUTINE : tl_get_octet_len | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 | ROUTINE : tl_adjust_message_len | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 PURPOSE : Derive the number of octets of TP-User-Data and the whole |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 message regarding the Data Coding Scheme. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 LOCAL BOOL tl_udl_count_septet (UBYTE dcs) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 BOOL isSeptet = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 switch (dcs & 0xF0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 case 0x00: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 case 0x10: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 if ((dcs & 0xC) EQ 0x4 OR /* 8-bit data */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 (dcs & 0xC) EQ 0x8) /* UCS2 data */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 isSeptet = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 case 0x20: /* compressed data */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 case 0x30: /* compressed data */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 case 0xE0: /* UCS2 data */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 isSeptet = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 case 0xF0: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 if ((dcs & 0x4) NEQ 0) /* 8-bit data */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 isSeptet = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 return isSeptet; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
143 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
144 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
145 LOCAL USHORT tl_get_octet_len (USHORT tp_udl, UBYTE dcs) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
146 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 if (tl_udl_count_septet (dcs)) /* convert number of septets */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 return (USHORT)((tp_udl + 1) * 7 / 8); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 return tp_udl; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 GLOBAL void tl_adjust_message_len (UBYTE tp_vt_mti, BUF_tpdu *tpdu) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
154 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 USHORT oct_len, pre_len; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 UBYTE dcs; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 UBYTE *tp_data, *tp_msg; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 if (tp_vt_mti EQ SMS_VT_SIM_PDU) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 pre_len = tpdu->b_tpdu[0] + 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
162 tp_msg = &tpdu->b_tpdu[pre_len]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 switch (*tp_msg & 0x3) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 case SMS_SUBMIT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 tp_vt_mti = SMS_VT_SUBMIT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 case SMS_DELIVER: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 tp_vt_mti = SMS_VT_DELIVER; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 case SMS_STATUS_REPORT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 tp_vt_mti = SMS_VT_STATUS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
178 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 pre_len = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
181 tp_msg = &tpdu->b_tpdu[0]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
182 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 switch (tp_vt_mti) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 case SMS_VT_SUBMIT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 oct_len = (tp_msg[2] + 1)/2; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
187 tp_data = &tp_msg[5 + oct_len]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
188 dcs = *tp_data; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
190 switch ((tp_msg[0] >> 3) & 0x3) /* TP-VPF */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 { /* point to TP-UDL */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 case SMS_VPF_RELATIVE: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 tp_data += 2; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 oct_len += 8; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
195 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 case SMS_VPF_ENHANCED: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 case SMS_VPF_ABSOLUTE: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 tp_data += 8; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
199 oct_len += 14; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
200 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
201 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 tp_data++; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 oct_len += 7; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 oct_len += tl_get_octet_len (*tp_data, dcs); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
207 tpdu->l_tpdu = (oct_len + pre_len) << 3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
208 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
209 case SMS_VT_DELIVER: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
210 oct_len = (tp_msg[1] + 1)/2; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
211 tp_data = &tp_msg[4 + oct_len]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
212 dcs = *tp_data; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
213 tp_data += 8; /* point to TP-UDL */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
214 oct_len += (13 + tl_get_octet_len (*tp_data, dcs)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
215 tpdu->l_tpdu = (oct_len + pre_len) << 3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 case SMS_VT_STATUS: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 oct_len = (tp_msg[2] + 1)/2 + 19; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
219 tp_data = &tp_msg[oct_len]; /* tp_data points to PI */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
220 if(*tp_data NEQ NOT_PRESENT_8BIT) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
221 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
222 dcs = *(tp_data+2); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
223 tp_data += 3; /* point to TP-UDL */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
224 oct_len += (3 + tl_get_octet_len (*tp_data, dcs)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
225 tpdu->l_tpdu = (oct_len + pre_len) << 3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
226 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
227 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
228 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
229 tpdu->l_tpdu = (oct_len + pre_len) << 3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
230 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
231 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
232 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
233 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
234 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
235 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
236 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
237 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
238 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
239 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
240 | STATE : code ROUTINE : tl_establish_connection | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
241 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
242 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
243 PURPOSE : Initiate the Establishment of a new connection |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
244 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
245 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
246 GLOBAL void tl_establish_connection ( |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
247 BOOL incr /* true if reference nr increment needed */) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
248 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
249 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
250 UBYTE ti; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
251 TRACE_FUNCTION ("tl_establish_connection()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
252 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
253 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
254 * new instance |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
255 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
256 GET_NEW_SMS_INSTANCE(0); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
257 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
258 * increment TI |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
259 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
260 ti = csf_get_new_mo_ti(); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
261 #if defined (GPRS) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
262 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
263 * Set downlink according to prefs, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
264 * in case of LL it has to be checked first if up |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
265 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
266 if ( ( (sms_data->mo_dst_pref EQ GPRS_SMS_GPRS_PREF) || |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
267 (sms_data->mo_dst_pref EQ GPRS_SMS_GPRS_ONLY) ) /*&& |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
268 ( sms_data->llc_flow NEQ SMS_LLC_UNKNOWN )*/ ) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
269 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
270 SMS_INST.downlink = SMS_DOWNLINK_LL_CHECK; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
271 TRACE_EVENT("downlink = SMS_DOWNLINK_LL_CHECK"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
272 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
273 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
274 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
275 SMS_INST.downlink = SMS_DOWNLINK_MMSMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
276 TRACE_EVENT("downlink = SMS_DOWNLINK_MMSMS"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
277 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
278 #endif /* GPRS */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
279 if (incr) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
280 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
281 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
282 * increment reference |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
283 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
284 ++SMS_INST.tp_mr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
285 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
286 * SIM_UPDATE_REQ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
287 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
288 tl_build_sim_update_req(); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
289 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
290 TRACE_EVENT_P2("TI=%u TP_MR=%u", ti, SMS_INST.tp_mr); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
291 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
292 * RL_ESTABLISH_REQ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
293 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
294 rl_establish_req(ti); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
295 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
296 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
297 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
298 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
299 | STATE : code ROUTINE : tl_build_status_rep | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
300 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
301 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
302 PURPOSE : Processing the function TL_BUILD_STATUS_REP. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
303 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
304 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
305 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
306 GLOBAL void tl_build_status_rep (T_rp_data_dl *rp_data_dl, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
307 T_MNSMS_STATUS_IND *status_ind) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
308 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
309 T_SIM_PDU *sim_pdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
310 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
311 TRACE_FUNCTION ("tl_build_status_rep()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
312 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
313 memset (&status_ind->sms_sdu, 0, sizeof(T_sms_sdu)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
314 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
315 if (rp_data_dl NEQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
316 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
317 MALLOC (sim_pdu, sizeof(T_SIM_PDU)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
318 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
319 sim_pdu->rp_addr = rp_data_dl->rp_addr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
320 sim_pdu->tpdu = rp_data_dl->rp_user_data.tpdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
321 sim_pdu->tp_mti = SMS_STATUS_REPORT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
322 sim_pdu->v_tpdu = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
323 sim_pdu->tp_vt_mti = SMS_VT_SIM_PDU; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
324 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
325 ccd_codeMsg (CCDENT_SMS, DOWNLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
326 (T_MSGBUF *)&status_ind->sms_sdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
327 (UBYTE *)sim_pdu, SMS_VT_SIM_PDU); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
328 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
329 MFREE (sim_pdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
330 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
331 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
332 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
333 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
334 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
335 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
336 | STATE : code ROUTINE : tl_modify_submit | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
337 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
338 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
339 PURPOSE : The SM taken from storage (rec_data) is modified with |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
340 certain values from parameter 'sms_sdu' according to |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
341 parameter 'modify'. The resulting message is returned in |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
342 parameter 'sim_pdu'. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
343 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
344 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
345 LOCAL void tl_translate_mt_to_mo (T_TP_SUBMIT *submit, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
346 T_TP_DELIVER *deliver) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
347 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
348 submit->tp_vt_mti = SMS_VT_SUBMIT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
349 submit->tp_udhi = deliver->tp_udhi; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
350 submit->tp_mti = SMS_SUBMIT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
351 submit->tp_mr = NOT_PRESENT_8BIT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
352 submit->tp_pid = deliver->tp_pid; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
353 submit->tp_dcs = deliver->tp_dcs; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
354 if ((submit->v_tp_ud = deliver->v_tp_ud) NEQ 0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
355 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
356 submit->tp_ud = deliver->tp_ud; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
357 submit->v_tp_udh_inc = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
358 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
359 else if (submit->v_tp_udh_inc= deliver->v_tp_udh_inc) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
360 submit->tp_udh_inc= deliver->tp_udh_inc; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
361 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
362 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
363 GLOBAL BOOL tl_modify_submit (T_SIM_PDU *sim_pdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
364 UBYTE modify, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
365 T_sms_sdu *sms_sdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
366 UBYTE *rec_data) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
367 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
368 T_TP_SUBMIT *submit; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
369 T_sms_sdu *rec_sdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
370 union { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
371 T_TP_SUBMIT *submit; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
372 T_TP_DELIVER *deliver; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
373 } rec_msg; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
374 T_rp_addr rp_addr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
375 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
376 TRACE_FUNCTION ("tl_modify_submit()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
377 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
378 if (modify >= SMS_MODIFY_ALL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
379 return TRUE; /* ignore message from storage */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
380 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
381 if ((rec_data[0] & 1) EQ SMS_RECORD_FREE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
382 return FALSE; /* empty or invalid record */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
383 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
384 if (ccd_decodeMsg (CCDENT_SMS, BOTH, (T_MSGBUF *)sms_sdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
385 (UBYTE *)sim_pdu, SMS_VT_SIM_PDU) EQ ccdError) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
386 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
387 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
388 rp_addr = sim_pdu->rp_addr; /* keep SCA */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
389 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
390 MALLOC (submit, sizeof(T_TP_SUBMIT)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
391 memset (submit, 0, sizeof(T_TP_SUBMIT)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
392 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
393 if (ccd_decodeMsg (CCDENT_SMS, UPLINK, (T_MSGBUF *)&sim_pdu->tpdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
394 (UBYTE *)submit, SMS_VT_SUBMIT) EQ ccdError) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
395 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
396 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
397 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
398 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
399 MALLOC (rec_sdu, sizeof(T_sms_sdu)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
400 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
401 rec_sdu->o_buf = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
402 rec_sdu->l_buf = SIM_PDU_LEN<<3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
403 memcpy (rec_sdu->buf, &rec_data[1], SIM_PDU_LEN); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
404 tl_adjust_message_len (SMS_VT_SIM_PDU, (BUF_tpdu *)rec_sdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
405 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
406 if (ccd_decodeMsg (CCDENT_SMS, BOTH, (T_MSGBUF *)rec_sdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
407 (UBYTE *)sim_pdu, SMS_VT_SIM_PDU) EQ ccdError) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
408 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
409 MFREE (rec_sdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
410 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
411 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
412 MFREE (rec_sdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
413 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
414 switch (modify) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
415 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
416 case SMS_MODIFY_SCA: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
417 sim_pdu->rp_addr = rp_addr; /* SCA from SUBMIT_REQ */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
418 /*FALLTHROUGH*/ /*lint -fallthrough*/ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
419 case SMS_MODIFY_NON: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
420 switch (rec_data[0] & 7) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
421 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
422 case SMS_RECORD_REC_UNREAD: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
423 case SMS_RECORD_REC_READ: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
424 if (sim_pdu->tp_mti NEQ SMS_DELIVER OR !sim_pdu->v_tpdu) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
425 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
426 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
427 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
428 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
429 MALLOC (rec_msg.deliver, sizeof(T_TP_DELIVER)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
430 memset (rec_msg.deliver, 0, sizeof(T_TP_DELIVER)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
431 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
432 if (ccd_decodeMsg (CCDENT_SMS, DOWNLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
433 (T_MSGBUF *)&sim_pdu->tpdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
434 (UBYTE *)rec_msg.deliver, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
435 SMS_VT_DELIVER) EQ ccdError) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
436 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
437 MFREE (rec_msg.deliver); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
438 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
439 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
440 tl_translate_mt_to_mo (submit, rec_msg.deliver); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
441 memcpy (&submit->tp_da, &rec_msg.deliver->tp_oa, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
442 sizeof(T_tp_da)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
443 MFREE (rec_msg.deliver); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
444 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
445 sim_pdu->tpdu.o_tpdu = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
446 sim_pdu->tpdu.l_tpdu = TPDU_BIT_LEN; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
447 if (ccd_codeMsg (CCDENT_SMS, UPLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
448 (T_MSGBUF *)&sim_pdu->tpdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
449 (UBYTE *)submit, SMS_VT_SUBMIT) NEQ ccdOK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
450 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
451 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
452 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
453 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
454 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
455 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
456 /* sim_pdu shall contain a SMS_SUBMIT message */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
457 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
458 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
459 if (sim_pdu->tp_mti NEQ SMS_SUBMIT OR !sim_pdu->v_tpdu) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
460 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
461 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
462 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
463 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
464 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
465 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
466 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
467 case SMS_MODIFY_TPOA_SCA: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
468 sim_pdu->rp_addr = rp_addr; /* SCA from SUBMIT_REQ */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
469 /* no break */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
470 case SMS_MODIFY_TPOA: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
471 switch (rec_data[0] & 7) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
472 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
473 case SMS_RECORD_REC_UNREAD: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
474 case SMS_RECORD_REC_READ: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
475 if (sim_pdu->tp_mti NEQ SMS_DELIVER OR !sim_pdu->v_tpdu) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
476 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
477 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
478 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
479 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
480 MALLOC (rec_msg.deliver, sizeof(T_TP_DELIVER)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
481 memset (rec_msg.deliver, 0, sizeof(T_TP_DELIVER)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
482 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
483 if (ccd_decodeMsg (CCDENT_SMS, DOWNLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
484 (T_MSGBUF *)&sim_pdu->tpdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
485 (UBYTE *)rec_msg.deliver, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
486 SMS_VT_DELIVER) EQ ccdError) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
487 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
488 MFREE (rec_msg.deliver); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
489 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
490 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
491 tl_translate_mt_to_mo (submit, rec_msg.deliver); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
492 MFREE (rec_msg.deliver); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
493 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
494 sim_pdu->tpdu.o_tpdu = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
495 sim_pdu->tpdu.l_tpdu = TPDU_BIT_LEN; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
496 if (ccd_codeMsg (CCDENT_SMS, UPLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
497 (T_MSGBUF *)&sim_pdu->tpdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
498 (UBYTE *)submit, SMS_VT_SUBMIT) NEQ ccdOK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
499 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
500 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
501 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
502 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
503 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
504 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
505 /* sim_pdu shall contain a SMS_SUBMIT message */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
506 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
507 if (sim_pdu->tp_mti NEQ SMS_SUBMIT OR !sim_pdu->v_tpdu) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
508 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
509 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
510 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
511 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
512 MALLOC (rec_msg.submit, sizeof(T_TP_SUBMIT)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
513 memset (rec_msg.submit, 0, sizeof(T_TP_SUBMIT)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
514 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
515 if (ccd_decodeMsg (CCDENT_SMS, UPLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
516 (T_MSGBUF *)&sim_pdu->tpdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
517 (UBYTE *)rec_msg.submit, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
518 SMS_VT_SUBMIT) EQ ccdError) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
519 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
520 MFREE (rec_msg.submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
521 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
522 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
523 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
524 rec_msg.submit->tp_da = submit->tp_da; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
525 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
526 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
527 sim_pdu->tpdu.o_tpdu = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
528 sim_pdu->tpdu.l_tpdu = TPDU_BIT_LEN; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
529 if (ccd_codeMsg (CCDENT_SMS, UPLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
530 (T_MSGBUF *)&sim_pdu->tpdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
531 (UBYTE *)rec_msg.submit, SMS_VT_SUBMIT) NEQ ccdOK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
532 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
533 MFREE (rec_msg.submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
534 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
535 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
536 MFREE (rec_msg.submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
537 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
538 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
539 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
540 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
541 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
542 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
543 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
544 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
545 sim_pdu->tp_mti = SMS_SUBMIT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
546 tl_adjust_message_len (SMS_VT_SUBMIT, &sim_pdu->tpdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
547 return TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
548 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
549 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
550 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
551 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
552 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
553 | STATE : code ROUTINE : tl_prepare_submit | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
554 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
555 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
556 PURPOSE : Fills 'cp_data' with required parameters and returns TRUE. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
557 If the parameter check fails nothing is changed and |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
558 FALSE is returned. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
559 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
560 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
561 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
562 GLOBAL BOOL tl_prepare_submit ( |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
563 T_SIM_PDU *sim_pdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
564 T_U_CP_DATA *cp_data) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
565 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
566 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
567 TRACE_FUNCTION ("tl_prepare_submit()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
568 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
569 if (sim_pdu->tp_mti EQ SMS_SUBMIT AND sim_pdu->v_tpdu) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
570 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
571 // ++SMS_INST.tp_mr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
572 sim_pdu->tpdu.b_tpdu[1] = SMS_INST.tp_mr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
573 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
574 SMS_TP_REF_RET(sms_data) = SMS_INST.tp_mr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
575 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
576 cp_data->cp_user_data_ul.v_rp_error = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
577 cp_data->cp_user_data_ul.v_rp_ack = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
578 memset (&cp_data->cp_user_data_ul.rp_data_ul, 0, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
579 sizeof (T_rp_data_ul)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
580 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
581 memcpy (&cp_data->cp_user_data_ul.rp_data_ul.rp_addr, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
582 &sim_pdu->rp_addr, sizeof (T_rp_addr)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
583 cp_data->cp_user_data_ul.rp_data_ul.rp_user_data.tp_mti |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
584 = sim_pdu->tp_mti; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
585 memcpy (&cp_data->cp_user_data_ul.rp_data_ul.rp_user_data.tpdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
586 &sim_pdu->tpdu, sizeof (BUF_tpdu)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
587 cp_data->cp_user_data_ul.rp_data_ul.rp_user_data.v_tpdu |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
588 = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
589 cp_data->cp_user_data_ul.v_rp_data_ul = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
590 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
591 return TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
592 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
593 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
594 TRACE_EVENT ("tl_prepare_submit() failed"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
595 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
596 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
597 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
598 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
599 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
600 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
601 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
602 | STATE : code ROUTINE : tl_init_complete | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
603 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
604 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
605 PURPOSE : tasks at initialisation (sim read record loop) completion |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
606 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
607 DESCRIPTION: - set init_done flag |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
608 - send smma message if necessary |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
609 - send report indication to user if applicable |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
610 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
611 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
612 GLOBAL void tl_init_complete (void) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
613 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
614 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
615 BOOL notification_flag; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
616 BOOL memory_available; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
617 BOOL mem_avail_msg; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
618 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
619 TRACE_FUNCTION ("tl_init_complete()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
620 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
621 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
622 * check whether memory available message must be sent |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
623 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
624 mem_avail_msg = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
625 notification_flag = !sms_data->mem_cap_avail; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
626 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
627 if ( (notification_flag == TRUE) AND |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
628 (sms_data->pr_cntrl.delivery_state == SMS_DELIVER_STATUS_RESUME) ) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
629 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
630 memory_available = (tl_get_free_space (MEM_SM) OR |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
631 tl_get_free_space (MEM_ME)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
632 if (memory_available == TRUE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
633 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
634 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
635 * initiate the sending of memory available message |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
636 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
637 mem_avail_msg = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
638 GET_MO_INSTANCE(sms_data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
639 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
640 * TL state transition TL_ESTABLISH |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
641 * EST state transition EST_SMMA |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
642 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
643 SMS_INST_SET_STATE (STATE_TL, TL_ESTABLISH); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
644 SET_STATE (STATE_EST, EST_SMMA); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
645 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
646 * 1st shot |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
647 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
648 SMS_INST.retrans = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
649 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
650 * establish connection |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
651 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
652 tl_establish_connection(FALSE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
653 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
654 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
655 if (mem_avail_msg == FALSE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
656 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
657 #ifdef GPRS |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
658 cp_send_getunitdata_req (); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
659 #endif |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
660 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
661 * set state: READY |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
662 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
663 sms_data->ent_state = SMS_STATE_READY; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
664 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
665 * report ind to user |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
666 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
667 tl_mnsms_report_ind (SMS_STATE_READY); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
668 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
669 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
670 * init done |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
671 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
672 sms_data->init_done = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
673 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
674 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
675 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
676 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
677 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
678 | STATE : code ROUTINE : tl_convert_sim_error | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
679 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
680 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
681 PURPOSE : Converts a SIM error to the appropriate SMS failure code. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
682 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
683 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
684 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
685 GLOBAL USHORT tl_convert_sim_error (USHORT sim_error) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
686 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
687 #if 0 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
688 switch (sim_error) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
689 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
690 case SIM_INVALID_PIN_1: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
691 return SMS_ERR_SIM_PIN1_REQ; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
692 case SIM_INVALID_PUK_1: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
693 return SMS_ERR_SIM_PUK1_REQ; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
694 case SIM_INVALID_PIN_2: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
695 return SMS_ERR_SIM_PIN2_REQ; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
696 case SIM_INVALID_PUK_2: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
697 return SMS_ERR_SIM_PUK2_REQ; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
698 case SIM_INVALID_OFFSET: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
699 return SMS_ERR_INV_INDEX; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
700 case SIM_FATAL_ERROR: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
701 return SMS_ERR_SIM_MISSING; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
702 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
703 return SMS_ERR_SIM_FAIL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
704 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
705 #else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
706 return sim_error; // prelimary |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
707 #endif |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
708 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
709 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
710 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
711 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
712 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
713 | STATE : code ROUTINE : tl_convert_mo_to_mem | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
714 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
715 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
716 PURPOSE : Prepare a MO-SM to be stored. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
717 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
718 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
719 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
720 GLOBAL BOOL tl_convert_mo_to_mem (T_MMSMS_DATA_REQ *data_req, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
721 UBYTE *data) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
722 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
723 T_SIM_PDU *sim_pdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
724 T_sms_sdu *sms_sdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
725 MCAST (cp_data, U_CP_DATA); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
726 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
727 TRACE_FUNCTION ("tl_convert_mo_to_mem()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
728 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
729 data_req->sdu.l_buf -= 8; // point to CP message type! |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
730 data_req->sdu.o_buf += 8; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
731 if (ccd_decodeMsg (CCDENT_SMS, UPLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
732 (T_MSGBUF *)&data_req->sdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
733 (UBYTE *)cp_data, NOT_PRESENT_8BIT) EQ ccdError) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
734 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
735 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
736 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
737 if (cp_data->msg_type NEQ U_CP_DATA OR |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
738 cp_data->cp_user_data_ul.rp_mti NEQ RP_DATA_UL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
739 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
740 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
741 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
742 MALLOC (sim_pdu, sizeof(T_SIM_PDU)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
743 MALLOC (sms_sdu, sizeof(T_sms_sdu)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
744 sms_sdu->o_buf = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
745 sms_sdu->l_buf = SIM_PDU_LEN<<3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
746 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
747 sim_pdu->rp_addr = cp_data->cp_user_data_ul.rp_data_ul.rp_addr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
748 sim_pdu->tpdu = cp_data->cp_user_data_ul.rp_data_ul.rp_user_data.tpdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
749 sim_pdu->tp_mti = SMS_SUBMIT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
750 sim_pdu->v_tpdu = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
751 sim_pdu->tp_vt_mti = SMS_VT_SIM_PDU; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
752 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
753 ccd_codeMsg (CCDENT_SMS, DOWNLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
754 (T_MSGBUF *)sms_sdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
755 (UBYTE *)sim_pdu, SMS_VT_SIM_PDU); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
756 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
757 /* set status byte */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
758 data[0] = SMS_RECORD_STO_SENT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
759 memcpy (&data[1], sms_sdu->buf, sms_sdu->l_buf >> 3); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
760 memset (&data[(sms_sdu->l_buf >> 3) + 1], NOT_PRESENT_8BIT, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
761 (SIZE_EF_SMS-1) - (sms_sdu->l_buf >> 3)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
762 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
763 MFREE (sim_pdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
764 MFREE (sms_sdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
765 // CCD_END; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
766 return TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
767 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
768 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
769 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
770 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
771 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
772 | STATE : code ROUTINE : tl_convert_mt_to_mem | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
773 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
774 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
775 PURPOSE : Prepare a MT-SM to be stored. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
776 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
777 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
778 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
779 GLOBAL void tl_convert_mt_to_mem (T_rp_data_dl *rp_data_dl, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
780 UBYTE *data) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
781 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
782 T_SIM_PDU *sim_pdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
783 T_sms_sdu *sms_sdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
784 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
785 TRACE_FUNCTION ("tl_convert_mt_to_mem()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
786 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
787 MALLOC (sim_pdu, sizeof(T_SIM_PDU)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
788 MALLOC (sms_sdu, sizeof(T_sms_sdu)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
789 sms_sdu->o_buf = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
790 sms_sdu->l_buf = SIM_PDU_LEN<<3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
791 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
792 sim_pdu->rp_addr = rp_data_dl->rp_addr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
793 sim_pdu->tpdu = rp_data_dl->rp_user_data.tpdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
794 sim_pdu->tp_mti = SMS_DELIVER; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
795 sim_pdu->v_tpdu = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
796 sim_pdu->tp_vt_mti = SMS_VT_SIM_PDU; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
797 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
798 ccd_codeMsg (CCDENT_SMS, DOWNLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
799 (T_MSGBUF *)sms_sdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
800 (UBYTE *)sim_pdu, SMS_VT_SIM_PDU); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
801 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
802 data[0] = SMS_RECORD_REC_UNREAD; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
803 memcpy (&data[1], sms_sdu->buf, sms_sdu->l_buf >> 3); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
804 memset (&data[(sms_sdu->l_buf >> 3) + 1], NOT_PRESENT_8BIT, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
805 (SIZE_EF_SMS-1) - (sms_sdu->l_buf >> 3)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
806 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
807 MFREE (sim_pdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
808 MFREE (sms_sdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
809 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
810 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
811 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
812 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
813 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
814 | STATE : code ROUTINE : tl_get_free_space | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
815 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
816 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
817 PURPOSE : Checks the first not used record for SMS messages. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
818 Returns the index of the first free record in the |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
819 range 1..max_record, if no free record exists 0 is returned. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
820 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
821 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
822 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
823 GLOBAL UBYTE tl_get_free_space (UBYTE mem_type) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
824 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
825 UBYTE i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
826 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
827 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
828 T_BACKUP * backup; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
829 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
830 TRACE_FUNCTION ("tl_get_free_space()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
831 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
832 if (mem_type EQ MEM_ME) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
833 backup = &SMS_ME_PROP(sms_data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
834 else if (mem_type EQ MEM_SM) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
835 backup = &SMS_SIM_PROP(sms_data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
836 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
837 return 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
838 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
839 for (i = 1; i <= backup->max_record; i++) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
840 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
841 if ((tl_get_status (backup, i-1) & 1) EQ 0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
842 return i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
843 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
844 return 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
845 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
846 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
847 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
848 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
849 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
850 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
851 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
852 | STATE : code ROUTINE : tl_find_first | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
853 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
854 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
855 PURPOSE : Checks availability of SMS memory on SIM or ME memory. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
856 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
857 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
858 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
859 GLOBAL void tl_find_first (UBYTE mem_type) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
860 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
861 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
862 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
863 TRACE_FUNCTION ("tl_find_first()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
864 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
865 if (mem_type EQ MEM_SM) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
866 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
867 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
868 * Start with index 1 on SIM card |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
869 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
870 tl_set_access_fifo (ACCESS_BY_MMI); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
871 SET_STATE (STATE_MMI, MMI_FIND_FIRST); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
872 tl_sim_read_record_req (1); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
873 sms_data->sim_backup.any_valid = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
874 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
875 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
876 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
877 USHORT max_record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
878 UBYTE version; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
879 UBYTE *sim_msg; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
880 MALLOC (sim_msg, SIZE_EF_SMS); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
881 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
882 sms_data->me_backup.any_valid = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
883 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
884 * look at Mobile Memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
885 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
886 /* Implements Measure#32: Row 84 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
887 if (pcm_ReadRecord ((UBYTE *)ef_sms_id, 1, SIZE_EF_SMS, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
888 sim_msg, &version, &max_record) EQ PCM_OK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
889 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
890 if (max_record > MAX_RECORD_ME) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
891 max_record = MAX_RECORD_ME; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
892 else if (max_record EQ 0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
893 max_record = 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
894 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
895 sms_data->me_backup.max_record = (UBYTE)max_record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
896 if (tl_find_status_pid (MEM_ME, 1, sim_msg, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
897 &sms_data->me_backup)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
898 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
899 tl_message_ind_from_sim (MEM_ME, 1, (UBYTE)max_record, sim_msg); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
900 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
901 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
902 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
903 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
904 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
905 * No SMS in mobile memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
906 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
907 sms_data->me_backup.max_record = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
908 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
909 MFREE (sim_msg); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
910 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
911 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
912 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
913 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
914 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
915 | STATE : code ROUTINE : tl_find_next | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
916 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
917 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
918 PURPOSE : Creates a copy of the status and protocol identifier |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
919 for the next entry. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
920 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
921 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
922 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
923 GLOBAL void tl_find_next (UBYTE mem_type, UBYTE index) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
924 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
925 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
926 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
927 TRACE_FUNCTION ("tl_find_next()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
928 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
929 if (mem_type EQ MEM_SM) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
930 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
931 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
932 * Start with index on SIM card |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
933 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
934 tl_set_access_fifo (ACCESS_BY_MMI); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
935 SET_STATE (STATE_MMI, MMI_FIND_NEXT); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
936 tl_sim_read_record_req (index); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
937 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
938 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
939 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
940 USHORT max_record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
941 UBYTE version; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
942 UBYTE *sim_msg; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
943 MALLOC (sim_msg, SIZE_EF_SMS); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
944 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
945 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
946 * look at Mobile Memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
947 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
948 /* Implements Measure#32: Row 86 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
949 if (pcm_ReadRecord ((UBYTE *)ef_sms_id, index, SIZE_EF_SMS, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
950 sim_msg, &version, &max_record) EQ PCM_OK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
951 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
952 if (tl_find_status_pid (MEM_ME, index, sim_msg, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
953 &sms_data->me_backup)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
954 tl_message_ind_from_sim (MEM_ME, index, (UBYTE)max_record, sim_msg); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
955 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
956 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
957 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
958 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
959 * declare only the successfull records |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
960 * from previous attempts as available |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
961 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
962 sms_data->me_backup.max_record = index - 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
963 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
964 MFREE (sim_msg); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
965 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
966 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
967 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
968 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
969 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
970 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
971 | STATE : code ROUTINE : tl_get_pid_dcs | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
972 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
973 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
974 PURPOSE : Gets TP-PID and/or TP-DCS from any message type. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
975 If something is not available, nothing is written to |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
976 *pid and *dcs. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
977 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
978 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
979 GLOBAL void tl_get_pid_dcs (UBYTE status, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
980 T_sms_sdu *sms_sdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
981 UBYTE *pid, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
982 UBYTE *dcs) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
983 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
984 UBYTE *ptr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
985 int step, rpl; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
986 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
987 TRACE_FUNCTION ("tl_get_pid_dcs()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
988 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
989 ptr = &sms_sdu->buf[rpl = sms_sdu->buf[0] + 1]; /* points to TP-MTI */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
990 switch (status) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
991 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
992 case SMS_RECORD_STO_UNSENT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
993 case SMS_RECORD_STO_SENT: /* MO-SM */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
994 switch (*ptr & 3) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
995 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
996 case SMS_SUBMIT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
997 ptr += (*(ptr + 2) + 1) / 2 + 4; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
998 if (pid NEQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
999 *pid = *ptr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1000 if (dcs NEQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1001 *dcs = *(ptr + 2); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1002 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1003 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1004 case SMS_COMMAND: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1005 if (pid NEQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1006 *pid = *(ptr + 2); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1007 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1008 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1009 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1010 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1011 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1012 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1013 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1014 case SMS_RECORD_REC_UNREAD: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1015 case SMS_RECORD_REC_READ: /* MT-SM */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1016 switch (*ptr & 3) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1017 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1018 case SMS_DELIVER: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1019 ptr += (*(ptr + 1) + 1) / 2 + 3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1020 if (pid NEQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1021 *pid = *ptr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1022 if (dcs NEQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1023 *dcs = *(ptr + 2); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1024 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1025 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1026 case SMS_STATUS_REPORT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1027 if ((step = (*(ptr + 2) + 1) / 2 + 19) + rpl < (sms_sdu->l_buf >> 3)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1028 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1029 ptr += step; /* TP-PI */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1030 if (pid NEQ NULL AND *ptr & 1) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1031 *pid = *(ptr + 1); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1032 if (dcs NEQ NULL AND *ptr & 2) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1033 *dcs = *(ptr + 2); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1034 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1035 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1036 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1037 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1038 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1039 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1040 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1041 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1042 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1043 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1044 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1045 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1046 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1047 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1048 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1049 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1050 | STATE : code ROUTINE : tl_find_status_pid | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1051 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1052 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1053 PURPOSE : Calculates status and protocol identifier of a SMS |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1054 record and stores the values. Returns TRUE, when a |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1055 valid message is recognized. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1056 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1057 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1058 GLOBAL BOOL tl_find_status_pid (UBYTE mem_type, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1059 UBYTE index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1060 UBYTE * data, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1061 T_BACKUP * backup) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1062 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1063 UBYTE *ptr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1064 BOOL is_valid = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1065 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1066 TRACE_FUNCTION ("tl_find_status_pid()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1067 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1068 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1069 * Store status and clear pid |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1070 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1071 tl_store_status (backup, index-1, data[0]); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1072 tl_store_pid (backup, index-1, 0); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1073 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1074 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1075 * mobile terminated message (bit 3 = 0) and used (bit 1 = 1) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1076 * check first byte with mask 00000101 = bit 3+1 = 5 must |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1077 * be 1, that means bit 3 = 0 and bit 1 = 1. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1078 * skip service centre address and set to message type |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1079 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1080 ptr = &data[1] + data[1] + 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1081 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1082 switch (data[0] & 5) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1083 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1084 case 1: // MT-SM |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1085 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1086 * check message type to be a SMS-DELIVER |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1087 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1088 if ((*ptr & 3) EQ SMS_DELIVER) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1089 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1090 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1091 * skip message type and originator address, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1092 * *(ptr+1) contains the number of digits of the |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1093 * originator address. The term (*p+1)/2 indicates |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1094 * the number of bytes used for the digits. Plus 3 for |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1095 * message type, the length field and TON/NPI field. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1096 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1097 ptr += (*(ptr + 1) + 1) / 2 + 3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1098 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1099 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1100 * store protocol identifier |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1101 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1102 tl_store_pid (backup, index-1, *ptr); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1103 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1104 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1105 * valid message found |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1106 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1107 backup->any_valid = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1108 is_valid = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1109 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1110 else if((*ptr & 3) EQ SMS_STATUS_REPORT) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1111 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1112 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1113 * Indicate that valid Status Report message is found in ME or SIM. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1114 * No need to store status & pid as only reading and delelting of |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1115 * Status Report Message is allowed and not replacing of the message. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1116 * |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1117 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1118 backup->any_valid = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1119 is_valid = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1120 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1121 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1122 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1123 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1124 * consider the record as free |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1125 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1126 tl_store_status (backup, index-1, 0); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1127 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1128 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1129 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1130 case 5: // MO-SM |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1131 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1132 * mobile originated messages are not to be replaced, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1133 * but it is checked whether there is really a SMS-SUBMIT |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1134 * stored on the SIM |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1135 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1136 if ((*ptr & 3) NEQ SMS_SUBMIT) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1137 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1138 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1139 * consider the record as free |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1140 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1141 tl_store_status (backup, index-1, 0); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1142 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1143 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1144 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1145 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1146 * valid message found |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1147 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1148 backup->any_valid = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1149 is_valid = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1150 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1151 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1152 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1153 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1154 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1155 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1156 return is_valid; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1157 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1158 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1159 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1160 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1161 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1162 | STATE : code ROUTINE : tl_cphs_voice_mail | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1163 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1164 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1165 PURPOSE : Checking whether a CPHS Voice Mail Indication is |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1166 given, which shall not be stored. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1167 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1168 #ifdef FF_CPHS |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1169 LOCAL BOOL tl_cphs_voice_mail (T_TP_DELIVER *sms_deliver) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1170 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1171 if (sms_deliver->tp_oa.digits NEQ 4 OR |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1172 sms_deliver->tp_oa.ton NEQ SMS_TON_ALPHANUMERIC) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1173 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1174 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1175 switch (sms_deliver->tp_dcs & 0xF0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1176 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1177 case SMS_DCS_GRP_DEF: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1178 case SMS_DCS_GRP_CLASS: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1179 if ((sms_deliver->tp_dcs & 0xC) EQ 0 OR |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1180 (sms_deliver->tp_dcs & 0xC) EQ 0xC) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1181 break; /* GSM Default Alphabet */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1182 /*FALLTHROUGH*/ /*lint -fallthrough*/ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1183 case SMS_DCS_GRP_COMPR: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1184 case SMS_DCS_GRP_CLASS_COMPR: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1185 case SMS_DCS_GRP_MW_STORE_UCS2: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1186 return FALSE; /* no GSM Default Alphabet */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1187 case SMS_DCS_DATA_CLASS: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1188 if (sms_deliver->tp_dcs & 0x4) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1189 return FALSE; /* no GSM Default Alphabet */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1190 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1191 if (!sms_deliver->v_tp_ud) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1192 return FALSE; /* not only text present */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1193 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1194 if (sms_deliver->tp_ud.length NEQ 1 OR |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1195 (sms_deliver->tp_ud.data[0] & 0x7F) NEQ ' ') |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1196 return FALSE; /* no single space */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1197 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1198 TRACE_FUNCTION ("CPHS VMS: do not store"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1199 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1200 return TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1201 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1202 #endif |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1203 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1204 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1205 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1206 | STATE : code ROUTINE : tl_check_network_on_sim | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1207 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1208 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1209 PURPOSE : Checks the PLMN code as part of the IMSI and notices |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1210 whether a certain network operator is present. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1211 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1212 #ifdef FF_SMS_NW_RCG_SIM |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1213 GLOBAL void tl_check_network_on_sim (UBYTE *data) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1214 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1215 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1216 if (data NEQ NULL AND data[0] >= 3 AND |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1217 (data[1] & 0xF7) EQ 0x21 /* ignore parity bit */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1218 AND data[2] EQ 0x43 AND data[3] EQ 0x03) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1219 SMS_NETWORK(sms_data) = NW_SIM_23430; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1220 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1221 SMS_NETWORK(sms_data) = NW_SIM_NONE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1222 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1223 #endif |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1224 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1225 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1226 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1227 | STATE : code ROUTINE : tl_handle_23430 | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1228 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1229 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1230 PURPOSE : Special handling of an income Short Message according to |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1231 specifications of operator 23430 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1232 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1233 #ifdef FF_SMS_23430 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1234 GLOBAL BOOL tl_handle_23430 (T_TP_DELIVER *sms_deliver) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1235 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1236 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1237 UBYTE record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1238 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1239 if (SMS_NETWORK(sms_data) NEQ NW_SIM_23430) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1240 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1241 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1242 if ((sms_deliver->tp_dcs EQ 0 OR sms_deliver->tp_dcs EQ 0xF2) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1243 AND (int)sms_deliver->tp_oa.digits EQ sizeof(ref_nr_23430) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1244 AND sms_deliver->tp_oa.ton EQ SMS_TON_ALPHANUMERIC |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1245 AND memcmp (sms_deliver->tp_oa.num, ref_nr_23430, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1246 sizeof(ref_nr_23430)) EQ 0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1247 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1248 record = tl_get_free_space (MEM_SM); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1249 if (record) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1250 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1251 tl_store_status (&SMS_SIM_PROP(sms_data), record-1, SIM_SMS_PENDING); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1252 tl_sim_conv_update_req (record, SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1253 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1254 tl_set_access_fifo (ACCESS_BY_NET); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1255 SET_STATE (STATE_NET, NET_23430_WRITE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1256 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1257 MFREE (SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1258 SMS_RP_RCVD(sms_data) = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1259 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1260 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1261 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1262 tl_sms_memo_exceeded (FALSE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1263 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1264 return TRUE; /* the message has been handled */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1265 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1266 switch (sms_deliver->tp_dcs & 0xF0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1267 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1268 case SMS_DCS_GRP_CLASS: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1269 case SMS_DCS_GRP_CLASS_COMPR: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1270 case SMS_DCS_DATA_CLASS: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1271 if ((sms_deliver->tp_dcs & 3) EQ 2 AND /* Class 2 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1272 ((sms_deliver->v_tp_ud AND sms_deliver->tp_ud.length EQ 0) OR |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1273 (sms_deliver->v_tp_udh_inc AND sms_deliver->tp_udh_inc.length EQ 0))) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1274 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1275 if (tl_get_free_space (MEM_SM) NEQ 0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1276 rl_report_req_ack (NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1277 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1278 tl_sms_memo_exceeded (FALSE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1279 return TRUE; /* the message has been handled */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1280 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1281 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1282 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1283 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1284 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1285 return FALSE; /* no SIM specific message */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1286 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1287 #endif |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1288 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1289 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1290 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1291 | STATE : code ROUTINE : tl_store_special_sms | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1292 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1293 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1294 PURPOSE : Checking the presence of a special message indication |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1295 requiring the message to be stored. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1296 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1297 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1298 LOCAL BOOL tl_store_special_sms (T_TP_DELIVER *sms_deliver) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1299 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1300 UBYTE *udh; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1301 int udh_len; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1302 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1303 if (!sms_deliver->tp_udhi OR |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1304 !sms_deliver->v_tp_udh_inc) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1305 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1306 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1307 udh = &sms_deliver->tp_udh_inc.tp_udh.data[0]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1308 udh_len = (int)sms_deliver->tp_udh_inc.tp_udh.c_data; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1309 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1310 while (udh_len > 0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1311 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1312 if (udh[0] EQ 0x01) /* tag Special Message Indication? */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1313 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1314 if (udh[2] & 0x80) /* storing required? */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1315 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1316 TRACE_FUNCTION ("tl_store_special_sms: found"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1317 return TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1318 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1319 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1320 udh_len -= (int)udh[1] + 2; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1321 udh += udh[1] + 2; /* next tag */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1322 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1323 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1324 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1325 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1326 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1327 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1328 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1329 | STATE : code ROUTINE : tl_handle_message | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1330 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1331 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1332 PURPOSE : Standard handling of an income Short Message according to |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1333 GSM 03.40 and 03.38 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1334 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1335 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1336 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1337 * DISPLAY display |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1338 * MEM_ME store in ME |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1339 * MEM_SM store in SIM |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1340 * NOTHING do nothing |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1341 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1342 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1343 static const UBYTE me_table_A [5][7] = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1344 { /* mt no class class 0 class 1 class 2 class 3 discard store */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1345 /* 0 */ { MEM_ME, MEM_ME, MEM_ME, MEM_SM, MEM_ME, MEM_ME, MEM_ME }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1346 /* 1 */ { MEM_ME, DISPLAY, MEM_ME, MEM_SM, MEM_ME, MEM_ME, MEM_ME }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1347 /* 2 */ { DISPLAY, DISPLAY, DISPLAY, MEM_SM, DISPLAY, DISPLAY, MEM_ME }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1348 /* 3 */ { MEM_ME, DISPLAY, MEM_ME, MEM_SM, DISPLAY, MEM_ME, MEM_ME }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1349 /* 4 */ { MEM_ME, DISPLAY, MEM_ME, MEM_SM, MEM_SM, DISPLAY, MEM_ME } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1350 }; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1351 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1352 static const UBYTE me_table_B [5][7] = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1353 { /* mt no class class 0 class 1 class 2 class 3 discard store */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1354 /* 0 */ { MEM_SM, DISPLAY, MEM_SM, NOTHING, NOTHING, DISPLAY, NOTHING }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1355 /* 1 */ { MEM_SM, IGNORE, MEM_SM, NOTHING, NOTHING, DISPLAY, NOTHING }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1356 /* 2 */ { NOTHING, IGNORE, NOTHING, NOTHING, NOTHING, NOTHING, NOTHING }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1357 /* 3 */ { MEM_SM, IGNORE, MEM_SM, NOTHING, NOTHING, DISPLAY, NOTHING }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1358 /* 4 */ { MEM_SM, IGNORE, MEM_SM, NOTHING, MEM_ME, NOTHING, MEM_SM } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1359 }; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1360 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1361 static const UBYTE sm_table_A [5][7] = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1362 { /* mt no class class 0 class 1 class 2 class 3 discard store */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1363 /* 0 */ { MEM_SM, MEM_SM, MEM_SM, MEM_SM, MEM_SM, MEM_SM, MEM_SM }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1364 /* 1 */ { MEM_SM, DISPLAY, MEM_SM, MEM_SM, MEM_SM, MEM_SM, MEM_SM }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1365 /* 2 */ { DISPLAY, DISPLAY, DISPLAY, MEM_SM, DISPLAY, DISPLAY, MEM_SM }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1366 /* 3 */ { MEM_SM, DISPLAY, MEM_SM, MEM_SM, DISPLAY, MEM_SM, MEM_SM }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1367 /* 4 */ { MEM_SM, DISPLAY, MEM_ME, MEM_SM, MEM_SM, DISPLAY, MEM_SM } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1368 }; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1369 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1370 static const UBYTE sm_table_B [5][7] = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1371 { /* mt no class class 0 class 1 class 2 class 3 discard store */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1372 /* 0 */ { MEM_ME, DISPLAY, MEM_ME, NOTHING, NOTHING, DISPLAY, NOTHING }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1373 /* 1 */ { MEM_ME, IGNORE, MEM_ME, NOTHING, NOTHING, DISPLAY, NOTHING }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1374 /* 2 */ { NOTHING, IGNORE, NOTHING, NOTHING, NOTHING, NOTHING, NOTHING }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1375 /* 3 */ { MEM_ME, IGNORE, MEM_ME, NOTHING, NOTHING, DISPLAY, NOTHING }, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1376 /* 4 */ { MEM_ME, IGNORE, MEM_SM, NOTHING, MEM_ME, NOTHING, MEM_ME } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1377 }; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1378 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1379 GLOBAL void tl_handle_message (T_TP_DELIVER *sms_deliver) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1380 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1381 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1382 UBYTE dcs_class; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1383 UBYTE record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1384 UBYTE data[SIZE_EF_SMS]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1385 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1386 TRACE_FUNCTION ("tl_handle_message()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1387 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1388 if (sms_data->pr_cntrl.delivery_state == SMS_DELIVER_STATUS_PAUSE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1389 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1390 /* user has blocked message receiption */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1391 TRACE_EVENT("User has paused MT message delivery"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1392 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1393 tl_sms_memo_pause(); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1394 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1395 SMS_INST_SET_STATE (STATE_TL, TL_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1396 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1397 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1398 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1399 #ifdef FF_CPHS |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1400 if (SMS_CPHS(sms_data) AND tl_cphs_voice_mail (sms_deliver)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1401 dcs_class = 5; /* discard message */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1402 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1403 #endif |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1404 if (tl_store_special_sms (sms_deliver)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1405 dcs_class = 6; /* store message */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1406 else if (sms_deliver->tp_pid EQ SMS_PID_ME_DOWNLOAD) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1407 dcs_class = 1 + 1; /* class 1 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1408 else if (sms_deliver->tp_pid EQ SMS_PID_SIM_DOWNLOAD) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1409 dcs_class = 2 + 1; /* class 2 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1410 else switch (sms_deliver->tp_dcs & 0xF0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1411 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1412 case SMS_DCS_GRP_CLASS: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1413 case SMS_DCS_GRP_CLASS_COMPR: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1414 case SMS_DCS_DATA_CLASS: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1415 dcs_class = (sms_deliver->tp_dcs & 3) + 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1416 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1417 case SMS_DCS_GRP_MW_DISCD: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1418 dcs_class = 5; /* discard message */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1419 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1420 case SMS_DCS_GRP_MW_STORE: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1421 case SMS_DCS_GRP_MW_STORE_UCS2: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1422 dcs_class = 6; /* store message */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1423 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1424 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1425 dcs_class = 0; // no class |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1426 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1427 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1428 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1429 if (sms_data->mem3 EQ MEM_ME) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1430 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1431 sms_data->use_mem_a = me_table_A [sms_data->mt][dcs_class]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1432 sms_data->use_mem_b = me_table_B [sms_data->mt][dcs_class]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1433 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1434 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1435 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1436 sms_data->use_mem_a = sm_table_A [sms_data->mt][dcs_class]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1437 sms_data->use_mem_b = sm_table_B [sms_data->mt][dcs_class]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1438 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1439 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1440 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1441 * try alternative A |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1442 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1443 switch (sms_data->use_mem_a) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1444 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1445 case DISPLAY: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1446 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1447 * Only display of the message |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1448 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1449 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1450 TRACE_EVENT("TABLE A: DISPLAY"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1451 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1452 SMS_EM_DISPLAY_MT_SHORT_MESSAGE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1453 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1454 tl_message_ind_from_net (NOT_PRESENT_8BIT, 0, 0, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1455 SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1456 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1457 if (SMS_MT_ACK_MODE(sms_data) NEQ SMS_MHC_PH2PLUS) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1458 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1459 rl_report_req_ack (NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1460 SMS_INST_SET_STATE (STATE_TL, TL_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1461 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1462 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1463 MFREE (SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1464 SMS_RP_RCVD(sms_data) = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1465 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1466 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1467 case MEM_ME: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1468 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1469 * memory type is mobile memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1470 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1471 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1472 TRACE_EVENT("TABLE A: MEM_ME"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1473 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1474 record = tl_get_free_space (MEM_ME); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1475 if (record NEQ 0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1476 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1477 tl_convert_mt_to_mem (SMS_RP_RCVD(sms_data), data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1478 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1479 * store in mobile memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1480 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1481 /* Implements Measure#32: Row 87 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1482 if (pcm_WriteRecord ((UBYTE *)ef_sms_id, record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1483 SIZE_EF_SMS, data) NEQ PCM_OK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1484 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1485 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1486 * update status byte and protocol identifier |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1487 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1488 tl_store_status (&SMS_ME_PROP(sms_data), record-1, SMS_RECORD_REC_UNREAD); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1489 tl_store_pid (&SMS_ME_PROP(sms_data), record-1, sms_deliver->tp_pid); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1490 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1491 * send indication to MMI |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1492 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1493 tl_message_ind_from_net (MEM_ME, record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1494 sms_data->me_backup.max_record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1495 SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1496 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1497 * acknowledge to the infrastructure |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1498 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1499 rl_report_req_ack (NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1500 SMS_INST_SET_STATE (STATE_TL, TL_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1501 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1502 MFREE (SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1503 SMS_RP_RCVD(sms_data) = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1504 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1505 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1506 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1507 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1508 case MEM_SM: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1509 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1510 * memory type is SIM card |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1511 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1512 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1513 TRACE_EVENT("TABLE A: MEM_SM"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1514 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1515 record = tl_get_free_space (MEM_SM); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1516 if (record) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1517 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1518 tl_store_status (&SMS_SIM_PROP(sms_data), record-1, SIM_SMS_PENDING); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1519 tl_sim_conv_update_req (record, SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1520 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1521 tl_set_access_fifo (ACCESS_BY_NET); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1522 SET_STATE (STATE_NET, NET_WRITE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1523 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1524 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1525 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1526 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1527 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1528 * try alternative B |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1529 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1530 switch (sms_data->use_mem_b) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1531 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1532 case DISPLAY: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1533 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1534 * Only display of the message |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1535 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1536 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1537 TRACE_EVENT("TABLE B: DISPLAY"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1538 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1539 tl_message_ind_from_net (NOT_PRESENT_8BIT, 0, 0, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1540 sms_data->rp_data_dl); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1541 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1542 if (SMS_MT_ACK_MODE(sms_data) NEQ SMS_MHC_PH2PLUS) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1543 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1544 rl_report_req_ack (NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1545 SMS_INST_SET_STATE (STATE_TL, TL_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1546 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1547 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1548 MFREE (SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1549 SMS_RP_RCVD(sms_data) = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1550 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1551 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1552 case MEM_ME: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1553 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1554 * memory type is mobile memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1555 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1556 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1557 TRACE_EVENT("TABLE B: MEM_ME"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1558 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1559 record = tl_get_free_space (MEM_ME); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1560 if (record) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1561 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1562 tl_convert_mt_to_mem (SMS_RP_RCVD(sms_data), data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1563 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1564 * store in mobile memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1565 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1566 /* Implements Measure#32: Row 89 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1567 if (pcm_WriteRecord ((UBYTE *)ef_sms_id, record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1568 SIZE_EF_SMS, data) EQ PCM_OK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1569 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1570 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1571 * update status byte |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1572 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1573 tl_store_status (&SMS_ME_PROP(sms_data), record-1, SMS_RECORD_REC_UNREAD); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1574 tl_store_pid (&SMS_ME_PROP(sms_data), record-1, sms_deliver->tp_pid); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1575 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1576 * send indication to MMI |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1577 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1578 tl_message_ind_from_net (MEM_ME, record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1579 sms_data->me_backup.max_record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1580 SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1581 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1582 * acknowledge to the infrastructure |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1583 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1584 rl_report_req_ack (NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1585 SMS_INST_SET_STATE (STATE_TL, TL_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1586 SET_STATE (STATE_NET, NET_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1587 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1588 MFREE (SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1589 SMS_RP_RCVD(sms_data) = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1590 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1591 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1592 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1593 if (tl_get_free_space (MEM_SM)) /* SIM memory available? */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1594 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1595 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1596 * RP_ERROR => |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1597 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1598 rl_report_req_error (SMS_RP_CS_PROTOCOL_ERROR, NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1599 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1600 * RL_RELEASE_REQ ==> |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1601 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1602 rl_release_req(SMS_INST.ti); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1603 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1604 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1605 * free instance |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1606 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1607 // FREE_SMS_INSTANCE (SMS_INST.ti); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1608 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1609 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1610 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1611 /* change mem_cap_avail flag on SIM and return error */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1612 tl_sms_memo_exceeded (FALSE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1613 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1614 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1615 SMS_INST_SET_STATE (STATE_TL, TL_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1616 SET_STATE (STATE_NET, NET_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1617 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1618 MFREE (SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1619 SMS_RP_RCVD(sms_data) = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1620 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1621 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1622 case MEM_SM: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1623 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1624 * memory type is SIM card |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1625 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1626 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1627 TRACE_EVENT("TABLE B: MEM_SM"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1628 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1629 record = tl_get_free_space (MEM_SM); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1630 if (record) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1631 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1632 tl_store_status (&SMS_SIM_PROP(sms_data), record-1, SIM_SMS_PENDING); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1633 tl_sim_conv_update_req (record, SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1634 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1635 tl_set_access_fifo (ACCESS_BY_NET); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1636 SET_STATE (STATE_NET, NET_WRITE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1637 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1638 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1639 if (tl_get_free_space (MEM_ME)) /* other memory available? */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1640 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1641 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1642 * RP_ERROR => |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1643 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1644 rl_report_req_error (SMS_RP_CS_PROTOCOL_ERROR, NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1645 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1646 * RL_RELEASE_REQ ==> |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1647 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1648 rl_release_req(SMS_INST.ti); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1649 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1650 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1651 * free instance |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1652 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1653 // FREE_SMS_INSTANCE (SMS_INST.ti); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1654 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1655 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1656 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1657 /* change mem_cap_avail flag on SIM and return error */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1658 tl_sms_memo_exceeded (FALSE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1659 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1660 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1661 SMS_INST_SET_STATE (STATE_TL, TL_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1662 SET_STATE (STATE_NET, NET_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1663 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1664 MFREE (SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1665 SMS_RP_RCVD(sms_data) = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1666 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1667 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1668 case IGNORE: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1669 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1670 TRACE_EVENT("TABLE B: IGNORE"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1671 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1672 rl_report_req_ack (NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1673 SMS_INST_SET_STATE (STATE_TL, TL_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1674 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1675 MFREE (SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1676 SMS_RP_RCVD(sms_data) = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1677 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1678 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1679 default: /* other memory available? */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1680 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1681 TRACE_EVENT("TABLE B: OTHER?"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1682 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1683 if (tl_get_free_space (MEM_ME) OR tl_get_free_space (MEM_SM)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1684 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1685 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1686 * RP_ERROR => |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1687 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1688 rl_report_req_error (SMS_RP_CS_PROTOCOL_ERROR, NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1689 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1690 * RL_RELEASE_REQ ==> |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1691 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1692 rl_release_req(SMS_INST.ti); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1693 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1694 * free instance |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1695 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1696 // FREE_SMS_INSTANCE (SMS_INST.ti); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1697 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1698 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1699 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1700 /* change mem_cap_avail flag on SIM and return error */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1701 tl_sms_memo_exceeded (FALSE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1702 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1703 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1704 SMS_INST_SET_STATE (STATE_TL, TL_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1705 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1706 MFREE (SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1707 SMS_RP_RCVD(sms_data) = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1708 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1709 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1710 sms_data->use_mem_b = NOTHING; // not reached if alternative B in progress |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1711 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1712 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1713 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1714 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1715 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1716 | STATE : code ROUTINE : tl_sms_reserve_req_id | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1717 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1718 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1719 PURPOSE : Finds a free entry in for SIM accesses and reserves it for use. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1720 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1721 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1722 GLOBAL BOOL tl_sms_reserve_req_id (UBYTE *acc_ix_ptr) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1723 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1724 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1725 UBYTE sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1726 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1727 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1728 for (sim_acc_ix = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1729 sim_acc_ix < SMS_MAX_SIM_ACCESS AND sms_data->sms_sim_access_info[sim_acc_ix].entry_used; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1730 ++sim_acc_ix); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1731 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1732 if (sim_acc_ix < SMS_MAX_SIM_ACCESS) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1733 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1734 *acc_ix_ptr = sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1735 sms_data->sms_sim_access_info[sim_acc_ix].entry_used = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1736 return TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1737 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1738 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1739 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1740 TRACE_ERROR("SMS SIM Access entries used up"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1741 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1742 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1743 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1744 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1745 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1746 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1747 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1748 | STATE : code ROUTINE : tl_build_sim_update_req | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1749 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1750 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1751 PURPOSE : Build and send the SIM_UPDATE_REQ. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1752 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1753 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1754 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1755 GLOBAL void tl_build_sim_update_req (void) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1756 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1757 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1758 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1759 TRACE_FUNCTION ("tl_build_sim_update_req()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1760 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1761 /* Implements Measure# 14 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1762 tl_send_sim_update_req (SMS_INST.tp_mr, 0); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1763 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1764 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1765 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1766 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1767 | PROJECT : GSM-PS (8410) MODULE : SMS_TL | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1768 | STATE : code ROUTINE : tl_message_ind_from_net | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1769 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1770 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1771 PURPOSE : Builds from SIM data and sends the primitive |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1772 MNSMS_MESSAGE_IND to ACI. A NULL pointer for parameter |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1773 'data' generates an empty indication, which shall |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1774 interpreted as existent but empty memory. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1775 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1776 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1777 GLOBAL void tl_message_ind_from_net (UBYTE mem_type, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1778 UBYTE record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1779 UBYTE max_record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1780 T_rp_data_dl *rp_data_dl) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1781 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1782 T_SIM_PDU *sim_pdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1783 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1784 TRACE_FUNCTION ("tl_message_ind_from_net"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1785 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1786 if (rp_data_dl NEQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1787 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1788 PALLOC (message_ind, MNSMS_MESSAGE_IND); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1789 MALLOC (sim_pdu, sizeof(T_SIM_PDU)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1790 message_ind->sms_sdu.o_buf = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1791 message_ind->sms_sdu.l_buf = SIM_PDU_LEN<<3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1792 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1793 message_ind->status = SMS_RECORD_REC_UNREAD; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1794 message_ind->mem_type = mem_type; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1795 message_ind->rec_num = record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1796 message_ind->rec_max = max_record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1797 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1798 SMS_EM_STORE_MT_MESSAGE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1799 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1800 sim_pdu->rp_addr = rp_data_dl->rp_addr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1801 sim_pdu->tpdu = rp_data_dl->rp_user_data.tpdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1802 sim_pdu->tp_mti = SMS_DELIVER; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1803 sim_pdu->v_tpdu = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1804 sim_pdu->tp_vt_mti = SMS_VT_SIM_PDU; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1805 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1806 ccd_codeMsg (CCDENT_SMS, DOWNLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1807 (T_MSGBUF *)&message_ind->sms_sdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1808 (UBYTE *)sim_pdu, SMS_VT_SIM_PDU); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1809 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1810 PSENDX (MMI, message_ind); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1811 MFREE (sim_pdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1812 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1813 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1814 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1815 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1816 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1817 | PROJECT : GSM-PS (8410) MODULE : SMS_TL | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1818 | STATE : code ROUTINE : tl_message_ind_from_sim | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1819 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1820 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1821 PURPOSE : Builds from SIM data and sends the primitive |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1822 MNSMS_MESSAGE_IND to ACI. A NULL pointer for parameter |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1823 'data' generates an empty indication, which shall |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1824 interpreted as existent but empty memory. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1825 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1826 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1827 GLOBAL void tl_message_ind_from_sim (UBYTE mem_type, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1828 UBYTE record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1829 UBYTE max_record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1830 UBYTE *data) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1831 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1832 PALLOC (message_ind, MNSMS_MESSAGE_IND); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1833 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1834 TRACE_FUNCTION ("tl_message_ind_from_sim"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1835 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1836 memset (message_ind, 0, sizeof (T_MNSMS_MESSAGE_IND)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1837 message_ind->mem_type = mem_type; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1838 message_ind->rec_max = max_record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1839 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1840 if (data NEQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1841 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1842 message_ind->rec_num = record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1843 message_ind->status = data[0]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1844 memcpy (message_ind->sms_sdu.buf, &data[1], SIZE_EF_SMS-1); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1845 message_ind->sms_sdu.l_buf = (SIZE_EF_SMS-1) << 3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1846 tl_adjust_message_len (SMS_VT_SIM_PDU, (BUF_tpdu *)&message_ind->sms_sdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1847 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1848 PSENDX (MMI, message_ind); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1849 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1850 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1851 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1852 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1853 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1854 | STATE : code ROUTINE : tl_read_access_fifo | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1855 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1856 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1857 PURPOSE : Processing the function TL_READ_ACCESS_FIFO. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1858 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1859 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1860 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1861 GLOBAL UBYTE tl_read_access_fifo (void) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1862 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1863 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1864 UBYTE id; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1865 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1866 TRACE_FUNCTION ("tl_read_access_fifo()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1867 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1868 if (sms_data->access_fifo [1] NEQ ACCESS_EMPTY) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1869 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1870 id = sms_data->access_fifo [1]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1871 sms_data->access_fifo [1] = ACCESS_EMPTY; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1872 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1873 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1874 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1875 id = sms_data->access_fifo [0]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1876 sms_data->access_fifo [0] = ACCESS_EMPTY; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1877 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1878 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1879 return id; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1880 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1881 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1882 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1883 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1884 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1885 | STATE : code ROUTINE : tl_read_me_memory | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1886 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1887 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1888 PURPOSE : Processing the function TL_READ_ME_MEMORY. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1889 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1890 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1891 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1892 GLOBAL void tl_read_me_memory (USHORT rec_num, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1893 UBYTE status) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1894 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1895 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1896 int index; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1897 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1898 TRACE_FUNCTION ("tl_read_me_memory()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1899 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1900 if (rec_num <= SMS_ME_PROP(sms_data).max_record) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1901 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1902 SMS_REC_STATUS(sms_data) = tl_check_status_value (status); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1903 if (rec_num EQ SMS_RECORD_NOT_EXIST) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1904 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1905 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1906 * find first record of given status |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1907 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1908 index = tl_search_record (&SMS_ME_PROP(sms_data), 1, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1909 SMS_REC_STATUS(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1910 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1911 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1912 index = (int)rec_num; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1913 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1914 if ((index NEQ SMS_RECORD_NOT_EXIST) AND |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1915 (tl_get_status (&SMS_ME_PROP(sms_data), index-1) & 1)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1916 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1917 USHORT max_record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1918 UBYTE misc; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1919 UBYTE sim_msg[SIZE_EF_SMS]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1920 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1921 * valid index |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1922 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1923 /* Implements Measure#32: Row 84 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1924 if (pcm_ReadRecord ((UBYTE *)ef_sms_id, (USHORT)index, SIZE_EF_SMS, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1925 sim_msg, &misc, &max_record) NEQ PCM_OK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1926 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1927 tl_mnsms_read_cnf (MEM_ME, (UBYTE)rec_num, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1928 NULL, SMS_CAUSE_MEM_FAIL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1929 SMS_ME_PROP(sms_data).max_record = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1930 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1931 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1932 tl_store_status (&SMS_ME_PROP(sms_data), index-1, sim_msg[0]); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1933 if (sim_msg[0] & 1) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1934 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1935 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1936 SMS_EM_READ_SHORT_MESSAGE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1937 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1938 switch (sim_msg[0] & 7) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1939 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1940 case SMS_RECORD_REC_UNREAD: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1941 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1942 * entry is changeable |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1943 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1944 switch (SMS_READ_MODE(sms_data)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1945 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1946 case READ_STATUS_CHANGE: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1947 sim_msg[0] = SMS_RECORD_REC_READ; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1948 /* Implements Measure#32: Row 84 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1949 pcm_WriteRecord ((UBYTE *)ef_sms_id, (USHORT)index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1950 SIZE_EF_SMS, sim_msg); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1951 tl_store_status (&SMS_ME_PROP(sms_data), index-1, sim_msg[0]); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1952 tl_mnsms_read_cnf (MEM_ME, (UBYTE)index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1953 NULL, SIM_NO_ERROR); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1954 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1955 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1956 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1957 misc = sim_msg[0]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1958 sim_msg[0] = SMS_RECORD_REC_READ; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1959 /* Implements Measure#32: Row 84 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1960 pcm_WriteRecord ((UBYTE *)ef_sms_id, (USHORT)index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1961 SIZE_EF_SMS, sim_msg); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1962 tl_store_status (&SMS_ME_PROP(sms_data), index-1, sim_msg[0]); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1963 sim_msg[0] = misc; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1964 /*FALLTHROUGH*/ /*lint -fallthrough*/ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1965 case READ_PREVIEW: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1966 tl_mnsms_read_cnf (MEM_ME, (UBYTE)index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1967 sim_msg, SIM_NO_ERROR); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1968 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1969 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1970 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1971 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1972 case SMS_RECORD_STO_SENT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1973 case SMS_RECORD_STO_UNSENT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1974 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1975 * no status change for STORE_UNSENT! |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1976 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1977 if (SMS_READ_MODE(sms_data) EQ READ_STATUS_CHANGE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1978 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1979 tl_mnsms_read_cnf (MEM_ME, (UBYTE)rec_num, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1980 NULL, SMS_CAUSE_OPER_NOT_ALLW); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1981 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1982 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1983 /*FALLTHROUGH*/ /*lint -fallthrough*/ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1984 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1985 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1986 * Status Change is obsolete |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1987 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1988 tl_mnsms_read_cnf (MEM_ME, (UBYTE)index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1989 sim_msg, SIM_NO_ERROR); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1990 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1991 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1992 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1993 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1994 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1995 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1996 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1997 index = (int)rec_num; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1998 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1999 * index is wrong or other error |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2000 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2001 tl_mnsms_read_cnf (MEM_ME, (UBYTE)index, NULL, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2002 (USHORT)((SMS_ME_PROP(sms_data).max_record EQ 0)? |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2003 SMS_CAUSE_MEM_FAIL: SMS_CAUSE_INV_INDEX)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2004 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2005 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2006 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2007 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2008 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2009 | STATE : code ROUTINE : tl_read_sim_memory | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2010 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2011 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2012 PURPOSE : Processing the function TL_READ_SIM_MEMORY. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2013 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2014 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2015 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2016 GLOBAL void tl_read_sim_memory ( |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2017 USHORT rec_num, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2018 UBYTE status) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2019 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2020 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2021 int index; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2022 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2023 TRACE_FUNCTION ("tl_read_sim_memory()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2024 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2025 if (rec_num <= (USHORT)SMS_SIM_PROP(sms_data).max_record) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2026 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2027 SMS_REC_STATUS(sms_data) = tl_check_status_value (status); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2028 if (rec_num EQ SMS_RECORD_NOT_EXIST) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2029 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2030 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2031 * find first record of given status |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2032 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2033 index = tl_search_record (&SMS_SIM_PROP(sms_data), 1, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2034 SMS_REC_STATUS(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2035 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2036 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2037 index = (int)rec_num; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2038 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2039 if ((index NEQ SMS_RECORD_NOT_EXIST) AND |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2040 (tl_get_status (&SMS_SIM_PROP(sms_data), index-1) & 1)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2041 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2042 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2043 * valid index |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2044 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2045 if (SMS_READ_MODE(sms_data) EQ READ_STATUS_CHANGE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2046 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2047 switch (tl_get_status (&SMS_SIM_PROP(sms_data), index-1) & 7) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2048 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2049 case SMS_RECORD_REC_UNREAD: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2050 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2051 * entry is changeable |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2052 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2053 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2054 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2055 case SMS_RECORD_STO_SENT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2056 case SMS_RECORD_STO_UNSENT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2057 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2058 * no status change for STORE_UNSENT! |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2059 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2060 tl_mnsms_read_cnf (MEM_SM, (UBYTE)rec_num, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2061 NULL, SMS_CAUSE_OPER_NOT_ALLW); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2062 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2063 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2064 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2065 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2066 * Status Change is obsolete |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2067 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2068 tl_mnsms_read_cnf (MEM_SM, (UBYTE)rec_num, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2069 NULL, SIM_NO_ERROR); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2070 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2071 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2072 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2073 SMS_SEL_REC(sms_data) = (UBYTE)index; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2074 tl_set_access_fifo (ACCESS_BY_MMI); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2075 SET_STATE (STATE_MMI, MMI_READ); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2076 SMS_INST_SET_STATE (STATE_TL, TL_OTHER); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2077 tl_sim_read_record_req ((UBYTE)index); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2078 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2079 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2080 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2081 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2082 * index is wrong or other error |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2083 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2084 tl_mnsms_read_cnf (MEM_SM, (UBYTE)rec_num, NULL, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2085 (USHORT)((SMS_SIM_PROP(sms_data).max_record EQ 0)? |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2086 SMS_CAUSE_MEM_FAIL: SMS_CAUSE_INV_INDEX)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2087 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2088 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2089 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2090 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2091 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2092 | STATE : code ROUTINE : tl_sim_read_req | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2093 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2094 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2095 PURPOSE : Prepares and sends the primitive SIM_READ_REQ to read a |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2096 binary file from SIM. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2097 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2098 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2099 GLOBAL void tl_sim_read_req (USHORT datafield, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2100 UBYTE length) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2101 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2102 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2103 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2104 UBYTE sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2105 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2106 if (tl_sms_reserve_req_id(&sim_acc_ix)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2107 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2108 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2109 PALLOC (sim_read_req, SIM_READ_REQ); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2110 sim_read_req->source = SRC_SMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2111 sim_read_req->req_id = sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2112 sim_read_req->datafield = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2113 sms_data->sms_sim_access_info[sim_acc_ix].datafield = datafield; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2114 sim_read_req->v_path_info = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2115 sim_read_req->offset = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2116 sim_read_req->length = length; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2117 sim_read_req->max_length = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2118 PSENDX (SIM, sim_read_req); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2119 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2120 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2121 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2122 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2123 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2124 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2125 | STATE : code ROUTINE : tl_sim_read_record_req | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2126 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2127 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2128 PURPOSE : Prepares and sends the primitive SIM_READ_RECORD_REQ to |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2129 read the given record from EF(SMS). |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2130 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2131 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2132 GLOBAL void tl_sim_read_record_req (UBYTE record) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2133 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2134 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2135 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2136 UBYTE sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2137 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2138 if (tl_sms_reserve_req_id(&sim_acc_ix)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2139 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2140 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2141 PALLOC (sim_read_record_req, SIM_READ_RECORD_REQ); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2142 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2143 sim_read_record_req->source = SRC_SMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2144 sim_read_record_req->req_id = sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2145 sim_read_record_req->v_path_info = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2146 sim_read_record_req->datafield = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2147 sms_data->sms_sim_access_info[sim_acc_ix].datafield = SIM_SMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2148 sim_read_record_req->record = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2149 sms_data->sms_sim_access_info[sim_acc_ix].rec_num = record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2150 sim_read_record_req->length = SIM_LENGTH_SMS_RECORD; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2151 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2152 PSENDX (SIM, sim_read_record_req); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2153 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2154 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2155 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2156 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2157 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2158 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2159 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2160 | STATE : code ROUTINE : tl_sim_update_req | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2161 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2162 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2163 PURPOSE : Prepares and sends the primitive SIM_READ_UPDATE_REQ to |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2164 update the given record of EF(SMS). Parameter 'status' is |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2165 written to the first byte of the record, the remaining |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2166 bytes are filled with the parameter '*data'. When parameter |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2167 'data' is NULL, then the remaining bytes are filled with |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2168 pattern NOT_PRESENT_8BIT (0xFF). |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2169 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2170 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2171 GLOBAL void tl_sim_update_req (UBYTE record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2172 UBYTE status, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2173 UBYTE *data) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2174 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2175 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2176 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2177 UBYTE sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2178 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2179 if (tl_sms_reserve_req_id(&sim_acc_ix)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2180 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2181 PALLOC (update_record_req, SIM_UPDATE_RECORD_REQ); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2182 update_record_req->source = SRC_SMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2183 update_record_req->req_id = sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2184 update_record_req->v_path_info = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2185 update_record_req->datafield = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2186 sms_data->sms_sim_access_info[sim_acc_ix].datafield = SIM_SMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2187 update_record_req->record = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2188 sms_data->sms_sim_access_info[sim_acc_ix].rec_num = record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2189 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2190 update_record_req->length = SIM_LENGTH_SMS_RECORD; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2191 if (data NEQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2192 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2193 update_record_req->linear_data[0] = status; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2194 memcpy (&update_record_req->linear_data[1], |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2195 data, SIM_LENGTH_SMS_RECORD-1); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2196 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2197 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2198 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2199 update_record_req->linear_data[0] = SMS_RECORD_FREE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2200 memset (&update_record_req->linear_data[1], |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2201 NOT_PRESENT_8BIT, SIM_LENGTH_SMS_RECORD-1); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2202 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2203 PSENDX (SIM, update_record_req); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2204 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2205 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2206 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2207 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2208 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2209 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2210 | STATE : code ROUTINE : tl_sim_conv_update_req | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2211 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2212 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2213 PURPOSE : Prepares and sends the primitive SIM_READ_UPDATE_REQ to |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2214 update the given record of EF(SMS). The data is extracted |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2215 from the RP-DATA IE. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2216 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2217 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2218 GLOBAL void tl_sim_conv_update_req (UBYTE record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2219 T_rp_data_dl *rp_data_dl) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2220 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2221 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2222 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2223 UBYTE sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2224 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2225 if (tl_sms_reserve_req_id(&sim_acc_ix)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2226 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2227 PALLOC (update_record_req, SIM_UPDATE_RECORD_REQ); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2228 update_record_req->source = SRC_SMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2229 update_record_req->req_id = sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2230 update_record_req->v_path_info = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2231 update_record_req->datafield = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2232 sms_data->sms_sim_access_info[sim_acc_ix].datafield = SIM_SMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2233 update_record_req->record = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2234 sms_data->sms_sim_access_info[sim_acc_ix].rec_num = record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2235 update_record_req->length = SIM_LENGTH_SMS_RECORD; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2236 tl_convert_mt_to_mem (rp_data_dl, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2237 update_record_req->linear_data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2238 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2239 PSENDX (SIM, update_record_req); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2240 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2241 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2242 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2243 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2244 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2245 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2246 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2247 | STATE : code ROUTINE : tl_check_replace_entry | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2248 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2249 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2250 PURPOSE : Compares the service centre address and the originator |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2251 address for two sms messages during replace procedure. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2252 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2253 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2254 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2255 GLOBAL BOOL tl_check_replace_entry (UBYTE /*T_TP_DELIVER*/ *sms_addr, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2256 UBYTE /*T_TP_DELIVER*/ *sms_storage) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2257 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2258 TRACE_FUNCTION ("tl_check_replace_entry()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2259 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2260 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2261 * skip service centre address |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2262 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2263 sms_storage += *sms_storage + 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2264 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2265 * check TP-MTI |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2266 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2267 if ((sms_storage[0] & 0x3) NEQ SMS_DELIVER) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2268 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2269 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2270 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2271 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2272 * compare originator address and protocol identifier |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2273 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2274 if (memcmp (sms_addr, &sms_storage[1], (*sms_addr + 1) / 2 + 3) EQ 0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2275 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2276 return TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2277 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2278 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2279 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2280 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2281 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2282 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2283 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2284 | STATE : code ROUTINE : tl_replace_message | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2285 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2286 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2287 PURPOSE : Checks the ME and SIM memory for replacing a short message. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2288 If protocol identifier, service centre address and |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2289 originator address are equal the message will be replaced. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2290 Else normal handling is processed. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2291 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2292 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2293 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2294 GLOBAL void tl_replace_message (T_TP_DELIVER *sms_deliver) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2295 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2296 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2297 int i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2298 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2299 TRACE_FUNCTION ("tl_replace_message()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2300 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2301 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2302 * first check mobile memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2303 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2304 i = tl_check_mt_pid (&sms_data->me_backup, 1, sms_deliver->tp_pid); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2305 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2306 if (i > 0) /* possible record found */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2307 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2308 USHORT max_record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2309 UBYTE version; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2310 UBYTE data[SIZE_EF_SMS]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2311 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2312 * look at Mobile Memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2313 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2314 /* Implements Measure#32: Row 84 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2315 if (pcm_ReadRecord ((UBYTE *)ef_sms_id, (USHORT)i, SIZE_EF_SMS, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2316 data, &version, &max_record) EQ PCM_OK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2317 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2318 if (tl_check_replace_entry (&SMS_RP_RCVD(sms_data)->rp_user_data.tpdu.b_tpdu[1], |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2319 &data[1])) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2320 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2321 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2322 *record shall be replaced, store new one |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2323 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2324 tl_convert_mt_to_mem (sms_data->rp_data_dl, data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2325 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2326 /* Implements Measure#32: Row 84 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2327 pcm_WriteRecord ((UBYTE *)ef_sms_id, (USHORT)i, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2328 SIZE_EF_SMS, data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2329 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2330 * send indication to MMI |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2331 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2332 tl_message_ind_from_net (MEM_ME, (UBYTE)i, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2333 SMS_ME_PROP(sms_data).max_record, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2334 SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2335 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2336 * acknowledge to the infrastructure |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2337 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2338 rl_report_req_ack (NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2339 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2340 SMS_EM_REPLACE_SMS_IN_ME; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2341 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2342 MFREE (SMS_RP_RCVD(sms_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2343 SMS_RP_RCVD(sms_data) = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2344 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2345 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2346 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2347 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2348 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2349 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2350 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2351 * now look at the SIM card |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2352 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2353 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2354 i = tl_check_mt_pid (&sms_data->sim_backup, 1, sms_deliver->tp_pid); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2355 if (i > 0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2356 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2357 tl_set_access_fifo (ACCESS_BY_NET); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2358 SET_STATE (STATE_NET, NET_READ); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2359 tl_sim_read_record_req ((UBYTE)i); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2360 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2361 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2362 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2363 tl_handle_message (sms_deliver); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2364 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2365 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2366 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2367 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2368 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2369 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2370 | STATE : code ROUTINE : tl_check_replace_pid | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2371 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2372 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2373 PURPOSE : This function checks whether a given PID for a replacement |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2374 message could match the entry described by backup and index. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2375 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2376 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2377 LOCAL BOOL tl_check_replace_pid (T_BACKUP *backup, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2378 unsigned index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2379 UBYTE pid) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2380 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2381 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2382 if (backup->pid_field EQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2383 return TRUE; /* Maybe of replacement type, further checks needed */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2384 return ((backup->pid_field[index >> 3] & (1 << (index & 0x7))) NEQ 0); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2385 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2386 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2387 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2388 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2389 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2390 | STATE : code ROUTINE : tl_store_pid | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2391 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2392 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2393 PURPOSE : This function stores the information wheter the given |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2394 MT PID is of the replacement type in compressed form. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2395 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2396 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2397 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2398 GLOBAL void tl_store_pid (T_BACKUP *backup, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2399 unsigned index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2400 UBYTE pid) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2401 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2402 UBYTE mask; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2403 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2404 #ifdef WIN32 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2405 if (backup->mem_type EQ MEM_ME) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2406 assert (index < MAX_RECORD_ME); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2407 else if (backup->mem_type EQ MEM_SM) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2408 assert (index < MAX_RECORD_SIM); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2409 #endif /* #ifdef WIN32 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2410 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2411 if (backup->pid_field EQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2412 return; /* No caching here */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2413 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2414 mask = 1 << (index & 0x7); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2415 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2416 switch (pid) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2417 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2418 case SMS_PID_REP_SM_TYPE_1: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2419 case SMS_PID_REP_SM_TYPE_2: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2420 case SMS_PID_REP_SM_TYPE_3: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2421 case SMS_PID_REP_SM_TYPE_4: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2422 case SMS_PID_REP_SM_TYPE_5: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2423 case SMS_PID_REP_SM_TYPE_6: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2424 case SMS_PID_REP_SM_TYPE_7: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2425 case SMS_PID_RET_CALL_MSG: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2426 backup->pid_field[index >> 3] |= mask; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2427 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2428 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2429 backup->pid_field[index >> 3] &= ~mask; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2430 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2431 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2432 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2433 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2434 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2435 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2436 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2437 | STATE : code ROUTINE : tl_store_status | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2438 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2439 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2440 PURPOSE : This function stores the status into the backup data |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2441 in compressed form. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2442 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2443 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2444 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2445 GLOBAL void tl_store_status (T_BACKUP *backup, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2446 unsigned index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2447 UBYTE status) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2448 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2449 #ifdef WIN32 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2450 if (backup->mem_type EQ MEM_ME) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2451 assert (index < MAX_RECORD_ME); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2452 else if (backup->mem_type EQ MEM_SM) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2453 assert (index < MAX_RECORD_SIM); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2454 #endif /* #ifdef WIN32 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2455 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2456 if (backup->status_field EQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2457 return; /* No caching here */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2458 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2459 backup->status_field[index] = status; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2460 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2461 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2462 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2463 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2464 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2465 | STATE : code ROUTINE : tl_get_status | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2466 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2467 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2468 PURPOSE : This function gets the status. For the asynchronous |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2469 interface to the SIM the presence of backup data is |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2470 mandatory, for the synchronous (and fast) interface |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2471 to the FFS the presence of backup data is optional. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2472 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2473 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2474 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2475 GLOBAL UBYTE tl_get_status (T_BACKUP *backup, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2476 unsigned index) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2477 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2478 USHORT max_record; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2479 UBYTE version; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2480 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2481 #ifdef WIN32 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2482 if (backup->mem_type EQ MEM_ME) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2483 assert (index < MAX_RECORD_ME); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2484 else if (backup->mem_type EQ MEM_SM) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2485 assert (index < MAX_RECORD_SIM); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2486 #endif /* #ifdef WIN32 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2487 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2488 switch (backup->mem_type) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2489 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2490 case MEM_ME: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2491 if (backup->status_field EQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2492 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2493 UBYTE status = SMS_RECORD_FREE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2494 UBYTE *sim_msg; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2495 MALLOC (sim_msg, SIZE_EF_SMS); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2496 /* Implements Measure#32: Row 84 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2497 if (pcm_ReadRecord ((UBYTE *)ef_sms_id, (USHORT)(index + 1), SIZE_EF_SMS, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2498 sim_msg, &version, &max_record) EQ PCM_OK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2499 status = sim_msg[0]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2500 MFREE (sim_msg); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2501 return status; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2502 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2503 /*FALLTHROUGH*/ /*lint -fallthrough*/ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2504 case MEM_SM: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2505 return backup->status_field[index]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2506 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2507 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2508 return SMS_RECORD_FREE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2509 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2510 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2511 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2512 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2513 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2514 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2515 | STATE : code ROUTINE : tl_check_mt_pid | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2516 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2517 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2518 PURPOSE : Checks the memory for replacing candidates. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2519 If protocol identifier and status (mt message) are okay |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2520 the index of the record is returned. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2521 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2522 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2523 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2524 GLOBAL int tl_check_mt_pid (T_BACKUP *backup, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2525 unsigned index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2526 UBYTE pid) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2527 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2528 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2529 int i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2530 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2531 for (i = (int)index; i <= (int)backup->max_record; i++) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2532 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2533 if (((tl_get_status (backup, i - 1) & 5) EQ 1) AND /* mt message */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2534 tl_check_replace_pid (backup, i - 1, pid)) /* replacement type pid */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2535 return i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2536 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2537 return 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2538 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2539 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2540 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2541 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2542 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2543 | STATE : code ROUTINE : tl_check_status_value | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2544 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2545 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2546 PURPOSE : Checks and maps the parameter <status> according to the |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2547 following rule: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2548 - SMS_RECORD_REC_UNREAD as is |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2549 - SMS_RECORD_REC_READ as is |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2550 - SMS_RECORD_STO_UNSENT as is |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2551 - SMS_RECORD_STO_SENT as is |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2552 - SMS_RECORD_STAT_UNRCVD to SMS_RECORD_STO_SENT |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2553 - SMS_RECORD_STAT_UNSTRD to SMS_RECORD_STO_SENT |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2554 - SMS_RECORD_STAT_STRD to SMS_RECORD_STO_SENT |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2555 - any other value to NOT_PRESENT_8BIT |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2556 In conjunction with 'tl_search_record' a memory location |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2557 with comparable properties can be found |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2558 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2559 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2560 GLOBAL UBYTE tl_check_status_value (UBYTE status) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2561 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2562 switch (status) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2563 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2564 case SMS_RECORD_REC_UNREAD: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2565 case SMS_RECORD_REC_READ: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2566 case SMS_RECORD_STO_UNSENT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2567 case SMS_RECORD_STO_SENT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2568 return status; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2569 case SMS_RECORD_STAT_UNRCVD: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2570 case SMS_RECORD_STAT_UNSTRD: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2571 case SMS_RECORD_STAT_STRD: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2572 return SMS_RECORD_STO_SENT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2573 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2574 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2575 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2576 return NOT_PRESENT_8BIT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2577 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2578 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2579 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2580 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2581 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2582 | STATE : code ROUTINE : tl_search_record | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2583 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2584 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2585 PURPOSE : Searches the memory for the next message with the given |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2586 status. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2587 The following codes for parameter <status> are supported: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2588 - SMS_RECORD_FREE: next free record |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2589 - SMS_RECORD_REC_UNREAD |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2590 - SMS_RECORD_REC_READ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2591 - SMS_RECORD_STO_UNSENT |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2592 - SMS_RECORD_STO_SENT: next record with any sent message |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2593 - NOT_PRESENT_8BIT: any occupied record |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2594 The index of the record is returned. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2595 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2596 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2597 GLOBAL int tl_search_record (T_BACKUP *backup, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2598 USHORT index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2599 UBYTE status) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2600 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2601 int i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2602 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2603 TRACE_FUNCTION ("tl_search_record()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2604 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2605 for (i = (int)index; i <= (int)backup->max_record; i++) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2606 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2607 if (status EQ NOT_PRESENT_8BIT) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2608 { /* next occupied record */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2609 if ((tl_get_status (backup, i - 1) & 1) NEQ SMS_RECORD_FREE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2610 return i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2611 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2612 else if ((status & 1) EQ SMS_RECORD_FREE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2613 { /* next free record */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2614 if ((tl_get_status (backup, i - 1) & 1) EQ SMS_RECORD_FREE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2615 return i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2616 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2617 else if ((status & 7) EQ (tl_get_status (backup, i - 1) & 7)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2618 return i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2619 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2620 return 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2621 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2622 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2623 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2624 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2625 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2626 | STATE : code ROUTINE : tl_search_record_for_delete| |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2627 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2628 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2629 PURPOSE : Searches the SMS DataBase for the next message to be deleted with the given |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2630 status. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2631 The following codes for parameter <status> are supported: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2632 - CMGD_DEL_INDEX delete message only for the index given |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2633 - CMGD_DEL_READ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2634 - CMGD_DEL_READ_SENT |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2635 - CMGD_DEL_READ_SENT_UNSENT |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2636 - CMGD_DEL_ALL next occupied record |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2637 The index of the record is returned. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2638 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2639 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2640 GLOBAL UBYTE tl_search_record_for_delete (T_BACKUP *backup, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2641 UBYTE index, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2642 UBYTE status) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2643 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2644 UBYTE i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2645 UBYTE file_status; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2646 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2647 TRACE_FUNCTION ("tl_search_record_for_delete()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2648 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2649 for (i = index; i <= backup->max_record; i++) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2650 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2651 file_status = backup->status_field[i - 1] & 7; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2652 switch(status) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2653 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2654 case CMGD_DEL_ALL: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2655 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2656 if ((file_status & 1) NEQ SMS_RECORD_FREE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2657 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2658 return i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2659 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2660 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2661 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2662 case CMGD_DEL_READ: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2663 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2664 if (file_status EQ SMS_RECORD_REC_READ) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2665 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2666 return i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2667 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2668 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2669 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2670 case CMGD_DEL_READ_SENT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2671 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2672 if (file_status EQ SMS_RECORD_REC_READ || |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2673 file_status EQ SMS_RECORD_STO_SENT) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2674 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2675 return i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2676 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2677 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2678 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2679 case CMGD_DEL_READ_SENT_UNSENT: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2680 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2681 if (file_status EQ SMS_RECORD_REC_READ || |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2682 file_status EQ SMS_RECORD_STO_SENT || |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2683 file_status EQ SMS_RECORD_STO_UNSENT) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2684 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2685 return i; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2686 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2687 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2688 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2689 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2690 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2691 return SMS_RECORD_NOT_EXIST; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2692 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2693 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2694 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2695 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2696 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2697 | STATE : code ROUTINE : tl_set_access_fifo | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2698 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2699 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2700 PURPOSE : Processing the function TL_SET_ACCESS_FIFO. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2701 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2702 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2703 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2704 GLOBAL void tl_set_access_fifo (UBYTE access) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2705 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2706 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2707 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2708 TRACE_FUNCTION ("tl_set_access_fifo()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2709 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2710 sms_data->access_fifo[1] = sms_data->access_fifo[0]; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2711 sms_data->access_fifo[0] = access; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2712 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2713 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2714 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2715 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2716 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2717 | STATE : code ROUTINE : tl_sms_memo_exceeded | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2718 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2719 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2720 PURPOSE : Checks the SIM memory availability. If an update of |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2721 EF(SMSS) is required, then TRUE is returned. If the memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2722 has become full, then the appropriate RP-ERROR is generated. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2723 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2724 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2725 GLOBAL BOOL tl_sms_memo_exceeded (BOOL avail) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2726 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2727 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2728 BOOL sim_update = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2729 UBYTE sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2730 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2731 TRACE_FUNCTION ("tl_sms_memo_exceeded()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2732 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2733 if ((sms_data->sim_phase >= 2) AND (sms_data->mem_cap_avail NEQ avail)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2734 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2735 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2736 if (tl_sms_reserve_req_id(&sim_acc_ix)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2737 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2738 PALLOC (update_req, SIM_UPDATE_REQ); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2739 update_req->source = SRC_SMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2740 update_req->req_id = sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2741 update_req->v_path_info = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2742 update_req->datafield = sms_data->sms_sim_access_info[sim_acc_ix].datafield = SIM_SMSS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2743 update_req->length = 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2744 update_req->trans_data[0] = (avail)? 0xFF: 0xFE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2745 update_req->offset = 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2746 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2747 PSENDX (SIM, update_req); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2748 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2749 if(sms_data->inst == INST_MO) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2750 tl_set_access_fifo (ACCESS_BY_MMI); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2751 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2752 tl_set_access_fifo (ACCESS_BY_NET); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2753 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2754 sim_update = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2755 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2756 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2757 if (!(sms_data->mem_cap_avail = avail)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2758 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2759 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2760 * RP_ERROR => |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2761 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2762 rl_report_req_error (SMS_RP_CS_MEM_CAP_EXCEEDED, NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2763 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2764 * RL_RELEASE_REQ ==> |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2765 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2766 rl_release_req(SMS_INST.ti); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2767 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2768 * no memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2769 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2770 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2771 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2772 /* inform the ACI about SIM-full/avail via SMS error indication */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2773 tl_mnsms_error_ind(avail ? SMS_CAUSE_MEM_AVAIL : SMS_CAUSE_MEM_FULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2774 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2775 return sim_update; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2776 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2777 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2778 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2779 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2780 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2781 | STATE : code ROUTINE : tl_sms_memo_pause | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2782 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2783 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2784 PURPOSE : used for <<user intiated memory full condition>> (by the |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2785 MNSMS_PAUSE_REQ). |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2786 - update sim notification flag (if not done already) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2787 - send RP-ERROR (MEM_CAPAPCITY_EXCEEDED) to network |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2788 - release connection |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2789 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2790 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2791 GLOBAL void tl_sms_memo_pause (void) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2792 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2793 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2794 UBYTE sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2795 TRACE_FUNCTION ("tl_sms_memo_pause()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2796 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2797 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2798 * generate RP_ERROR(MEM_CAP_EXCEEDED) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2799 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2800 rl_report_req_error (SMS_RP_CS_MEM_CAP_EXCEEDED, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2801 NULL); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2802 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2803 * RL_RELEASE_REQ ==> |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2804 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2805 rl_release_req(SMS_INST.ti); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2806 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2807 * update sim notification flag if necessary |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2808 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2809 if(sms_data->pr_cntrl.mem_full_sent EQ FALSE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2810 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2811 sms_data->pr_cntrl.mem_full_sent = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2812 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2813 if (sms_data->sim_phase >= 2) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2814 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2815 if (tl_sms_reserve_req_id(&sim_acc_ix)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2816 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2817 PALLOC (update_req, SIM_UPDATE_REQ); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2818 update_req->req_id = sim_acc_ix; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2819 update_req->v_path_info = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2820 update_req->source = SRC_SMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2821 update_req->datafield = |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2822 sms_data->sms_sim_access_info[sim_acc_ix].datafield = SIM_SMSS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2823 update_req->length = 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2824 update_req->trans_data[0] = 0xFE; /* Notification Flag = TRUE */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2825 update_req->offset = 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2826 PSENDX (SIM, update_req); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2827 if(sms_data->inst == INST_MO) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2828 tl_set_access_fifo (ACCESS_BY_MMI); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2829 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2830 tl_set_access_fifo (ACCESS_BY_NET); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2831 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2832 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2833 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2834 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2835 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2836 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2837 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2838 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2839 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2840 | STATE : code ROUTINE : tl_sms_memo_resume | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2841 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2842 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2843 PURPOSE : used for release of <<user intiated memory full condition>> |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2844 (by the MNSMS_RESUME_REQ). |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2845 - update sim notification flag (set to false) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2846 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2847 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2848 GLOBAL void tl_sms_memo_resume (void) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2849 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2850 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2851 TRACE_FUNCTION ("tl_sms_memo_resume()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2852 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2853 /* Implements Measure# 14 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2854 tl_send_sim_update_req(0xFF, 1); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2855 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2856 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2857 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2858 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2859 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2860 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2861 | STATE : code ROUTINE : tl_mnsms_report_ind | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2862 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2863 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2864 PURPOSE : Processing the function TL_MNSMS_REPORT_IND. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2865 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2866 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2867 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2868 GLOBAL void tl_mnsms_report_ind (UBYTE ent_state) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2869 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2870 PALLOC (report_ind, MNSMS_REPORT_IND); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2871 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2872 report_ind->state = ent_state; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2873 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2874 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2875 * Disable the v_cmms_mode flag as we are not sending current value of the |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2876 * mode value for CMMS operation. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2877 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2878 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2879 report_ind->v_cmms_mode = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2880 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2881 PSENDX (MMI, report_ind); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2882 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2883 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2884 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2885 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2886 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2887 | STATE : code ROUTINE : tl_pause | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2888 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2889 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2890 PURPOSE : execute sms delivery pause |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2891 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2892 DESCRIPTION: set marker for pause so that the next incoming sms |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2893 will be responded with RP_ERROR (Cause: Memory |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2894 Capacity Exceeded). |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2895 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2896 GLOBAL void tl_pause (void) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2897 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2898 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2899 TRACE_FUNCTION ("tl_pause()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2900 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2901 if (sms_data->pr_cntrl.delivery_state NEQ SMS_DELIVER_STATUS_PAUSE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2902 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2903 sms_data->pr_cntrl.delivery_state = SMS_DELIVER_STATUS_PAUSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2904 sms_data->pr_cntrl.mem_full_sent = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2905 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2906 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2907 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2908 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2909 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2910 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2911 | STATE : code ROUTINE : tl_resume | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2912 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2913 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2914 PURPOSE : execute sms delivery resumption |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2915 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2916 DESCRIPTION: reset marker for pause and initiate the sending of |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2917 memory available message (SMMA) to network |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2918 to indicate that we can receive sms again. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2919 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2920 GLOBAL void tl_resume (void) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2921 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2922 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2923 TRACE_FUNCTION ("tl_resume()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2924 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2925 if ( sms_data->pr_cntrl.delivery_state != SMS_DELIVER_STATUS_PAUSE ) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2926 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2927 tl_mnsms_resume_cnf(SMS_NO_ERROR); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2928 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2929 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2930 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2931 if ( sms_data->pr_cntrl.mem_full_sent == FALSE ) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2932 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2933 sms_data->pr_cntrl.delivery_state = SMS_DELIVER_STATUS_RESUME; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2934 tl_mnsms_resume_cnf(SMS_NO_ERROR); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2935 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2936 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2937 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2938 if (GET_STATE (STATE_MMI) NEQ MMI_IDLE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2939 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2940 TRACE_ERROR("Unable to process resume request"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2941 tl_mnsms_resume_cnf(SMS_CAUSE_ENTITY_BUSY); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2942 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2943 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2944 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2945 GET_MO_INSTANCE(sms_data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2946 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2947 * TL state transition TL_ESTABLISH |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2948 * EST state transition EST_SMMA |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2949 * MMI state transition MMI_RESUME |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2950 * |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2951 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2952 SET_STATE (STATE_MMI, MMI_RESUME); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2953 SET_STATE (STATE_EST, EST_SMMA); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2954 SMS_INST_SET_STATE (STATE_TL, TL_ESTABLISH); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2955 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2956 * 1st shot |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2957 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2958 SMS_INST.retrans = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2959 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2960 * establish connection |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2961 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2962 tl_establish_connection(FALSE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2963 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2964 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2965 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2966 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2967 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2968 | STATE : code ROUTINE : tl_query_deliver_status | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2969 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2970 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2971 PURPOSE : handle sms status query for deliver state |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2972 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2973 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2974 GLOBAL void tl_query_deliver_status (void) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2975 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2976 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2977 TRACE_FUNCTION ("tl_query_deliver_status()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2978 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2979 tl_mnsms_query_cnf(SMS_QUERY_DELIVER_STATUS,sms_data->pr_cntrl.delivery_state); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2980 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2981 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2982 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2983 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2984 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2985 | STATE : code ROUTINE : tl_concat_check | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2986 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2987 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2988 PURPOSE : check for concatenated sms |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2989 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2990 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2991 GLOBAL BOOL tl_concat_check ( T_sms_sdu *sms_sdu) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2992 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2993 BYTE ccd_result; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2994 T_SIM_PDU *sim_pdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2995 T_TP_SUBMIT *submit; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2996 T_SMS_PDU_IE_HDR *ie_hdr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2997 T_SMS_PDU_CONCAT_8BIT_HDR *concat_8_hdr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2998 /* T_SMS_PDU_CONCAT_16BIT_HDR *concat_16_hdr; */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2999 T_SMS_CONCAT_HDR *concat_hdr = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3000 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3001 MALLOC (sim_pdu, sizeof(*sim_pdu)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3002 MALLOC (submit, sizeof(*submit)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3003 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3004 //CCD_START; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3005 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3006 * CCD: SMS SDU -> SIM PDU |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3007 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3008 ccd_result = ccd_decodeMsg (CCDENT_SMS, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3009 BOTH, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3010 (T_MSGBUF *)sms_sdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3011 (UBYTE *)sim_pdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3012 SMS_VT_SIM_PDU); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3013 if (ccd_result NEQ ccdOK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3014 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3015 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3016 * error understanding the sdu |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3017 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3018 TRACE_ERROR ("ccd error decoding sim pdu"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3019 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3020 * give up |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3021 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3022 // CCD_END; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3023 MFREE (sim_pdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3024 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3025 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3026 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3027 if (sim_pdu->tp_mti NEQ SMS_SUBMIT) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3028 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3029 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3030 * error understanding the sdu |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3031 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3032 TRACE_ERROR ("error not a <submit> in sim pdu"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3033 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3034 * give up |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3035 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3036 // CCD_END; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3037 MFREE (sim_pdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3038 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3039 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3040 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3041 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3042 * CCD: SIM PDU -> SUBMIT |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3043 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3044 ccd_result = ccd_decodeMsg (CCDENT_SMS, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3045 UPLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3046 (T_MSGBUF *)&sim_pdu->tpdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3047 (UBYTE *)submit, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3048 SMS_VT_SUBMIT); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3049 if (ccd_result NEQ ccdOK) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3050 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3051 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3052 * error understanding the sdu |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3053 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3054 TRACE_ERROR ("ccd error decoding submit"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3055 //TISH, patch for ASTec32699,OMAPS00135322 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3056 //start |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3057 if (ccd_result NEQ ccdWarning) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3058 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3059 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3060 * give up |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3061 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3062 // CCD_END; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3063 MFREE (sim_pdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3064 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3065 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3066 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3067 //end |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3068 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3069 if (submit->tp_udhi EQ SMS_UDHI_INCLUDED) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3070 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3071 TRACE_EVENT("UDH INCLUDED"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3072 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3073 ie_hdr = (T_SMS_PDU_IE_HDR *)((UBYTE *)&submit->tp_udh_inc.tp_udh.data[0]); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3074 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3075 if (ie_hdr->iei EQ 0x00 ) /* SMS_IEI_CONC_8BIT */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3076 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3077 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3078 * Concatenation header for 8 bit ref nr |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3079 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3080 concat_8_hdr = (T_SMS_PDU_CONCAT_8BIT_HDR *) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3081 ((UBYTE *)&submit->tp_udh_inc.tp_udh.data[2]); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3082 TRACE_EVENT_P3("Concatenated: Ref %#x Seq %u Of %u", |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3083 concat_8_hdr->ref_nr, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3084 concat_8_hdr->seq_nr, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3085 concat_8_hdr->max_nr); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3086 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3087 * safe contents of header in common header structure |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3088 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3089 MALLOC (concat_hdr, sizeof(*concat_hdr)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3090 concat_hdr->ref_nr = concat_8_hdr->ref_nr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3091 concat_hdr->seq_nr = concat_8_hdr->seq_nr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3092 concat_hdr->max_nr = concat_8_hdr->max_nr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3093 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3094 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3095 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3096 TRACE_ERROR ("could not find concat header"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3097 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3098 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3099 // CCD_END; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3100 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3101 * concat control |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3102 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3103 tl_concat_cntrl(concat_hdr); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3104 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3105 * clean up |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3106 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3107 if (concat_hdr) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3108 MFREE(concat_hdr); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3109 MFREE (sim_pdu); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3110 MFREE (submit); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3111 return TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3112 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3113 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3114 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3115 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3116 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3117 | STATE : code ROUTINE : tl_concat_cntrl | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3118 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3119 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3120 PURPOSE : control of concatenated sms |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3121 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3122 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3123 GLOBAL void tl_concat_cntrl ( |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3124 T_SMS_CONCAT_HDR *concat_hdr /* may be NULL */) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3125 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3126 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3127 if (sms_data->concat_cntrl.concatenation EQ FALSE) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3128 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3129 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3130 * Concatenation currently not active |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3131 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3132 if (concat_hdr EQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3133 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3134 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3135 * nothing to be done |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3136 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3137 return; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3138 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3139 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3140 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3141 if ((concat_hdr->seq_nr EQ 1) AND |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3142 (concat_hdr->seq_nr < concat_hdr->max_nr)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3143 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3144 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3145 * begin of concatenation series |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3146 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3147 TRACE_EVENT("concatenation series begin"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3148 sms_data->concat_cntrl.concatenation = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3149 sms_data->concat_cntrl.release_pending = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3150 sms_data->concat_cntrl.nr = *concat_hdr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3151 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3152 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3153 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3154 TRACE_ERROR("concatenation series implausible nr"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3155 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3156 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3157 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3158 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3159 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3160 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3161 * Concatenation currently active |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3162 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3163 if (concat_hdr EQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3164 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3165 TRACE_ERROR("concatenation series ends unexpected"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3166 sms_data->concat_cntrl.release_pending = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3167 sms_data->concat_cntrl.end = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3168 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3169 else if ((concat_hdr->seq_nr == concat_hdr->max_nr) AND |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3170 (concat_hdr->seq_nr EQ sms_data->concat_cntrl.nr.seq_nr+1)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3171 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3172 TRACE_EVENT("concatenation series end"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3173 sms_data->concat_cntrl.release_pending = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3174 sms_data->concat_cntrl.end = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3175 sms_data->concat_cntrl.nr = *concat_hdr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3176 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3177 else if (concat_hdr->seq_nr EQ sms_data->concat_cntrl.nr.seq_nr+1) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3178 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3179 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3180 * plausible |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3181 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3182 TRACE_EVENT("concatenation series continued"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3183 sms_data->concat_cntrl.release_pending = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3184 sms_data->concat_cntrl.end = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3185 sms_data->concat_cntrl.nr = *concat_hdr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3186 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3187 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3188 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3189 TRACE_ERROR("concatenation series implausible nr"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3190 sms_data->concat_cntrl.release_pending = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3191 sms_data->concat_cntrl.end = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3192 sms_data->concat_cntrl.nr = *concat_hdr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3193 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3194 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3195 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3196 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3197 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3198 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3199 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3200 | STATE : code ROUTINE : tl_check_class_2 | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3201 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3202 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3203 PURPOSE : Checks whether the data coding scheme is class 2. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3204 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3205 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3206 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3207 #ifdef SIM_TOOLKIT |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3208 GLOBAL UBYTE tl_check_class_2 (UBYTE dcs) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3209 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3210 TRACE_FUNCTION ("tl_class_check()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3211 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3212 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3213 * check 00x1xx10 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3214 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3215 if ((dcs & 0xD3) EQ 0x12) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3216 return TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3217 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3218 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3219 * check 1111xx10 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3220 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3221 if ((dcs & 0xF3) EQ 0xF2) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3222 return TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3223 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3224 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3225 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3226 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3227 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3228 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3229 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3230 | STATE : code ROUTINE : tl_build_envelope_sms_download | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3231 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3232 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3233 PURPOSE : Builds an envelope command to the SIM card for SMS |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3234 download. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3235 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3236 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3237 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3238 GLOBAL BOOL tl_build_envelope_sms_download (T_rp_data_dl *rp_data_dl) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3239 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3240 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3241 int ber_len, tpdu_len; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3242 int start_addr, start_tpdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3243 T_stk_cmd *stk_cmd; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3244 UBYTE *env; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3245 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3246 MCAST (sim_pdu, SIM_PDU); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3247 PALLOC (sim_toolkit_req, SIM_TOOLKIT_REQ); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3248 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3249 TRACE_FUNCTION ("tl_build_envelope_sms_download()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3250 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3251 if (rp_data_dl EQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3252 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3253 PFREE (sim_toolkit_req); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3254 return FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3255 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3256 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3257 * make SIM PDU |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3258 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3259 sim_pdu->rp_addr = rp_data_dl->rp_addr; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3260 sim_pdu->tpdu = rp_data_dl->rp_user_data.tpdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3261 sim_pdu->tp_mti = SMS_DELIVER; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3262 sim_pdu->v_tpdu = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3263 sim_pdu->tp_vt_mti = SMS_VT_SIM_PDU; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3264 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3265 MALLOC (stk_cmd, sizeof(T_stk_cmd)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3266 stk_cmd->o_cmd = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3267 stk_cmd->l_cmd = MAX_STK_CMD<<3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3268 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3269 ccd_codeMsg (CCDENT_SMS, DOWNLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3270 (T_MSGBUF *)stk_cmd, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3271 (UBYTE *)sim_pdu, SMS_VT_SIM_PDU); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3272 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3273 * calculate variable length items of ENVELOPE |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3274 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3275 ber_len = 4; /* length of TLV device id */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3276 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3277 * find RP-ADDR (Service Centre) in SIM_PDU |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3278 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3279 start_addr = (int)stk_cmd->o_cmd >> 3; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3280 /* position of RP-ADDR length */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3281 ber_len += (int)stk_cmd->cmd[start_addr] + 2; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3282 /* add length of TLV address */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3283 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3284 * find TPDU in SIM PDU |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3285 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3286 start_tpdu = start_addr + (int)stk_cmd->cmd[start_addr] + 1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3287 /* skip RP-Orig Address */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3288 tpdu_len = ((int)stk_cmd->l_cmd >> 3) - start_tpdu; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3289 /* length of RP-User-Data */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3290 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3291 ber_len += tpdu_len + 2; /* add length of TLV SMS-TPDU */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3292 if (tpdu_len >= 128) /* 2 byte length coding required? */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3293 ber_len++; /* adjust */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3294 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3295 * prepare the primitive |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3296 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3297 sim_toolkit_req -> source = SRC_SMS; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3298 sim_toolkit_req -> req_id = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3299 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3300 sim_toolkit_req -> stk_cmd.o_cmd = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3301 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3302 * BER-TLV Envelope SMS-PP Download |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3303 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3304 env = sim_toolkit_req -> stk_cmd.cmd; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3305 *env++ = 0xD1; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3306 if (ber_len >= 128) /* 2 byte length coding required */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3307 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3308 *env++ = 0x81; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3309 sim_toolkit_req -> stk_cmd.l_cmd = (USHORT)((ber_len + 3) << 3); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3310 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3311 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3312 sim_toolkit_req -> stk_cmd.l_cmd = (USHORT)((ber_len + 2) << 3); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3313 *env++ = (UBYTE)ber_len; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3314 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3315 * TLV Device Identities |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3316 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3317 *env++ = 0x82; /* Tag */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3318 *env++ = 2; /* Length */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3319 *env++ = 0x83; /* Source Network */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3320 *env++ = 0x81; /* Destination SIM */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3321 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3322 * TLV Address |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3323 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3324 *env++ = 0x06; /* address tag, optional */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3325 memcpy (env, &stk_cmd->cmd[start_addr], /* copy length and content of RP-Orig Address */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3326 stk_cmd->cmd[start_addr] + 1); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3327 env += stk_cmd->cmd[start_addr] + 1; /* tag plus content */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3328 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3329 * env now points to the tag of the TLV SMS-TPDU |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3330 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3331 *env++ = 0x8B; /* SMS TPDU tag, mandatory */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3332 if (tpdu_len >= 128) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3333 *env++ = 0x81; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3334 *env++ = (UBYTE)tpdu_len; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3335 memcpy (env, &stk_cmd->cmd[start_tpdu], /* copy content of TPDU */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3336 tpdu_len); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3337 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3338 * Send to SIM card |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3339 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3340 PSENDX (SIM, sim_toolkit_req); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3341 MFREE (stk_cmd); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3342 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3343 * Set instance to assign answer from SIM card. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3344 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3345 tl_set_access_fifo (ACCESS_BY_NET); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3346 SET_STATE (STATE_NET, NET_WRITE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3347 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3348 return TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3349 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3350 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3351 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3352 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3353 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3354 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3355 | STATE : code ROUTINE : tl_sim_toolkit_confirm | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3356 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3357 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3358 PURPOSE : Getting the terminal response to a SMS - Download. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3359 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3360 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3361 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3362 GLOBAL void tl_sim_toolkit_confirm (T_SIM_TOOLKIT_CNF *toolkit_cnf) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3363 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3364 GET_INSTANCE_DATA; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3365 T_rp_user_data *rp_ud; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3366 union { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3367 T_TP_DLVR_REP_ACK *ack; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3368 T_TP_DLVR_REP_ERR *err; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3369 } dlvr_rep; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3370 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3371 TRACE_FUNCTION ("tl_sim_toolkit_confirm()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3372 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3373 CCD_START; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3374 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3375 switch (toolkit_cnf->cause) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3376 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3377 case SIM_NO_ERROR: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3378 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3379 * The SIM responds with "90 00", the ME shall acknowledge the receipt |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3380 * of the short message to the network using an RP-ACK message. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3381 * |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3382 * or |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3383 * |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3384 * The SIM responds with "9F XX", the ME shall use the GET RESPONSE |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3385 * command to the response data. The response data will be supplied by |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3386 * the ME in the TP-User-Data Element of the RP-ACK message. It will be |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3387 * send back to the network. The values of protocol identifier and data |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3388 * coding scheme in RP-ACK shall be as in the original message. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3389 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3390 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3391 if (toolkit_cnf->stk_cmd.l_cmd > 0) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3392 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3393 MALLOC (rp_ud, sizeof(T_rp_user_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3394 MALLOC (dlvr_rep.ack, sizeof(T_TP_DLVR_REP_ACK)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3395 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3396 dlvr_rep.ack->tp_vt_mti = SMS_VT_DLVR_REP_ACK; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3397 dlvr_rep.ack->tp_udhi = SMS_UDHI_NOT_INCLUDED; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3398 dlvr_rep.ack->tp_mti = SMS_DELIVER_REPORT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3399 dlvr_rep.ack->v_tp_udh_inc = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3400 memcpy (dlvr_rep.ack->tp_ud.data, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3401 &toolkit_cnf->stk_cmd.cmd[toolkit_cnf->stk_cmd.o_cmd >> 3], |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3402 (size_t)(toolkit_cnf->stk_cmd.l_cmd >> 3)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3403 dlvr_rep.ack->tp_ud.c_data = (UBYTE)(toolkit_cnf->stk_cmd.l_cmd >> 3); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3404 dlvr_rep.ack->tp_ud.length = (tl_udl_count_septet (SMS_DCS(sms_data)))? |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3405 (UBYTE)(dlvr_rep.ack->tp_ud.c_data * 8 / 7): |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3406 dlvr_rep.ack->tp_ud.c_data; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3407 dlvr_rep.ack->tp_ext = SMS_EXT_NOT_INCLUDED; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3408 dlvr_rep.ack->v_tp_ud = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3409 dlvr_rep.ack->tp_udl_p = SMS_UD_INCLUDED; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3410 dlvr_rep.ack->tp_dcs = SMS_DCS(sms_data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3411 dlvr_rep.ack->v_tp_dcs = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3412 dlvr_rep.ack->tp_dcs_p = SMS_DCS_INCLUDED; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3413 dlvr_rep.ack->tp_pid = SMS_PID(sms_data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3414 dlvr_rep.ack->v_tp_pid = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3415 dlvr_rep.ack->tp_pid_p = SMS_PID_INCLUDED; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3416 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3417 rp_ud->tpdu.o_tpdu = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3418 rp_ud->tpdu.l_tpdu = TPDU_BIT_LEN; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3419 rp_ud->v_tpdu = (ccd_codeMsg (CCDENT_SMS, UPLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3420 (T_MSGBUF *)&rp_ud->tpdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3421 (UBYTE *)dlvr_rep.ack, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3422 SMS_VT_DLVR_REP_ACK) EQ ccdOK); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3423 rp_ud->tp_mti = SMS_DELIVER_REPORT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3424 MFREE (dlvr_rep.ack); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3425 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3426 else |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3427 rp_ud = NULL; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3428 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3429 rl_report_req_ack (rp_ud); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3430 SET_STATE (STATE_NET, NET_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3431 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3432 SMS_EM_RECEIVE_SIM_TOOLKIT_DATA_DOWNLOAD; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3433 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3434 if (rp_ud NEQ NULL) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3435 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3436 MFREE (rp_ud); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3437 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3438 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3439 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3440 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3441 case SIM_CAUSE_SAT_BUSY: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3442 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3443 * The SIM responds with "93 00", the ME shall either retry the command or |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3444 * send back an RP-ERROR message to the network with the TP-FCS value |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3445 * indicating "SIM Application Toolkit Busy). |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3446 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3447 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3448 MALLOC (rp_ud, sizeof(T_rp_user_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3449 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3450 rp_ud->tpdu.l_tpdu = 40; /* 5 bytes */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3451 rp_ud->tpdu.o_tpdu = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3452 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3453 rp_ud->tpdu.b_tpdu[0] = SMS_DELIVER_REPORT; /* MTI, no UDHI */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3454 rp_ud->tpdu.b_tpdu[1] = SMS_FCS_SAT_BUSY; /* SAT busy */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3455 rp_ud->tpdu.b_tpdu[2] = 0x03; /* PI: DCS and PID will follow, no UD */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3456 rp_ud->tpdu.b_tpdu[3] = SMS_PID(sms_data); /* set PID */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3457 rp_ud->tpdu.b_tpdu[4] = SMS_DCS(sms_data); /* set DCS */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3458 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3459 rp_ud->tp_mti = SMS_DELIVER_REPORT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3460 rp_ud->v_tpdu = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3461 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3462 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3463 * RP_ERROR |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3464 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3465 rl_report_req_error (SMS_RP_CS_PROTOCOL_ERROR, rp_ud); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3466 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3467 * RL_RELEASE_REQ ==> |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3468 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3469 rl_release_req(SMS_INST.ti); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3470 SET_STATE (STATE_NET, NET_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3471 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3472 MFREE (rp_ud); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3473 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3474 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3475 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3476 case SIM_CAUSE_DNL_ERROR: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3477 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3478 * The ME has indicated in TERMINAL PROFILE that it supports the status |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3479 * word "9E XX" and if the SIM responds with "9E XX", the ME shall use |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3480 * the GET RESPONSE command to get the response data. The response data |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3481 * from the SIM will be supplied by the ME in the TP-User data element |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3482 * of the RP-ERROR message. It will be sent back to the network. The |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3483 * values of protocol identifier and data coding scheme in RP-ERROR |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3484 * shall be as in the original message. The value of TP-FCS element |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3485 * of the RP-ERROR shall be "SIM data download error". |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3486 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3487 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3488 MALLOC (rp_ud, sizeof(T_rp_user_data)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3489 MALLOC (dlvr_rep.err, sizeof(T_TP_DLVR_REP_ERR)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3490 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3491 dlvr_rep.err->tp_vt_mti = SMS_VT_DLVR_REP_ERR; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3492 dlvr_rep.err->tp_udhi = SMS_UDHI_NOT_INCLUDED; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3493 dlvr_rep.err->tp_mti = SMS_DELIVER_REPORT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3494 dlvr_rep.err->tp_fcs = SMS_FCS_SAT_DNL_ERROR; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3495 dlvr_rep.err->v_tp_udh_inc = FALSE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3496 memcpy (dlvr_rep.err->tp_ud.data, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3497 &toolkit_cnf->stk_cmd.cmd[toolkit_cnf->stk_cmd.o_cmd >> 3], |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3498 (size_t)(toolkit_cnf->stk_cmd.l_cmd >> 3)); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3499 dlvr_rep.err->tp_ud.c_data = (UBYTE)(toolkit_cnf->stk_cmd.l_cmd >> 3); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3500 dlvr_rep.err->tp_ud.length = (tl_udl_count_septet (SMS_DCS(sms_data)))? |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3501 (UBYTE)(dlvr_rep.err->tp_ud.c_data * 8 / 7): |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3502 dlvr_rep.err->tp_ud.c_data; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3503 dlvr_rep.err->tp_ext = SMS_EXT_NOT_INCLUDED; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3504 dlvr_rep.err->v_tp_ud = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3505 dlvr_rep.err->tp_udl_p = SMS_UD_INCLUDED; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3506 dlvr_rep.err->tp_dcs = SMS_DCS(sms_data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3507 dlvr_rep.err->v_tp_dcs = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3508 dlvr_rep.err->tp_dcs_p = SMS_DCS_INCLUDED; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3509 dlvr_rep.err->tp_pid = SMS_PID(sms_data); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3510 dlvr_rep.err->v_tp_pid = TRUE; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3511 dlvr_rep.err->tp_pid_p = SMS_PID_INCLUDED; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3512 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3513 rp_ud->tpdu.o_tpdu = 0; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3514 rp_ud->tpdu.l_tpdu = TPDU_BIT_LEN; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3515 rp_ud->v_tpdu = (ccd_codeMsg (CCDENT_SMS, UPLINK, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3516 (T_MSGBUF *)&rp_ud->tpdu, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3517 (UBYTE *)dlvr_rep.err, |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3518 SMS_VT_DLVR_REP_ERR) EQ ccdOK); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3519 rp_ud->tp_mti = SMS_DELIVER_REPORT; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3520 MFREE (dlvr_rep.err); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3521 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3522 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3523 * RP_ERROR |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3524 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3525 rl_report_req_error (SMS_RP_CS_PROTOCOL_ERROR, rp_ud); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3526 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3527 * RL_RELEASE_REQ ==> |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3528 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3529 rl_release_req(SMS_INST.ti); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3530 SET_STATE (STATE_NET, NET_IDLE); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3531 MFREE (rp_ud); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3532 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3533 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3534 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3535 default: |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3536 break; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3537 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3538 CCD_END; |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3539 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3540 #endif |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3541 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3542 /* |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3543 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3544 | PROJECT : GSM-PS (8410) MODULE : SMS_TLF | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3545 | STATE : code ROUTINE : tl_cmms_start | |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3546 +--------------------------------------------------------------------+ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3547 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3548 PURPOSE : Function used for starting the Timer TMMS and continuing |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3549 the CMMS mode. |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3550 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3551 */ |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3552 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3553 GLOBAL void tl_cmms_start(void) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3554 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3555 TRACE_FUNCTION ("tl_cmms_start()"); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3556 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3557 if(sms_timer_check(TMMS)) |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3558 { |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3559 sms_timer_stop(TMMS); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3560 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3561 sms_timer_start(TMMS); |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3562 } |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3563 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3564 |
2f7df7a314f8
gsm-fw/g23m-gsm subtree: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3565 #endif |