comparison gsm-fw/g23m-gsm/alr/alr_pch.c @ 682:7ddec309313d

alr_pch.c compiles
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 29 Sep 2014 21:35:16 +0000
parents 2f7df7a314f8
children
comparison
equal deleted inserted replaced
681:461ab5b255f5 682:7ddec309313d
18 +----------------------------------------------------------------------------- 18 +-----------------------------------------------------------------------------
19 */ 19 */
20 20
21 #ifndef ALR_PCH_C 21 #ifndef ALR_PCH_C
22 #define ALR_PCH_C 22 #define ALR_PCH_C
23
24 #include "config.h"
25 #include "fixedconf.h"
26 #include "condat-features.h"
23 27
24 #define ENTITY_PL 28 #define ENTITY_PL
25 29
26 /*==== INCLUDES ===================================================*/ 30 /*==== INCLUDES ===================================================*/
27 #include <string.h> 31 #include <string.h>
349 #endif 353 #endif
350 } 354 }
351 } 355 }
352 356
353 357
354
355
356 /* 358 /*
357 +--------------------------------------------------------------------+ 359 +--------------------------------------------------------------------+
358 | PROJECT : GSM-PS (6103) MODULE : ALR_PCH | 360 | PROJECT : GSM-PS (6103) MODULE : ALR_PCH |
359 | STATE : code ROUTINE : pch_identity_req | 361 | STATE : code ROUTINE : pch_identity_req |
360 +--------------------------------------------------------------------+ 362 +--------------------------------------------------------------------+
826 GET_INSTANCE_DATA; 828 GET_INSTANCE_DATA;
827 UBYTE *frame = data_ind->l2_frame.content; 829 UBYTE *frame = data_ind->l2_frame.content;
828 ULONG tmsi; 830 ULONG tmsi;
829 UBYTE i; 831 UBYTE i;
830 UBYTE channel_needed; 832 UBYTE channel_needed;
831 833
832 /* 834 /*
833 * Check only if IMSI available (len NEQ 0) and 835 * Check only if IMSI available (len NEQ 0) and
834 * ti and pd = 0x06 and 836 * ti and pd = 0x06 and
835 * l2 pseudolength is greater than 5 bytes 837 * l2 pseudolength is greater than 5 bytes
836 */ 838 */
860 /* 862 /*
861 * check mobile identity 2 only if TMSI is available 863 * check mobile identity 2 only if TMSI is available
862 */ 864 */
863 if(pch_tmsi_type(TMSI_TYPE_2, frame, channel_needed)) 865 if(pch_tmsi_type(TMSI_TYPE_2, frame, channel_needed))
864 return; 866 return;
865 #ifdef GPRS 867 #ifdef GPRS
866 if(GET_STATE(STATE_MA) NEQ MA_CON_EST) 868 if(GET_STATE(STATE_MA) NEQ MA_CON_EST)
867 { 869 {
868 tmsi = 0L; 870 tmsi = 0L;
869 for (i=0;i<4;i++) 871 for (i=0;i<4;i++)
870 tmsi += frame[i+8] << (8*(3-i)); 872 tmsi += frame[i+8] << (8*(3-i));