FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/L1/stand/l1_pei.c @ 616:4d40f9a99445
gsm-fw/L1/stand: plan to use L1IF forwarder entity
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sat, 30 Aug 2014 22:52:35 +0000 |
parents | 4274171eabd2 |
children |
comparison
equal
deleted
inserted
replaced
615:13e55e310eea | 616:4d40f9a99445 |
---|---|
33 | 33 |
34 static T_HANDLE L1_Handle; | 34 static T_HANDLE L1_Handle; |
35 | 35 |
36 #define VSI_CALLER L1_Handle, | 36 #define VSI_CALLER L1_Handle, |
37 | 37 |
38 static T_HANDLE hCommL1 = VSI_ERROR; | 38 static T_HANDLE hCommL1 = VSI_ERROR; |
39 static T_HANDLE hCommFWD = VSI_ERROR; | |
39 | 40 |
40 /*==== PROTOTYPES ============================================================*/ | 41 /*==== PROTOTYPES ============================================================*/ |
41 | 42 |
42 void l1_create_HISR (void); | 43 void l1_create_HISR (void); |
43 void l1a_task(unsigned arcg, void *argv); | 44 void l1a_task(unsigned arcg, void *argv); |
75 if ((hCommL1 = vsi_c_open (VSI_CALLER "L1")) < VSI_OK) | 76 if ((hCommL1 = vsi_c_open (VSI_CALLER "L1")) < VSI_OK) |
76 return PEI_ERROR; | 77 return PEI_ERROR; |
77 _osx_open (VSI_CALLER L1_QUEUE, hCommL1); | 78 _osx_open (VSI_CALLER L1_QUEUE, hCommL1); |
78 } | 79 } |
79 | 80 |
80 if (hCommPL < VSI_OK) | 81 /* |
81 { | 82 * Redirect all L1-> outbound messages to our special forwarder |
82 if ((hCommPL = vsi_c_open (VSI_CALLER PL_NAME)) < VSI_OK) | 83 * entity; see README for the explanation. |
84 */ | |
85 | |
86 if (hCommFWD < VSI_OK) | |
87 { | |
88 if ((hCommFWD = vsi_c_open (VSI_CALLER "L1IF")) < VSI_OK) | |
83 return PEI_ERROR; | 89 return PEI_ERROR; |
84 _osx_open (VSI_CALLER DL_QUEUE, hCommPL); | |
85 _osx_open (VSI_CALLER RR_QUEUE, hCommPL); | |
86 } | 90 } |
87 | 91 |
88 if (hCommACI < VSI_OK) | 92 _osx_open (VSI_CALLER DL_QUEUE, hCommFWD); |
89 { | 93 _osx_open (VSI_CALLER RR_QUEUE, hCommFWD); |
90 if ((hCommACI = vsi_c_open (VSI_CALLER ACI_NAME)) < VSI_OK) | 94 _osx_open (VSI_CALLER GPF_ACI_QUEUE, hCommFWD); |
91 return PEI_ERROR; | 95 _osx_open (VSI_CALLER GRR_QUEUE, hCommFWD); |
92 _osx_open (VSI_CALLER GPF_ACI_QUEUE, hCommACI); | 96 _osx_open (VSI_CALLER LLC_QUEUE, hCommFWD); |
93 } | 97 _osx_open (VSI_CALLER SNDCP_QUEUE, hCommFWD); |
94 | |
95 #ifdef GPRS | |
96 if (hCommGRR < VSI_OK) | |
97 { | |
98 if ((hCommGRR = vsi_c_open (VSI_CALLER GRR_NAME)) < VSI_OK) | |
99 return PEI_ERROR; | |
100 _osx_open (VSI_CALLER GRR_QUEUE, hCommGRR); | |
101 } | |
102 | |
103 if (hCommLLC < VSI_OK) | |
104 { | |
105 if ((hCommLLC = vsi_c_open (VSI_CALLER LLC_NAME)) < VSI_OK) | |
106 return PEI_ERROR; | |
107 _osx_open (VSI_CALLER LLC_QUEUE, hCommLLC); | |
108 } | |
109 | |
110 if (hCommSNDCP < VSI_OK) | |
111 { | |
112 if ((hCommSNDCP = vsi_c_open (VSI_CALLER SNDCP_NAME)) < VSI_OK) | |
113 return PEI_ERROR; | |
114 _osx_open (VSI_CALLER SNDCP_QUEUE, hCommSNDCP); | |
115 } | |
116 #endif | |
117 | 98 |
118 /* | 99 /* |
119 * Register VSI_CALLER as generic caller entity. | 100 * Register VSI_CALLER as generic caller entity. |
120 */ | 101 */ |
121 _osx_open (VSI_CALLER 0, 0); | 102 _osx_open (VSI_CALLER 0, 0); |