This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".
The branch, neels/subscr_vty has been updated
discards 7a5d12ca717865de42f7be1942310956a1534871 (commit)
discards 95101ce2c6330f7e16234906a5d30757e1ff122c (commit)
discards 18db395475a9d21ce14ae3196d4c7c9fc1a554c1 (commit)
discards 796f486dc976cbec82c5fbc09c6ec8c874469bba (commit)
discards 4b9be928c238e88ceaa9c7093fd13f2bd4291a90 (commit)
discards a8d831793a20e139be66660d3e4e3ea5dc734383 (commit)
discards c31b4a341f4eb0f28c0121c240905ea1aac3e23a (commit)
discards d0cbff26481aabd6467241bc305f966a989ed8f6 (commit)
discards 8869f0a63507d468ad243daa17e14baa3dbd4e37 (commit)
discards 2c15e53663d7c2f171914b3a195b5008268aaa81 (commit)
discards d28f4be55c7817d7256b6949f02797c08ffe0d9e (commit)
discards 35c9f7fda8fdb976444ef46cbbb0c438f8ad080e (commit)
discards 8e1237b63f541a27452b0119f549c7992dfe9dc0 (commit)
discards d1060aa554910599e20741bee282b1fcd3cd5037 (commit)
discards 2ad8b4d5b3d8b3473b9e4797ac3de55050e164a6 (commit)
discards 88fc2402c1935e0a159c96923fb2f3c09f33695e (commit)
discards 0df66a4c4a149884f3115d143f9551cd1b6ddf6b (commit)
via 047b45beb63553a4566eb1fe73a25bc2cb5af519 (commit)
via 063a935062f6309aa5286bd0075eb725d343ad14 (commit)
via a8992f2d44f8c9a8e349aabc0771478219709a81 (commit)
via fc0b1d64ce14a4c083c702d5e9e8b4f5ac7dc08e (commit)
via 0451e985905985a8025e49b20821c67874cdd085 (commit)
via 96782fa5f76076a0d8e6d9a8932d5fe7b8d5352d (commit)
via 2366161091f05d025f2eb9e18afa14766b5d9b9a (commit)
via b2584c4831b40a265b63cecdf7bd2f4fca416298 (commit)
via e171b00049ecf60fe45076ef69b0885af82411ff (commit)
via 5e661d05b4f760ebb2c867a578af48f3db998243 (commit)
via a085519047f1e140084a00954cf3b6986b7ebae0 (commit)
via 21c4b1427c17ad567ef98cccc1848193bb09b617 (commit)
via 02ea5241f7fd4d4874eaddeea83f488502854379 (commit)
via 64ef6f7aab3b7a361db7d806d92d11740f03b3ef (commit)
via 1161b21b357a50472510cf9174ccbee5d25058bc (commit)
via b405dd45ded80a572f92cf435894156eeaee2c62 (commit)
via f23fa4b75bbf44005cf85c6007df1bf38cbfc9ea (commit)
via 7c13aa3fbb7e6ac470148ee6f026ac9bede48636 (commit)
via f3e8f36f4066bb3f02db6755686679c311e104ec (commit)
via 715e3f6397db19caa177d523ea7c2731ed3901e3 (commit)
via cd65ee37252c491d9c578085a2c3d7b1c9907da5 (commit)
via 6c1950e1f37b290f504a288c22eb2c5256cbacdf (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (7a5d12ca717865de42f7be1942310956a1534871)
\
N -- N -- N (047b45beb63553a4566eb1fe73a25bc2cb5af519)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cgit.osmocom.org/osmo-hlr/commit/?id=047b45beb63553a4566eb1fe73a25bc…
commit 047b45beb63553a4566eb1fe73a25bc2cb5af519
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Fri Oct 6 02:59:54 2017 +0200
implement subscriber vty, tests
Depends: libosmocore I1e94f5b0717b947d2a7a7d36bacdf04a75cb3522
Change-Id: I42b3b70a0439a8f2e4964d7cc31e593c1f0d7537
http://cgit.osmocom.org/osmo-hlr/commit/?id=063a935062f6309aa5286bd0075eb72…
commit 063a935062f6309aa5286bd0075eb725d343ad14
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Wed Oct 11 01:20:55 2017 +0200
gitignore: tests/package.m4
Change-Id: Ida4a61d4786d7db63dc59a641f44afb2ec2edd97
http://cgit.osmocom.org/osmo-hlr/commit/?id=a8992f2d44f8c9a8e349aabc0771478…
commit a8992f2d44f8c9a8e349aabc0771478219709a81
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Tue Oct 10 21:59:02 2017 +0200
ctrl_test_runner.py: use proper constant as test db path
Change-Id: I9533a9ff8c0f8d24c678583a9197143a187908f3
http://cgit.osmocom.org/osmo-hlr/commit/?id=fc0b1d64ce14a4c083c702d5e9e8b4f…
commit fc0b1d64ce14a4c083c702d5e9e8b4f5ac7dc08e
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Tue Oct 10 23:20:09 2017 +0200
cosmetic: db_hlr: SL3_TXT: clarify indenting
Change-Id: I8d03433b6fba90f4e46814bc54636bc3a444cc46
http://cgit.osmocom.org/osmo-hlr/commit/?id=0451e985905985a8025e49b20821c67…
commit 0451e985905985a8025e49b20821c67874cdd085
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Tue Oct 10 16:52:22 2017 +0200
cosmetic: log: "SQLite" with capital L
Change-Id: I43a6ea646f14cfea3a7cd4eb88237ada6d47f5f1
http://cgit.osmocom.org/osmo-hlr/commit/?id=96782fa5f76076a0d8e6d9a8932d5fe…
commit 96782fa5f76076a0d8e6d9a8932d5fe7b8d5352d
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Tue Oct 10 23:20:26 2017 +0200
fix db_subscr_get_by_*(): clear output data; test in db_test.c
db_subscr_get_by_*() failed to clear the out-param struct, meaning that data
could remain in a struct even though it is not present in the database. Always
zero out the struct before writing to it.
Adjust the db_test to catch this error by writing "-invalid-data-" to each
struct before running db get functions.
Change-Id: I038bd437452c87841d709fcdd5ac30ab1356b2db
http://cgit.osmocom.org/osmo-hlr/commit/?id=2366161091f05d025f2eb9e18afa147…
commit 2366161091f05d025f2eb9e18afa14766b5d9b9a
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Mon Oct 9 23:12:57 2017 +0200
code undup: use db_bind_text() in db_get_auth_data()
To make the db_bind_text() error reporting mention "imsi", change the
DB_STMT_AUC_BY_IMSI to use a named parameter.
Change-Id: I49bd5eb78170cf4cdf8abb386c766d20d9f1cf73
http://cgit.osmocom.org/osmo-hlr/commit/?id=b2584c4831b40a265b63cecdf7bd2f4…
commit b2584c4831b40a265b63cecdf7bd2f4fca416298
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Mon Oct 9 23:03:57 2017 +0200
fix db_update_sqn(): reset stmt in all error cases
Use the common db_bind_int64() so that the stmt bindings are cleared for any
errors and to get error logging for free.
On error with sqlite3_step(), log the SQL error message, and make sure the stmt
is cleared of bindings and reset.
After sqlite3_step(), verify that exactly one row was modifed, log and return
errors otherwise.
After this patch, the DB interaction closely matches the other (refactored) DB
functions.
Change-Id: I0d870d405e2e0a830360d9ad19f0a3f9e09d8cf2
http://cgit.osmocom.org/osmo-hlr/commit/?id=e171b00049ecf60fe45076ef69b0885…
commit e171b00049ecf60fe45076ef69b0885af82411ff
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Mon Oct 9 22:49:25 2017 +0200
code undup: use db_remove_reset() in db_auc.c
Change-Id: I32d728e2b8a9771421c097647aa0e060e29a601f
http://cgit.osmocom.org/osmo-hlr/commit/?id=5e661d05b4f760ebb2c867a578af48f…
commit 5e661d05b4f760ebb2c867a578af48f3db998243
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Mon Oct 9 17:51:13 2017 +0200
refactor db_get_auth_data return val
Adopt the error handling of the other db functions: return -ENOENT on unknown
subscriber and -EIO on SQL failure. Return 0 for no error, instead of the
number of rows modified.
Adjust the single caller: db_get_auc()
(and db_test.c).
Change-Id: I006f471962bdad95d00a3a4c41a28ebbc9740884
http://cgit.osmocom.org/osmo-hlr/commit/?id=a085519047f1e140084a00954cf3b69…
commit a085519047f1e140084a00954cf3b6986b7ebae0
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Tue Oct 10 02:25:00 2017 +0200
add db_subscr_update_aud_by_id(), complete db_subscr_delete_by_id()
Add ability to add and remove auc_2g and auc_3g table rows with
db_subscr_update_aud_by_id().
In db_subscr_delete_by_id(), make sure that when deleting a subscriber, also
all auth data associated with that user ID is removed as well. A newly created
subscriber must not obtain the same auth tokens just by getting the same id.
Depends: libosmocore Idf75946eb0a84e145adad13fc7c78bb7a267aa0a
Change-Id: Icb11b5e059fb920447a9aa414db1819a0c020529
http://cgit.osmocom.org/osmo-hlr/commit/?id=21c4b1427c17ad567ef98cccc184819…
commit 21c4b1427c17ad567ef98cccc1848193bb09b617
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Mon Oct 9 17:48:51 2017 +0200
refactor db_subscr_purge
Use named parameters in the SQL statements.
Use db_bind_* functions to drop some code dup.
Adopt error handling (rc and logging) to match the other db functions: return
-ENOENT for unknown subscriber, -EIO for SQL failures.
Change-Id: Iad49d29b90a708c6cf55bfb3bcc02d9e29001a15
http://cgit.osmocom.org/osmo-hlr/commit/?id=02ea5241f7fd4d4874eaddeea83f488…
commit 02ea5241f7fd4d4874eaddeea83f488502854379
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Mon Oct 9 17:36:08 2017 +0200
refactor db_subscr_lu()
Use named parameters in the SQL statement.
Use db_bind_* functions to drop some code dup.
Use explicit subscriber id arg instead of subscriber struct.
Match return values and error logging to other db functions.
Change-Id: I35665e84ddbe54a6f218b24033df969ad2e669a0
http://cgit.osmocom.org/osmo-hlr/commit/?id=64ef6f7aab3b7a361db7d806d92d117…
commit 64ef6f7aab3b7a361db7d806d92d11740f03b3ef
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Fri Oct 6 04:10:06 2017 +0200
refactor db_subscr_ps() to db_subscr_nam()
Allow to set nam_ps and nam_cs from this same function, by adding the is_ps
arg.
Combine both NAM_PS stmts to DB_STMT_UPD_NAM_PS_BY_IMSI, add another such stmt
for CS. Use named parameters instead of parameter indexes.
Improve error return values as well as error logging to clearly indicate
whether the operation could not find the requested IMSI, or other errors
occured.
Adjust the single caller.
This prepares for upcoming VTY and possibly CTRL commands, and the error
handling introduced here has been or will be adopted by other functions in
previous or subsequent patches.
Change-Id: I6e70e15228f5bb10bee6758ae5dc9687d65839bd
http://cgit.osmocom.org/osmo-hlr/commit/?id=1161b21b357a50472510cf9174ccbee…
commit 1161b21b357a50472510cf9174ccbee5d25058bc
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Mon Oct 9 17:30:32 2017 +0200
add db_subscr_get_by_msisdn() and db_subscr_get_by_id()
Factor out the selected SQL columns as SEL_COLUMNS macro, so that each of the
new DB_STMTs will select identical columns: the old DB_STMT_SEL_BY_IMSI as well
as the new DB_STMT_SEL_BY_MSISDN and DB_STMT_SEL_BY_ID.
Add the new functions db_subscr_get_by_msisdn() and db_subscr_get_by_id() and
factor out common parts with db_subscr_get_by_imsi() to static db_sel().
Change-Id: I6d0ddd1b7e3f6b180b4b1b2663c5725d2a4a9428
http://cgit.osmocom.org/osmo-hlr/commit/?id=b405dd45ded80a572f92cf435894156…
commit b405dd45ded80a572f92cf435894156eeaee2c62
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Fri Oct 6 04:26:21 2017 +0200
db: use int64_t as subscriber id
The SQLite db does not support uint64_t, and we are always binding the uint64_t
id actually as signed int64_t. Hence be consistent and actually handle it as
int64_t in the code as well.
This means that if we ever see a negative subscriber ID in the SQL database
(however unlikely), we will also see it negative in our log output.
The SQN handled in osmo_auth* is actually of unsigned type, and, unless we
store the SQN as 64bit hex string, we are forced to feed this unsigned value as
signed int64_t to the SQLite API. The upcoming db regression test for SQN in
change-id I0d870d405e2e0a830360d9ad19f0a3f9e09d8cf2 verifies that the SQN
uint64_t translates to signed int64_t and back as expected.
Change-Id: I83a47289a48ac37da0f712845d422e897a5e8171
http://cgit.osmocom.org/osmo-hlr/commit/?id=f23fa4b75bbf44005cf85c6007df1bf…
commit f23fa4b75bbf44005cf85c6007df1bf38cbfc9ea
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Fri Oct 6 03:50:30 2017 +0200
less noise: simplify db_remove_reset()
db_remove_reset() needs to be called after each stmt run, whether it succeeded
or not.
In case sqlite3_clear_bindings() would fail to unbind a stmt, we would anyway
be beyond recovery. There seem to be no plausible situations where such failure
would occur, unless there have been no bindings in the first place.
In case there was an SQL stmt failure, sqlite3_reset() will re-barf the same
error message, we will always have logged it earlier already in the proper
context.
We are never evaluating the return value, nor would we know how to recover from
non-success.
The conclusions:
- db_remove_reset() does not need to log any errors.
- db_remove_reset() does not need to return success.
Change-Id: I21678463e59f607f5f5c5732963e274392f0fffd
http://cgit.osmocom.org/osmo-hlr/commit/?id=7c13aa3fbb7e6ac470148ee6f026ac9…
commit 7c13aa3fbb7e6ac470148ee6f026ac9bede48636
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Tue Oct 10 23:42:45 2017 +0200
db_test: fix typo: drop double-print of sgsn_address
Change-Id: Ia85a3a3b10ceed4bbcd10867d147355c99ccb715
http://cgit.osmocom.org/osmo-hlr/commit/?id=f3e8f36f4066bb3f02db6755686679c…
commit f3e8f36f4066bb3f02db6755686679c311e104ec
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Mon Oct 9 17:28:53 2017 +0200
add initial db_test: creating and deleting subscribers
Change-Id: I2a0d277f55162bf5ceb0fc7d50390f2994daed71
http://cgit.osmocom.org/osmo-hlr/commit/?id=715e3f6397db19caa177d523ea7c273…
commit 715e3f6397db19caa177d523ea7c2731ed3901e3
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Mon Oct 9 17:55:16 2017 +0200
add db_subscr_create(), db_subscr_delete(), db_subscr_update_msisdn_by_imsi()
These will be needed by VTY commands to create, delete and modify subscribers.
Auth data editing will follow in another patch.
The FIXME "also remove authentication data from auc_2g and auc_3g" will get
fixed in change-id Icb11b5e059fb920447a9aa414db1819a0c020529.
Change-Id: I725273d36234331093e7fff7d5f12f6be6ab2623
http://cgit.osmocom.org/osmo-hlr/commit/?id=cd65ee37252c491d9c578085a2c3d7b…
commit cd65ee37252c491d9c578085a2c3d7b1c9907da5
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Fri Oct 6 03:44:57 2017 +0200
add db_bind_int() and db_bind_int64()
Will be used in upcoming patches, e.g. change-IDs
- I6e70e15228f5bb10bee6758ae5dc9687d65839bd
- I83a47289a48ac37da0f712845d422e897a5e8171
Change-Id: I705a15eef242c98feb6e95a883916f6cf8173d70
http://cgit.osmocom.org/osmo-hlr/commit/?id=6c1950e1f37b290f504a288c22eb2c5…
commit 6c1950e1f37b290f504a288c22eb2c5256cbacdf
Author: Neels Hofmeyr <neels(a)hofmeyr.de>
Date: Fri Oct 6 04:20:37 2017 +0200
cosmetic: don't log about missing SQLite log cb
SQLite3 seems to be commonly compiled without log callback support. It is then
misleading to see a seeming error message about this on each osmo-hlr startup.
Avoid the impression that we would miss out on important logging: query
sqlit3_compileoption_get() whether SQLITE_CONFIG_SQLLOG is enabled. Try to
register the callback only if present, if not, say so on DEBUG log.
See
https://sqlite.org/compile.html "SQLITE_ENABLE_SQLLOG"
Change-Id: I78d75dc351eb587b0a022f82f147e9a31c0324c5
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 1 +
src/db.c | 20 +-
src/db_auc.c | 10 +-
src/db_hlr.c | 8 +-
src/hlr_vty_subscr.c | 13 +-
tests/Makefile.am | 5 +
tests/ctrl_test_runner.py | 2 +-
tests/db/db_test.c | 20 +-
tests/test_subscr_create_update_show_delete.vty | 64 +++++
tests/vty_test_runner.py | 298 ++++++++++++++++++++++++
10 files changed, 417 insertions(+), 24 deletions(-)
create mode 100644 tests/test_subscr_create_update_show_delete.vty
create mode 100644 tests/vty_test_runner.py
hooks/post-receive
--
UNNAMED PROJECT