aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-01 23:35:35 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-01 23:35:35 +0100
commit3f2a9a2ab1cf3c4059ed8a5f81c969375a1c2627 (patch)
tree86a6befabc33eebf99d230fed1ff678a7345f5d3
parent880a34d2ef63276fdbba34cc4944d66d72467e6a (diff)
Fix responses to PURGE MS
When performing PURGE MS, OsmoHLR before this patch used toreturn an error even in the successful case. The reasone for this is some wrong assumptions about the return values of db_subscr_purge(). Change-Id: Ie3005e2eeb424715fd77f202e9fe18464ba211b7
-rw-r--r--src/hlr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hlr.c b/src/hlr.c
index f3a6864..838b1bc 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -238,9 +238,9 @@ static int rx_purge_ms_req(struct osmo_gsup_conn *conn,
/* Perform the actual update of the DB */
rc = db_subscr_purge(g_hlr->dbc, gsup->imsi, true, is_ps);
- if (rc == 1)
+ if (rc == 0)
gsup_reply.message_type = OSMO_GSUP_MSGT_PURGE_MS_RESULT;
- else if (rc == 0) {
+ else if (rc == -ENOENT) {
gsup_reply.message_type = OSMO_GSUP_MSGT_PURGE_MS_ERROR;
gsup_reply.cause = GMM_CAUSE_IMSI_UNKNOWN;
} else {