FreeCalypso > hg > freecalypso-sw
diff 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 |
line wrap: on
line diff
--- a/gsm-fw/L1/stand/l1_pei.c Fri Aug 29 18:41:55 2014 +0000 +++ b/gsm-fw/L1/stand/l1_pei.c Sat Aug 30 22:52:35 2014 +0000 @@ -35,7 +35,8 @@ #define VSI_CALLER L1_Handle, -static T_HANDLE hCommL1 = VSI_ERROR; +static T_HANDLE hCommL1 = VSI_ERROR; +static T_HANDLE hCommFWD = VSI_ERROR; /*==== PROTOTYPES ============================================================*/ @@ -77,43 +78,23 @@ _osx_open (VSI_CALLER L1_QUEUE, hCommL1); } - if (hCommPL < VSI_OK) + /* + * Redirect all L1-> outbound messages to our special forwarder + * entity; see README for the explanation. + */ + + if (hCommFWD < VSI_OK) { - if ((hCommPL = vsi_c_open (VSI_CALLER PL_NAME)) < VSI_OK) + if ((hCommFWD = vsi_c_open (VSI_CALLER "L1IF")) < VSI_OK) return PEI_ERROR; - _osx_open (VSI_CALLER DL_QUEUE, hCommPL); - _osx_open (VSI_CALLER RR_QUEUE, hCommPL); - } - - if (hCommACI < VSI_OK) - { - if ((hCommACI = vsi_c_open (VSI_CALLER ACI_NAME)) < VSI_OK) - return PEI_ERROR; - _osx_open (VSI_CALLER GPF_ACI_QUEUE, hCommACI); } -#ifdef GPRS - if (hCommGRR < VSI_OK) - { - if ((hCommGRR = vsi_c_open (VSI_CALLER GRR_NAME)) < VSI_OK) - return PEI_ERROR; - _osx_open (VSI_CALLER GRR_QUEUE, hCommGRR); - } - - if (hCommLLC < VSI_OK) - { - if ((hCommLLC = vsi_c_open (VSI_CALLER LLC_NAME)) < VSI_OK) - return PEI_ERROR; - _osx_open (VSI_CALLER LLC_QUEUE, hCommLLC); - } - - if (hCommSNDCP < VSI_OK) - { - if ((hCommSNDCP = vsi_c_open (VSI_CALLER SNDCP_NAME)) < VSI_OK) - return PEI_ERROR; - _osx_open (VSI_CALLER SNDCP_QUEUE, hCommSNDCP); - } -#endif + _osx_open (VSI_CALLER DL_QUEUE, hCommFWD); + _osx_open (VSI_CALLER RR_QUEUE, hCommFWD); + _osx_open (VSI_CALLER GPF_ACI_QUEUE, hCommFWD); + _osx_open (VSI_CALLER GRR_QUEUE, hCommFWD); + _osx_open (VSI_CALLER LLC_QUEUE, hCommFWD); + _osx_open (VSI_CALLER SNDCP_QUEUE, hCommFWD); /* * Register VSI_CALLER as generic caller entity.