[PATCH] osmo-hlr[master]: Fix responses to PURGE MS

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Mar 1 22:41:19 UTC 2018


Review at  https://gerrit.osmocom.org/7043

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(-)


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

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: newchange
Gerrit-Change-Id: Ie3005e2eeb424715fd77f202e9fe18464ba211b7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list