Commit 7d837239 authored by winckel's avatar winckel

Corrected interpretation of "numberofelements" field in tracking area list (must be used as N+1).

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4909 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent edc18f00
......@@ -124,10 +124,6 @@ int emm_recv_attach_accept(attach_accept_msg *msg, int *emm_cause)
/* Only list of TACs belonging to one PLMN with consecutive
* TAC values is supported */
*emm_cause = EMM_CAUSE_IE_NOT_IMPLEMENTED;
} else if (msg->tailist.numberofelements < 1) {
/* The tracking area identity list shall contain
* at leat one TAI value */
*emm_cause = EMM_CAUSE_INVALID_MANDATORY_INFO;
} else if ( (msg->presencemask & ATTACH_ACCEPT_GUTI_PRESENT) &&
(msg->guti.guti.typeofidentity != EPS_MOBILE_IDENTITY_GUTI) ) {
/* The only supported type of EPS mobile identity is GUTI */
......@@ -151,7 +147,10 @@ int emm_recv_attach_accept(attach_accept_msg *msg, int *emm_cause)
T3423 = gprs_timer_value(&msg->t3423value);
}
/* Get the tracking area list the UE is registered to */
int n_tais = msg->tailist.numberofelements;
/* LW: number of elements is coded as N-1 (0 -> 1 element, 1 -> 2 elements...),
* see 3GPP TS 24.301, section 9.9.3.33.1 */
int n_tais = msg->tailist.numberofelements + 1;
tai_t tai[n_tais];
for (i = 0; i < n_tais; i++) {
tai[i].plmn.MCCdigit1 = msg->tailist.mccdigit1;
......
......@@ -79,7 +79,9 @@ void dump_tracking_area_identity_list_xml(TrackingAreaIdentityList *trackingarea
/* Don't display IEI if = 0 */
printf(" <IEI>0x%X</IEI>\n", iei);
printf(" <Type of list>%u</Type of list>\n", trackingareaidentitylist->typeoflist);
printf(" <Number of elements>%u</Number of elements>\n", trackingareaidentitylist->numberofelements);
/* LW: number of elements is coded as N-1 (0 -> 1 element, 1 -> 2 elements...),
* see 3GPP TS 24.301, section 9.9.3.33.1 */
printf(" <Number of elements>%u</Number of elements>\n", trackingareaidentitylist->numberofelements + 1);
printf(" <MCC digit 2>%u</MCC digit 2>\n", trackingareaidentitylist->mccdigit2);
printf(" <MCC digit 1>%u</MCC digit 1>\n", trackingareaidentitylist->mccdigit1);
printf(" <MNC digit 3>%u</MNC digit 3>\n", trackingareaidentitylist->mncdigit3);
......
......@@ -731,11 +731,12 @@ ssize_t taiList(char* buffer, size_t len, const TrackingAreaIdentityList* tai)
tai->mncdigit3);
}
if (tai->numberofelements > 0) {
index += snprintf(buffer + index, len - index,
", n_tacs = %u, tac = 0x%.4x",
tai->numberofelements, tai->tac);
}
/* LW: number of elements is coded as N-1 (0 -> 1 element, 1 -> 2 elements...),
* see 3GPP TS 24.301, section 9.9.3.33.1 */
tai->numberofelements + 1,
tai->tac);
index += snprintf(buffer + index, len - index, "}");
......
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