From 11a003db135e56fb40dd503840d57f07d53435c5 Mon Sep 17 00:00:00 2001
From: Lionel Gauthier <lionel.gauthier@eurecom.fr>
Date: Tue, 4 Nov 2014 09:37:31 +0000
Subject: [PATCH] sync ENB source code (debug session on PDCP GTP)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5964 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair2/LAYER2/PDCP_v10.1.0/pdcp.c      | 6 +++---
 openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
index 50e7af86a0..eed515f980 100755
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
@@ -410,7 +410,7 @@ boolean_t pdcp_data_ind(
   uint8_t      pdcp_header_len = 0;
   uint8_t      pdcp_tailer_len = 0;
   pdcp_sn_t    sequence_number = 0;
-  uint8_t      payload_offset  = 0;
+  volatile sdu_size_t   payload_offset  = 0;
   rb_id_t      rb_id           = rb_idP;
   boolean_t    packet_forwarded = FALSE;
 
@@ -688,13 +688,13 @@ boolean_t pdcp_data_ind(
    * PDCP header)
    */
 #if defined(LINK_PDCP_TO_GTPV1U)
-  if (enb_flagP) {
+  if ((TRUE == enb_flagP) && (FALSE == srb_flagP)) {
       LOG_I(PDCP,"Sending to GTPV1U %d bytes\n", sdu_buffer_sizeP - payload_offset);
 
       gtpv1u_new_data_req(
               enb_mod_idP, //gtpv1u_data_t *gtpv1u_data_p,
               ue_mod_idP,//rb_id/maxDRB, TO DO UE ID
-              ((pdcp_data_ind_header_t *) new_sdu_p->data)->rb_id,
+              rb_id + 4,
               &sdu_buffer_pP->data[payload_offset],
               sdu_buffer_sizeP - payload_offset);
       packet_forwarded = TRUE;
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
index 581f29347d..eee7e928dc 100755
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
@@ -124,6 +124,7 @@ int pdcp_fifo_flush_sdus(frame_t frameP, eNB_flag_t enb_flagP, module_id_t enb_m
 
 #if defined(LINK_PDCP_TO_GTPV1U)
       if (enb_flagP) {
+          AssertFatal(0, "Now execution should not go here");
           LOG_I(PDCP,"Sending to GTPV1U %d bytes\n", ((pdcp_data_ind_header_t *)(sdu_p->data))->data_size);
           /*message_p = itti_alloc_new_message(TASK_PDCP_ENB, GTPV1U_TUNNEL_DATA_REQ);
           GTPV1U_TUNNEL_DATA_REQ(message_p).buffer       = &(((uint8_t *) sdu_p->data)[sizeof (pdcp_data_ind_header_t)]);
-- 
GitLab