Change in ...osmo-sgsn[master]: gprs_gmm: only update gb/iu cell information when Iu/Gb present

2019-09-02 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15172 )

Change subject: gprs_gmm: only update gb/iu cell information when Iu/Gb present
..

gprs_gmm: only update gb/iu cell information when Iu/Gb present

This function should not do the transistion of Iu/Gb. Only copy simple data

Change-Id: Id52761f3ea655a2d0cc663a950154c6b7c1b5f7a
---
M src/gprs/gprs_gmm.c
1 file changed, 16 insertions(+), 10 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index e44b3ec..d232156 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -375,17 +375,23 @@
 /* Store BVCI/NSEI in MM context */
 static void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg)
 {
-   mm->gb.bvci = msgb_bvci(msg);
-   mm->gb.nsei = msgb_nsei(msg);
-   /* In case a Iu connection is reconnected we need to update the ue ctx 
*/
-   mm->iu.ue_ctx = MSG_IU_UE_CTX(msg);
-   if (mm->ran_type == MM_CTX_T_UTRAN_Iu
-   && mm->iu.ue_ctx) {
-#ifdef BUILD_IU
-   mm->iu.ue_ctx->rab_assign_addr_enc =
-   sgsn->cfg.iu.rab_assign_addr_enc;
-#endif
+   /* check for Iu or Gb */
+   if (!MSG_IU_UE_CTX(msg)) {
+   mm->gb.bvci = msgb_bvci(msg);
+   mm->gb.nsei = msgb_nsei(msg);
}
+#ifdef BUILD_IU
+   else {
+   /* In case a Iu connection is reconnected we need to update the 
ue ctx */
+   /* FIXME: the old ue_ctx have to be freed/disconnected */
+   mm->iu.ue_ctx = MSG_IU_UE_CTX(msg);
+   if (mm->ran_type == MM_CTX_T_UTRAN_Iu
+   && mm->iu.ue_ctx) {
+   mm->iu.ue_ctx->rab_assign_addr_enc =
+   sgsn->cfg.iu.rab_assign_addr_enc;
+   }
+   }
+#endif
 }

 /* Store BVCI/NSEI in MM context */

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15172
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Id52761f3ea655a2d0cc663a950154c6b7c1b5f7a
Gerrit-Change-Number: 15172
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-sgsn[master]: gprs_gmm: only update gb/iu cell information when Iu/Gb present

2019-09-02 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15172 )

Change subject: gprs_gmm: only update gb/iu cell information when Iu/Gb present
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15172
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Id52761f3ea655a2d0cc663a950154c6b7c1b5f7a
Gerrit-Change-Number: 15172
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 02 Sep 2019 08:58:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: gprs_gmm: only update gb/iu cell information when Iu/Gb present

2019-08-13 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15172 )

Change subject: gprs_gmm: only update gb/iu cell information when Iu/Gb present
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15172
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Id52761f3ea655a2d0cc663a950154c6b7c1b5f7a
Gerrit-Change-Number: 15172
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 13 Aug 2019 20:29:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: gprs_gmm: only update gb/iu cell information when Iu/Gb present

2019-08-13 Thread lynxis lazus
Hello pespin, Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-sgsn/+/15172

to look at the new patch set (#2).

Change subject: gprs_gmm: only update gb/iu cell information when Iu/Gb present
..

gprs_gmm: only update gb/iu cell information when Iu/Gb present

This function should not do the transistion of Iu/Gb. Only copy simple data

Change-Id: Id52761f3ea655a2d0cc663a950154c6b7c1b5f7a
---
M src/gprs/gprs_gmm.c
1 file changed, 16 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/72/15172/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15172
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Id52761f3ea655a2d0cc663a950154c6b7c1b5f7a
Gerrit-Change-Number: 15172
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: gprs_gmm: only update gb/iu cell information when Iu/Gb present

2019-08-13 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15172 )

Change subject: gprs_gmm: only update gb/iu cell information when Iu/Gb present
..


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/#/c/15172/1/src/gprs/gprs_gmm.c
File src/gprs/gprs_gmm.c:

https://gerrit.osmocom.org/#/c/15172/1/src/gprs/gprs_gmm.c@306
PS1, Line 306: #ifdef BUILD_IU
Better move it this way, to avoid a compiler warning on empty else condition:
}
#ifdef BUILD_IU
 else {
...
}
#endif


https://gerrit.osmocom.org/#/c/15172/1/src/gprs/gprs_gmm.c@309
PS1, Line 309:  mm->iu.ue_ctx = msg->dst;
Use MSG_IU_UE_CTX_SET()



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15172
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Id52761f3ea655a2d0cc663a950154c6b7c1b5f7a
Gerrit-Change-Number: 15172
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 13 Aug 2019 15:20:44 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: gprs_gmm: only update gb/iu cell information when Iu/Gb present

2019-08-13 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15172


Change subject: gprs_gmm: only update gb/iu cell information when Iu/Gb present
..

gprs_gmm: only update gb/iu cell information when Iu/Gb present

This function should not do the transistion of Iu/Gb. Only copy simple data

Change-Id: Id52761f3ea655a2d0cc663a950154c6b7c1b5f7a
---
M src/gprs/gprs_gmm.c
1 file changed, 13 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/72/15172/1

diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index c8bc0f7..8d8c877 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -298,15 +298,20 @@
 /* Store BVCI/NSEI in MM context */
 static void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg)
 {
-   mm->gb.bvci = msgb_bvci(msg);
-   mm->gb.nsei = msgb_nsei(msg);
-   /* In case a Iu connection is reconnected we need to update the ue ctx 
*/
-   mm->iu.ue_ctx = MSG_IU_UE_CTX(msg);
-   if (mm->ran_type == MM_CTX_T_UTRAN_Iu
-   && mm->iu.ue_ctx) {
+   /* check for Iu or Gb */
+   if (!MSG_IU_UE_CTX(msg)) {
+   mm->gb.bvci = msgb_bvci(msg);
+   mm->gb.nsei = msgb_nsei(msg);
+   } else {
 #ifdef BUILD_IU
-   mm->iu.ue_ctx->rab_assign_addr_enc =
-   sgsn->cfg.iu.rab_assign_addr_enc;
+   /* In case a Iu connection is reconnected we need to update the 
ue ctx */
+   /* FIXME: the old ue_ctx have to be freed/disconnected */
+   mm->iu.ue_ctx = msg->dst;
+   if (mm->ran_type == MM_CTX_T_UTRAN_Iu
+   && mm->iu.ue_ctx) {
+   mm->iu.ue_ctx->rab_assign_addr_enc =
+   sgsn->cfg.iu.rab_assign_addr_enc;
+   }
 #endif
}
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15172
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Id52761f3ea655a2d0cc663a950154c6b7c1b5f7a
Gerrit-Change-Number: 15172
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange