Change in osmo-sgsn[master]: osmo-gbproxy: Free msgb in ns2 prim callback

2020-11-09 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/21059 )

Change subject: osmo-gbproxy: Free msgb in ns2 prim callback
..

osmo-gbproxy: Free msgb in ns2 prim callback

Commit cce88282388f in libosmocore changed the msg ownership model - the
callback that the user registers is now responsible for freeing the msg.

Change-Id: Iee940aba7d94afefb5957dbe5f0b04dcf951b31c
Related: SYS#4998
---
M src/gbproxy/gb_proxy.c
M tests/gbproxy/gbproxy_test.c
2 files changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index ccf3f73..fb58284 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -1470,6 +1470,7 @@
msgb_nsei(oph->msg) = nsp->nsei;

rc = gbprox_rcvmsg(cfg, oph->msg);
+   msgb_free(oph->msg);
break;
case PRIM_NS_STATUS:
gprs_ns_prim_status_cb(cfg, nsp);
diff --git a/tests/gbproxy/gbproxy_test.c b/tests/gbproxy/gbproxy_test.c
index 1662980..76fc000 100644
--- a/tests/gbproxy/gbproxy_test.c
+++ b/tests/gbproxy/gbproxy_test.c
@@ -505,7 +505,6 @@
PRIM_OP_INDICATION, msg);

gprs_ns2_callback(&nsp.oph, &gbcfg);
-   talloc_free(msg);
 }
 static int gbprox_test_bssgp_send_cb(void *ctx, struct msgb *msg);

@@ -1037,9 +1036,8 @@
break;
}

-   /* Hand off to gbproxy */
+   /* Hand off to gbproxy which will free the msg */
return gprs_ns2_prim_cb(oph, ctx);
-
 }

 /* Get the next message from the receive FIFO

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Iee940aba7d94afefb5957dbe5f0b04dcf951b31c
Gerrit-Change-Number: 21059
Gerrit-PatchSet: 6
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-sgsn[master]: osmo-gbproxy: Free msgb in ns2 prim callback

2020-11-09 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/21059 )

Change subject: osmo-gbproxy: Free msgb in ns2 prim callback
..


Patch Set 5: Code-Review+2


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Iee940aba7d94afefb5957dbe5f0b04dcf951b31c
Gerrit-Change-Number: 21059
Gerrit-PatchSet: 5
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 09 Nov 2020 10:53:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-sgsn[master]: osmo-gbproxy: Free msgb in ns2 prim callback

2020-11-06 Thread daniel
Hello Jenkins Builder, pespin,

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

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

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

Change subject: osmo-gbproxy: Free msgb in ns2 prim callback
..

osmo-gbproxy: Free msgb in ns2 prim callback

Commit cce88282388f in libosmocore changed the msg ownership model - the
callback that the user registers is now responsible for freeing the msg.

Change-Id: Iee940aba7d94afefb5957dbe5f0b04dcf951b31c
Related: SYS#4998
---
M src/gbproxy/gb_proxy.c
M tests/gbproxy/gbproxy_test.c
2 files changed, 2 insertions(+), 3 deletions(-)


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Iee940aba7d94afefb5957dbe5f0b04dcf951b31c
Gerrit-Change-Number: 21059
Gerrit-PatchSet: 5
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-sgsn[master]: osmo-gbproxy: Free msgb in ns2 prim callback

2020-11-06 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/21059 )

Change subject: osmo-gbproxy: Free msgb in ns2 prim callback
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Iee940aba7d94afefb5957dbe5f0b04dcf951b31c
Gerrit-Change-Number: 21059
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Fri, 06 Nov 2020 12:56:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-sgsn[master]: osmo-gbproxy: Free msgb in ns2 prim callback

2020-11-06 Thread daniel
daniel has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/21059 )


Change subject: osmo-gbproxy: Free msgb in ns2 prim callback
..

osmo-gbproxy: Free msgb in ns2 prim callback

Commit cce88282388f in libosmocore changed the msg ownership model - the
callback that the user registers is now responsible for freeing the msg.

Change-Id: Iee940aba7d94afefb5957dbe5f0b04dcf951b31c
Related: SYS#4998
---
M src/gbproxy/gb_proxy.c
M tests/gbproxy/gbproxy_test.c
2 files changed, 2 insertions(+), 3 deletions(-)



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

diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index ccf3f73..fb58284 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -1470,6 +1470,7 @@
msgb_nsei(oph->msg) = nsp->nsei;

rc = gbprox_rcvmsg(cfg, oph->msg);
+   msgb_free(oph->msg);
break;
case PRIM_NS_STATUS:
gprs_ns_prim_status_cb(cfg, nsp);
diff --git a/tests/gbproxy/gbproxy_test.c b/tests/gbproxy/gbproxy_test.c
index 05bc300..1287e48 100644
--- a/tests/gbproxy/gbproxy_test.c
+++ b/tests/gbproxy/gbproxy_test.c
@@ -505,7 +505,6 @@
PRIM_OP_INDICATION, msg);

gprs_ns2_callback(&nsp.oph, &gbcfg);
-   talloc_free(msg);
 }
 static int gbprox_test_bssgp_send_cb(void *ctx, struct msgb *msg);

@@ -1037,9 +1036,8 @@
break;
}

-   /* Hand off to gbproxy */
+   /* Hand off to gbproxy which will free the msg */
return gprs_ns2_prim_cb(oph, ctx);
-
 }

 /* Get the next message from the receive FIFO

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Iee940aba7d94afefb5957dbe5f0b04dcf951b31c
Gerrit-Change-Number: 21059
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-MessageType: newchange