pespin has submitted this change. ( 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(-)
Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/src/rlcmac/rlcmac_prim.c b/src/rlcmac/rlcmac_prim.c index 0e9cb45..4bcd925 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; }