Hello Jenkins Builder,

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

    https://gerrit.osmocom.org/2277

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

m3ua: cosmetic clanup.  We can simply return the M3UA errror code

Change-Id: I6ed04a4f78e618938484aeab62dbcfb3f310998d
---
M src/m3ua.c
1 file changed, 6 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/77/2277/4

diff --git a/src/m3ua.c b/src/m3ua.c
index 9a56ff9..7dc2afb 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -496,7 +496,6 @@
 {
        uint32_t rctx = xua_msg_get_u32(xua, M3UA_IEI_ROUTE_CTX);
        struct m3ua_data_hdr *dh;
-       struct xua_msg *err = NULL;
        struct osmo_ss7_as *as;
 
        if (xua->hdr.msg_type != M3UA_XFER_DATA)
@@ -505,15 +504,13 @@
        /* Use routing context IE to look up the AS for which the
         * message was received. */
        as = osmo_ss7_as_find_by_rctx(asp->inst, rctx);
-       if (!as) {
-               err = m3ua_gen_error(M3UA_ERR_INVAL_ROUT_CTX);
-               goto out_err;
-       }
+       if (!as)
+               return M3UA_ERR_INVAL_ROUT_CTX;
+
        /* Verify that this ASP ix part of the AS. */
-       if (!osmo_ss7_as_has_asp(as, asp)) {
-               err = m3ua_gen_error(M3UA_ERR_NO_CONFGD_AS_FOR_ASP);
-               goto out_err;
-       }
+       if (!osmo_ss7_as_has_asp(as, asp))
+               return M3UA_ERR_NO_CONFGD_AS_FOR_ASP;
+
        /* FIXME: check for AS state == ACTIVE */
 
        /* store the MTP-level information in the xua_msg for use by
@@ -527,11 +524,6 @@
        xua_msg_free_tag(xua, M3UA_IEI_ROUTE_CTX);
 
        return m3ua_hmdc_rx_from_l2(asp->inst, xua);
-out_err:
-       if (err)
-               m3ua_tx_xua_asp(asp, err);
-
-       return -1;
 }
 
 static int m3ua_rx_mgmt_err(struct osmo_ss7_asp *asp, struct xua_msg *xua)
@@ -688,7 +680,6 @@
        case M3UA_MSGC_ASPSM:
        case M3UA_MSGC_ASPTM:
                rc = m3ua_rx_asp(asp, xua);
-               break;
                break;
        case M3UA_MSGC_MGMT:
                rc = m3ua_rx_mgmt(asp, xua);

-- 
To view, visit https://gerrit.osmocom.org/2277
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6ed04a4f78e618938484aeab62dbcfb3f310998d
Gerrit-PatchSet: 4
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to