osmith has uploaded this change for review. ( https://gerrit.osmocom.org/12815


Change subject: hlr.c: replace deprecated osmo_gsup_get_err_msg_type()
......................................................................

hlr.c: replace deprecated osmo_gsup_get_err_msg_type()

Use OSMO_GSUP_TO_MSGT_ERROR() instead. The other function has been
deprecated in [1].

Remove the < 0 return check, because the macro doesn't do any error
handling. It relies on all "request" messages having an appropriate
"error" message, which is part of the GSUP spec now (see [2]).

[1] change-id I46d9f2327791978710e2f90b4d28a3761d723d8f (libosmocore)
[2] change-id Iec1b4ce4b7d8eb157406f006e1c4241e8fba2cd6 (osmo-gsm-manuals)

Change-Id: I5435ec4c29d6acee814c33499c68d18aaa91d4fb
---
M src/hlr.c
1 file changed, 1 insertion(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/12815/1

diff --git a/src/hlr.c b/src/hlr.c
index 0098a32..7046180 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -379,16 +379,10 @@
 static int gsup_send_err_reply(struct osmo_gsup_conn *conn, const char *imsi,
                                enum osmo_gsup_message_type type_in, uint8_t 
err_cause)
 {
-       int type_err = osmo_gsup_get_err_msg_type(type_in);
+       int type_err = OSMO_GSUP_TO_MSGT_ERROR(type_in);
        struct osmo_gsup_message gsup_reply = {0};
        struct msgb *msg_out;

-       if (type_err < 0) {
-               LOGP(DMAIN, LOGL_ERROR, "unable to determine error response for 
%s\n",
-                       osmo_gsup_message_type_name(type_in));
-               return type_err;
-       }
-
        OSMO_STRLCPY_ARRAY(gsup_reply.imsi, imsi);
        gsup_reply.message_type = type_err;
        gsup_reply.cause = err_cause;

--
To view, visit https://gerrit.osmocom.org/12815
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5435ec4c29d6acee814c33499c68d18aaa91d4fb
Gerrit-Change-Number: 12815
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>

Reply via email to