osmo-hlr.git branch master updated. 0.0.1-97-gc5122f2

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/osmocom-commitlog@lists.osmocom.org/.

gitosis at osmocom.org gitosis at osmocom.org
Wed Oct 11 22:02:50 UTC 2017


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, master has been updated
       via  c5122f28292e4923f02bb645c6bb7fa4c270a5d5 (commit)
       via  1cbdb70b27599b3a233184d01cee63cea5e8fee3 (commit)
       via  76328e57d1d9c7df8763b2b8be6fce39e5822731 (commit)
       via  57a8792f230f2ec6db72f3b6249b702428ab5d6e (commit)
       via  1332a17a3db46bae7e2ee720baf21c594e1b2331 (commit)
       via  e50121ec96c2457c66501d7b6e1fcd539ee3c5e1 (commit)
       via  dd783056f7ede461dd27347fa86743a24c4c4eed (commit)
       via  e8ccd5013abe0e04b2400661405fd9e18e88cd89 (commit)
       via  9c2bbc840f3678489d744d69a718afacafa60ad3 (commit)
       via  32633e2b895233892a238095e21b89b12ed94d14 (commit)
       via  d7d9697d85cba6bb18bcb767ebd0005b1ae73e1c (commit)
       via  985094601315c45c2e0a2ac8292df4c2f646c698 (commit)
       via  f7c3e6e3a29f67398fdb8790629d0e951a494bc1 (commit)
       via  28da26ec191b176028c6bad6a43749a8c8926cb2 (commit)
       via  cd83b8a44c2824cfc9dfdca685fea28f9221f60e (commit)
      from  d3cd102505bdc78c92daed325ee824071fa48403 (commit)

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=c5122f28292e4923f02bb645c6bb7fa4c270a5d5

commit c5122f28292e4923f02bb645c6bb7fa4c270a5d5
Author: Neels Hofmeyr <neels at 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=1cbdb70b27599b3a233184d01cee63cea5e8fee3

commit 1cbdb70b27599b3a233184d01cee63cea5e8fee3
Author: Neels Hofmeyr <neels at 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=76328e57d1d9c7df8763b2b8be6fce39e5822731

commit 76328e57d1d9c7df8763b2b8be6fce39e5822731
Author: Neels Hofmeyr <neels at 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=57a8792f230f2ec6db72f3b6249b702428ab5d6e

commit 57a8792f230f2ec6db72f3b6249b702428ab5d6e
Author: Neels Hofmeyr <neels at 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=1332a17a3db46bae7e2ee720baf21c594e1b2331

commit 1332a17a3db46bae7e2ee720baf21c594e1b2331
Author: Neels Hofmeyr <neels at 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=e50121ec96c2457c66501d7b6e1fcd539ee3c5e1

commit e50121ec96c2457c66501d7b6e1fcd539ee3c5e1
Author: Neels Hofmeyr <neels at 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=dd783056f7ede461dd27347fa86743a24c4c4eed

commit dd783056f7ede461dd27347fa86743a24c4c4eed
Author: Neels Hofmeyr <neels at 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=e8ccd5013abe0e04b2400661405fd9e18e88cd89

commit e8ccd5013abe0e04b2400661405fd9e18e88cd89
Author: Neels Hofmeyr <neels at 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=9c2bbc840f3678489d744d69a718afacafa60ad3

commit 9c2bbc840f3678489d744d69a718afacafa60ad3
Author: Neels Hofmeyr <neels at 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=32633e2b895233892a238095e21b89b12ed94d14

commit 32633e2b895233892a238095e21b89b12ed94d14
Author: Neels Hofmeyr <neels at 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=d7d9697d85cba6bb18bcb767ebd0005b1ae73e1c

commit d7d9697d85cba6bb18bcb767ebd0005b1ae73e1c
Author: Neels Hofmeyr <neels at 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=985094601315c45c2e0a2ac8292df4c2f646c698

commit 985094601315c45c2e0a2ac8292df4c2f646c698
Author: Neels Hofmeyr <neels at 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=f7c3e6e3a29f67398fdb8790629d0e951a494bc1

commit f7c3e6e3a29f67398fdb8790629d0e951a494bc1
Author: Neels Hofmeyr <neels at 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=28da26ec191b176028c6bad6a43749a8c8926cb2

commit 28da26ec191b176028c6bad6a43749a8c8926cb2
Author: Neels Hofmeyr <neels at 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=cd83b8a44c2824cfc9dfdca685fea28f9221f60e

commit cd83b8a44c2824cfc9dfdca685fea28f9221f60e
Author: Neels Hofmeyr <neels at 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:
 configure.ac         |    1 +
 src/ctrl.c           |    2 +-
 src/db.c             |  112 +++-
 src/db.h             |   72 ++-
 src/db_auc.c         |   86 ++-
 src/db_hlr.c         |  557 +++++++++++++++++---
 src/hlr.c            |    2 +-
 tests/Makefile.am    |    1 +
 tests/db/Makefile.am |   53 ++
 tests/db/db_test.c   |  826 +++++++++++++++++++++++++++++
 tests/db/db_test.err | 1410 ++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/db/db_test.ok  |    2 +
 tests/testsuite.at   |    8 +
 13 files changed, 2983 insertions(+), 149 deletions(-)
 create mode 100644 tests/db/Makefile.am
 create mode 100644 tests/db/db_test.c
 create mode 100644 tests/db/db_test.err
 create mode 100644 tests/db/db_test.ok


hooks/post-receive
-- 
UNNAMED PROJECT



More information about the osmocom-commitlog mailing list