[OpenSIPS-Devel] [OpenSIPS/opensips] f89780: core: reduce code duplication

Maksym Sobolyev noreply at github.com
Wed Nov 15 18:50:35 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: f89780854aaf6dc985d7e76f70583db5339b2be3
      https://github.com/OpenSIPS/opensips/commit/f89780854aaf6dc985d7e76f70583db5339b2be3
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    M pvar.c

  Log Message:
  -----------
  core: reduce code duplication

Define pv_true and pv_false constants and use them each time we
need to return true or false instead of constructing those
in-line


  Commit: 86270b3a37418bea2465cc5a250acc7309907bd3
      https://github.com/OpenSIPS/opensips/commit/86270b3a37418bea2465cc5a250acc7309907bd3
  Author: Maksym Sobolyev <sobomax at sippysoft.com>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    M modules/acc/acc_mod.c
    M modules/b2b_logic/b2b_logic.c
    M modules/benchmark/benchmark.c
    M modules/call_center/call_center.c
    M modules/cfgutils/cfgutils.c
    M modules/cgrates/cgrates.c
    M modules/clusterer/clusterer_mod.c
    M modules/dialog/dialog.c
    M modules/json/json.c
    M modules/nat_traversal/nat_traversal.c
    M modules/presence_dfks/presence_dfks.c
    M modules/ratelimit/ratelimit.c
    M modules/rr/rr_mod.c
    M modules/rtp_relay/rtp_relay.c
    M modules/rtpengine/rtpengine.c
    M modules/signaling/signaling.c
    M modules/sip_i/sip_i.c
    M modules/sipcapture/sipcapture.c
    M modules/siprec/siprec.c
    M modules/sql_cacher/sql_cacher.c
    M modules/statistics/statistics.c
    M modules/stir_shaken/stir_shaken.c
    M modules/tls_mgm/tls_mgm.c
    M modules/tm/tm.c
    M modules/topology_hiding/topology_hiding.c
    M modules/uuid/uuid.c
    M modules/xml/xml.c
    M pvar.c
    M pvar.h

  Log Message:
  -----------
  core: make _pv_export.name str_const

This ensures that name is truly constant, stored in the
read-only data segment.

Use str_const_init() to initialize it consistently.


Compare: https://github.com/OpenSIPS/opensips/compare/bffcf0035a3b...86270b3a3741



More information about the Devel mailing list