lynxis lazus has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22271 )

Change subject: test: gprs_ns2: replace free_bind() with clear_pdus()
......................................................................

test: gprs_ns2: replace free_bind() with clear_pdus()

free_bind() should free up all driver specific state but NOT
the bind itself. As the only thing left is clearing the pdus
rename the function to it.

Change-Id: Iac506734c93aca8be045ac13788d07d1bdc78eb3
---
M tests/gb/gprs_ns2_test.c
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/tests/gb/gprs_ns2_test.c b/tests/gb/gprs_ns2_test.c
index 7c28dca..4c47b6a 100644
--- a/tests/gb/gprs_ns2_test.c
+++ b/tests/gb/gprs_ns2_test.c
@@ -44,15 +44,15 @@
        return 0;
 }

-void free_bind(struct gprs_ns2_vc_bind *bind)
+static void clear_pdus(struct gprs_ns2_vc_bind *bind)
 {
-       OSMO_ASSERT(bind);
-       talloc_free(bind);
+       struct osmo_wqueue *queue = bind->priv;
+       osmo_wqueue_clear(queue);
 }

 struct gprs_ns2_vc_driver vc_driver_dummy = {
        .name = "GB UDP dummy",
-       .free_bind = free_bind,
+       .free_bind = clear_pdus,
 };

 static int vc_sendmsg(struct gprs_ns2_vc *nsvc, struct msgb *msg)

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iac506734c93aca8be045ac13788d07d1bdc78eb3
Gerrit-Change-Number: 22271
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus <lyn...@fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillm...@sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lyn...@fe80.eu>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to