[PATCH] osmo-hlr[master]: cosmetic: rename db_subscr_get() to db_subscr_get_by_imsi()

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Oct 10 01:31:57 UTC 2017


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

cosmetic: rename db_subscr_get() to db_subscr_get_by_imsi()

There will be more additions, _by_msisdn() and _by_id(), to serve the upcoming
VTY commands, to allow flexibly selecting subscribers as in the old OsmoNITB.

Change-Id: I32fa676ccc5c10eba834c4390c8a42476b9c1961
---
M src/ctrl.c
M src/db.h
M src/db_hlr.c
M src/luop.c
4 files changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/src/ctrl.c b/src/ctrl.c
index 81de961..b034cd7 100644
--- a/src/ctrl.c
+++ b/src/ctrl.c
@@ -38,7 +38,7 @@
 	struct lu_operation *luop = NULL;
 	struct osmo_gsup_conn *co;
 
-	if (db_subscr_get(ctx->dbc, cmd->value, NULL) < 0) {
+	if (db_subscr_get_by_imsi(ctx->dbc, cmd->value, NULL) < 0) {
 		cmd->reply = "Subscriber Unknown in HLR";
 		return CTRL_CMD_ERROR;
 	}
diff --git a/src/db.h b/src/db.h
index d424b38..0064a4d 100644
--- a/src/db.h
+++ b/src/db.h
@@ -71,8 +71,8 @@
 	bool		ms_purged_ps;
 };
 
-int db_subscr_get(struct db_context *dbc, const char *imsi,
-		  struct hlr_subscriber *subscr);
+int db_subscr_get_by_imsi(struct db_context *dbc, const char *imsi,
+			  struct hlr_subscriber *subscr);
 int db_subscr_ps(struct db_context *dbc, const char *imsi, bool enable);
 int db_subscr_lu(struct db_context *dbc,
 		 const struct hlr_subscriber *subscr,
diff --git a/src/db_hlr.c b/src/db_hlr.c
index 9c74a24..fa962f3 100644
--- a/src/db_hlr.c
+++ b/src/db_hlr.c
@@ -37,8 +37,8 @@
 			x[sizeof(x)-1] = '\0';				\
 		} while (0)
 
-int db_subscr_get(struct db_context *dbc, const char *imsi,
-		  struct hlr_subscriber *subscr)
+int db_subscr_get_by_imsi(struct db_context *dbc, const char *imsi,
+			  struct hlr_subscriber *subscr)
 {
 	sqlite3_stmt *stmt = dbc->stmt[DB_STMT_SEL_BY_IMSI];
 	int rc;
diff --git a/src/luop.c b/src/luop.c
index 937c02c..1b17fe3 100644
--- a/src/luop.c
+++ b/src/luop.c
@@ -95,7 +95,7 @@
 {
 	struct hlr_subscriber *subscr = &luop->subscr;
 
-	if (db_subscr_get(dbc, imsi, subscr) < 0)
+	if (db_subscr_get_by_imsi(dbc, imsi, subscr) < 0)
 		return false;
 
 	return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32fa676ccc5c10eba834c4390c8a42476b9c1961
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list