Commit b0120a6e authored by Lionel Gauthier's avatar Lionel Gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5663 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent b1dd4a3b
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
#include "EsmMessageContainer.h" #include "EsmMessageContainer.h"
#include "nas_log.h" #include "nas_log.h"
#define NAS_DEBUG 1
int decode_esm_message_container(EsmMessageContainer *esmmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len) int decode_esm_message_container(EsmMessageContainer *esmmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len)
{ {
int decoded = 0; int decoded = 0;
......
...@@ -46,6 +46,7 @@ int decode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8 ...@@ -46,6 +46,7 @@ int decode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8
} }
DECODE_U8(buffer + decoded, ielen, decoded); DECODE_U8(buffer + decoded, ielen, decoded);
LOG_TRACE(INFO, "decode_ue_network_capability len = %d",ielen);
CHECK_LENGTH_DECODER(len - decoded, ielen); CHECK_LENGTH_DECODER(len - decoded, ielen);
uenetworkcapability->eea = *(buffer + decoded); uenetworkcapability->eea = *(buffer + decoded);
decoded++; decoded++;
...@@ -62,7 +63,7 @@ int decode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8 ...@@ -62,7 +63,7 @@ int decode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8
uenetworkcapability->uia = *(buffer + decoded) & 0x7f; uenetworkcapability->uia = *(buffer + decoded) & 0x7f;
decoded++; decoded++;
if (ielen >= 4) { if (ielen > 4) {
uenetworkcapability->spare = (*(buffer + decoded) >> 5) & 0x7; uenetworkcapability->spare = (*(buffer + decoded) >> 5) & 0x7;
uenetworkcapability->csfb = (*(buffer + decoded) >> 4) & 0x1; uenetworkcapability->csfb = (*(buffer + decoded) >> 4) & 0x1;
uenetworkcapability->lpp = (*(buffer + decoded) >> 3) & 0x1; uenetworkcapability->lpp = (*(buffer + decoded) >> 3) & 0x1;
...@@ -73,9 +74,11 @@ int decode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8 ...@@ -73,9 +74,11 @@ int decode_ue_network_capability(UeNetworkCapability *uenetworkcapability, uint8
} }
} }
} }
LOG_TRACE(INFO, "uenetworkcapability decoded=%u\n", decoded);
if ((ielen + 2) != decoded) { if ((ielen + 2) != decoded) {
decoded = ielen + 1 + (iei > 0 ? 1 : 0) /* Size of header for this IE */; decoded = ielen + 1 + (iei > 0 ? 1 : 0) /* Size of header for this IE */;
LOG_TRACE(INFO, "uenetworkcapability then decoded=%u\n", decoded);
} }
#if defined (NAS_DEBUG) #if defined (NAS_DEBUG)
......
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