Harald Welte has submitted this change and it was merged.

Change subject: Fix responses to PURGE MS
......................................................................


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
---
M src/hlr.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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 @@
        /* 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 {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3005e2eeb424715fd77f202e9fe18464ba211b7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder

Reply via email to