[OpenSIPS-Devel] [OpenSIPS/opensips] 597daa: usrloc: Add generic, contact-level key-value stora...

Liviu Chircu liviu at opensips.org
Tue Jan 23 09:39:33 EST 2018


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 597daa366613c44a58b61df5ebf4ebd7adfb97a4
      https://github.com/OpenSIPS/opensips/commit/597daa366613c44a58b61df5ebf4ebd7adfb97a4
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M modules/usrloc/ucontact.c
    M modules/usrloc/ucontact.h
    M modules/usrloc/usrloc.c
    M modules/usrloc/usrloc.h
    M ut.h

  Log Message:
  -----------
  usrloc: Add generic, contact-level key-value storage

Allows various usrloc-dependent modules to easily store data into or to
retrieve data from each usrloc contact.


  Commit: b2ac38d70bcf837db0fed2891c1c1fe0999febbb
      https://github.com/OpenSIPS/opensips/commit/b2ac38d70bcf837db0fed2891c1c1fe0999febbb
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    A modules/usrloc/kv_store.c
    A modules/usrloc/kv_store.h
    M modules/usrloc/ucontact.c
    M modules/usrloc/ucontact.h
    M modules/usrloc/urecord.c
    M modules/usrloc/urecord.h
    M modules/usrloc/usrloc.c
    M modules/usrloc/usrloc.h

  Log Message:
  -----------
  usrloc: Add generic, record-level key-value storage

Allows various usrloc-dependent modules to easily store data into or
to retrieve data from each usrloc record / AOR.


  Commit: 1fc88e8bae8ddbce6f559b6ae38c6e1a74216056
      https://github.com/OpenSIPS/opensips/commit/1fc88e8bae8ddbce6f559b6ae38c6e1a74216056
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M modules/usrloc/kv_store.c

  Log Message:
  -----------
  usrloc: K/V store - use map_find() instead of map_get()


  Commit: cfa7be5672e0e325b8919400d947242dc801e63d
      https://github.com/OpenSIPS/opensips/commit/cfa7be5672e0e325b8919400d947242dc801e63d
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M modules/mid_registrar/save.c
    A modules/mid_registrar/ul_storage.c
    A modules/mid_registrar/ul_storage.h
    M modules/mid_registrar/ulcb.c
    M modules/usrloc/kv_store.c

  Log Message:
  -----------
  mid_registrar: Refactor the AoR throttling implementation

We now make use of usrloc's newly added k/v storage functions in order
to store/retrieve the module data into/from each record.


  Commit: e94d90d1653015f209dd19d86713fabc731a4f68
      https://github.com/OpenSIPS/opensips/commit/e94d90d1653015f209dd19d86713fabc731a4f68
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M modules/fraud_detection/fraud_detection.c
    M modules/usrloc/kv_store.c
    M ut.h

  Log Message:
  -----------
  Refactor shm_str_resize() into shm_str_extend()

This hints better at what the function actually does (i.e. it will not
shrink your buffers)


  Commit: 7f71f3ff9032dcd404c775a6bd5c02c6cb012eff
      https://github.com/OpenSIPS/opensips/commit/7f71f3ff9032dcd404c775a6bd5c02c6cb012eff
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M modules/mid_registrar/save.c
    M modules/mid_registrar/ul_storage.c
    M modules/mid_registrar/ul_storage.h
    M modules/mid_registrar/ulcb.c

  Log Message:
  -----------
  mid_registrar: Refactor contact mirroring/throttling

We now make use of usrloc's newly added k/v storage functions in order
to store/retrieve the module data into/from each contact.


  Commit: 6a86d54434813164330b55d8974658dc5442b959
      https://github.com/OpenSIPS/opensips/commit/6a86d54434813164330b55d8974658dc5442b959
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M modules/mid_registrar/mid_registrar.c
    M modules/mid_registrar/mid_registrar.h
    M modules/mid_registrar/save.c
    M modules/mid_registrar/ulcb.c
    M modules/mid_registrar/ulcb.h
    M modules/pua_bla/pua_bla.c
    M modules/pua_bla/registrar_cb.c
    M modules/pua_bla/registrar_cb.h
    M modules/pua_usrloc/pua_usrloc.c
    M modules/pua_usrloc/pua_usrloc.h
    M modules/pua_usrloc/ul_publish.c
    M modules/snmpstats/interprocess_buffer.c
    M modules/snmpstats/interprocess_buffer.h
    M modules/snmpstats/openserSIPRegUserTable.c
    M modules/usrloc/ucontact.c
    M modules/usrloc/ucontact.h
    M modules/usrloc/ul_callback.c
    M modules/usrloc/ul_callback.h
    M modules/usrloc/urecord.c
    M modules/usrloc/urecord.h

  Log Message:
  -----------
  usrloc: Simplify the callback API

