Commit 4bfe3b47 authored by winckel's avatar winckel

Corrected NAS direction for UE message logging.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4983 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 35c6d683
...@@ -224,6 +224,15 @@ int nas_message_decode(const char* const buffer, nas_message_t* msg, int length) ...@@ -224,6 +224,15 @@ int nas_message_decode(const char* const buffer, nas_message_t* msg, int length)
LOG_FUNC_IN; LOG_FUNC_IN;
int bytes; int bytes;
#if ((defined(EPC_BUILD) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(UE_BUILD) && defined(NAS_UE)))
int down_link;
# if ((defined(EPC_BUILD) && defined(NAS_MME)))
down_link = 0;
# else
down_link = 1;
# endif
#endif
/* Decode the header */ /* Decode the header */
int size = _nas_message_header_decode(buffer, &msg->header, length); int size = _nas_message_header_decode(buffer, &msg->header, length);
...@@ -248,7 +257,7 @@ int nas_message_decode(const char* const buffer, nas_message_t* msg, int length) ...@@ -248,7 +257,7 @@ int nas_message_decode(const char* const buffer, nas_message_t* msg, int length)
&msg->plain, length - size); &msg->plain, length - size);
#if ((defined(EPC_BUILD) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(UE_BUILD) && defined(NAS_UE))) #if ((defined(EPC_BUILD) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(UE_BUILD) && defined(NAS_UE)))
/* Message has been decoded and security header removed, handle it has a plain message */ /* Message has been decoded and security header removed, handle it has a plain message */
nas_itti_plain_msg(buffer, msg, length, 0); nas_itti_plain_msg(buffer, msg, length, down_link);
#endif #endif
} }
else { else {
...@@ -256,7 +265,7 @@ int nas_message_decode(const char* const buffer, nas_message_t* msg, int length) ...@@ -256,7 +265,7 @@ int nas_message_decode(const char* const buffer, nas_message_t* msg, int length)
bytes = _nas_message_plain_decode(buffer, &msg->header, bytes = _nas_message_plain_decode(buffer, &msg->header,
&msg->plain, length); &msg->plain, length);
#if ((defined(EPC_BUILD) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(UE_BUILD) && defined(NAS_UE))) #if ((defined(EPC_BUILD) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(UE_BUILD) && defined(NAS_UE)))
nas_itti_plain_msg(buffer, msg, length, 0); nas_itti_plain_msg(buffer, msg, length, down_link);
#endif #endif
} }
...@@ -291,6 +300,15 @@ int nas_message_encode(char* buffer, const nas_message_t* const msg, int length) ...@@ -291,6 +300,15 @@ int nas_message_encode(char* buffer, const nas_message_t* const msg, int length)
LOG_FUNC_IN; LOG_FUNC_IN;
int bytes; int bytes;
#if ((defined(EPC_BUILD) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(UE_BUILD) && defined(NAS_UE)))
int down_link;
# if ((defined(EPC_BUILD) && defined(NAS_MME)))
down_link = 1;
# else
down_link = 0;
# endif
#endif
/* Encode the header */ /* Encode the header */
int size = _nas_message_header_encode(buffer, &msg->header, length); int size = _nas_message_header_encode(buffer, &msg->header, length);
...@@ -314,7 +332,7 @@ int nas_message_encode(char* buffer, const nas_message_t* const msg, int length) ...@@ -314,7 +332,7 @@ int nas_message_encode(char* buffer, const nas_message_t* const msg, int length)
*(UInt32_t*)(buffer + sizeof(UInt8_t)) = mac; *(UInt32_t*)(buffer + sizeof(UInt8_t)) = mac;
} }
#if ((defined(EPC_BUILD) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(UE_BUILD) && defined(NAS_UE))) #if ((defined(EPC_BUILD) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(UE_BUILD) && defined(NAS_UE)))
nas_itti_protected_msg(buffer, msg, length, 1); nas_itti_protected_msg(buffer, msg, length, down_link);
#endif #endif
} }
else { else {
...@@ -322,7 +340,7 @@ int nas_message_encode(char* buffer, const nas_message_t* const msg, int length) ...@@ -322,7 +340,7 @@ int nas_message_encode(char* buffer, const nas_message_t* const msg, int length)
bytes = _nas_message_plain_encode(buffer, &msg->header, bytes = _nas_message_plain_encode(buffer, &msg->header,
&msg->plain, length); &msg->plain, length);
#if ((defined(EPC_BUILD) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(UE_BUILD) && defined(NAS_UE))) #if ((defined(EPC_BUILD) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(UE_BUILD) && defined(NAS_UE)))
nas_itti_plain_msg(buffer, msg, length, 1); nas_itti_plain_msg(buffer, msg, length, down_link);
#endif #endif
} }
......
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