osmo-hlr.git branch master updated. 0.0.1-118-gdbced93

gitosis at osmocom.org gitosis at osmocom.org
Sat Oct 28 16:49:49 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  dbced93b5f988d370db6ea628d1d2fcdaba93f14 (commit)
       via  88c91f6fb233e4400ee781d63ffb2bdb5599e58d (commit)
       via  7750d2cedc5403cd1d756d1d30a8e08fccd12f74 (commit)
       via  cd7fa4502cc2e003ae1d6520f7a49fdaef490a3c (commit)
       via  99a14c8ca1d1675bb7220376d6438d3d73c20fd6 (commit)
      from  c6a6d26f50fe87a5f67699f9696d63d9dfd39210 (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=dbced93b5f988d370db6ea628d1d2fcdaba93f14

commit dbced93b5f988d370db6ea628d1d2fcdaba93f14
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Fri Oct 27 02:57:51 2017 +0200

    cosmetic: rename SL3_TXT macro, use osmo_strlcpy()
    
    Rename SL3_TXT to more accurate copy_sqlite3_text_to_buf(), and use
    osmo_strlcpy() instead of essentially dup'ing it.
    
    The macro will also be used by hlr_db_tool.c in upcoming patch. This patch
    prepares for a move to db.h.
    
    Change-Id: I1dadeddddcfe0109195c09c0e706201b0df009cc

http://cgit.osmocom.org/osmo-hlr/commit/?id=88c91f6fb233e4400ee781d63ffb2bdb5599e58d

commit 88c91f6fb233e4400ee781d63ffb2bdb5599e58d
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Wed Oct 25 00:26:29 2017 +0200

    cosmetic: sql/hlr.sql: move comments
    
    By moving the comments inside the table row definitions, they are dumped back
    during 'sqlite3 hlr.db .dump'. When they are between SQL statements like before
    this patch, the comments are lost.
    
    Tweak wording.
    
    Change-Id: I280c2e2d3e9b7f1dc632722724d9e1c54d041820

http://cgit.osmocom.org/osmo-hlr/commit/?id=7750d2cedc5403cd1d756d1d30a8e08fccd12f74

commit 7750d2cedc5403cd1d756d1d30a8e08fccd12f74
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Tue Oct 24 23:26:27 2017 +0200

    automatically create db tables on osmo-hlr invocation
    
    If a database file is missing, osmo-hlr creates it, as is the default sqlite3
    API behavior -- before this patch, that db file is created, but lacks useful
    tables. Actually also create initial tables in it, as osmo-nitb did.
    
    In effect, the 'vty-test' target in tests/Makefile.am no longer needs to create
    a database manually. (The 'ctrl-test' still does, because it also wants to add
    subscriber data on top of the bare tables.)
    
    Note: it could be desirable to bail if the desired database file does not
    exist. That is however a different semantic from this patch; this is not
    changing the fact that a db file is created, this just creates a usable one.
    
    Note: I am about to add osmo-hlr-db-tool to do database migration from
    osmo-nitb. For that, it is desirable to bootstrap a usable database, which is
    the core reason for this patch.
    
    Don't plainly duplicate hlr.sql to .c, but create db_bootstrap.h as a
    BUILT_SOURCE from reading in sql/hlr.sql and mangling via sed to a list of SQL
    statement strings. On each db_open(), run this bootstrap sequence.
    
    In sql/hlr.sql, these tweaks are necessary:
    * Add 'IF NOT EXISTS' to 'CREATE TABLE', so that the bootstrap sequence can be
      run on an already bootstrapped db.
    * Drop the final comment at the bottom, which ended up being an empty SQL
      statement and causing sqlite3 API errors, seemed to have no purpose anyway.
    
    Note: by composing the statement strings as multiline and including the SQL
    comments, sqlite3 actually retains the comments contained in table definitions
    and prints them back during 'sqlite3 hlr.db .dump'.
    
    Change-Id: If77dbbfe1af3e66aaec91cb6295b687f37678636

http://cgit.osmocom.org/osmo-hlr/commit/?id=cd7fa4502cc2e003ae1d6520f7a49fdaef490a3c

commit cd7fa4502cc2e003ae1d6520f7a49fdaef490a3c
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Wed Oct 25 01:13:09 2017 +0200

    db_test: fix *FLAGS
    
    The -I includes should be in CFLAGS, not CPPFLAGS.
    
    I noticed problems with it when trying to add an -I$(builddir) in an upcoming
    patch that adds a BUILT_SOURCE, If77dbbfe1af3e66aaec91cb6295b687f37678636.
    
    Change-Id: Ie57a04b7efc7a1e16cf0e3625d8ad2f0ef0089b0

http://cgit.osmocom.org/osmo-hlr/commit/?id=99a14c8ca1d1675bb7220376d6438d3d73c20fd6

commit 99a14c8ca1d1675bb7220376d6438d3d73c20fd6
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Fri Oct 27 02:46:11 2017 +0200

    tests/Makefile: use test db var instead of repeating the path
    
    Change-Id: I9859b522b5ffa7f2c9ed33ab849199d4b4e6696c

-----------------------------------------------------------------------

Summary of changes:
 sql/hlr.sql          | 14 ++++++--------
 src/Makefile.am      | 18 ++++++++++++++++++
 src/db.c             | 32 ++++++++++++++++++++++++++++++++
 src/db_bootstrap.sed | 25 +++++++++++++++++++++++++
 src/db_hlr.c         | 25 ++++++++++++++-----------
 tests/Makefile.am    |  5 ++---
 tests/db/Makefile.am |  9 ++-------
 7 files changed, 99 insertions(+), 29 deletions(-)
 create mode 100644 src/db_bootstrap.sed


hooks/post-receive
-- 
UNNAMED PROJECT


More information about the osmocom-commitlog mailing list