The opaque buffer extension for the API (commit b0241c1318) is no longer
needed, as the K/V usrloc extension completely replaces it.

This commit also refactors the usrloc callback types as "ul_cb_type",
thus making them easier to pick up / work with.


  Commit: d2527e88d5eefcf8f6ab8ae07b414119617de8ec
      https://github.com/OpenSIPS/opensips/commit/d2527e88d5eefcf8f6ab8ae07b414119617de8ec
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-19 (Fri, 19 Jan 2018)

  Changed paths:
    M lib/cJSON.c
    M lib/cJSON.h

  Log Message:
  -----------
  Improve the cJSON library

    * add a str-based appending function
    * avoid defining yet another pair of malloc/free funcs
    * fix the resetted allocation functions from glibc to PKG


  Commit: bcae687fdf84da1c5adc96db3746bf03ac8af128
      https://github.com/OpenSIPS/opensips/commit/bcae687fdf84da1c5adc96db3746bf03ac8af128
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-19 (Fri, 19 Jan 2018)

  Changed paths:
    M str.h

  Log Message:
  -----------
  str.h: Add a quick str initialization function


  Commit: 90828299253da859617ca374ca54c1b37a9e4db8
      https://github.com/OpenSIPS/opensips/commit/90828299253da859617ca374ca54c1b37a9e4db8
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-19 (Fri, 19 Jan 2018)

  Changed paths:
    M map.c
    M map.h

  Log Message:
  -----------
  map.h: Refactor int flags into enum map_flags


  Commit: b674aa264f0cff7cf53d9994a7cd05b40a9d1edc
      https://github.com/OpenSIPS/opensips/commit/b674aa264f0cff7cf53d9994a7cd05b40a9d1edc
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-19 (Fri, 19 Jan 2018)

  Changed paths:
    M modules/usrloc/kv_store.c
    M modules/usrloc/kv_store.h

  Log Message:
  -----------
  usrloc K/V store: Add serialize/deserialize functions


  Commit: 7f1bef2f4cce695d3387094ed16154990a86ba6b
      https://github.com/OpenSIPS/opensips/commit/7f1bef2f4cce695d3387094ed16154990a86ba6b
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-19 (Fri, 19 Jan 2018)

  Changed paths:
    M modules/usrloc/ucontact.c
    M modules/usrloc/ucontact.h
    M modules/usrloc/udomain.c
    M modules/usrloc/ul_mod.c
    M modules/usrloc/ul_mod.h
    M modules/usrloc/urecord.c
    M modules/usrloc/urecord.h

  Log Message:
  -----------
  usrloc: Implement DB persistency for all K/V storage

This patch adds a new location table column, named "kv_store". This
column will hold any custom data that modules may intend to push into
usrloc contact structures. Currently, only the mid_registrar module is making
use of this feature.

Moreover, the implementation also includes persistency for the
record-level K/V storage. This is achieved with a special key, "_urec_kvs",
that will only be present in one of the contacts' K/V store.


  Commit: ca0fc932137e0061ce1f75899d510f2d14b3619c
      https://github.com/OpenSIPS/opensips/commit/ca0fc932137e0061ce1f75899d510f2d14b3619c
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-19 (Fri, 19 Jan 2018)

  Changed paths:
    M db/schema/location.xml
    M modules/usrloc/ul_mod.h
    M scripts/db_berkeley/opensips/location
    M scripts/db_berkeley/opensips/version
    M scripts/dbtext/opensips/location
    M scripts/dbtext/opensips/version
    M scripts/mysql/usrloc-create.sql
    M scripts/oracle/usrloc-create.sql
    M scripts/pi_http/pi_framework.xml
    M scripts/pi_http/usrloc-mod
    M scripts/pi_http/usrloc-table
    M scripts/postgres/usrloc-create.sql
    M scripts/sqlite/usrloc-create.sql

  Log Message:
  -----------
  Update DB schema


  Commit: d17722d0d870e2326373720e87dd307fdba48ce6
      https://github.com/OpenSIPS/opensips/commit/d17722d0d870e2326373720e87dd307fdba48ce6
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-19 (Fri, 19 Jan 2018)

  Changed paths:
    M modules/mid_registrar/mid_registrar.c
    M modules/mid_registrar/save.c

  Log Message:
  -----------
  mid_registrar: Allow startup with DB-enabled usrloc

Also swap the ordering of some usrloc API operations - this will help
keep the DB in sync at runtime more often.


  Commit: 2b2e2ad6da600c93db81e08c6a398e45d65e2190
      https://github.com/OpenSIPS/opensips/commit/2b2e2ad6da600c93db81e08c6a398e45d65e2190
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-19 (Fri, 19 Jan 2018)

  Changed paths:
    M modules/usrloc/kv_store.c
    M modules/usrloc/kv_store.h

  Log Message:
  -----------
  usrloc: Remove bogus "const" modifiers


  Commit: 2333d0d0cae63eb0256a914183a8ecf5f09db40f
      https://github.com/OpenSIPS/opensips/commit/2333d0d0cae63eb0256a914183a8ecf5f09db40f
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-23 (Tue, 23 Jan 2018)

  Changed paths:
    M modules/usrloc/ucontact.c
    M modules/usrloc/urecord.c

  Log Message:
  -----------
  usrloc: Fix SHM leaks in the K/V support


  Commit: f7bf26857f1eaa24f8d4a73ee445cb6d9a9bd8de
      https://github.com/OpenSIPS/opensips/commit/f7bf26857f1eaa24f8d4a73ee445cb6d9a9bd8de
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-23 (Tue, 23 Jan 2018)

  Changed paths:
    M modules/usrloc/README
    M modules/usrloc/doc/usrloc_admin.xml
    M modules/usrloc/ul_mod.c

  Log Message:
  -----------
  usrloc: Document the new "kv_store" column


  Commit: 1ec407b829abeaf8711617b5b6ed82a21cdde247
      https://github.com/OpenSIPS/opensips/commit/1ec407b829abeaf8711617b5b6ed82a21cdde247
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2018-01-23 (Tue, 23 Jan 2018)

  Changed paths:
    M db/schema/location.xml
    M lib/cJSON.c
    M lib/cJSON.h
    M map.c
    M map.h
    M modules/fraud_detection/fraud_detection.c
    M modules/mid_registrar/mid_registrar.c
    M modules/mid_registrar/mid_registrar.h
    M modules/mid_registrar/save.c
    A modules/mid_registrar/ul_storage.c
    A modules/mid_registrar/ul_storage.h
    M modules/mid_registrar/ulcb.c
    M modules/mid_registrar/ulcb.h
    M modules/pua_bla/pua_bla.c
    M modules/pua_bla/registrar_cb.c
    M modules/pua_bla/registrar_cb.h
    M modules/pua_usrloc/pua_usrloc.c
    M modules/pua_usrloc/pua_usrloc.h
    M modules/pua_usrloc/ul_publish.c
    M modules/snmpstats/interprocess_buffer.c
    M modules/snmpstats/interprocess_buffer.h
    M modules/snmpstats/openserSIPRegUserTable.c
    M modules/usrloc/README
    M modules/usrloc/doc/usrloc_admin.xml
    A modules/usrloc/kv_store.c
    A modules/usrloc/kv_store.h
    M modules/usrloc/ucontact.c
    M modules/usrloc/ucontact.h
    M modules/usrloc/udomain.c
    M modules/usrloc/ul_callback.c
    M modules/usrloc/ul_callback.h
    M modules/usrloc/ul_mod.c
    M modules/usrloc/ul_mod.h
    M modules/usrloc/urecord.c
    M modules/usrloc/urecord.h
    M modules/usrloc/usrloc.c
    M modules/usrloc/usrloc.h
    M scripts/db_berkeley/opensips/location
    M scripts/db_berkeley/opensips/version
    M scripts/dbtext/opensips/location
    M scripts/dbtext/opensips/version
    M scripts/mysql/usrloc-create.sql
    M scripts/oracle/usrloc-create.sql
    M scripts/pi_http/pi_framework.xml
    M scripts/pi_http/usrloc-mod
    M scripts/pi_http/usrloc-table
    M scripts/postgres/usrloc-create.sql
    M scripts/sqlite/usrloc-create.sql
    M str.h
    M ut.h

  Log Message:
  -----------
  Merge branch 'feature/usrloc-kv-contact-storage'


Compare: https://github.com/OpenSIPS/opensips/compare/700422325d3b...1ec407b829ab


More information about the Devel mailing list