pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/32357 )


Change subject: ms: Make sure tbf!=NULL in ms_attach_{ul,dl}_tbf()
......................................................................

ms: Make sure tbf!=NULL in ms_attach_{ul,dl}_tbf()

It makes no sense to pass "NULL" to attach function. There's a detach
function to be used if a given TBF has to be detached.

Change-Id: I0c5df195c080b21e5516aebfb46db22bdc55f2a2
---
M src/gprs_ms.c
1 file changed, 17 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/57/32357/1

diff --git a/src/gprs_ms.c b/src/gprs_ms.c
index f65ffb8..357470b 100644
--- a/src/gprs_ms.c
+++ b/src/gprs_ms.c
@@ -362,8 +362,7 @@

        ms->ul_tbf = tbf;

-       if (tbf)
-               ms_release_timer_stop(ms);
+       ms_release_timer_stop(ms);

        ms_unref(ms, __func__);
 }
@@ -382,14 +381,16 @@

        ms->dl_tbf = tbf;

-       if (tbf)
-               ms_release_timer_stop(ms);
+       ms_release_timer_stop(ms);

        ms_unref(ms, __func__);
 }

 void ms_attach_tbf(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf)
 {
+       OSMO_ASSERT(ms);
+       OSMO_ASSERT(tbf);
+
        if (tbf_direction(tbf) == GPRS_RLCMAC_DL_TBF)
                ms_attach_dl_tbf(ms, tbf_as_dl_tbf(tbf));
        else

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I0c5df195c080b21e5516aebfb46db22bdc55f2a2
Gerrit-Change-Number: 32357
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to