[OpenSIPS-Devel] [OpenSIPS/opensips] dc6bdb: add dependencies function in module_exports

Răzvan Crainea noreply at github.com
Thu Sep 19 09:39:01 EDT 2019


  Branch: refs/heads/2.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: dc6bdb6c9f43a94d323de1da371ddaecf8e42578
      https://github.com/OpenSIPS/opensips/commit/dc6bdb6c9f43a94d323de1da371ddaecf8e42578
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M main.c
    M modules/aaa_radius/aaa_radius.c
    M modules/acc/acc_mod.c
    M modules/alias_db/alias_db.c
    M modules/auth/auth_mod.c
    M modules/auth_aaa/authaaa_mod.c
    M modules/auth_db/authdb_mod.c
    M modules/avpops/avpops.c
    M modules/b2b_entities/b2b_entities.c
    M modules/b2b_logic/b2b_logic.c
    M modules/b2b_sca/b2b_sca.c
    M modules/benchmark/benchmark.c
    M modules/cachedb_cassandra/cachedb_cassandra.c
    M modules/cachedb_couchbase/cachedb_couchbase.c
    M modules/cachedb_local/cachedb_local.c
    M modules/cachedb_memcached/cachedb_memcached.c
    M modules/cachedb_mongodb/cachedb_mongodb.c
    M modules/cachedb_redis/cachedb_redis.c
    M modules/cachedb_sql/cachedb_sql.c
    M modules/call_center/call_center.c
    M modules/call_control/call_control.c
    M modules/carrierroute/carrierroute.c
    M modules/cfgutils/cfgutils.c
    M modules/cgrates/cgrates.c
    M modules/clusterer/clusterer_mod.c
    M modules/compression/compression.c
    M modules/cpl_c/cpl.c
    M modules/db_berkeley/db_berkeley.c
    M modules/db_cachedb/db_cachedb.c
    M modules/db_flatstore/flatstore_mod.c
    M modules/db_http/db_http.c
    M modules/db_mysql/db_mysql.c
    M modules/db_oracle/db_oracle.c
    M modules/db_perlvdb/perlvdb.c
    M modules/db_postgres/db_postgres.c
    M modules/db_sqlite/db_sqlite.c
    M modules/db_text/dbtext.c
    M modules/db_unixodbc/db_unixodbc.c
    M modules/db_virtual/db_virtual.c
    M modules/dialog/dialog.c
    M modules/dialplan/dialplan.c
    M modules/dispatcher/dispatcher.c
    M modules/diversion/diversion.c
    M modules/dns_cache/dns_cache.c
    M modules/domain/domain_mod.c
    M modules/domainpolicy/domainpolicy_mod.c
    M modules/drouting/drouting.c
    M modules/emergency/emergency_methods.c
    M modules/enum/enum_mod.c
    M modules/event_datagram/event_datagram.c
    M modules/event_flatstore/event_flatstore.c
    M modules/event_jsonrpc/event_jsonrpc.c
    M modules/event_rabbitmq/event_rabbitmq.c
    M modules/event_route/event_route.c
    M modules/event_routing/event_routing.c
    M modules/event_virtual/event_virtual.c
    M modules/event_xmlrpc/event_xmlrpc.c
    M modules/exec/exec_mod.c
    M modules/fraud_detection/fraud_detection.c
    M modules/freeswitch/fs_mod.c
    M modules/freeswitch_scripting/fss_mod.c
    M modules/gflags/gflags.c
    M modules/group/group_mod.c
    M modules/h350/h350_mod.c
    M modules/httpd/httpd.c
    M modules/identity/identity.c
    M modules/imc/imc.c
    M modules/jabber/jabber.c
    M modules/json/json.c
    M modules/jsonrpc/jsonrpc.c
    M modules/ldap/ldap_mod.c
    M modules/load_balancer/load_balancer.c
    M modules/lua/siplua.c
    M modules/mangler/mangler.c
    M modules/mathops/mathops.c
    M modules/maxfwd/maxfwd.c
    M modules/mediaproxy/mediaproxy.c
    M modules/mi_datagram/mi_datagram.c
    M modules/mi_fifo/mi_fifo.c
    M modules/mi_http/mi_http.c
    M modules/mi_json/mi_json.c
    M modules/mi_xmlrpc_ng/mi_xmlrpc_http.c
    M modules/mid_registrar/mid_registrar.c
    M modules/mmgeoip/mmgeoip.c
    M modules/msilo/msilo.c
    M modules/nat_traversal/nat_traversal.c
    M modules/nathelper/nathelper.c
    M modules/options/mod_options.c
    M modules/osp/osp_mod.c
    M modules/path/path_mod.c
    M modules/peering/peering.c
    M modules/perl/perl.c
    M modules/permissions/permissions.c
    M modules/pi_http/pi_http.c
    M modules/pike/pike.c
    M modules/presence/presence.c
    M modules/presence_callinfo/presence_callinfo.c
    M modules/presence_dialoginfo/presence_dialoginfo.c
    M modules/presence_mwi/presence_mwi.c
    M modules/presence_xcapdiff/presence_xcapdiff.c
    M modules/presence_xml/presence_xml.c
    M modules/proto_bin/proto_bin.c
    M modules/proto_hep/proto_hep.c
    M modules/proto_sctp/proto_sctp.c
    M modules/proto_tls/proto_tls.c
    M modules/proto_ws/proto_ws.c
    M modules/proto_wss/proto_wss.c
    M modules/pua/pua.c
    M modules/pua_bla/pua_bla.c
    M modules/pua_dialoginfo/pua_dialoginfo.c
    M modules/pua_mi/pua_mi.c
    M modules/pua_usrloc/pua_usrloc.c
    M modules/pua_xmpp/pua_xmpp.c
    M modules/python/python_mod.c
    M modules/qos/qos.c
    M modules/rabbitmq/rabbitmq.c
    M modules/ratelimit/ratelimit.c
    M modules/regex/regex_mod.c
    M modules/registrar/reg_mod.c
    M modules/rest_client/rest_client.c
    M modules/rls/rls.c
    M modules/rr/rr_mod.c
    M modules/rtpengine/rtpengine.c
    M modules/rtpproxy/rtpproxy.c
    M modules/script_helper/script_helper.c
    M modules/signaling/signaling.c
    M modules/sip_i/sip_i.c
    M modules/sipcapture/sipcapture.c
    M modules/sipmsgops/sipmsgops.c
    M modules/siprec/siprec.c
    M modules/siptrace/siptrace.c
    M modules/sl/sl.c
    M modules/sms/sms.c
    M modules/sngtc/sngtc.c
    M modules/snmpstats/snmpstats.h
    M modules/speeddial/speeddial.c
    M modules/sql_cacher/sql_cacher.c
    M modules/sst/sst.c
    M modules/statistics/statistics.c
    M modules/stun/stun.c
    M modules/textops/textops.c
    M modules/tls_mgm/tls_mgm.c
    M modules/tm/tm.c
    M modules/topology_hiding/topology_hiding.c
    M modules/uac/uac.c
    M modules/uac_auth/uac_auth.c
    M modules/uac_redirect/redirect.c
    M modules/uac_registrant/registrant.c
    M modules/uri/uri_mod.c
    M modules/userblacklist/userblacklist.c
    M modules/usrloc/ul_mod.c
    M modules/xcap/xcap_mod.c
    M modules/xcap_client/xcap_client.c
    M modules/xml/xml.c
    M modules/xmpp/xmpp.c
    M net/proto_tcp/proto_tcp.c
    M net/proto_udp/proto_udp.c
    M sr_module.c
    M sr_module.h

  Log Message:
  -----------
  add dependencies function in module_exports

