summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-10-06 03:20:14 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-10-10 02:38:37 +0200
commit518335e688ea79a41cb6ce0b6b65ad829ece6f3f (patch)
tree71e111bee8e75778fc0dac527a597b5be9660d6c /src
parent4bde949b34a8dc53734373e57b5e36955775b81d (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/ctrl.c2
-rw-r--r--src/db.h4
-rw-r--r--src/db_hlr.c4
-rw-r--r--src/luop.c2
4 files changed, 6 insertions, 6 deletions
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 @@ static int handle_cmd_ps(struct hlr *ctx, struct ctrl_cmd *cmd, bool enable)
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 @@ struct hlr_subscriber {
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 @@ bool lu_op_fill_subscr(struct lu_operation *luop, struct db_context *dbc,
{
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;