Commit f2936487 authored by gauthier's avatar gauthier

Now should receive attach complete (TODO: GUTI is still hardcoded)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5690 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 2b00d4e4
......@@ -2309,8 +2309,14 @@ static int _emm_attach_accept(emm_data_context_t *emm_ctx, attach_data_t *data)
if (emm_ctx->guti_is_new && emm_ctx->old_guti) {
/* Implicit GUTI reallocation;
* include the new assigned GUTI in the Attach Accept message */
LOG_TRACE(INFO,"EMM-PROC - Implicit GUTI reallocation, include the new assigned GUTI in the Attach Accept message");
emm_sap.u.emm_as.u.establish.UEid.guti = emm_ctx->old_guti;
emm_sap.u.emm_as.u.establish.new_guti = emm_ctx->guti;
} else if (emm_ctx->guti_is_new && emm_ctx->guti) {
/* include the new assigned GUTI in the Attach Accept message */
LOG_TRACE(INFO,"EMM-PROC - Include the new assigned GUTI in the Attach Accept message");
emm_sap.u.emm_as.u.establish.UEid.guti = emm_ctx->guti;
emm_sap.u.emm_as.u.establish.new_guti = emm_ctx->guti;
} else {
emm_sap.u.emm_as.u.establish.UEid.guti = emm_ctx->guti;
emm_sap.u.emm_as.u.establish.new_guti = NULL;
......@@ -2516,13 +2522,12 @@ static int _emm_attach_update(emm_data_context_t *ctx, unsigned int ueid,
ctx->uea = uea;
ctx->uia = uia;
ctx->gea = gea;
LOG_TRACE(WARNING, "EMM-PROC - umts_present %u", umts_present);
LOG_TRACE(WARNING, "EMM-PROC - gprs_present %u", gprs_present);
ctx->umts_present = umts_present;
ctx->gprs_present = gprs_present;
/* The GUTI if provided by the UE */
if (guti) {
LOG_TRACE(INFO, "EMM-PROC - GUTI NOT NULL");
if (ctx->guti == NULL) {
ctx->guti = (GUTI_t *)malloc(sizeof(GUTI_t));
}
......@@ -2537,20 +2542,20 @@ static int _emm_attach_update(emm_data_context_t *ctx, unsigned int ueid,
}
if (ctx->guti != NULL) {
/* TODO: FIXME */
LOG_TRACE(WARNING, "EMM-PROC - Assign hardcoded PLMN 208.92 and tac 0001 to emm_data_context");
LOG_TRACE(WARNING, "EMM-PROC - Assign GUTI hardcoded PLMN 208.92 and tac 15 to emm_data_context");
ctx->guti->gummei.plmn.MCCdigit1 = 2;
ctx->guti->gummei.plmn.MCCdigit2 = 0;
ctx->guti->gummei.plmn.MCCdigit3 = 8;
ctx->guti->gummei.plmn.MNCdigit1 = 9;
ctx->guti->gummei.plmn.MNCdigit2 = 2;
ctx->guti->gummei.plmn.MNCdigit3 = 15;
ctx->tac = 15;
ctx->guti->gummei.MMEcode = 29;
ctx->guti->gummei.MMEgid = 30;
ctx->guti->m_tmsi = (uint32_t) ctx;
LOG_TRACE(WARNING, "EMM-PROC - Set ctx->guti_is_new to emm_data_context");
ctx->guti_is_new = TRUE;
ctx->guti->gummei.MMEcode = 0;
ctx->guti->gummei.MMEgid = 0;
ctx->guti->m_tmsi = (uint32_t) ctx;
ctx->tac = 1;
} else {
LOG_FUNC_RETURN (RETURNerror);
}
......
......@@ -192,6 +192,9 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
*(buffer + encoded) = (encode_u8_eps_attach_result(&attach_accept->epsattachresult) & 0x0f);
encoded++;
#warning "LG TEST override t3412value"
attach_accept->t3412value.unit = GPRS_TIMER_UNIT_360S;
attach_accept->t3412value.timervalue = 10;
if ((encode_result = encode_gprs_timer(&attach_accept->t3412value, 0, buffer
+ encoded, len - encoded)) < 0) { //Return in case of error
LOG_TRACE(WARNING, "Failed encode_gprs_timer");
......
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