aboutsummaryrefslogtreecommitdiffstats
path: root/src/hlr.c
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-02-04 11:20:08 +0100
committerOliver Smith <osmith@sysmocom.de>2019-02-04 11:22:46 +0100
commitf9cf180ebe8a9de2e011fad188d85d4156524f37 (patch)
tree9ea8aa0e297feee244779c051123afc740caf639 /src/hlr.c
parent02078b7d917fc7c8cd019d5ed357cf3110905e9b (diff)
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
Diffstat (limited to 'src/hlr.c')
-rw-r--r--src/hlr.c8
1 files changed, 1 insertions, 7 deletions
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 rx_purge_ms_req(struct osmo_gsup_conn *conn,
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;