Change in ...osmo-iuh[master]: iu_client: introduce a guard around global_iu_event_cb

2019-09-11 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/15471 )

Change subject: iu_client: introduce a guard around global_iu_event_cb
..


Patch Set 1:

1+1 = 2


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

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I49a3402a871d6dccd343cda49f8a7f82bffe150b
Gerrit-Change-Number: 15471
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: neels 
Gerrit-Comment-Date: Wed, 11 Sep 2019 23:28:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-iuh[master]: iu_client: introduce a guard around global_iu_event_cb

2019-09-11 Thread lynxis lazus
lynxis lazus has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/15471 )

Change subject: iu_client: introduce a guard around global_iu_event_cb
..

iu_client: introduce a guard around global_iu_event_cb

As preparation to enable and disable notifications for a specific ue connection,
add a slim proxy before calling global_iu_event_cb

Change-Id: I49a3402a871d6dccd343cda49f8a7f82bffe150b
---
M src/iu_client.c
1 file changed, 14 insertions(+), 4 deletions(-)

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



diff --git a/src/iu_client.c b/src/iu_client.c
index 7a0a78e..ec5290f 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -109,6 +109,16 @@
{ 0, NULL }
 };

+static int global_iu_event(struct ranap_ue_conn_ctx *ue_ctx,
+  enum ranap_iu_event_type type,
+  void *data)
+{
+   if (!global_iu_event_cb)
+   return 0;
+
+   return global_iu_event_cb(ue_ctx, type, data);
+}
+
 static struct ranap_ue_conn_ctx *ue_conn_ctx_alloc(struct ranap_iu_rnc *rnc, 
uint32_t conn_id)
 {
struct ranap_ue_conn_ctx *ctx = talloc_zero(talloc_iu_ctx, struct 
ranap_ue_conn_ctx);
@@ -501,7 +511,7 @@
return rc;
}

-   rc = global_iu_event_cb(ctx, RANAP_IU_EVENT_RAB_ASSIGN, 
&setup_ies);
+   rc = global_iu_event(ctx, RANAP_IU_EVENT_RAB_ASSIGN, 
&setup_ies);

ranap_free_rab_setupormodifieditemies(&setup_ies);
}
@@ -567,11 +577,11 @@
switch (message->procedureCode) {
case RANAP_ProcedureCode_id_SecurityModeControl:
/* Security Mode Complete */
-   rc = global_iu_event_cb(ctx, 
RANAP_IU_EVENT_SECURITY_MODE_COMPLETE, NULL);
+   rc = global_iu_event(ctx, 
RANAP_IU_EVENT_SECURITY_MODE_COMPLETE, NULL);
break;
case RANAP_ProcedureCode_id_Iu_Release:
/* Iu Release Complete */
-   rc = global_iu_event_cb(ctx, RANAP_IU_EVENT_IU_RELEASE, 
NULL);
+   rc = global_iu_event(ctx, RANAP_IU_EVENT_IU_RELEASE, 
NULL);
if (rc) {
LOGPIU(LOGL_ERROR, "Iu Release event: Iu Event 
callback returned %d\n",
   rc);
@@ -818,7 +828,7 @@
if (!ue)
break;

-   global_iu_event_cb(ue, RANAP_IU_EVENT_LINK_INVALIDATED, NULL);
+   global_iu_event(ue, RANAP_IU_EVENT_LINK_INVALIDATED, NULL);
break;
case OSMO_PRIM(OSMO_SCU_PRIM_N_DATA, PRIM_OP_INDICATION):
/* connection-oriented data received */

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

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I49a3402a871d6dccd343cda49f8a7f82bffe150b
Gerrit-Change-Number: 15471
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: neels 
Gerrit-MessageType: merged


Change in ...osmo-iuh[master]: iu_client: introduce a guard around global_iu_event_cb

2019-09-11 Thread lynxis lazus
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/15471 )

Change subject: iu_client: introduce a guard around global_iu_event_cb
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I49a3402a871d6dccd343cda49f8a7f82bffe150b
Gerrit-Change-Number: 15471
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: neels 
Gerrit-Comment-Date: Wed, 11 Sep 2019 23:28:02 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-iuh[master]: iu_client: introduce a guard around global_iu_event_cb

2019-09-11 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/15471 )

