FreeCalypso > hg > fc-magnetite
annotate src/aci2/aci/conc_sms.c @ 204:e2714de970a4
TCS2/TCS3 hybrid config links after adding cl.lib
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 14 Oct 2016 06:21:03 +0000 |
parents | 93999a60b835 |
children |
rev | line source |
---|---|
3
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 | Project : $Workfile:: |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 | Modul : CONC_SMS |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 +----------------------------------------------------------------------------- |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 | All rights reserved. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 | This file is confidential and a trade secret of Texas |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 | Instruments Berlin, AG |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 | The receipt of or possession of this file does not convey |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 | any rights to reproduce or disclose its contents or to |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 | whole, or in part, without the specific written consent of |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 +----------------------------------------------------------------------------- |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 | Purpose : SMS Concatenation Handler |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 +----------------------------------------------------------------------------- |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 #ifndef CONC_SMS_C |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 #define CONC_SMS_C |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 /*==== INCLUDES ===================================================*/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #include "aci_all.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 #include "aci_cmh.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 #include "ati_cmd.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 #include "aci_cmd.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 #include "aci_fd.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 #include "aci_mem.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 #include "psa.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 #include "psa_sms.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 #include "cmh.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 #include "cmh_sms.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 #include "psa_cc.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 #include "typedefs.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 #include "aci_lst.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 #include "conc_sms.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 #include "aci_io.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 #include "aci_mfw.h" |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 /*==== VARIABLES ==================================================*/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 GLOBAL T_SM_ASSEMBLY assembly_list[MAX_BUF_ELEMS]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 GLOBAL T_SEG_BUF segBuf_list [MAX_BUF_ELEMS]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 GLOBAL T_CONC_BUF concBuf_list [MAX_CONC_BUF_ELEMS]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 LOCAL USHORT RefNum_Del = 0xFF; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 LOCAL BOOL dFLAG = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 LOCAL CHAR Addres[MAX_SMS_ADDR_DIG]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 /*==== FUNCTIONS ==================================================*/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 LOCAL void concSMS_printConcatList (); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 LOCAL USHORT concSMS_findMaxRefNum(void); // Marcus: Issue 872: 03/10/2002 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 | STATE : code ROUTINE : concSMS_findSeqNumSB | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 PURPOSE : find 'seq_num' in segment buffer |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 LOCAL BOOL concSMS_findSeqNumSB ( UBYTE critrerium, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 void *elem ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 T_SEG_BUF_ELEM *compared = (T_SEG_BUF_ELEM *)elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 if ( compared->seq_num == critrerium ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 return TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 | STATE : code ROUTINE : concSMS_findSeqNumElemCB | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 PURPOSE : find 'seq_num' in concatenation buffer |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 LOCAL BOOL concSMS_findSeqNumElemCB ( UBYTE critrerium, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 void *elem ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 T_CONC_BUF_ELEM *compared = (T_CONC_BUF_ELEM *)elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 if ( compared->seq_num == critrerium ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 return TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 | STATE : code ROUTINE : concSMS_findRecNumElemCB | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 PURPOSE : find 'rec_num' in concatenation buffer |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 LOCAL BOOL concSMS_findRecNumElemCB ( UBYTE critrerium, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 void *elem ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 T_CONC_BUF_ELEM *compared = (T_CONC_BUF_ELEM *)elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 if ( compared->rec_num == critrerium ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 return TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 | STATE : code ROUTINE : concSMS_getAsBuffer | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 PURPOSE : This functions searchs the assembly buffer for ref_num |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 and address. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 LOCAL T_SM_ASSEMBLY* concSMS_getAsBuffer( USHORT ref_num, CHAR *address ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 TRACE_FUNCTION ("concSMS_getAsBuffer()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 /* search for the element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 for (i=0; i<MAX_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 if ( (assembly_list[i].ref_num EQ ref_num) AND |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 (assembly_list[i].in_use) ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 if ((address NEQ NULL) /* AND (address[0] NEQ '\0') */) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 if (!strcmp(assembly_list[i].address, address)) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 return &assembly_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 return &assembly_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 return NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 | STATE : code ROUTINE : concSMS_addToAsBuffer | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 PURPOSE : This function adds data to the assembly buffer. It returns |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 NULL if buffer is full. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 LOCAL T_SM_ASSEMBLY* concSMS_addToAsBuffer ( USHORT ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 CHAR *address, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 UBYTE max_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 T_SM_DATA_EXT *data ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 T_SM_ASSEMBLY *assembly_elem = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 TRACE_FUNCTION ("concSMS_addToAsBuffer()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 /* search for the element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 assembly_elem = concSMS_getAsBuffer( ref_num, address ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 TRACE_EVENT_P1("addToAsBuffer:[0].in_use: %d", assembly_list[0].in_use); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 TRACE_EVENT_P1("addToAsBuffer:[1].in_use: %d", assembly_list[1].in_use); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 /* element not found */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 if (assembly_elem EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 /* search for an unused list entry */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 for (i=0; i<MAX_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 if (assembly_list[i].in_use EQ FALSE) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 assembly_elem = &assembly_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 break; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 /* buffer is full */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 if (assembly_elem EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 return NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 /* create new assembly buffer for this ref_num*/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 assembly_elem->in_use = TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 assembly_elem->ref_num = ref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 if ( (address NEQ NULL) AND (address[0] NEQ '\0') ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 strcpy(assembly_elem->address, address); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 assembly_elem->address[0] = '\0'; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 assembly_elem->next_exp_num = 1; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 assembly_elem->segs_left = max_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 assembly_elem->seg_count = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 } /* if (assembly_elem EQ NULL) */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 if (assembly_elem->seg_count EQ 0) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 /* alloc memory for data to assemble */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 UBYTE segs; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 segs = MINIMUM(assembly_elem->segs_left, CONC_MAX_SEGS); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 ACI_MALLOC(assembly_elem->data.data, (USHORT)(MAX_SM_LEN*segs)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 assembly_elem->segs_left -= segs; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 assembly_elem->data.len = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 memcpy(assembly_elem->data.data+assembly_elem->data.len, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 data->data, data->len); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 assembly_elem->data.len += data->len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 assembly_elem->data.data[assembly_elem->data.len] = '\0'; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 assembly_elem->next_exp_num++; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 assembly_elem->seg_count++; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
253 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 if (assembly_elem->data.len < TTRACE_LEN) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
256 TRACE_EVENT_P1("addToAsBuffer:data.data: %s", assembly_elem->data.data); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 TRACE_EVENT_P1("addToAsBuffer:data.len: %d", assembly_elem->data.len); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 TRACE_EVENT_P1("addToAsBuffer:next_exp_num: %d", assembly_elem->next_exp_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 TRACE_EVENT_P1("addToAsBuffer:seg_count: %d", assembly_elem->seg_count); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 return assembly_elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 +---------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 | STATE : code ROUTINE : concSMS_removeFromAsBuffer | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 +---------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 PURPOSE : This functions gets data from the assembly buffer and |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 sets it to 'unused'. The assembly is completed. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 LOCAL UBYTE concSMS_removeFromAsBuffer(T_SM_DATA_EXT *data_conc, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 USHORT ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 CHAR *address) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 T_SM_ASSEMBLY *assembly_buf; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 TRACE_FUNCTION ("concSMS_removeFromAsBuffer()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 /* search for the element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 assembly_buf = concSMS_getAsBuffer( ref_num, address ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 if (assembly_buf EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 assembly_buf->in_use = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 data_conc->data = assembly_buf->data.data; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 data_conc->len = assembly_buf->data.len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
297 return TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 +---------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 | STATE : code ROUTINE : concSMS_getFromAsBuffer | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 +---------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 PURPOSE : This functions gets data from the assembly buffer and |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 resets the seg_count. The assembly buffer is still in use |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 and the assembly is not completed. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 LOCAL UBYTE concSMS_getFromAsBuffer(T_SM_DATA_EXT *data_conc, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 USHORT ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 CHAR *address) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 T_SM_ASSEMBLY *assembly_buf; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
318 TRACE_FUNCTION ("concSMS_getFromAsBuffer()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 /* search for the element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 assembly_buf = concSMS_getAsBuffer( ref_num, address ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 /* assemlby buffer not found */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 if (assembly_buf EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 assembly_buf->seg_count = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 data_conc->data = assembly_buf->data.data; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 data_conc->len = assembly_buf->data.len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 return TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 | STATE : code ROUTINE : concSMS_getSegBuffer | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 PURPOSE : This functions searchs the segment buffer for ref_num |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
344 and address. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
345 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
346 LOCAL T_SEG_BUF* concSMS_getSegBuffer( USHORT ref_num, CHAR *address ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
347 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 TRACE_FUNCTION ("concSMS_getSegBuffer()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 /* search for the element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 for (i=0; i<MAX_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 if ((segBuf_list[i].ref_num EQ ref_num) AND |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 (segBuf_list[i].in_use)) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 if ((address NEQ NULL) /* AND (address[0] NEQ '\0') */) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 if (!strcmp(segBuf_list[i].address, address)) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 return &segBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
367 return &segBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 return NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 | STATE : code ROUTINE : concSMS_addToSegBuffer | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
382 PURPOSE : This functions adds one segment to the buffer and returns |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 FALSE if no segment buffer is available or the current |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 seg buffer is full. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
387 LOCAL UBYTE concSMS_addToSegBuffer ( USHORT ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
388 CHAR *address, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
389 UBYTE seq_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
390 UBYTE rec_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
391 T_ACI_SMS_STAT status, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
392 T_SM_DATA_EXT *data ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
393 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
394 T_SEG_BUF *segBuf = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 T_SEG_BUF_ELEM *segBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
396 USHORT count; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
397 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 TRACE_FUNCTION ("concSMS_addToSegBuffer()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
400 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
402 /* search for the segment buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 segBuf = concSMS_getSegBuffer( ref_num, address ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
404 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 /* element not found */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
406 if (segBuf EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
407 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 /* search for an unused list entry */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
409 for (i=0; i<MAX_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
411 if (segBuf_list[i].in_use EQ FALSE) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 segBuf = &segBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 break; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 /* no segment buffer available */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 if ( segBuf EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 /* initialise new buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 segBuf->in_use = TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 segBuf->ref_num = ref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 if ( (address) AND (address[0] NEQ '\0') ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426 strcpy(segBuf->address, address); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
427 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 segBuf->address[0] = '\0'; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 segBuf->list = new_list(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
430 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
431 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
432 count = get_list_count(segBuf->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
433 if ( count >= CONC_MAX_SEGS ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 /* clean segment buffer before it overflows */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
436 while (1) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
438 segBufElem = remove_first_element(segBuf->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 if (segBufElem EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 break; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441 ACI_MFREE(segBufElem->data.data); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
442 ACI_MFREE(segBufElem); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 segBuf->in_use = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448 /* create new segment buffer element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 ACI_MALLOC(segBufElem, sizeof(T_SEG_BUF_ELEM)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
450 memset(segBufElem, 0, sizeof(T_SEG_BUF_ELEM)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
451 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452 /* fill new buffer element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 segBufElem->seq_num = seq_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
454 segBufElem->rec_num = rec_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455 segBufElem->status = status; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
457 /* alloc memory and copy user data to segment buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 ACI_MALLOC(segBufElem->data.data, data->len); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
459 segBufElem->data.len = data->len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 memcpy(segBufElem->data.data, data->data, data->len); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
462 /* insert element (segment) into the segment buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
463 insert_list(segBuf->list, segBufElem); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
465 return TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
468 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
469 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 | STATE : code ROUTINE : concSMS_removeFromSegBuffer| |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475 PURPOSE : This function finds and removes the segment with |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
476 'seq_num' from the segment buffer. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
477 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
478 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 LOCAL T_SEG_BUF_ELEM* concSMS_removeFromSegBuffer ( USHORT ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
480 CHAR* address, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 UBYTE seq_num ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
482 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
483 T_SEG_BUF *segBuf = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
484 T_SEG_BUF_ELEM *segBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 USHORT count; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 TRACE_FUNCTION ("concSMS_removeFromSegBuffer()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
489 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
491 /* search for the segment buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 segBuf = concSMS_getSegBuffer( ref_num, address ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
494 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
495 /* segment buffer not found */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 if (segBuf EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
497 return NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
498 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 segBufElem = remove_element(segBuf->list, seq_num, concSMS_findSeqNumSB); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
500 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 if (segBufElem EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
503 return NULL; /* didn't find the segment buffer element for this seq_num */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 count = get_list_count(segBuf->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
507 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
508 if (count EQ 0) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
510 ACI_MFREE (segBuf->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
511 segBuf->list = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
512 segBuf->in_use = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
513 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
514 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 return segBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
519 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
520 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
521 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
522 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
523 | STATE : code ROUTINE : concSMS_getConcBuffer | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
524 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
525 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
526 PURPOSE : This functions searchs the concatenations buffer for |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
527 ref_num and address. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 LOCAL T_CONC_BUF* concSMS_getConcBuffer( USHORT ref_num, CHAR *address ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 TRACE_FUNCTION ("concSMS_getConcBuffer()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 /* search for the element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
536 for (i=0; i<MAX_CONC_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
537 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
538 if ((concBuf_list[i].ref_num EQ ref_num) AND |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
539 (concBuf_list[i].in_use)) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
540 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
541 if ((address NEQ NULL) /* AND (address[0] NEQ '\0') */) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
542 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
543 if (!strcmp(concBuf_list[i].address, address)) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
544 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
545 return &concBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
546 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
547 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
548 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
549 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
550 return &concBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
551 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
552 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
553 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
555 return NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 | STATE : code ROUTINE : concSMS_addToConcatList | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
564 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 PURPOSE : |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
566 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
567 LOCAL BOOL concSMS_addToConcatList ( USHORT ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
568 CHAR *address, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
569 UBYTE max_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
570 UBYTE seq_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
571 UBYTE rec_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
572 T_ACI_SMS_STAT status ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
573 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
574 T_CONC_BUF *concBuf; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
575 T_CONC_BUF_ELEM *concBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
576 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
577 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
578 TRACE_FUNCTION ("concSMS_addToConcatList()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
579 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
580 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
581 /* search for concatenation buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
582 concBuf = concSMS_getConcBuffer( ref_num, address ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
583 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
584 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
585 /* element not found */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
586 if (concBuf EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
587 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
588 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
589 /* search for an unused list entry */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
590 for (i=0; i<MAX_CONC_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
591 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
592 if (concBuf_list[i].in_use EQ FALSE) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
593 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
594 concBuf = &concBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
595 break; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
596 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
597 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
598 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
599 /* buffer is full */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
600 if ( concBuf EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
601 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
602 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
603 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
604 concBuf->in_use = TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
605 concBuf->ref_num = ref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
606 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
607 if ( (address) AND (address[0] NEQ '\0') ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
608 strcpy(concBuf->address, address); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
609 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
610 concBuf->address[0] = '\0'; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
611 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
612 concBuf->max_num = max_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
613 concBuf->list = new_list(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
614 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
615 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
616 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
617 /* don't add elements with same seq_num to the Concatenation Buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
618 concBufElem = find_element(concBuf->list,seq_num,concSMS_findSeqNumElemCB); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
619 if (concBufElem) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
620 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
621 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
622 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
623 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
624 /* create new conc. buffer element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
625 ACI_MALLOC(concBufElem, sizeof(T_CONC_BUF_ELEM)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
626 concBufElem->seq_num = seq_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
627 concBufElem->rec_num = rec_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
628 concBufElem->status = status; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
629 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
630 /* insert element into the conc. buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
631 insert_list(concBuf->list, concBufElem); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
632 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
633 concSMS_printConcatList(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
634 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
635 return TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
636 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
637 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
638 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
639 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
640 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
641 +---------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
642 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
643 | STATE : code ROUTINE : concSMS_removeFromConcatList| |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
644 +---------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
645 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
646 PURPOSE : This function removes and FREES the memory for the element. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
647 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
648 LOCAL T_ACI_LIST *concSMS_removeFromConcatList ( USHORT ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
649 CHAR *address, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
650 UBYTE rec_num ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
651 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
652 T_CONC_BUF *concBuf = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
653 T_CONC_BUF_ELEM *concBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
654 USHORT count; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
655 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
656 TRACE_FUNCTION ("concSMS_removeFromConcatList()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
657 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
658 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
659 /* search for concatenation buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
660 concBuf = concSMS_getConcBuffer( ref_num, address ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
661 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
662 /* concatenation buffer not found */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
663 if (concBuf EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
664 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
665 TRACE_EVENT_P1("conc_buf NULL: rec: %d", rec_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
666 return NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
667 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
668 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
669 concBufElem = remove_element(concBuf->list, rec_num, concSMS_findRecNumElemCB); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
670 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
671 if (concBufElem EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
672 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
673 TRACE_EVENT_P1("concBufElem NULL: rec: %d", rec_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
674 return NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
675 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
676 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
677 /* free memory for this element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
678 ACI_MFREE(concBufElem); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
679 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
680 count = get_list_count(concBuf->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
681 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
682 if (count EQ 0) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
683 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
684 ACI_MFREE (concBuf->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
685 concBuf->list = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
686 concBuf->in_use = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
687 return NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
688 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
689 return concBuf->list; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
690 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
691 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
692 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
693 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
694 +---------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
695 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
696 | STATE : code ROUTINE : concSMS_sortConcatList | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
697 +---------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
698 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
699 PURPOSE : This function sorts the concat. buffer acc. to its seq_num. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
700 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
701 LOCAL void concSMS_sortConcatList ( USHORT ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
702 CHAR *address ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
703 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
704 T_CONC_BUF *concBuf = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
705 T_CONC_BUF_ELEM *concBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
706 UBYTE seq_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
707 UBYTE rec_num = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
708 T_ACI_LIST *oldlist, *newlist, *current; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
709 USHORT count; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
710 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
711 TRACE_FUNCTION ("concSMS_sortConcatList()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
712 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
713 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
714 /* search for concatenation buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
715 concBuf = concSMS_getConcBuffer( ref_num, address ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
716 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
717 /* concatenation buffer not found */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
718 if (concBuf EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
719 return; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
720 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
721 newlist = new_list(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
722 oldlist = concBuf->list; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
723 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
724 count = get_list_count(oldlist); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
725 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
726 while (count) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
727 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
728 seq_num = 255; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
729 current = oldlist; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
730 while (current) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
731 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
732 concBufElem = (T_CONC_BUF_ELEM*)current->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
733 if ( concBufElem->seq_num < seq_num ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
734 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
735 seq_num = concBufElem->seq_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
736 rec_num = concBufElem->rec_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
737 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
738 current = current->next; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
739 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
740 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
741 concBufElem = remove_element(oldlist, rec_num, concSMS_findRecNumElemCB); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
742 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
743 insert_list(newlist, concBufElem); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
744 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
745 count = get_list_count(oldlist); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
746 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
747 if (concBuf->list) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
748 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
749 ACI_MFREE (concBuf->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
750 concBuf->list = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
751 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
752 concBuf->list = newlist; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
753 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
754 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
755 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
756 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
757 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
758 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
759 | STATE : code ROUTINE : concSMS_split | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
760 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
761 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
762 PURPOSE : return TRUE if splitting was done, otherwise FALSE |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
763 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
764 LOCAL UBYTE concSMS_split ( T_ACI_SM_DATA* tar_data, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
765 T_SM_DATA_EXT* src_data, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
766 UBYTE alphabet, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
767 T_EXT_CMS_CMD_ID id) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
768 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
769 static UBYTE sref_num = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
770 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
771 /* Temp variable for the value returned by concSMS_findMaxRefNum() */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
772 UBYTE t_num = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
773 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
774 TRACE_FUNCTION ("concSMS_split ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
775 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
776 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
777 if (alphabet EQ 0x00) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
778 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
779 /* 7-bit data coding scheme */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
780 if (src_data->len <= concShrdPrm.l_uncomp7bit_data) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
781 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
782 tar_data->len = (UBYTE)src_data->len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
783 memcpy ( tar_data->data, src_data->data, tar_data->len ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
784 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
785 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
786 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
787 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
788 tar_data->len = concShrdPrm.l_uncomp7bit_data_conc; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
789 concShrdPrm.max_sms_len = concShrdPrm.l_uncomp7bit_data_conc; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
790 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
791 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
792 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
793 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
794 /* 8-bit data coding scheme */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
795 if (src_data->len <= concShrdPrm.l_uncomp8bit_data) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
796 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
797 tar_data->len = (UBYTE)src_data->len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
798 memcpy ( tar_data->data, src_data->data, tar_data->len ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
799 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
800 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
801 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
802 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
803 tar_data->len = concShrdPrm.l_uncomp8bit_data_conc; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
804 concShrdPrm.max_sms_len = concShrdPrm.l_uncomp8bit_data_conc; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
805 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
806 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
807 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
808 /* copy first segment to 'tar_data' */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
809 memcpy ( tar_data->data, src_data->data, tar_data->len ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
810 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
811 concShrdPrm.udh.ref_num = (UBYTE)concSMS_findMaxRefNum(); /* Marcus: Issue 872: 03/10/2002 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
812 t_num = concShrdPrm.udh.ref_num++; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
813 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
814 concShrdPrm.udh.max_num = (src_data->len+(concShrdPrm.max_sms_len-1)) / concShrdPrm.max_sms_len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
815 concShrdPrm.udh.seq_num = 1; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
816 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
817 if (id EQ CMGS_CONC) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
818 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
819 /* sref_num assigned the value depending on the value returned by |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
820 concSMS_findMaxRefNum() and the value already stored in the sref_num |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
821 so that for every sent conc SMS reference number value will be different */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
822 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
823 sref_num=((sref_num+1 > t_num)? (sref_num) : t_num)+1; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
824 concShrdPrm.udh.ref_num = sref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
825 concShrdPrm.specPrm.concCMGS.data.len = src_data->len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
826 concShrdPrm.specPrm.concCMGS.data.data = src_data->data; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
827 concShrdPrm.specPrm.concCMGS.offset = tar_data->len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
828 return TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
829 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
830 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
831 if (id EQ CMGW_CONC) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
832 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
833 concShrdPrm.specPrm.concCMGW.data.len = src_data->len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
834 concShrdPrm.specPrm.concCMGW.data.data = src_data->data; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
835 concShrdPrm.specPrm.concCMGW.offset = tar_data->len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
836 return TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
837 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
838 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
839 return FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
840 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
841 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
842 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
843 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
844 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
845 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
846 | STATE : code ROUTINE : concSMS_fillUDH | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
847 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
848 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
849 PURPOSE : |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
850 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
851 LOCAL void concSMS_fillUDH ( T_ACI_UDH_DATA* udh, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
852 UBYTE ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
853 UBYTE max_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
854 UBYTE seq_num ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
855 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
856 /* fill user data header structure for 8-bit ref number */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
857 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
858 udh->len = 0x05; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
859 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
860 /* Information Element Identifier */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
861 udh->data[0] = SMS_IEI_CONC_8BIT; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
862 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
863 /* Information Element Identifier Length */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
864 udh->data[1] = 0x03; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
865 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
866 /* Information Element Data */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
867 udh->data[2] = (UBYTE)(ref_num & 0x00FF); /* since we use only 8-Bit ref number */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
868 udh->data[3] = max_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
869 udh->data[4] = seq_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
870 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
871 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
872 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
873 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
874 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
875 /********************** Init Functions *********************************/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
876 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
877 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
878 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
879 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
880 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
881 | STATE : code ROUTINE : concSMS_retrieveConcBuf | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
882 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
883 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
884 PURPOSE : This function searches for the concatenation buffer |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
885 which has 'index' in its first element. Returns |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
886 'CONC_ERROR' if index is not the first element or list is |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
887 incomplete. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
888 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
889 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
890 LOCAL T_CONC_INIT_RETURN concSMS_retrieveConcBuf ( T_CONC_BUF **concBuf, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
891 UBYTE index ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
892 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
893 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
894 T_CONC_BUF_ELEM *concBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
895 USHORT count; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
896 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
897 TRACE_FUNCTION ("concSMS_retrieveConcBuf ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
898 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
899 *concBuf = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
900 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
901 for (i=0; i<MAX_CONC_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
902 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
903 concSMS_printConcatList(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
904 /* find conc. buffer element for this rec number */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
905 concBufElem = find_element(concBuf_list[i].list, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
906 index, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
907 concSMS_findRecNumElemCB); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
908 /* element found */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
909 if (concBufElem NEQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
910 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
911 break; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
912 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
913 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
914 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
915 if (concBufElem EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
916 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
917 /* no concatenation handler needed */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
918 return CONC_NOT_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
919 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
920 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
921 *concBuf = &concBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
922 count = get_list_count((*concBuf)->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
923 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
924 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
925 /* check if rec number is the first segment (with seq_num == 1) */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
926 if ( ( concBufElem->seq_num EQ 1 ) AND |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
927 ( smsShrdPrm.status EQ CMGD_DEL_INDEX ) ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
928 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
929 *concBuf = &concBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
930 count = get_list_count((*concBuf)->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
931 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
932 /* check if concat. list is complete */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
933 if (count EQ (*concBuf)->max_num) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
934 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
935 return CONC_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
936 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
937 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
938 else if( smsShrdPrm.status > CMGD_DEL_INDEX ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
939 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
940 /* The below check needs to be changed for deleting all |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
941 the concatmessages in case of DELET FLAG > 0. */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
942 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
943 *concBuf = &concBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
944 count = get_list_count((*concBuf)->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
945 return CONC_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
946 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
947 /* rec number is not the first element in conc. buffer |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
948 * allow reading of incomplete segments and tread them like "normal" SMS |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
949 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
950 return CONC_NOT_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
951 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
952 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
953 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
954 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
955 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
956 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
957 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
958 | STATE : code ROUTINE : concSMS_initSendFromMem | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
959 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
960 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
961 PURPOSE : This function initialises shared parameter for CMSS. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
962 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
963 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
964 GLOBAL T_CONC_INIT_RETURN concSMS_initSendFromMem ( T_ACI_CMD_SRC srcId, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
965 UBYTE *index, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
966 CHAR *da, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
967 T_ACI_TOA *toda ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
968 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
969 T_CONC_BUF *concBuf = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
970 T_CONC_BUF_ELEM* elem = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
971 T_CONC_INIT_RETURN ret = CONC_ERROR; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
972 T_CONC_CMSS *prm = &concShrdPrm.specPrm.concCMSS; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
973 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
974 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
975 TRACE_FUNCTION ("concSMS_initSendFromMem ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
976 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
977 ret = concSMS_retrieveConcBuf ( &concBuf, *index ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
978 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
979 if (ret EQ CONC_ERROR) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
980 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
981 /* Error: segment is not the first segment of the SM */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
982 return CONC_ERROR; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
983 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
984 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
985 if (ret EQ CONC_NOT_NEEDED) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
986 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
987 /* no conatenation handler needed */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
988 return CONC_NOT_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
989 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
990 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
991 concShrdPrm.sentSegs = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
992 concShrdPrm.srcId = srcId; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
993 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
994 if (da) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
995 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
996 memcpy(prm->da, da, strlen(da)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
997 prm->da[strlen(da)] = '\0'; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
998 prm->p_da = prm->da; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
999 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1000 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1001 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1002 prm->p_da = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1003 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1004 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1005 if (toda) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1006 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1007 memcpy(&prm->toda, toda, sizeof(T_ACI_TOA)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1008 prm->p_toda = &prm->toda; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1009 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1010 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1011 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1012 prm->p_toda = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1013 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1014 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1015 /* save the first concatenated buffer element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1016 prm->currConcBufListElem = concBuf->list; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1017 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1018 prm->skipStoSent = TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1019 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1020 /* skip segments with status SMS_STAT_StoSent */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1021 while (prm->currConcBufListElem) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1022 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1023 elem = (T_CONC_BUF_ELEM*)prm->currConcBufListElem->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1024 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1025 if (elem->status EQ SMS_STAT_StoSent) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1026 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1027 prm->currConcBufListElem = prm->currConcBufListElem->next; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1028 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1029 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1030 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1031 break; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1032 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1033 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1034 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1035 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1036 * All elements were set to SMS_STAT_StoSent. Assume that this message was |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1037 * sent completly and should be sent for the second time. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1038 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1039 if (prm->currConcBufListElem EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1040 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1041 prm->skipStoSent = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1042 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1043 /* save the first concatenated buffer element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1044 prm->currConcBufListElem = concBuf->list; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1045 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1046 elem = (T_CONC_BUF_ELEM*)prm->currConcBufListElem->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1047 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1048 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1049 *index = elem ? elem->rec_num : NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1050 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1051 if (elem NEQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1052 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1053 elem->status = SMS_STAT_StoSent; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1054 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1055 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1056 return CONC_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1057 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1058 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1059 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1060 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1061 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1062 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1063 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1064 | STATE : code ROUTINE : concSMS_initReadFromMem | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1065 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1066 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1067 PURPOSE : This function initialises shared parameter for CMGR. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1068 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1069 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1070 GLOBAL T_CONC_INIT_RETURN concSMS_initReadFromMem ( T_ACI_CMD_SRC srcId, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1071 UBYTE index, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1072 T_ACI_SMS_READ rdMode ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1073 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1074 T_CONC_BUF *concBuf; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1075 T_CONC_INIT_RETURN ret; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1076 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1077 TRACE_FUNCTION ("concSMS_initReadFromMem ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1078 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1079 ret = concSMS_retrieveConcBuf ( &concBuf, index ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1080 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1081 if (ret EQ CONC_ERROR) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1082 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1083 /* Error: segment is not the first segment of the SM */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1084 return CONC_ERROR; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1085 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1086 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1087 if (ret EQ CONC_NOT_NEEDED) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1088 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1089 /* no conatenation handler needed */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1090 return CONC_NOT_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1091 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1092 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1093 concShrdPrm.srcId = srcId; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1094 concShrdPrm.specPrm.concCMGR.rdMode = rdMode; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1095 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1096 /* save the second concatenated buffer element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1097 concShrdPrm.specPrm.concCMGR.currConcBufListElem = concBuf->list->next; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1098 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1099 return CONC_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1100 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1101 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1102 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1103 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1104 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1105 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1106 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1107 | STATE : code ROUTINE : concSMS_initDeleteFromMem | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1108 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1109 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1110 PURPOSE : This function initialises shared parameter for CMGD. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1111 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1112 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1113 GLOBAL T_CONC_INIT_RETURN concSMS_initDeleteFromMem ( T_ACI_CMD_SRC srcId, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1114 UBYTE index ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1115 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1116 T_CONC_BUF *concBuf; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1117 T_CONC_INIT_RETURN ret; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1118 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1119 TRACE_FUNCTION ("concSMS_initDeleteFromMem ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1120 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1121 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1122 ret = concSMS_retrieveConcBuf ( &concBuf, index ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1123 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1124 if (ret EQ CONC_ERROR) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1125 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1126 /* Error: segment is not the first segment of the SM */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1127 return CONC_ERROR; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1128 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1129 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1130 if (ret EQ CONC_NOT_NEEDED) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1131 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1132 if (concBuf NEQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1133 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1134 RefNum_Del = concBuf->ref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1135 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1136 /*else if (*/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1137 else if (dFLAG EQ TRUE) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1138 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1139 TRACE_EVENT("BUFFER FULL"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1140 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1141 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1142 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1143 RefNum_Del = 0xFF; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1144 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1145 /* no conatenation handler needed */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1146 return CONC_NOT_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1147 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1148 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1149 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1150 /* save the concatenation list */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1151 concShrdPrm.specPrm.concCMGD.currConcBufListElem = concBuf->list; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1152 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1153 concShrdPrm.specPrm.concCMGD.ref_num = concBuf->ref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1154 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1155 concShrdPrm.specPrm.concCMGD.address = concBuf->address; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1156 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1157 concShrdPrm.srcId = srcId; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1158 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1159 concShrdPrm.specPrm.concCMGD.error_count = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1160 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1161 return CONC_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1162 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1163 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1164 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1165 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1166 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1167 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1168 | STATE : code ROUTINE : concSMS_initSend | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1169 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1170 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1171 PURPOSE : This function initialises shared parameter for CMGS. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1172 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1173 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1174 GLOBAL T_CONC_INIT_RETURN concSMS_initSend ( |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1175 T_ACI_SM_DATA* tar_data, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1176 T_ACI_UDH_DATA* udh, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1177 T_ACI_CMD_SRC srcId, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1178 CHAR* da, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1179 T_ACI_TOA* toda, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1180 T_SM_DATA_EXT* src_data, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1181 CHAR* sca, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1182 T_ACI_TOA* tosca, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1183 SHORT isReply, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1184 UBYTE alphabet ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1185 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1186 UBYTE ret; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1187 T_CONC_CMGS *prm = &concShrdPrm.specPrm.concCMGS; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1188 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1189 TRACE_FUNCTION ("concSMS_initSend ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1190 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1191 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1192 ret = concSMS_split ( tar_data, src_data, alphabet, CMGS_CONC ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1193 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1194 if ( ret EQ FALSE ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1195 return CONC_NOT_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1196 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1197 concShrdPrm.srcId = srcId; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1198 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1199 if (da) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1200 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1201 memcpy(prm->da, da, strlen(da)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1202 prm->da[strlen(da)] = '\0'; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1203 prm->p_da = prm->da; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1204 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1205 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1206 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1207 prm->p_da = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1208 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1209 if (toda) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1210 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1211 memcpy(&prm->toda, toda, sizeof(T_ACI_TOA)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1212 prm->p_toda = &prm->toda; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1213 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1214 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1215 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1216 prm->p_toda = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1217 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1218 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1219 prm->data.len = src_data->len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1220 prm->data.data = src_data->data; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1221 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1222 if (sca) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1223 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1224 memcpy(prm->sca, sca, strlen(sca)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1225 prm->sca[strlen(sca)] = '\0'; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1226 prm->p_sca = prm->sca; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1227 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1228 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1229 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1230 prm->p_sca = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1231 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1232 if (tosca) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1233 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1234 memcpy(&prm->tosca, tosca, sizeof(T_ACI_TOA)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1235 prm->p_tosca = &prm->tosca; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1236 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1237 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1238 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1239 prm->p_tosca = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1240 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1241 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1242 prm->isReply = isReply; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1243 prm->sent_bytes = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1244 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1245 concShrdPrm.sentSegs = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1246 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1247 /* fill user data header structure */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1248 concSMS_fillUDH ( udh, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1249 concShrdPrm.udh.ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1250 concShrdPrm.udh.max_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1251 concShrdPrm.udh.seq_num ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1252 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1253 return CONC_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1254 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1255 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1256 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1257 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1258 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1259 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1260 | STATE : code ROUTINE : concSMS_initStoreInMem | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1261 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1262 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1263 PURPOSE : This function initialises shared parameter for CMGW. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1264 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1265 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1266 GLOBAL T_CONC_INIT_RETURN concSMS_initStoreInMem ( T_ACI_SM_DATA* tar_data, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1267 T_ACI_UDH_DATA* udh, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1268 T_ACI_CMD_SRC srcId, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1269 SHORT index, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1270 CHAR* address, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1271 T_ACI_TOA* toa, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1272 T_ACI_SMS_STAT stat, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1273 UBYTE msg_ref, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1274 T_SM_DATA_EXT* src_data, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1275 CHAR* sca, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1276 T_ACI_TOA* tosca, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1277 SHORT isReply, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1278 UBYTE alphabet ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1279 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1280 T_CONC_INIT_RETURN ret; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1281 T_CONC_CMGW *prm = &concShrdPrm.specPrm.concCMGW; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1282 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1283 TRACE_FUNCTION ("concSMS_initStoreInMem ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1284 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1285 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1286 ret = concSMS_split ( tar_data, src_data, alphabet, CMGW_CONC ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1287 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1288 if ( ret EQ FALSE ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1289 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1290 return CONC_NOT_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1291 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1292 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1293 concShrdPrm.srcId = srcId; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1294 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1295 if (address) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1296 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1297 memcpy(prm->da, address, strlen(address)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1298 prm->da[strlen(address)] = '\0'; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1299 prm->p_da = prm->da; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1300 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1301 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1302 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1303 prm->p_da = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1304 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1305 if (toa) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1306 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1307 memcpy(&prm->toda, toa, sizeof(T_ACI_TOA)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1308 prm->p_toda = &prm->toda; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1309 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1310 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1311 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1312 prm->p_toda = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1313 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1314 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1315 if ( stat NEQ SMS_STAT_NotPresent) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1316 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1317 prm->stat = stat; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1318 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1319 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1320 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1321 prm->stat = SMS_STAT_StoUnsent; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1322 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1323 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1324 prm->msg_ref = msg_ref; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1325 prm->data.len = src_data->len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1326 prm->data.data = src_data->data; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1327 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1328 if (sca) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1329 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1330 memcpy(prm->sca, sca, strlen(sca)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1331 prm->sca[strlen(sca)] = '\0'; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1332 prm->p_sca = prm->sca; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1333 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1334 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1335 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1336 prm->p_sca = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1337 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1338 if (tosca) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1339 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1340 memcpy(&prm->tosca, tosca, sizeof(T_ACI_TOA)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1341 prm->p_tosca = &prm->tosca; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1342 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1343 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1344 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1345 prm->p_tosca = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1346 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1347 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1348 prm->isReply = isReply; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1349 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1350 /* fill user data header structure */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1351 concSMS_fillUDH ( udh, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1352 concShrdPrm.udh.ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1353 concShrdPrm.udh.max_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1354 concShrdPrm.udh.seq_num ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1355 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1356 return CONC_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1357 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1358 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1359 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1360 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1361 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1362 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1363 | STATE : code ROUTINE : concSMS_initCommand | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1364 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1365 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1366 PURPOSE : This function initialises shared parameter for CMGC. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1367 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1368 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1369 GLOBAL T_CONC_INIT_RETURN concSMS_initCommand ( T_ACI_CMD_SRC srcId, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1370 SHORT fo, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1371 SHORT ct, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1372 SHORT pid, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1373 SHORT mn, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1374 CHAR* da, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1375 T_ACI_TOA* toda, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1376 T_ACI_CMD_DATA* data ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1377 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1378 T_CONC_CMGC *prm = &concShrdPrm.specPrm.concCMGC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1379 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1380 TRACE_FUNCTION ("concSMS_initCommand ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1381 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1382 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1383 if ( ct NEQ COMMAND_TYPE_DELETE) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1384 return CONC_NOT_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1385 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1386 if ((mn < concShrdPrm.first_mr) OR |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1387 (mn > concShrdPrm.first_mr + concShrdPrm.sentSegs-1)) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1388 return CONC_NOT_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1389 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1390 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1391 if ( mn NEQ concShrdPrm.first_mr) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1392 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1393 /* Error: segment is not the first segment of the SM */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1394 return CONC_ERROR; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1395 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1396 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1397 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1398 concShrdPrm.srcId = srcId; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1399 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1400 prm->command_count = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1401 prm->fo = (UBYTE)fo; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1402 prm->ct = (UBYTE)ct; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1403 prm->pid = (UBYTE)pid; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1404 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1405 if (da) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1406 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1407 memcpy(prm->da, da, strlen(da)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1408 prm->da[strlen(da)] = '\0'; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1409 prm->p_da = prm->da; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1410 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1411 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1412 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1413 prm->p_da = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1414 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1415 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1416 if (toda) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1417 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1418 memcpy(&prm->toda, toda, sizeof(T_ACI_TOA)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1419 prm->p_toda = &prm->toda; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1420 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1421 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1422 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1423 prm->p_toda = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1424 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1425 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1426 ACI_MALLOC(prm->data.data, MAX_SM_CMD_LEN); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1427 memcpy ( prm->data.data, data->data, data->len ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1428 prm->data.len = data->len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1429 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1430 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1431 return CONC_NEEDED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1432 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1433 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1434 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1435 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1436 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1437 /********************** RAT Callback Fucntions ****************************/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1438 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1439 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1440 GLOBAL void rConcSMS_PlusCMSS (UBYTE mr, UBYTE numSeg) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1441 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1442 UBYTE index; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1443 T_CONC_BUF_ELEM* elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1444 T_CONC_CMSS *prm = &concShrdPrm.specPrm.concCMSS; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1445 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1446 TRACE_FUNCTION ("rConcSMS_PlusCMSS()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1447 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1448 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1449 /* save the first message reference */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1450 if (concShrdPrm.sentSegs EQ 0) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1451 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1452 concShrdPrm.first_mr = mr; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1453 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1454 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1455 /* increment number of successfully sent elements */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1456 concShrdPrm.sentSegs++; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1457 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1458 /* get next concat. list element */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1459 prm->currConcBufListElem = prm->currConcBufListElem->next; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1460 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1461 if (prm->skipStoSent) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1462 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1463 /* skip segments with status SMS_STAT_StoSent */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1464 while (prm->currConcBufListElem) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1465 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1466 elem = (T_CONC_BUF_ELEM*)prm->currConcBufListElem->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1467 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1468 if (elem->status EQ SMS_STAT_StoSent) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1469 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1470 prm->currConcBufListElem = prm->currConcBufListElem->next; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1471 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1472 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1473 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1474 break; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1475 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1476 } /* while */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1477 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1478 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1479 if (prm->currConcBufListElem NEQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1480 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1481 elem = (T_CONC_BUF_ELEM*)prm->currConcBufListElem->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1482 index = elem->rec_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1483 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1484 sAT_PlusCMSS_Gl(concShrdPrm.srcId, index, prm->p_da, prm->p_toda, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1485 rConcSMS_PlusCMSS, rConcSMS_PlusCMS_CMSS); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1486 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1487 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1488 elem->status = SMS_STAT_StoSent; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1489 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1490 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1491 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1492 else /* if (concShrdPrm.currConcBufListElem NEQ NULL) */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1493 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1494 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1495 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1496 char *sa; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1497 ACI_MALLOC(sa,KEY + BYTE_LTH); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1498 sprintf(sa,"+CMSS: %d,%d",concShrdPrm.first_mr, concShrdPrm.sentSegs); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1499 io_sendMessage(concShrdPrm.srcId, sa, ATI_NORMAL_OUTPUT); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1500 ACI_MFREE(sa); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1501 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1502 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1503 rAT_PlusCMSS(concShrdPrm.first_mr, (UBYTE)(concShrdPrm.sentSegs)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1504 R_AT ( RAT_OK, concShrdPrm.srcId ) ( AT_CMD_CMSS ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1505 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1506 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1507 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1508 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1509 GLOBAL void rConcSMS_PlusCMGS (UBYTE mr, UBYTE numSeg) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1510 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1511 T_ACI_SM_DATA data; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1512 T_ACI_UDH_DATA udh; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1513 USHORT len_left; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1514 T_CONC_CMGS *prm = &concShrdPrm.specPrm.concCMGS; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1515 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1516 TRACE_FUNCTION ("rConcSMS_PlusCMGS()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1517 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1518 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1519 /* save the first message reference */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1520 if (concShrdPrm.udh.seq_num EQ 1) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1521 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1522 concShrdPrm.first_mr = mr; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1523 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1524 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1525 /* increment number of successfully sent elements */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1526 len_left = prm->data.len - prm->offset; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1527 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1528 concShrdPrm.sentSegs++; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1529 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1530 if (len_left NEQ 0) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1531 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1532 prm->sent_bytes += concShrdPrm.max_sms_len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1533 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1534 if ( len_left > concShrdPrm.max_sms_len ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1535 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1536 data.len = concShrdPrm.max_sms_len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1537 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1538 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1539 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1540 data.len = (UBYTE)len_left; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1541 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1542 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1543 memcpy (data.data, prm->data.data+prm->offset, data.len); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1544 prm->offset += data.len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1545 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1546 concShrdPrm.udh.seq_num++; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1547 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1548 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1549 /* fill user data header structure */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1550 concSMS_fillUDH ( &udh, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1551 concShrdPrm.udh.ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1552 concShrdPrm.udh.max_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1553 concShrdPrm.udh.seq_num ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1554 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1555 sAT_PlusCMGS_Gl(concShrdPrm.srcId, prm->p_da, prm->p_toda, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1556 &data, &udh, prm->p_sca, prm->p_tosca, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1557 prm->isReply, rConcSMS_PlusCMGS, rConcSMS_PlusCMS_CMGS); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1558 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1559 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1560 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1561 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1562 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1563 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1564 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1565 char *sa; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1566 ACI_MALLOC(sa,KEY + BYTE_LTH); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1567 sprintf(sa,"+CMGS: %d,%d",concShrdPrm.first_mr, concShrdPrm.udh.seq_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1568 io_sendMessage(concShrdPrm.srcId, sa, ATI_NORMAL_OUTPUT); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1569 ACI_MFREE(sa); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1570 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1571 ACI_MFREE(prm->data.data); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1572 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1573 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1574 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1575 rAT_PlusCMGS (concShrdPrm.first_mr, (UBYTE)(concShrdPrm.udh.seq_num)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1576 R_AT ( RAT_OK, concShrdPrm.srcId ) ( AT_CMD_CMGS ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1577 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1578 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1579 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1580 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1581 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1582 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1583 GLOBAL void rConcSMS_PlusCMGR ( T_ACI_CMGL_SM* sm, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1584 T_ACI_CMGR_CBM* cbm ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1585 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1586 T_CONC_CMGR *prm = &concShrdPrm.specPrm.concCMGR; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1587 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1588 TRACE_FUNCTION ("rConcSMS_PlusCMGR ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1589 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1590 if (prm->currConcBufListElem NEQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1591 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1592 T_CONC_BUF_ELEM *elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1593 elem = (T_CONC_BUF_ELEM *)prm->currConcBufListElem->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1594 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1595 sAT_PlusCMGR_Gl(concShrdPrm.srcId, elem->rec_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1596 concShrdPrm.specPrm.concCMGR.rdMode, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1597 rConcSMS_PlusCMGR); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1598 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1599 prm->currConcBufListElem = prm->currConcBufListElem->next; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1600 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1601 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1602 rAT_PlusCMGR_Ext (sm, cbm); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1603 #else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1604 rAT_PlusCMGR (sm, cbm); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1605 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1606 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1607 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1608 else /* if (concShrdPrm.currConcBufListElem NEQ NULL) */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1609 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1610 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1611 rAT_PlusCMGR_Ext (sm, cbm); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1612 #else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1613 rAT_PlusCMGR (sm, cbm); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1614 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1615 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1616 R_AT ( RAT_OK, concShrdPrm.srcId ) ( AT_CMD_CMGR ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1617 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1618 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1619 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1620 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1621 GLOBAL void rConcSMS_PercentCMGMDU (void) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1622 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1623 T_CONC_CMGR *prm = &concShrdPrm.specPrm.concCMGR; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1624 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1625 TRACE_FUNCTION ("rConcSMS_PercentCMGMDU ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1626 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1627 if (prm->currConcBufListElem NEQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1628 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1629 T_CONC_BUF_ELEM *elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1630 elem = (T_CONC_BUF_ELEM *)prm->currConcBufListElem->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1631 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1632 sAT_PercentCMGMDU_Gl(concShrdPrm.srcId, elem->rec_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1633 rConcSMS_PercentCMGMDU); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1634 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1635 prm->currConcBufListElem = prm->currConcBufListElem->next; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1636 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1637 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1638 else /* if (concShrdPrm.currConcBufListElem NEQ NULL) */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1639 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1640 if( concShrdPrm.srcId NEQ CMD_SRC_LCL ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1641 R_AT ( RAT_OK, concShrdPrm.srcId ) ( AT_CMD_P_CMGMDU ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1642 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1643 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1644 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1645 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1646 GLOBAL void rConcSMS_PlusCMGW ( UBYTE index, UBYTE numSeg ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1647 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1648 T_ACI_SM_DATA data; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1649 T_ACI_UDH_DATA udh; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1650 USHORT len_left; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1651 T_CONC_CMGW *prm = &concShrdPrm.specPrm.concCMGW; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1652 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1653 static UBYTE first_rec; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1654 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1655 TRACE_FUNCTION ("rConcSMS_PlusCMGW ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1656 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1657 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1658 /* save the first index */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1659 if (concShrdPrm.udh.seq_num EQ 1) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1660 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1661 first_rec = index; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1662 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1663 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1664 concSMS_addToConcatList((USHORT)concShrdPrm.udh.ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1665 NULL, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1666 concShrdPrm.udh.max_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1667 concShrdPrm.udh.seq_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1668 index, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1669 prm->stat); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1670 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1671 concSMS_printConcatList(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1672 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1673 len_left = prm->data.len - prm->offset; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1674 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1675 if (len_left NEQ 0) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1676 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1677 prm->sent_bytes += concShrdPrm.max_sms_len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1678 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1679 if ( len_left > concShrdPrm.max_sms_len ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1680 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1681 data.len = concShrdPrm.max_sms_len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1682 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1683 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1684 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1685 data.len = (UBYTE)len_left; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1686 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1687 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1688 memcpy (data.data, prm->data.data+prm->offset, data.len); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1689 prm->offset += data.len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1690 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1691 concShrdPrm.udh.seq_num++; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1692 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1693 /* fill user data header structure */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1694 concSMS_fillUDH ( &udh, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1695 concShrdPrm.udh.ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1696 concShrdPrm.udh.max_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1697 concShrdPrm.udh.seq_num ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1698 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1699 sAT_PlusCMGW_Gl(concShrdPrm.srcId, CMGW_IDX_FREE_ENTRY, prm->p_da, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1700 prm->p_toda, prm->stat, prm->msg_ref, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1701 &data, &udh, prm->p_sca, prm->p_tosca, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1702 prm->isReply, rConcSMS_PlusCMGW, rConcSMS_PlusCMS_CMGW); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1703 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1704 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1705 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1706 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1707 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1708 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1709 char *sa; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1710 ACI_MALLOC(sa,KEY + BYTE_LTH); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1711 sprintf(sa,"+CMGW: %d,%d",first_rec, concShrdPrm.udh.seq_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1712 io_sendMessage(concShrdPrm.srcId, sa, ATI_NORMAL_OUTPUT); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1713 ACI_MFREE(sa); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1714 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1715 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1716 rAT_PlusCMGW (first_rec, concShrdPrm.udh.seq_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1717 R_AT ( RAT_OK, concShrdPrm.srcId ) ( AT_CMD_CMGW ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1718 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1719 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1720 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1721 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1722 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1723 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1724 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1725 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1726 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1727 GLOBAL void rConcSMS_PlusCMGD ( ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1728 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1729 T_CONC_CMGD *prm = &concShrdPrm.specPrm.concCMGD; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1730 T_CONC_BUF_ELEM *elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1731 T_ACI_LIST *conc_list; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1732 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1733 TRACE_FUNCTION ("rConcSMS_PlusCMGD ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1734 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1735 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1736 elem = (T_CONC_BUF_ELEM *)prm->currConcBufListElem->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1737 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1738 /* remove the old element from concatenation list and free its memory */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1739 conc_list = concSMS_removeFromConcatList(prm->ref_num, prm->address, elem->rec_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1740 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1741 concSMS_printConcatList(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1742 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1743 if (conc_list NEQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1744 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1745 TRACE_EVENT("conc_list not null"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1746 elem = (T_CONC_BUF_ELEM *)conc_list->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1747 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1748 /* save the concatenation list */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1749 prm->currConcBufListElem= conc_list; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1750 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1751 sAT_PlusCMGD_Gl(concShrdPrm.srcId, elem->rec_num, smsShrdPrm.status, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1752 rConcSMS_PlusCMGD, rConcSMS_PlusCMS_CMGD); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1753 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1754 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1755 else /* if (concShrdPrm.currConcBufListElem NEQ NULL) */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1756 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1757 if (concShrdPrm.full.Conc_Full EQ TRUE) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1758 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1759 concSMS_AddtoconcBuff(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1760 concShrdPrm.full.Conc_Full = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1761 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1762 TRACE_EVENT("RAT_OK in rConcSMS_PlusCMGD"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1763 R_AT ( RAT_OK, concShrdPrm.srcId ) ( AT_CMD_CMGD ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1764 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1765 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1766 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1767 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1768 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1769 GLOBAL void rConcSMS_PlusCMGC ( UBYTE mr ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1770 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1771 UBYTE mn; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1772 T_CONC_CMGC *prm = &concShrdPrm.specPrm.concCMGC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1773 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1774 TRACE_FUNCTION ("rConcSMS_PlusCMGC ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1775 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1776 /* save the first message reference */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1777 if (concShrdPrm.udh.seq_num EQ 1) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1778 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1779 concShrdPrm.first_mr = mr; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1780 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1781 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1782 prm->command_count++; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1783 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1784 if (prm->command_count < concShrdPrm.sentSegs) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1785 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1786 mn = concShrdPrm.first_mr + prm->command_count; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1787 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1788 sAT_PlusCMGC_Gl(concShrdPrm.srcId, prm->fo, prm->ct, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1789 prm->pid, mn, prm->p_da, prm->p_toda, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1790 (T_ACI_CMD_DATA*)&prm->data, rConcSMS_PlusCMGC); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1791 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1792 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1793 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1794 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1795 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1796 char *sa; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1797 ACI_MALLOC(sa,KEY + BYTE_LTH); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1798 sprintf(sa,"+CMGC: %d",concShrdPrm.first_mr /*, prm->command_count*/); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1799 io_sendMessage(concShrdPrm.srcId, sa, ATI_NORMAL_OUTPUT); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1800 ACI_MFREE(sa); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1801 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1802 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1803 ACI_MFREE( prm->data.data ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1804 rAT_PlusCMGC (concShrdPrm.first_mr/*, prm->command_count*/); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1805 R_AT ( RAT_OK, concShrdPrm.srcId ) ( AT_CMD_CMGC ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1806 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1807 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1808 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1809 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1810 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1811 GLOBAL void rConcSMS_PlusCMS_CMSS (T_ACI_AT_CMD cmdId, T_ACI_CMS_ERR err, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1812 T_EXT_CMS_ERROR *ce) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1813 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1814 T_EXT_CMS_ERROR conc_error; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1815 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1816 char *sa; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1817 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1818 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1819 TRACE_FUNCTION ("rConcSMS_PlusCMS_CMSS ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1820 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1821 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1822 conc_error.id = CMSS_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1823 conc_error.specErr.errConcCMSS.segs = |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1824 concShrdPrm.udh.max_num - concShrdPrm.sentSegs; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1825 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1826 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1827 ACI_MALLOC(sa,KEY + BYTE_LTH); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1828 sprintf(sa,"+CMS ERROR: %d,%d",err, conc_error.specErr.errConcCMSS.segs); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1829 io_sendMessage(concShrdPrm.srcId, sa, ATI_NORMAL_OUTPUT); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1830 ACI_MFREE(sa); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1831 rCI_PlusCMS ( cmdId, err, NULL ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1832 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1833 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1834 rAT_PlusCMS (cmdId, err, &conc_error); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1835 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1836 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1837 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1838 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1839 GLOBAL void rConcSMS_PlusCMS_CMGS (T_ACI_AT_CMD cmdId, T_ACI_CMS_ERR err, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1840 T_EXT_CMS_ERROR *ce) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1841 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1842 T_EXT_CMS_ERROR conc_error; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1843 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1844 char *sa; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1845 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1846 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1847 TRACE_FUNCTION ("rConcSMS_PlusCMS_CMGS ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1848 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1849 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1850 conc_error.id = CMGS_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1851 conc_error.specErr.errConcCMGS.sent_chars = |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1852 concShrdPrm.specPrm.concCMGS.sent_bytes; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1853 conc_error.specErr.errConcCMGS.ref_num = concShrdPrm.udh.ref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1854 conc_error.specErr.errConcCMGS.next_seg = concShrdPrm.udh.seq_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1855 conc_error.specErr.errConcCMGS.max_num = concShrdPrm.udh.max_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1856 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1857 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1858 ACI_MALLOC(sa,KEY + BYTE_LTH); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1859 sprintf(sa,"+CMS ERROR: %d,%d,%d,%d,%d",err, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1860 conc_error.specErr.errConcCMGS.sent_chars, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1861 conc_error.specErr.errConcCMGS.ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1862 conc_error.specErr.errConcCMGS.next_seg, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1863 conc_error.specErr.errConcCMGS.max_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1864 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1865 io_sendMessage(concShrdPrm.srcId, sa, ATI_NORMAL_OUTPUT); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1866 ACI_MFREE(sa); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1867 rCI_PlusCMS ( cmdId, err, NULL ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1868 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1869 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1870 rAT_PlusCMS (cmdId, err, &conc_error); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1871 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1872 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1873 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1874 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1875 GLOBAL void rConcSMS_PlusCMS_CMGW (T_ACI_AT_CMD cmdId, T_ACI_CMS_ERR err, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1876 T_EXT_CMS_ERROR *ce) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1877 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1878 T_EXT_CMS_ERROR conc_error; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1879 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1880 char *sa; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1881 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1882 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1883 TRACE_FUNCTION ("rConcSMS_PlusCMS_CMGW ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1884 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1885 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1886 conc_error.id = CMGW_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1887 conc_error.specErr.errConcCMGW.sent_chars = |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1888 concShrdPrm.specPrm.concCMGW.sent_bytes; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1889 conc_error.specErr.errConcCMGW.ref_num = concShrdPrm.udh.ref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1890 conc_error.specErr.errConcCMGW.next_seg = concShrdPrm.udh.seq_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1891 conc_error.specErr.errConcCMGW.max_num = concShrdPrm.udh.max_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1892 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1893 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1894 ACI_MALLOC(sa,KEY + BYTE_LTH); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1895 sprintf(sa,"+CMS ERROR: %d,%d,%d,%d,%d",err, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1896 conc_error.specErr.errConcCMGW.sent_chars, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1897 conc_error.specErr.errConcCMGW.ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1898 conc_error.specErr.errConcCMGW.next_seg, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1899 conc_error.specErr.errConcCMGW.max_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1900 io_sendMessage(concShrdPrm.srcId, sa, ATI_NORMAL_OUTPUT); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1901 ACI_MFREE(sa); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1902 rCI_PlusCMS ( cmdId, err, NULL ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1903 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1904 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1905 rAT_PlusCMS (cmdId, err, &conc_error); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1906 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1907 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1908 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1909 GLOBAL void rConcSMS_PlusCMS_CMGD (T_ACI_AT_CMD cmdId, T_ACI_CMS_ERR err, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1910 T_EXT_CMS_ERROR *ce) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1911 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1912 T_CONC_CMGD *prm = &concShrdPrm.specPrm.concCMGD; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1913 T_CONC_BUF_ELEM *elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1914 T_EXT_CMS_ERROR conc_error; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1915 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1916 TRACE_FUNCTION ("rConcSMS_PlusCMS_CMGD ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1917 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1918 conc_error.id = EMPTY; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1919 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1920 prm->error_count++; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1921 if (prm->error_count EQ concShrdPrm.udh.max_num) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1922 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1923 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1924 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1925 char *sa; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1926 ACI_MALLOC(sa,KEY + BYTE_LTH); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1927 sprintf(sa,"+CMS ERROR: %d",err); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1928 io_sendMessage(concShrdPrm.srcId, sa, ATI_NORMAL_OUTPUT); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1929 ACI_MFREE(sa); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1930 rCI_PlusCMS ( cmdId, err, NULL ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1931 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1932 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1933 elem = (T_CONC_BUF_ELEM *)prm->currConcBufListElem->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1934 /* remove the old element from concatenation list and free its memory */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1935 concSMS_removeFromConcatList(prm->ref_num, prm->address, elem->rec_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1936 concSMS_printConcatList(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1937 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1938 rAT_PlusCMS ( cmdId, err, &conc_error); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1939 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1940 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1941 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1942 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1943 /* continue with the next segment */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1944 rConcSMS_PlusCMGD(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1945 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1946 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1947 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1948 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1949 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1950 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1951 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1952 /*************** Functions which must be called by MFW ***************/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1953 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1954 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1955 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1956 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1957 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1958 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1959 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1960 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1961 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1962 | STATE : code ROUTINE : SMS_getSMSType | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1963 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1964 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1965 PURPOSE : This function must be called by the MFW to detect the SMS |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1966 type from the information element identifier. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1967 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1968 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1969 GLOBAL T_SMS_TYPE SMS_getSMSType( T_ACI_UDH_DATA* udh ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1970 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1971 TRACE_FUNCTION ("SMS_getSMSType()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1972 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1973 if (udh->len EQ 0) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1974 return NORMAL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1975 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1976 if (udh->data[0] EQ SMS_IEI_CONC_8BIT) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1977 return CONCATE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1978 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1979 if (udh->data[0] EQ SMS_IEI_CONC_16BIT) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1980 return CONCATE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1981 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1982 return UNKNOWN; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1983 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1984 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1985 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1986 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1987 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1988 | STATE : code ROUTINE : concSMS_GetFirstIndex | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1989 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1990 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1991 PURPOSE : This function provides MFW with the first index of a given |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1992 concatenated SMS (identified by its message reference). |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1993 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1994 returns first index: (0 means no message found...) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1995 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1996 #define FIRST_SEQ_NUM (1) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1997 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1998 GLOBAL UBYTE concSMS_GetFirstIndex ( USHORT msg_ref, char *address ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1999 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2000 T_CONC_BUF *concBuf; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2001 T_CONC_BUF_ELEM *concBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2002 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2003 TRACE_FUNCTION ("concSMS_GetFirstIndex()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2004 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2005 /* search for concatenation buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2006 concBuf = concSMS_getConcBuffer( msg_ref, address ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2007 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2008 if( concBuf EQ NULL ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2009 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2010 TRACE_EVENT_P1("ERROR: unknown msg_ref: 0x%04x", msg_ref); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2011 return( 0 ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2012 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2013 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2014 /* search for the first sequence */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2015 concBufElem = find_element(concBuf->list, FIRST_SEQ_NUM, concSMS_findSeqNumElemCB); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2016 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2017 if( concBufElem EQ NULL ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2018 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2019 TRACE_EVENT("ERROR: first sequence not found"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2020 return( 0 ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2021 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2022 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2023 TRACE_EVENT_P1("first rec_num: %d", concBufElem->rec_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2024 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2025 /* return index of first segment */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2026 return(concBufElem->rec_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2027 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2028 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2029 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2030 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2031 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2032 | STATE : code ROUTINE : concSMS_GetMsgRef | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2033 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2034 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2035 PURPOSE : This function provides MFW with the message reference of a given |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2036 concatenated SMS (decoded from the header). |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2037 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2038 returns msg ref. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2039 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2040 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2041 GLOBAL USHORT concSMS_GetMsgRef ( T_ACI_CMGL_SM *sm ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2042 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2043 USHORT ref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2044 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2045 TRACE_FUNCTION ("concSMS_GetMsgRef()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2046 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2047 if( sm EQ NULL ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2048 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2049 TRACE_ERROR("sm is NULL"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2050 return 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2051 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2052 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2053 /* 8-bit reference number */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2054 if (sm->udh.data[0] EQ SMS_IEI_CONC_8BIT) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2055 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2056 ref_num = sm->udh.data[2]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2057 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2058 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2059 /* 16-bit reference number */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2060 else if (sm->udh.data[0] EQ SMS_IEI_CONC_16BIT) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2061 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2062 /* MSB */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2063 ref_num = (sm->udh.data[2] & 0x00FF) << 8u; /* 23.040 9.1.2.1 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2064 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2065 /* LSB */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2066 ref_num |= sm->udh.data[3]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2067 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2068 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2069 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2070 TRACE_ERROR("sm->udh.data unknown"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2071 return 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2072 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2073 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2074 TRACE_EVENT_P1("ref_num: 0x%04x", ref_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2075 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2076 return(ref_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2077 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2078 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2079 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2080 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2081 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2082 | STATE : code ROUTINE : concSMS_Collect | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2083 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2084 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2085 PURPOSE : This function must be called by the MFW. The function |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2086 reassembles the received SM segments. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2087 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2088 Set 'isStored' to: |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2089 TRUE, if rAT_PlusCMTI() was called |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2090 FALSE, if rAT_PlusCMT() was called |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2091 FALSE, if rAT_PlusCMGR() was called |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2092 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2093 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2094 GLOBAL T_CONC_ASSEMBLY_RETURN concSMS_Collect ( T_SM_DATA_EXT *data_conc, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2095 T_ACI_CMGL_SM *sm, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2096 UBYTE isStored ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2097 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2098 USHORT ref_num = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2099 UBYTE max_num = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2100 UBYTE seq_num = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2101 UBYTE rec_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2102 T_SM_ASSEMBLY *assembly_elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2103 T_SEG_BUF_ELEM *segBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2104 T_SM_DATA_EXT data; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2105 T_ACI_SMS_STAT status; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2106 UBYTE next_exp_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2107 UBYTE ret; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2108 static UBYTE i = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2109 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2110 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2111 CHAR *address; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2112 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2113 TRACE_FUNCTION ("concSMS_Collect()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2114 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2115 /* initialize data_conc->len */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2116 data_conc->len = 0; /* ACI-SPR-16372 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2117 /* extract parameters from user data header */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2118 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2119 /* 8-bit reference number */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2120 if (sm->udh.data[0] EQ SMS_IEI_CONC_8BIT) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2121 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2122 ref_num = sm->udh.data[2]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2123 max_num = sm->udh.data[3]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2124 seq_num = sm->udh.data[4]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2125 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2126 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2127 /* 16-bit reference number */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2128 else if (sm->udh.data[0] EQ SMS_IEI_CONC_16BIT) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2129 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2130 /* MSB */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2131 ref_num = (sm->udh.data[2] & 0x00FF) << 8u; /* 23.040 9.1.2.1 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2132 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2133 /* LSB */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2134 ref_num += sm->udh.data[3]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2135 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2136 max_num = sm->udh.data[4]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2137 seq_num = sm->udh.data[5]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2138 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2139 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2140 rec_num = sm->msg_ref; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2141 status = sm->stat; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2142 address = sm->adress; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2143 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2144 data.data = sm->data.data; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2145 data.len = sm->data.len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2146 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2147 TRACE_EVENT_P1("rec_num:%d", rec_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2148 TRACE_EVENT_P1("concSMS_GetFirstIndex():%d", |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2149 concSMS_GetFirstIndex (ref_num, sm->adress)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2150 TRACE_EVENT_P1("ref_num:0x%04x", ref_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2151 TRACE_EVENT_P1("concSMS_GetMsgRef():0x%04x", concSMS_GetMsgRef ( sm )); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2152 TRACE_EVENT_P1("max_num:%d", max_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2153 TRACE_EVENT_P1("seq_num:%d", seq_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2154 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2155 /* try to get an existing assembly buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2156 assembly_elem = concSMS_getAsBuffer(ref_num, address); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2157 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2158 /* if no assembly buffer found, then assume that is a new conc. SM */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2159 if (assembly_elem EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2160 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2161 next_exp_num = 1; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2162 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2163 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2164 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2165 next_exp_num = assembly_elem->next_exp_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2166 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2167 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2168 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2169 /* the received seq_num is not valid */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2170 if ( (seq_num EQ 0) OR (seq_num > max_num) OR (seq_num < next_exp_num) ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2171 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2172 return CONC_ERR_UNKN; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2173 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2174 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2175 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2176 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2177 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2178 * If CMTI, then add every received segment to concatenation buffer. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2179 * The segments in the concatenation buffer were also stored in non-volatile |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2180 * memory. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2181 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2182 if (isStored) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2183 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2184 ret = concSMS_addToConcatList(ref_num, address, max_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2185 seq_num, rec_num, status); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2186 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2187 if (ret EQ FALSE) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2188 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2189 dFLAG = TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2190 RefNum_Del = ref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2191 concShrdPrm.full.Conc_Full = TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2192 concShrdPrm.full.RefNum = ref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2193 memcpy(Addres,address,sizeof(Addres)); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2194 concShrdPrm.full.MaxNum = max_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2195 concShrdPrm.full.SeqNum[i] = seq_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2196 concShrdPrm.full.RecNum[i] = rec_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2197 i++; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2198 concShrdPrm.full.Numsegs = i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2199 /* error: concatenation buffer full */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2200 return CONC_ERR_BUF_FULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2201 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2202 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2203 i = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2204 if ( seq_num > next_exp_num ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2205 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2206 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2207 * the received segment is not in sequence |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2208 * -> add it to the segment buffer |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2209 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2210 ret = concSMS_addToSegBuffer(ref_num, address, seq_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2211 rec_num, status, &data); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2212 if (ret EQ FALSE) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2213 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2214 /* error: segment buffer full */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2215 return CONC_ERR_BUF_FULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2216 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2217 return CONC_CONTINUED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2218 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2219 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2220 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2221 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2222 * the received segment is in sequence |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2223 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2224 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2225 while (1) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2226 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2227 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2228 /* add segment to assembly buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2229 assembly_elem = concSMS_addToAsBuffer (ref_num, address, max_num, &data); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2230 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2231 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2232 /* free data memory only for data from segment buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2233 if (data.data NEQ sm->data.data) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2234 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2235 ACI_MFREE (data.data); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2236 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2237 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2238 /* error: no assembly buffer available */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2239 if (assembly_elem EQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2240 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2241 return CONC_ERR_BUF_FULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2242 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2243 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2244 /* maximum reached in assembly buffer , assembly is NOT completed */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2245 if (assembly_elem->seg_count EQ CONC_MAX_SEGS) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2246 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2247 concSMS_getFromAsBuffer(data_conc, ref_num, address); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2248 concSMS_sortConcatList(ref_num, address); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2249 return CONC_COMPLETED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2250 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2251 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2252 /* assembly of concatenated SM is completed */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2253 if (assembly_elem->next_exp_num EQ max_num+1) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2254 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2255 concSMS_removeFromAsBuffer(data_conc, ref_num, address); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2256 concSMS_sortConcatList(ref_num, address); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2257 return CONC_COMPLETED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2258 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2259 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2260 /* search and remove the next segment from segment buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2261 segBufElem = concSMS_removeFromSegBuffer(ref_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2262 address, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2263 assembly_elem->next_exp_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2264 if ( segBufElem EQ NULL ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2265 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2266 /* no segment found */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2267 return CONC_CONTINUED; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2268 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2269 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2270 /* for adding to concatenation list */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2271 rec_num = segBufElem->rec_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2272 status = segBufElem->status; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2273 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2274 /* for adding to assembly buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2275 data.data = segBufElem->data.data; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2276 data.len = segBufElem->data.len; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2277 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2278 ACI_MFREE(segBufElem); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2279 } /* while */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2280 } /* if ( seq_num EQ next_exp_num ) */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2281 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2282 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2283 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2284 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2285 GLOBAL void concSMS_Init() |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2286 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2287 concShrdPrm.isConcatenated = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2288 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2289 memset (&concShrdPrm, 0, sizeof(T_CONC_SHRD_PRM) ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2290 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2291 memset (&assembly_list, 0, sizeof(T_SM_ASSEMBLY)*MAX_BUF_ELEMS); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2292 memset (&segBuf_list, 0, sizeof(T_SEG_BUF) *MAX_BUF_ELEMS); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2293 memset (&concBuf_list, 0, sizeof(T_CONC_BUF) *MAX_CONC_BUF_ELEMS); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2294 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2295 concShrdPrm.l_uncomp8bit_data = L_UNCOMP_8BIT_DATA; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2296 concShrdPrm.l_uncomp7bit_data = L_UNCOMP_7BIT_DATA; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2297 concShrdPrm.l_uncomp8bit_data_conc = L_UNCOMP_8BIT_DATA_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2298 concShrdPrm.l_uncomp7bit_data_conc = L_UNCOMP_7BIT_DATA_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2299 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2300 #ifndef _SIMULATION_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2301 concSMS_InitForTesting(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2302 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2303 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2304 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2305 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2306 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2307 /* only for test purposes */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2308 GLOBAL void concSMS_InitForTesting() |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2309 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2310 concShrdPrm.concTesting = TRUE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2311 concShrdPrm.l_uncomp8bit_data = L_UNCOMP_8BIT_DATA_TST; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2312 concShrdPrm.l_uncomp7bit_data = L_UNCOMP_7BIT_DATA_TST; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2313 concShrdPrm.l_uncomp8bit_data_conc = L_UNCOMP_8BIT_DATA_CONC_TST; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2314 concShrdPrm.l_uncomp7bit_data_conc = L_UNCOMP_7BIT_DATA_CONC_TST; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2315 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2316 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2317 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2318 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2319 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2320 | PROJECT : MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2321 | STATE : code ROUTINE : concSMS_delAllIncompleteMsg| |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2322 +--------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2323 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2324 PURPOSE : This function must be called by the MFW to clean all |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2325 segment buffers, assembly buffers and remove all |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2326 incompleted SM from concat. buffer and non-volatile memory. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2327 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2328 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2329 GLOBAL void concSMS_delAllIncompleteMsg( ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2330 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2331 T_SEG_BUF *segBuf = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2332 T_SEG_BUF_ELEM *segBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2333 T_CONC_BUF *concBuf = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2334 T_CONC_BUF_ELEM *concBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2335 T_SM_ASSEMBLY *assembly_elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2336 USHORT count; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2337 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2338 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2339 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2340 TRACE_FUNCTION ("concSMS_delAllIncompleteMsg()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2341 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2342 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2343 concShrdPrm.srcId = CMD_SRC_LCL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2344 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2345 for (i=0; i<MAX_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2346 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2347 /* delete assembly buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2348 if (assembly_list[i].in_use) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2349 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2350 assembly_elem = &assembly_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2351 assembly_elem->in_use = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2352 ACI_MFREE(assembly_elem->data.data); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2353 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2354 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2355 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2356 /* delete segment buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2357 if (segBuf_list[i].in_use) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2358 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2359 segBuf = &segBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2360 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2361 /* remove element from segment buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2362 segBufElem = remove_first_element(segBuf->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2363 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2364 if (segBufElem NEQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2365 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2366 /* free memory */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2367 ACI_MFREE(segBufElem->data.data); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2368 ACI_MFREE(segBufElem); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2369 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2370 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2371 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2372 segBuf->in_use = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2373 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2374 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2375 } /* for */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2376 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2377 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2378 for (i=0; i<MAX_CONC_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2379 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2380 /* find concat. buffer in use */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2381 if (concBuf_list[i].in_use) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2382 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2383 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2384 /* get number of segments in this concat. buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2385 count = get_list_count(concBuf_list[i].list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2386 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2387 /* conc buffer is incomplete */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2388 if (count < concBuf_list[i].max_num) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2389 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2390 if (count EQ 0) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2391 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2392 /* last element of one conc buffer was deleted */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2393 concBuf_list[i].in_use = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2394 R_AT ( RAT_OK, concShrdPrm.srcId ) ( AT_CMD_CMGC ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2395 continue; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2396 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2397 concBuf = &concBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2398 break; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2399 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2400 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2401 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2402 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2403 if (concBuf) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2404 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2405 /* remove element from concat. buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2406 concBufElem = remove_first_element(concBuf->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2407 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2408 if (concBufElem) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2409 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2410 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2411 /* delete segment from non-volatile memory */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2412 sAT_PlusCMGD_Gl(concShrdPrm.srcId, concBufElem->rec_num, smsShrdPrm.status, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2413 concSMS_delAllIncompleteMsg, rConcSMS_PlusCMS_CMGD); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2414 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2415 /* free memory */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2416 ACI_MFREE(concBufElem); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2417 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2418 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2419 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2420 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2421 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2422 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2423 /************** Help Functions ******************************/ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2424 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2425 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2426 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2427 +-------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2428 | PROJECT : GSM-PS (6147) MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2429 | ROUTINE : concSMS_printConcatList | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2430 +-------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2431 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2432 PURPOSE : |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2433 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2434 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2435 LOCAL void concSMS_printConcatList () |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2436 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2437 T_ACI_LIST *current; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2438 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2439 T_CONC_BUF *concBuf; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2440 T_CONC_BUF_ELEM *elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2441 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2442 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2443 TRACE_EVENT("Concatenation List:"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2444 for (i=0; i<MAX_CONC_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2445 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2446 if (concBuf_list[i].in_use EQ TRUE) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2447 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2448 concBuf = &concBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2449 TRACE_EVENT_P2(" ref_num: 0x%04x , max_num: %u", |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2450 concBuf->ref_num, concBuf->max_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2451 current = concBuf->list; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2452 while (current) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2453 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2454 elem = (T_CONC_BUF_ELEM*) current->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2455 TRACE_EVENT_P3(" seq_num: %d , rec_num: %d , status: %d", |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2456 elem->seq_num, elem->rec_num, elem->status); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2457 current = current->next; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2458 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2459 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2460 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2461 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2462 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2463 /* Marcus: Issue 872: 03/10/2002 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2464 +-------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2465 | PROJECT : GSM-PS (6147) MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2466 | ROUTINE : concSMS_findMaxRefNum | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2467 +-------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2468 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2469 PURPOSE : Find the highest value of concBuf_list[i].ref_num |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2470 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2471 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2472 LOCAL USHORT concSMS_findMaxRefNum(void) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2473 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2474 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2475 USHORT ref_num = 0; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2476 TRACE_FUNCTION("concSMS_findMaxRefNum()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2477 for (i=0; i<MAX_CONC_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2478 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2479 if (concBuf_list[i].in_use EQ TRUE) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2480 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2481 if ((concBuf_list[i].ref_num & 0x00ff)> ref_num) /* since we use only 8-Bit ref_num */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2482 ref_num = concBuf_list[i].ref_num & 0x00ff; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2483 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2484 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2485 return ref_num; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2486 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2487 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2488 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2489 GLOBAL void concSMS_clearIncompleteMsg() |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2490 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2491 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2492 T_SEG_BUF *segBuf = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2493 T_SEG_BUF_ELEM *segBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2494 T_SM_ASSEMBLY *assembly_elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2495 T_CONC_BUF *concBuf = NULL; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2496 T_CONC_BUF_ELEM *concBufElem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2497 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2498 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2499 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2500 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2501 TRACE_FUNCTION ("concSMS_clearIncompleteMsg()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2502 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2503 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2504 if (RefNum_Del EQ concShrdPrm.full.RefNum) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2505 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2506 concShrdPrm.full.Conc_Full = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2507 concShrdPrm.full.RefNum = 0xFF; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2508 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2509 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2510 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2511 for (i=0; i<MAX_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2512 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2513 /* delete assembly buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2514 if (assembly_list[i].in_use AND assembly_list[i].ref_num EQ RefNum_Del) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2515 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2516 assembly_elem = &assembly_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2517 assembly_elem->in_use = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2518 ACI_MFREE(assembly_elem->data.data); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2519 break; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2520 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2521 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2522 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2523 /* delete segment buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2524 if (segBuf_list[i].in_use AND segBuf_list[i].ref_num EQ RefNum_Del) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2525 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2526 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2527 segBuf = &segBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2528 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2529 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2530 /*remove element from segment buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2531 segBufElem = remove_first_element(segBuf->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2532 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2533 if (segBufElem NEQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2534 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2535 segBuf->in_use = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2536 /* free memory */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2537 ACI_MFREE(segBufElem->data.data); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2538 ACI_MFREE(segBufElem); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2539 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2540 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2541 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2542 else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2543 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2544 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2545 segBuf->in_use = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2546 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2547 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2548 break; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2549 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2550 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2551 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2552 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2553 for (i=0; i<MAX_CONC_BUF_ELEMS; i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2554 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2555 /* find concat. buffer in use */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2556 if (concBuf_list[i].in_use AND concBuf_list[i].ref_num EQ RefNum_Del) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2557 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2558 concBuf_list[i].in_use = FALSE; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2559 concBuf = &concBuf_list[i]; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2560 break; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2561 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2562 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2563 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2564 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2565 if (concBuf) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2566 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2567 /* remove element from concat. buffer */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2568 concBufElem = remove_first_element(concBuf->list); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2569 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2570 if (concBufElem) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2571 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2572 /* free memory */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2573 ACI_MFREE(concBufElem); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2574 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2575 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2576 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2577 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2578 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2579 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2580 GLOBAL void concSMS_AddtoconcBuff(void) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2581 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2582 UBYTE i; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2583 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2584 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2585 TRACE_FUNCTION("concSMS_AddtoconcBuff()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2586 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2587 for (i=0;i<concShrdPrm.full.Numsegs;i++) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2588 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2589 concSMS_addToConcatList(concShrdPrm.full.RefNum,Addres, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2590 concShrdPrm.full.MaxNum,concShrdPrm.full.SeqNum[i], |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2591 concShrdPrm.full.RecNum[i],1); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2592 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2593 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2594 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2595 /* |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2596 +-------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2597 | PROJECT : GSM-PS (6147) MODULE : CONC_SMS | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2598 | ROUTINE : concSMS_DeleteConcList | |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2599 +-------------------------------------------------------------------+ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2600 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2601 PURPOSE : This function is used to delete the concatinated SMS, when |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2602 the CMGD command contails the delete flag greater than ZERO. |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2603 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2604 */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2605 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2606 GLOBAL void concSMS_DeleteConcList ( ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2607 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2608 T_CONC_CMGD *prm = &concShrdPrm.specPrm.concCMGD; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2609 T_CONC_BUF_ELEM *elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2610 T_ACI_LIST *conc_list; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2611 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2612 TRACE_FUNCTION ("concSMS_DeleteConcList()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2613 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2614 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2615 elem = (T_CONC_BUF_ELEM *)prm->currConcBufListElem->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2616 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2617 /* remove the old element from concatenation list and free its memory */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2618 conc_list = concSMS_removeFromConcatList(prm->ref_num, prm->address, elem->rec_num); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2619 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2620 concSMS_printConcatList(); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2621 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2622 if (conc_list NEQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2623 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2624 TRACE_EVENT("conc_list not null"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2625 elem = (T_CONC_BUF_ELEM *)conc_list->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2626 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2627 /* save the concatenation list */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2628 prm->currConcBufListElem= conc_list; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2629 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2630 else /* if (concShrdPrm.currConcBufListElem NEQ NULL) */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2631 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2632 TRACE_EVENT("Concat List is NULL : concSMS_DeleteConcList"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2633 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2634 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2635 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2636 GLOBAL void rConcSMS_PercentCMGR ( T_ACI_CMGL_SM* sm, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2637 T_ACI_CMGR_CBM* cbm ) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2638 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2639 T_CONC_CMGR *prm = &concShrdPrm.specPrm.concCMGR; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2640 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2641 TRACE_FUNCTION ("rConcSMS_PercentCMGR ()"); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2642 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2643 if (prm->currConcBufListElem NEQ NULL) |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2644 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2645 T_CONC_BUF_ELEM *elem; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2646 elem = (T_CONC_BUF_ELEM *)prm->currConcBufListElem->msg; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2647 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2648 sAT_PercentCMGR_Gl(concShrdPrm.srcId, elem->rec_num, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2649 concShrdPrm.specPrm.concCMGR.rdMode, |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2650 rConcSMS_PercentCMGR); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2651 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2652 prm->currConcBufListElem = prm->currConcBufListElem->next; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2653 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2654 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2655 rAT_PercentCMGR_Ext (sm, cbm); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2656 #else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2657 rAT_PercentCMGR (sm, cbm); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2658 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2659 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2660 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2661 else /* if (concShrdPrm.currConcBufListElem NEQ NULL) */ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2662 { |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2663 #ifdef _CONC_TESTING_ |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2664 rAT_PercentCMGR_Ext (sm, cbm); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2665 #else |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2666 rAT_PercentCMGR (sm, cbm); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2667 #endif |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2668 |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2669 R_AT ( RAT_OK, concShrdPrm.srcId ) ( AT_CMD_P_CMGR ); |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2670 UNSET_CONC; |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2671 } |
93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2672 } |