pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-gprs/+/31754 )


Change subject: rlcmac: gprs_rlcmac_prim_call_down/up_cb(): Avoid propagating 
rc=1
......................................................................

rlcmac: gprs_rlcmac_prim_call_down/up_cb(): Avoid propagating rc=1

rc=1 Only has meaning in call to rlcmac_down_cb().
gprs_rlcmac_prim_call_down_cb() called by internal rlcmac code
guarantess the prim is always freed, and hence returning 1 has not
meaning there.

Same applies for up direction.

Change-Id: Ibd9c44150e8dbec5fbaa98e14aa16703935dac71
---
M src/rlcmac/rlcmac_prim.c
1 file changed, 22 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/54/31754/1

diff --git a/src/rlcmac/rlcmac_prim.c b/src/rlcmac/rlcmac_prim.c
index 7b2cba0..7321fe2 100644
--- a/src/rlcmac/rlcmac_prim.c
+++ b/src/rlcmac/rlcmac_prim.c
@@ -362,6 +362,8 @@
        /* Special return value '1' means: do not free */
        if (rc != 1)
                msgb_free(rlcmac_prim->oph.msg);
+       else
+               rc = 0;
        return rc;
 }

@@ -452,6 +454,8 @@
        /* Special return value '1' means: do not free */
        if (rc != 1)
                msgb_free(rlcmac_prim->oph.msg);
+       else
+               rc = 0;
        return rc;
 }

@@ -559,5 +563,7 @@
        /* Special return value '1' means: do not free */
        if (rc != 1)
                msgb_free(msg);
+       else
+               rc = 0;
        return rc;
 }

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

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: Ibd9c44150e8dbec5fbaa98e14aa16703935dac71
Gerrit-Change-Number: 31754
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to