Change subject: iu_client: introduce a guard around global_iu_event_cb
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I49a3402a871d6dccd343cda49f8a7f82bffe150b
Gerrit-Change-Number: 15471
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Comment-Date: Wed, 11 Sep 2019 12:24:34 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-iuh[master]: iu_client: introduce a guard around global_iu_event_cb

2019-09-11 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/15471 )

Change subject: iu_client: introduce a guard around global_iu_event_cb
..


Patch Set 1:

In general, I think we would do good in dissolving iu_client from osmo-iuh.git 
and absorbing it to osmo-sgsn, since osmo-msc is no longer using it at all. It 
would probably make things easier in general by removing one layer of API 
abstraction.


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

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I49a3402a871d6dccd343cda49f8a7f82bffe150b
Gerrit-Change-Number: 15471
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: neels 
Gerrit-Comment-Date: Wed, 11 Sep 2019 12:04:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-iuh[master]: iu_client: introduce a guard around global_iu_event_cb

2019-09-10 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/15471 )

Change subject: iu_client: introduce a guard around global_iu_event_cb
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I49a3402a871d6dccd343cda49f8a7f82bffe150b
Gerrit-Change-Number: 15471
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 11 Sep 2019 06:27:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-iuh[master]: iu_client: introduce a guard around global_iu_event_cb

2019-09-10 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/15471


Change subject: iu_client: introduce a guard around global_iu_event_cb
..

iu_client: introduce a guard around global_iu_event_cb

As preparation to enable and disable notifications for a specific ue connection,
add a slim proxy before calling global_iu_event_cb

Change-Id: I49a3402a871d6dccd343cda49f8a7f82bffe150b
---
M src/iu_client.c
1 file changed, 14 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/71/15471/1

diff --git a/src/iu_client.c b/src/iu_client.c
index 7a0a78e..ec5290f 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -109,6 +109,16 @@
{ 0, NULL }
 };

+static int global_iu_event(struct ranap_ue_conn_ctx *ue_ctx,
+  enum ranap_iu_event_type type,
+  void *data)
+{
+   if (!global_iu_event_cb)
+   return 0;
+
+   return global_iu_event_cb(ue_ctx, type, data);
+}
+
 static struct ranap_ue_conn_ctx *ue_conn_ctx_alloc(struct ranap_iu_rnc *rnc, 
uint32_t conn_id)
 {
struct ranap_ue_conn_ctx *ctx = talloc_zero(talloc_iu_ctx, struct 
ranap_ue_conn_ctx);
@@ -501,7 +511,7 @@
return rc;
}

-   rc = global_iu_event_cb(ctx, RANAP_IU_EVENT_RAB_ASSIGN, 
&setup_ies);
+   rc = global_iu_event(ctx, RANAP_IU_EVENT_RAB_ASSIGN, 
&setup_ies);

ranap_free_rab_setupormodifieditemies(&setup_ies);
}
@@ -567,11 +577,11 @@
switch (message->procedureCode) {
case RANAP_ProcedureCode_id_SecurityModeControl:
/* Security Mode Complete */
-   rc = global_iu_event_cb(ctx, 
RANAP_IU_EVENT_SECURITY_MODE_COMPLETE, NULL);
+   rc = global_iu_event(ctx, 
RANAP_IU_EVENT_SECURITY_MODE_COMPLETE, NULL);
break;
case RANAP_ProcedureCode_id_Iu_Release:
/* Iu Release Complete */
-   rc = global_iu_event_cb(ctx, RANAP_IU_EVENT_IU_RELEASE, 
NULL);
+   rc = global_iu_event(ctx, RANAP_IU_EVENT_IU_RELEASE, 
NULL);
if (rc) {
LOGPIU(LOGL_ERROR, "Iu Release event: Iu Event 
callback returned %d\n",
   rc);
@@ -818,7 +828,7 @@
if (!ue)
break;

-   global_iu_event_cb(ue, RANAP_IU_EVENT_LINK_INVALIDATED, NULL);
+   global_iu_event(ue, RANAP_IU_EVENT_LINK_INVALIDATED, NULL);
break;
case OSMO_PRIM(OSMO_SCU_PRIM_N_DATA, PRIM_OP_INDICATION):
/* connection-oriented data received */

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

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I49a3402a871d6dccd343cda49f8a7f82bffe150b
Gerrit-Change-Number: 15471
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange