Hello Jenkins Builder,

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

    https://gerrit.osmocom.org/2262

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

xua: report N-ERROR and N-NOTIFY primitives to layer manager

Change-Id: I5c2060f0397d2bf510b085a5bb07e7ab176f2742
---
M src/m3ua.c
1 file changed, 12 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/62/2262/5

diff --git a/src/m3ua.c b/src/m3ua.c
index 0ec4529..1868388 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -526,10 +526,16 @@
 static int m3ua_rx_mgmt_err(struct osmo_ss7_asp *asp, struct xua_msg *xua)
 {
        uint32_t err_code = xua_msg_get_u32(xua, M3UA_IEI_ERR_CODE);
+       struct osmo_xlm_prim *prim;
 
        LOGPASP(asp, DLM3UA, LOGL_ERROR, "Received MGMT_ERR '%s': %s\n",
                get_value_string(m3ua_err_names, err_code),
                xua_msg_dump(xua, &xua_dialect_m3ua));
+
+       /* report this to layer manager */
+       prim = xua_xlm_prim_alloc(OSMO_XLM_PRIM_M_ERROR, PRIM_OP_INDICATION);
+       prim->u.error.code = err_code;
+       xua_asp_send_xlm_prim(asp, prim);
 
        /* NEVER return != 0 here, as we cannot respont to an ERR
         * message with another ERR! */
@@ -540,6 +546,7 @@
 {
        struct osmo_xlm_prim_notify ntfy;
        const char *type_name, *info_name;
+       struct osmo_xlm_prim *prim;
 
        m3ua_decode_notify(&ntfy, asp, xua);
 
@@ -562,10 +569,14 @@
                type_name, info_name,
                ntfy.info_string ? ntfy.info_string : "");
 
+       /* report this to layer manager */
+       prim = xua_xlm_prim_alloc(OSMO_XLM_PRIM_M_NOTIFY, PRIM_OP_INDICATION);
+       prim->u.notify = ntfy;
+       xua_asp_send_xlm_prim(asp,prim);
+
        if (ntfy.info_string)
                talloc_free(ntfy.info_string);
 
-       /* TODO: should we report this soemwhere? */
        return 0;
 }
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5c2060f0397d2bf510b085a5bb07e7ab176f2742
Gerrit-PatchSet: 5
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