Add a new function in module_exports that is run to determine what kind
of dependencies (of other modules) a module has. This function is ran
before running the initialization phase of the module.

(cherry picked from commit b29931e4fb1ae528fd896d68038cf5ad4395c4cf)


  Commit: a4f0d86232226d227ef29913da5aa852aa865a2c
      https://github.com/OpenSIPS/opensips/commit/a4f0d86232226d227ef29913da5aa852aa865a2c
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M modules/acc/acc_logic.c
    M modules/acc/acc_mod.c

  Log Message:
  -----------
  acc: use the dependencies function to register dlg ctx

This is a temporary fix, until we figure out a way of registering the
dlg ctx index only if cdr is used.

(cherry picked from commit 3aa5596c5584141f0256959f18b606c256a48092)


  Commit: bbf0de9799971856d7a5c7d5913de05eb8f8d299
      https://github.com/OpenSIPS/opensips/commit/bbf0de9799971856d7a5c7d5913de05eb8f8d299
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M modules/acc/acc_mod.c

  Log Message:
  -----------
  acc: Fix segmentation fault on startup

Reported by Dan Pascu

(cherry picked from commit af1e442551b9d1c949ce879cc72f870a95f011ab)


  Commit: 79773e2348a403bf89e150a88166242d2dbb118d
      https://github.com/OpenSIPS/opensips/commit/79773e2348a403bf89e150a88166242d2dbb118d
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M modules/acc/acc_logic.c
    M modules/acc/acc_mod.c
    M modules/acc/acc_mod.h

  Log Message:
  -----------
  acc: always try to load dialog module

In case the `cdr` flag is used as variable, we can not figure out during
startup parsing whether the dialog module should be loaded or not.
Therefore we always try to load the dialog module, and in case we can't
and the `cdr` flag is used, we trigger a warning.

(cherry picked from commit f54e3fd767a6906df260f810baf62cdd04b2e42a)


  Commit: 3234f69ec023aca0ef9acc51a69f8ab540783ae4
      https://github.com/OpenSIPS/opensips/commit/3234f69ec023aca0ef9acc51a69f8ab540783ae4
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M modules/acc/acc_mod.c

  Log Message:
  -----------
  acc: register DLGCB_LOADED callback in mod init

Move the registration from the dependencies function, because at that
point the dialog module does not have anything loaded.

(cherry picked from commit 68a764c06785c5fdf7904920cbc7ae0aedcf817b)


  Commit: 9092269cb16146408e241665d07656cc4f82c316
      https://github.com/OpenSIPS/opensips/commit/9092269cb16146408e241665d07656cc4f82c316
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M modules/acc/acc.c
    M modules/acc/acc.h
    M modules/acc/acc_logic.c

  Log Message:
  -----------
  acc: store ctx in dialog when starting accounting

(cherry picked from commit a105be21ba27d9e796e6a158b30278777c656ca8)


  Commit: 24ce6919ecc61f2f9fca5f73048ba698d563e0d9
      https://github.com/OpenSIPS/opensips/commit/24ce6919ecc61f2f9fca5f73048ba698d563e0d9
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2019-09-19 (Thu, 19 Sep 2019)

  Changed paths:
    M main.c
    M modules/aaa_radius/aaa_radius.c
    M modules/acc/acc_mod.c
    M modules/alias_db/alias_db.c
    M modules/auth/auth_mod.c
    M modules/auth_aaa/authaaa_mod.c
    M modules/auth_db/authdb_mod.c
    M modules/avpops/avpops.c
    M modules/b2b_entities/b2b_entities.c
    M modules/b2b_logic/b2b_logic.c
    M modules/b2b_sca/b2b_sca.c
    M modules/benchmark/benchmark.c
    M modules/cachedb_cassandra/cachedb_cassandra.c
    M modules/cachedb_couchbase/cachedb_couchbase.c
    M modules/cachedb_local/cachedb_local.c
    M modules/cachedb_memcached/cachedb_memcached.c
    M modules/cachedb_mongodb/cachedb_mongodb.c
    M modules/cachedb_redis/cachedb_redis.c
    M modules/cachedb_sql/cachedb_sql.c
    M modules/call_center/call_center.c
    M modules/call_control/call_control.c
    M modules/carrierroute/carrierroute.c
    M modules/cfgutils/cfgutils.c
    M modules/cgrates/cgrates.c
    M modules/clusterer/clusterer_mod.c
    M modules/compression/compression.c
    M modules/cpl_c/cpl.c
    M modules/db_berkeley/db_berkeley.c
    M modules/db_cachedb/db_cachedb.c
    M modules/db_flatstore/flatstore_mod.c
    M modules/db_http/db_http.c
    M modules/db_mysql/db_mysql.c
    M modules/db_oracle/db_oracle.c
    M modules/db_perlvdb/perlvdb.c
    M modules/db_postgres/db_postgres.c
    M modules/db_sqlite/db_sqlite.c
    M modules/db_text/dbtext.c
    M modules/db_unixodbc/db_unixodbc.c
    M modules/db_virtual/db_virtual.c
    M modules/dialog/dialog.c
    M modules/dialplan/dialplan.c
    M modules/dispatcher/dispatcher.c
    M modules/diversion/diversion.c
    M modules/dns_cache/dns_cache.c
    M modules/domain/domain_mod.c
    M modules/domainpolicy/domainpolicy_mod.c
    M modules/drouting/drouting.c
    M modules/emergency/emergency_methods.c
    M modules/enum/enum_mod.c
    M modules/event_datagram/event_datagram.c
    M modules/event_flatstore/event_flatstore.c
    M modules/event_jsonrpc/event_jsonrpc.c
    M modules/event_rabbitmq/event_rabbitmq.c
    M modules/event_route/event_route.c
    M modules/event_routing/event_routing.c
    M modules/event_virtual/event_virtual.c
    M modules/event_xmlrpc/event_xmlrpc.c
    M modules/exec/exec_mod.c
    M modules/fraud_detection/fraud_detection.c
    M modules/freeswitch/fs_mod.c
    M modules/freeswitch_scripting/fss_mod.c
    M modules/gflags/gflags.c
    M modules/group/group_mod.c
    M modules/h350/h350_mod.c
    M modules/httpd/httpd.c
    M modules/identity/identity.c
    M modules/imc/imc.c
    M modules/jabber/jabber.c
    M modules/json/json.c
    M modules/jsonrpc/jsonrpc.c
    M modules/ldap/ldap_mod.c
    M modules/load_balancer/load_balancer.c
    M modules/lua/siplua.c
    M modules/mangler/mangler.c
    M modules/mathops/mathops.c
    M modules/maxfwd/maxfwd.c
    M modules/mediaproxy/mediaproxy.c
    M modules/mi_datagram/mi_datagram.c
    M modules/mi_fifo/mi_fifo.c
    M modules/mi_http/mi_http.c
    M modules/mi_json/mi_json.c
    M modules/mi_xmlrpc_ng/mi_xmlrpc_http.c
    M modules/mid_registrar/mid_registrar.c
    M modules/mmgeoip/mmgeoip.c
    M modules/msilo/msilo.c
    M modules/nat_traversal/nat_traversal.c
    M modules/nathelper/nathelper.c
    M modules/options/mod_options.c
    M modules/osp/osp_mod.c
    M modules/path/path_mod.c
    M modules/peering/peering.c
    M modules/perl/perl.c
    M modules/permissions/permissions.c
    M modules/pi_http/pi_http.c
    M modules/pike/pike.c
    M modules/presence/presence.c
    M modules/presence_callinfo/presence_callinfo.c
    M modules/presence_dialoginfo/presence_dialoginfo.c
    M modules/presence_mwi/presence_mwi.c
    M modules/presence_xcapdiff/presence_xcapdiff.c
    M modules/presence_xml/presence_xml.c
    M modules/proto_bin/proto_bin.c
    M modules/proto_hep/proto_hep.c
    M modules/proto_sctp/proto_sctp.c
    M modules/proto_tls/proto_tls.c
    M modules/proto_ws/proto_ws.c
    M modules/proto_wss/proto_wss.c
    M modules/pua/pua.c
    M modules/pua_bla/pua_bla.c
    M modules/pua_dialoginfo/pua_dialoginfo.c
    M modules/pua_mi/pua_mi.c
    M modules/pua_usrloc/pua_usrloc.c
    M modules/pua_xmpp/pua_xmpp.c
    M modules/python/python_mod.c
    M modules/qos/qos.c
    M modules/rabbitmq/rabbitmq.c
    M modules/ratelimit/ratelimit.c
    M modules/regex/regex_mod.c
    M modules/registrar/reg_mod.c
    M modules/rest_client/rest_client.c
    M modules/rls/rls.c
    M modules/rr/rr_mod.c
    M modules/rtpengine/rtpengine.c
    M modules/rtpproxy/rtpproxy.c
    M modules/script_helper/script_helper.c
    M modules/seas/seas.c
    M modules/signaling/signaling.c
    M modules/sip_i/sip_i.c
    M modules/sipcapture/sipcapture.c
    M modules/sipmsgops/sipmsgops.c
    M modules/siprec/siprec.c
    M modules/siptrace/siptrace.c
    M modules/sl/sl.c
    M modules/sms/sms.c
    M modules/sngtc/sngtc.c
    M modules/snmpstats/snmpstats.h
    M modules/speeddial/speeddial.c
    M modules/sql_cacher/sql_cacher.c
    M modules/sst/sst.c
    M modules/statistics/statistics.c
    M modules/stun/stun.c
    M modules/textops/textops.c
    M modules/tls_mgm/tls_mgm.c
    M modules/tm/tm.c
    M modules/topology_hiding/topology_hiding.c
    M modules/uac/uac.c
    M modules/uac_auth/uac_auth.c
    M modules/uac_redirect/redirect.c
    M modules/uac_registrant/registrant.c
    M modules/uri/uri_mod.c
    M modules/userblacklist/userblacklist.c
    M modules/usrloc/ul_mod.c
    M modules/xcap/xcap_mod.c
    M modules/xcap_client/xcap_client.c
    M modules/xml/xml.c
    M modules/xmpp/xmpp.c
    M net/proto_tcp/proto_tcp.c
    M net/proto_udp/proto_udp.c
    M sr_module.c
    M sr_module.h

  Log Message:
  -----------
  Rename the mod_exports dependencies function to preinit

Commit b29931e4f added a new function in `mod_exports`, sadly named
`dependency` function. This created a confusion with the existing
dependency mechanism.
This commit changes renames the newly added function to `preinit`.

Kudos to Liviu Chircu and Vlad Patrascu for arguing about this.

(cherry picked from commit fed5bade4ee435a0431efbb224ba21291c708467)


Compare: https://github.com/OpenSIPS/opensips/compare/22273d9c8fe2...24ce6919ecc6



More information about the Devel mailing list