fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/14458


Change subject: libmsc/gsm_09_11.c: send GSUP PROS_SS ERROR message where needed
......................................................................

libmsc/gsm_09_11.c: send GSUP PROS_SS ERROR message where needed

OsmoMSC should notify the remote SS/USSD entity if:

  - received GSUP message has unexpected session state;
  - received GSUP message has unknown session ID;
  - received GSUP message missing mandatory IE(s);
  - NCSS transaction establishment failed;
  - NCSS message delivery failed.

Change-Id: Ief9f8a197b0860072b671edfc55180f619860d9d
Related: (TTCN-3) Ie267ee174c5061cd3fc102a2824abe03d73f3aac
Related: OS#2931
---
M src/libmsc/gsm_09_11.c
1 file changed, 4 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/58/14458/1

diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c
index 3de933c..82a045d 100644
--- a/src/libmsc/gsm_09_11.c
+++ b/src/libmsc/gsm_09_11.c
@@ -475,7 +475,7 @@
                /* Attempt to establish a new transaction */
                trans = establish_nc_ss_trans(net, vsub, gsup_msg);
                if (!trans) {
-                       /* FIXME: send ERROR back to the HLR */
+                       gsup_client_mux_tx_error_reply(gcm, gsup_msg, 
GMM_CAUSE_NET_FAIL);
                        return -EINVAL;
                }

@@ -520,7 +520,7 @@
        default:
                LOG_TRANS(trans, LOGL_ERROR, "Unexpected session state %d\n",
                        gsup_msg->session_state);
-               /* FIXME: send ERROR back to the HLR */
+               gsup_client_mux_tx_error_reply(gcm, gsup_msg, 
GMM_CAUSE_MSGT_INCOMP_P_STATE);
                msgb_free(ss_msg);
                return -EINVAL;
        }
@@ -530,7 +530,7 @@
                if (!gsup_msg->ss_info || gsup_msg->ss_info_len < 2) {
                        LOG_TRANS(trans, LOGL_ERROR, "Missing mandatory 
Facility IE "
                                "for mapped 0x%02x message\n", gh->msg_type);
-                       /* FIXME: send ERROR back to the HLR */
+                       gsup_client_mux_tx_error_reply(gcm, gsup_msg, 
GMM_CAUSE_INV_MAND_INFO);
                        msgb_free(ss_msg);
                        return -EINVAL;
                }
@@ -553,6 +553,7 @@
        msc_a = trans->msc_a;
        if (!msc_a) {
                LOG_TRANS(trans, LOGL_ERROR, "Cannot send SS message, no local 
MSC-A role defined for subscriber\n");
+               gsup_client_mux_tx_error_reply(gcm, gsup_msg, 
GMM_CAUSE_NET_FAIL);
                msgb_free(ss_msg);
                return -EINVAL;
        }

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ief9f8a197b0860072b671edfc55180f619860d9d
Gerrit-Change-Number: 14458
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilira...@gmail.com>
Gerrit-MessageType: newchange

Reply via email to