Commit 859cb4b8 authored by Swetank Srivastava's avatar Swetank Srivastava

indentation fixed

parent 5d414df1
...@@ -4389,90 +4389,89 @@ uint8_t do_Paging(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size, ...@@ -4389,90 +4389,89 @@ uint8_t do_Paging(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size,
static LTE_PCCH_Message_t pcch_msg; static LTE_PCCH_Message_t pcch_msg;
LTE_PagingRecord_t *paging_record_p; LTE_PagingRecord_t *paging_record_p;
int j; int j;
static uint8_t oneTimeProcessingFlag = 0; static uint8_t oneTimeProcessingFlag = 0;
static uint8_t count = 1; static uint8_t count = 1;
/* This block of code will be one time */ /* This block of code will be one time */
if (oneTimeProcessingFlag == 0) if (oneTimeProcessingFlag == 0)
{ {
pcch_msg.message.present = LTE_PCCH_MessageType_PR_c1; pcch_msg.message.present = LTE_PCCH_MessageType_PR_c1;
pcch_msg.message.choice.c1.present = LTE_PCCH_MessageType__c1_PR_paging; pcch_msg.message.choice.c1.present = LTE_PCCH_MessageType__c1_PR_paging;
pcch_msg.message.choice.c1.choice.paging.pagingRecordList = NULL; pcch_msg.message.choice.c1.choice.paging.pagingRecordList = NULL;
pcch_msg.message.choice.c1.choice.paging.systemInfoModification = NULL; pcch_msg.message.choice.c1.choice.paging.systemInfoModification = NULL;
pcch_msg.message.choice.c1.choice.paging.etws_Indication = NULL; pcch_msg.message.choice.c1.choice.paging.etws_Indication = NULL;
pcch_msg.message.choice.c1.choice.paging.nonCriticalExtension = NULL; pcch_msg.message.choice.c1.choice.paging.nonCriticalExtension = NULL;
asn_set_empty(&pcch_msg.message.choice.c1.choice.paging.pagingRecordList->list); asn_set_empty(&pcch_msg.message.choice.c1.choice.paging.pagingRecordList->list);
pcch_msg.message.choice.c1.choice.paging.pagingRecordList = CALLOC(1,sizeof(*pcch_msg.message.choice.c1.choice.paging.pagingRecordList));
pcch_msg.message.choice.c1.choice.paging.pagingRecordList = CALLOC(1,sizeof(*pcch_msg.message.choice.c1.choice.paging.pagingRecordList)); pcch_msg.message.choice.c1.choice.paging.pagingRecordList->list.count = 0;
pcch_msg.message.choice.c1.choice.paging.pagingRecordList->list.count = 0; oneTimeProcessingFlag = 1;
oneTimeProcessingFlag = 1; }
}
if ((paging_record_p = calloc(1, sizeof(LTE_PagingRecord_t))) == NULL) {
return (-1);
}
if (count <= pagingRecordCount)
{
memset(paging_record_p, 0, sizeof(LTE_PagingRecord_t));
/* convert ue_paging_identity_t to PagingUE_Identity_t */
if (ue_paging_identity.presenceMask == UE_PAGING_IDENTITY_s_tmsi) {
paging_record_p->ue_Identity.present = LTE_PagingUE_Identity_PR_s_TMSI;
MME_CODE_TO_OCTET_STRING(ue_paging_identity.choice.s_tmsi.mme_code,
&paging_record_p->ue_Identity.choice.s_TMSI.mmec);
paging_record_p->ue_Identity.choice.s_TMSI.mmec.bits_unused = 0;
M_TMSI_TO_OCTET_STRING(ue_paging_identity.choice.s_tmsi.m_tmsi,
&paging_record_p->ue_Identity.choice.s_TMSI.m_TMSI);
paging_record_p->ue_Identity.choice.s_TMSI.m_TMSI.bits_unused = 0;
} else if (ue_paging_identity.presenceMask == UE_PAGING_IDENTITY_imsi) {
paging_record_p->ue_Identity.present = LTE_PagingUE_Identity_PR_imsi;
LTE_IMSI_Digit_t imsi_digit[21];
for (j = 0; j< ue_paging_identity.choice.imsi.length; j++) { /* IMSI size */
imsi_digit[j] = (LTE_IMSI_Digit_t)ue_paging_identity.choice.imsi.buffer[j];
ASN_SEQUENCE_ADD(&paging_record_p->ue_Identity.choice.imsi.list, &imsi_digit[j]);
}
}
/* set cn_domain */ if ((paging_record_p = calloc(1, sizeof(LTE_PagingRecord_t))) == NULL) {
if (cn_domain == CN_DOMAIN_PS) { return (-1);
paging_record_p->cn_Domain = LTE_PagingRecord__cn_Domain_ps; }
} else {
paging_record_p->cn_Domain = LTE_PagingRecord__cn_Domain_cs;
}
/* add to list */ if (count <= pagingRecordCount)
ASN_SEQUENCE_ADD(&pcch_msg.message.choice.c1.choice.paging.pagingRecordList->list, paging_record_p); {
LOG_D(RRC, "[eNB %d] do_Paging paging_record: cn_Domain %ld, ue_paging_identity.presenceMask %d, PagingRecordList.count %d\n", memset(paging_record_p, 0, sizeof(LTE_PagingRecord_t));
Mod_id, paging_record_p->cn_Domain, ue_paging_identity.presenceMask, pcch_msg.message.choice.c1.choice.paging.pagingRecordList->list.count);
count++; /* convert ue_paging_identity_t to PagingUE_Identity_t */
} if (ue_paging_identity.presenceMask == UE_PAGING_IDENTITY_s_tmsi) {
if (count == pagingRecordCount) paging_record_p->ue_Identity.present = LTE_PagingUE_Identity_PR_s_TMSI;
{ MME_CODE_TO_OCTET_STRING(ue_paging_identity.choice.s_tmsi.mme_code,
if (systemInfoModification) &paging_record_p->ue_Identity.choice.s_TMSI.mmec);
{ paging_record_p->ue_Identity.choice.s_TMSI.mmec.bits_unused = 0;
LOG_A(RRC, "Handling of paging for systemInfoModification\n"); M_TMSI_TO_OCTET_STRING(ue_paging_identity.choice.s_tmsi.m_tmsi,
pcch_msg.message.choice.c1.choice.paging.systemInfoModification = calloc(1, sizeof(long)); &paging_record_p->ue_Identity.choice.s_TMSI.m_TMSI);
*(pcch_msg.message.choice.c1.choice.paging.systemInfoModification) = LTE_Paging__systemInfoModification_true; paging_record_p->ue_Identity.choice.s_TMSI.m_TMSI.bits_unused = 0;
} } else if (ue_paging_identity.presenceMask == UE_PAGING_IDENTITY_imsi) {
paging_record_p->ue_Identity.present = LTE_PagingUE_Identity_PR_imsi;
LTE_IMSI_Digit_t imsi_digit[21];
for (j = 0; j< ue_paging_identity.choice.imsi.length; j++) { /* IMSI size */
imsi_digit[j] = (LTE_IMSI_Digit_t)ue_paging_identity.choice.imsi.buffer[j];
ASN_SEQUENCE_ADD(&paging_record_p->ue_Identity.choice.imsi.list, &imsi_digit[j]);
}
}
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_PCCH_Message, NULL, (void *)&pcch_msg, /* set cn_domain */
buffer, buffer_size); if (cn_domain == CN_DOMAIN_PS) {
paging_record_p->cn_Domain = LTE_PagingRecord__cn_Domain_ps;
} else {
paging_record_p->cn_Domain = LTE_PagingRecord__cn_Domain_cs;
}
if(enc_rval.encoded == -1) { /* add to list */
LOG_I(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n", ASN_SEQUENCE_ADD(&pcch_msg.message.choice.c1.choice.paging.pagingRecordList->list, paging_record_p);
enc_rval.failed_type->name, enc_rval.encoded); LOG_D(RRC, "[eNB %d] do_Paging paging_record: cn_Domain %ld, ue_paging_identity.presenceMask %d, PagingRecordList.count %d\n",
return -1; Mod_id, paging_record_p->cn_Domain, ue_paging_identity.presenceMask, pcch_msg.message.choice.c1.choice.paging.pagingRecordList->list.count);
count++;
}
if (count == pagingRecordCount)
{
if (systemInfoModification)
{
LOG_A(RRC, "Handling of paging for systemInfoModification\n");
pcch_msg.message.choice.c1.choice.paging.systemInfoModification = calloc(1, sizeof(long));
*(pcch_msg.message.choice.c1.choice.paging.systemInfoModification) = LTE_Paging__systemInfoModification_true;
} }
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_PCCH_Message, NULL, (void *)&pcch_msg,
xer_fprint(stdout, &asn_DEF_LTE_PCCH_Message, (void *)&pcch_msg); buffer, buffer_size);
}
count = 1; if(enc_rval.encoded == -1) {
memset(&pcch_msg, 0, sizeof(LTE_PCCH_Message_t)); LOG_I(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
oneTimeProcessingFlag = 0; enc_rval.failed_type->name, enc_rval.encoded);
return((enc_rval.encoded+7)/8); return -1;
} }
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_LTE_PCCH_Message, (void *)&pcch_msg);
}
count = 1;
memset(&pcch_msg, 0, sizeof(LTE_PCCH_Message_t));
oneTimeProcessingFlag = 0;
return((enc_rval.encoded+7)/8);
}
} }
uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t *pdu_buffer) { uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t *pdu_buffer) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment