[OpenSIPS-Devel] [OpenSIPS/opensips] 4eccc4: permissions: Integrate with 'db_default_url'

Liviu Chircu noreply at github.com
Thu Nov 5 07:52:36 EST 2020


  Branch: refs/heads/2.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 4eccc44cfbab57b0f6f7b679789cb3279e25c9cb
      https://github.com/OpenSIPS/opensips/commit/4eccc44cfbab57b0f6f7b679789cb3279e25c9cb
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M modules/permissions/address.c
    M modules/permissions/address.h
    M modules/permissions/partitions.c
    M modules/permissions/partitions.h
    M modules/permissions/permissions.c
    M modules/permissions/permissions.h

  Log Message:
  -----------
  permissions: Integrate with 'db_default_url'

    * DB partitions now inherit their DB URL (if not given explicitly)
        from 'db_url' -> 'db_default_url'
    * the above is similar for the 'table_name' property
       (inherit from the 'address_table' modparam)
    * rewrite the 'partitions' parser: no more coding style limitations
    * backwards-compatible: the 'db_url' is still mandatory if you are
      not specifying a partition definition!  This is due to the fact
      that the module has a non-DB based usage mode

Part of a series of patches for #2117

(cherry picked from commit bb57cc1c375b9325138154eb415cebc2fa971ec0)
(cherry picked from commit e663ee6a905f64c1d26954fa896bbc1461001163)
(cherry picked from commit 8cb6048949cc0440d87b205bbaed88fa16d1fc93)


  Commit: 674c611f22a0048afb2425f1a39390ebec573d8b
      https://github.com/OpenSIPS/opensips/commit/674c611f22a0048afb2425f1a39390ebec573d8b
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M modules/dialplan/dialplan.c
    M modules/dialplan/dialplan.h
    M modules/dialplan/dp_db.c
    M modules/dialplan/dp_db.h
    M str.h

  Log Message:
  -----------
  dialplan: Integrate with 'db_default_url'

    * DB partitions now inherit their DB URL (if not given explicitly)
        from 'db_url' -> 'db_default_url'
    * the above is similar for the 'table_name' property
       (inherit from the 'address_table' modparam)
    * rewrite the 'partitions' parser: no more coding style limitations
    * backwards-compatible: at least one partition must be specified
      (even through simply defining a global 'db_default_url') before
      the module can start

Part of a series of patches for #2117

(cherry picked from commit 2e8164368b31da9292f08623eac6934ef2057e22)
(cherry picked from commit f061ad31d39538de59da05e8a98018cc42c4c336)
(cherry picked from commit 000df2ba61e91142ce3c8f09562e5867519a94b5)


  Commit: baf00b5d7873e4ea8e31d0f7fb004eeba523855e
      https://github.com/OpenSIPS/opensips/commit/baf00b5d7873e4ea8e31d0f7fb004eeba523855e
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M modules/dialplan/doc/dialplan_admin.xml

  Log Message:
  -----------
  dialplan docs: Update partition, db_url and table_name

(cherry picked from commit 6443ad5829c15f8ae7dad8bb9f0e4f418702b1ad)
(cherry picked from commit 5185859a5776b6cb6ed49938eeba80c2017c5087)
(cherry picked from commit dbd3e9eace04e0b54a16bfff4b9c78d9a5c51732)


  Commit: 37abcc3d6e5f3774a07bbd9219484d72844b684a
      https://github.com/OpenSIPS/opensips/commit/37abcc3d6e5f3774a07bbd9219484d72844b684a
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M modules/dialplan/doc/dialplan_admin.xml
    M modules/permissions/doc/permissions_admin.xml

  Log Message:
  -----------
  permissions docs: Update partition, db_url and address_table

(cherry picked from commit 180674b833ef9e82cb3f97105add2ada6843ddc1)
(cherry picked from commit 67c06628eae20cca4fc3e5509435b775a425d17e)
(cherry picked from commit 8ad9847f0b010b5344c1d9fdf4b4f65f347efae8)


  Commit: 53bec0c3de9f158233eb6904fdf90073c91db3fc
      https://github.com/OpenSIPS/opensips/commit/53bec0c3de9f158233eb6904fdf90073c91db3fc
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M modules/dispatcher/dispatcher.c

  Log Message:
  -----------
  dispatcher: Fix a bug with the 'default' partition

This commit allows the "default" partition to be populated just like the
other ones:

modparam("dispatcher", "partition",
    "default:
            db_url = mysql://opensips:opensipsrw@127.0.0.1/opensips_3_2;
            table_name = v1_dispatcher")

(cherry picked from commit cc2f4a8c49402f99502a58940d2fbb51daed6e47)
(cherry picked from commit 419f0119400229ac54df2b8ce1943d88c31c4b5a)
(cherry picked from commit 1f14390a4b7147a3ba7434b5dc19c6aa98184a44)


  Commit: 23f987886b0e61fb9fd392d195c4c7e4fd4aff7c
      https://github.com/OpenSIPS/opensips/commit/23f987886b0e61fb9fd392d195c4c7e4fd4aff7c
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M modules/dispatcher/dispatcher.c

  Log Message:
  -----------
  dispatcher: Add useful debug log

(cherry picked from commit 198687e17d13a06b0868676252292643c6d549c4)
(cherry picked from commit 654f1e9ba552ab96e1b3b31b3199f5464b41bd9d)
(cherry picked from commit 5c154e2cec728014993dd980309225b47e6af514)


  Commit: a61d9417a81f5b05d5eb1fad539d76176a42221f
      https://github.com/OpenSIPS/opensips/commit/a61d9417a81f5b05d5eb1fad539d76176a42221f
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M modules/dispatcher/dispatch.c
    M modules/dispatcher/dispatcher.c

  Log Message:
  -----------
  dispatcher: Integrate with 'db_default_url'

    * both 'db_url' and a partition DB URL will inherit their starting
      value from the 'db_default_url' global
    * add the option to point the default partition to a known one, in
      order to avoid unwanted loading of the default table.  Example:

	modparam("dispatcher", "partition", "default: trunks")
	modparam("dispatcher", "partition", "trunks:  db_url = ...")

(cherry picked from commit c7d668bad5b2b41a9c9065e1539914f0629ccf64)
(cherry picked from commit ba7a4e33a6e2141aa7300f4e5db268c39f5e9520)
(cherry picked from commit c0b2a0ae4117e395e1c4724b7b91270d83a0d269)


  Commit: bff98ff4e8c11b0477f7432cce9469c9a8c8cf00
      https://github.com/OpenSIPS/opensips/commit/bff98ff4e8c11b0477f7432cce9469c9a8c8cf00
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M modules/dispatcher/doc/dispatcher_admin.xml

  Log Message:
  -----------
  dispatcher docs: Update partition, db_url and table_name

(cherry picked from commit 89a618be1f005d1bc80d528bc41de73fff24533a)
(cherry picked from commit dd0245e98087e07fb2182ae4e21f06ce034c9b4b)
(cherry picked from commit 02df9b8fdb2bdb2521481b9d1b466466689c38e1)


  Commit: e64845a3feff5a0e0e9ac7b816df7ee80dea8cc1
      https://github.com/OpenSIPS/opensips/commit/e64845a3feff5a0e0e9ac7b816df7ee80dea8cc1
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M modules/dialplan/dialplan.c
    M modules/dialplan/doc/dialplan_admin.xml
    M modules/dialplan/dp_db.c

  Log Message:
  -----------
  dialplan: Allow re-pointing the default partition

This is useful in situations where script writers do not intend to cache
the default 'dialplan' table, rather only the named partitions.

Example syntax:
    db_default_url = "mysql://opensips:opensipsrw@127.0.0.1/opensips"
    ...
    modparam("dialplan", "partition", "
	pstn:
	    table_name = dialplan_pstn")
    modparam("dialplan", "partition", "default: pstn")

(cherry picked from commit efee3438773a83c1a05edc8b05ba45f53a83c5a6)
(cherry picked from commit 4abd2617f970b2505534ee8dfd68fdd11ddcc716)
(cherry picked from commit 03bf0ae1b0ce1931377ae131235413bbc5f01df1)


  Commit: aa8a43dc7e57ea023892638cc725abc9de86fdb1
      https://github.com/OpenSIPS/opensips/commit/aa8a43dc7e57ea023892638cc725abc9de86fdb1
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-05 (Thu, 05 Nov 2020)

  Changed paths:
    M modules/dialplan/dialplan.c
    M modules/dialplan/dialplan.h
    M modules/dialplan/dp_db.c

  Log Message:
  -----------
  dialplan: Fix startup with a single, non-default partition


  Commit: 7c251f545aaff21dcf649d3f9ef14f9635590a8c
      https://github.com/OpenSIPS/opensips/commit/7c251f545aaff21dcf649d3f9ef14f9635590a8c
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2020-11-05 (Thu, 05 Nov 2020)

  Changed paths:
    M modules/dispatcher/dispatcher.c

  Log Message:
  -----------
  dispatcher: prevent possibl uninitialized access

(cherry picked from commit 58804282fe53b25a2d18f8bed35b8f6fc8f8a1a8)


  Commit: f721cc01bebbde984b34d606e24a530bc541f9d3
      https://github.com/OpenSIPS/opensips/commit/f721cc01bebbde984b34d606e24a530bc541f9d3
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-05 (Thu, 05 Nov 2020)

  Changed paths:
    M modules/b2b_entities/b2b_entities.c
    M modules/b2b_logic/b2b_logic.c

  Log Message:
  -----------
  b2b entities/logic: Inherit `db_default_url` if possible

If there is still no DB URL, simply start without DB support (just as
before)

(cherry picked from commit ff7b5849751d11537d989afe2b17ef35ebd2a133)
(cherry picked from commit a54424be0c0ff2cd42adf6a0d748ac2a866dc319)
(cherry picked from commit 0684e98376a841b6b7351b23e23de1d9a804ba41)


Compare: https://github.com/OpenSIPS/opensips/compare/1525893e2e3e...f721cc01bebb



More information about the Devel mailing list