[sr-dev] Re: [kamailio/kamailio] registrar: adding contact and UA to xavp_cfg (Issue #3753)
This issue is stale because it has been open 6 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3753#issuecomment-2058126856 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:f4332447: modules: readme files regenerated - acc ... [skip ci]
Module: kamailio Branch: master Commit: f43324473bfd9b6c5db59c5691e316d32c15be81 URL: https://github.com/kamailio/kamailio/commit/f43324473bfd9b6c5db59c5691e316d32c15be81 Author: Kamailio Dev Committer: Kamailio Dev Date: 2024-04-15T21:31:23+02:00 modules: readme files regenerated - acc ... [skip ci] --- Modified: src/modules/acc/README --- Diff: https://github.com/kamailio/kamailio/commit/f43324473bfd9b6c5db59c5691e316d32c15be81.diff Patch: https://github.com/kamailio/kamailio/commit/f43324473bfd9b6c5db59c5691e316d32c15be81.patch --- diff --git a/src/modules/acc/README b/src/modules/acc/README index 666f8844a52..bbe356a17d5 100644 --- a/src/modules/acc/README +++ b/src/modules/acc/README @@ -1150,7 +1150,7 @@ modparam("acc", "cdr_facility", "LOG_DAEMON") Example 1.35. cdr_extra example ... -modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)" +modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)") ... 6.36. cdr_extra_nullable (integer) ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:1adc0724: acc: docs - small fix to cdr_extra param example
Module: kamailio Branch: master Commit: 1adc07240c153b40f6bf5cb700145f8789070bcc URL: https://github.com/kamailio/kamailio/commit/1adc07240c153b40f6bf5cb700145f8789070bcc Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-04-15T21:29:54+02:00 acc: docs - small fix to cdr_extra param example --- Modified: src/modules/acc/doc/acc_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/1adc07240c153b40f6bf5cb700145f8789070bcc.diff Patch: https://github.com/kamailio/kamailio/commit/1adc07240c153b40f6bf5cb700145f8789070bcc.patch --- diff --git a/src/modules/acc/doc/acc_admin.xml b/src/modules/acc/doc/acc_admin.xml index 69be72fe2e6..37a1365627e 100644 --- a/src/modules/acc/doc/acc_admin.xml +++ b/src/modules/acc/doc/acc_admin.xml @@ -1156,7 +1156,7 @@ modparam("acc", "cdr_facility", "LOG_DAEMON") cdr_extra example ... -modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)" +modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)") ... ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] rtpengine: fix pkg mem leak in send_rtpp_command() (PR #3813)
Sure. Thanks @henningw -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3813#issuecomment-2057506104 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] [kamailio/kamailio] free_fixup functions in cmd_export_t are not called (Issue #3814)
### Description It seems that the fixup_free_* functions are not getting called when used with: ``` static cmd_export_t cmds[] = { {"acc_log_request", (cmd_function)w_acc_log_request, 1, acc_fixup, free_acc_fixup, ANY_ROUTE}, // ... {0, 0, 0, 0, 0, 0} }; static int free_acc_fixup(void **param, int param_no) { LM_CRIT("acc free fixup = %d\n", param_no); if(*param) { pkg_free(*param); *param = 0; } return 0; } ``` Nothing is getting logged from the function. Is this expected not to print in free_fixup due to the destruction of kamailio and the logging is not reliable? I also used gdb and added some breakpoints in `fixup` and `free_fixup` functions in some other modules (file_out) and the breakpoint was only found in `fixup` but not in `free_fixup`. When is the `free_fixup` supposed to be called, at kamailio destruction or after fixing it and before the main loop starts? ### Troubleshooting Reproduction Use any module that has a custom (maybe also provided from core) `free_fixup` function, and monitor if `free_fixup` is called using debug mode. Log Messages ``` Apr 15 15:52:03 app01 kamailio[812169]: INFO: [core/mem/q_malloc.c:402]: qm_malloc(): qm_malloc(0x7fcdcab18010, 56) called from file_out: file_out.c: fo_fixup_str_index(287) Apr 15 15:52:03 app01 kamailio[812169]: INFO: [core/mem/q_malloc.c:449]: qm_malloc(): qm_malloc(0x7fcdcab18010, 64) returns address 0x7fcdcacc4280 frag. 0x7fcdcacc4240 (size=64) on 1 -th hit``` `0x7fcdcacc4240` fragment is not found anywhere in the logs reported that it was freed unlike other malloced resources. ``` ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` version: kamailio 5.9.0-dev0 (x86_64/linux) 8bc64a flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 8bc64a compiled on 15:32:09 Apr 15 2024 with gcc 10.5.0 ``` * **Operating System**: ``` No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 20.04.6 LTS Release:20.04 Codename: focal 5.4.0-176-generic #196-Ubuntu SMP Fri Mar 22 16:46:39 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux ``` -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3814 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] rtpengine: fix pkg mem leak in send_rtpp_command() (PR #3813)
> Hi @henningw , memory is getting allocated in line 3660 , which was not > getting freed. request.s = pkg_malloc(len + 1); Sure. :-) I checked in the lwsc module (which is actually called from the rtpengine module in this function part) to no have a double free. If nobody else comment, I will merge it tomorrow. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3813#issuecomment-2057182250 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Maintenance work overnight on kamailio.org server
Hello, there is some planned work on the data center infrastructure hosting kamailio.org server that is going to affect briefly the web server (web site, wiki) and the mailing lists. The downtime is expected to be 10-15 minutes around 1:00am Western Europe time (CEST / GMT+2), but if it takes longer or repeats, be patient for a while. Cheers, Daniel -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] rtpengine: fix pkg mem leak in send_rtpp_command() (PR #3813)
Hi @henningw , memory is getting allocated in line 3660 , which was not getting freed. request.s = pkg_malloc(len + 1); -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3813#issuecomment-2056502355 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] pike: fix documentation for reqs_density_per_unit (PR #3806)
I think in general it shouldn;t be merged. But I am also not really familiar and might have understood the inner workings of the modules. Some points though, might need updating like: - [re split between itself and its child--both of them gone have x/2.](https://www.kamailio.org/docs/modules/stable/modules/pike.html#idm153) I can't match this somewhere in the code, and maybe the limits are not what the dev guide suggests. - when doing some debuging/testing and calling `kamcmd pike.list ALL` seems to have list nodes with negative expire (probably shouldn't exist and taken into account) and doesn't refresh the nodes correctly if requests are coming from this subnet. ``` Apr 15 10:11:37 app01 kam5.7.2/sbin/kamailio[358099]: DEBUG: pike [pike_rpc.c:78]: traverse_subtree(): pike:rpc traverse_subtree, not IP leaf, depth: 0, ip: x.0.0.0 hits[0,0], expires: -291 Apr 15 10:11:37 app01 kam5.7.2/sbin/kamailio[358099]: DEBUG: pike [pike_rpc.c:49]: traverse_subtree(): pike:rpc traverse_subtree, depth: 1, byte: 203 Apr 15 10:11:37 app01 kam5.7.2/sbin/kamailio[358099]: DEBUG: pike [pike_rpc.c:78]: traverse_subtree(): pike:rpc traverse_subtree, not IP leaf, depth: 1, ip: x.y.0.0 hits[0,0], expires: -291 Apr 15 10:11:37 app01 kam5.7.2/sbin/kamailio[358099]: DEBUG: pike [pike_rpc.c:49]: traverse_subtree(): pike:rpc traverse_subtree, depth: 2, byte: 64 Apr 15 10:11:37 app01 kam5.7.2/sbin/kamailio[358099]: DEBUG: pike [pike_rpc.c:78]: traverse_subtree(): pike:rpc traverse_subtree, not IP leaf, depth: 2, ip: z.y.z.0 hits[0,0], expires: -171 ``` -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3806#issuecomment-2056466304 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] core/tcp_main: Match protocol when lookup tcp/tls connections (PR #3810)
Ok, thanks for the review! If there are no other comments, I will merge it today -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3810#issuecomment-2056406356 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Option to not add received via param (Issue #3515)
Did u have solution for this? got same issue. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3515#issuecomment-2056376090 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:70f19ddd: pkg/kamailio: app_lua_sr module relocated to archive [skip ci]
Module: kamailio Branch: master Commit: 70f19ddd16b392f46e32b41536bde6fba8e7e14a URL: https://github.com/kamailio/kamailio/commit/70f19ddd16b392f46e32b41536bde6fba8e7e14a Author: Victor Seva Committer: Victor Seva Date: 2024-04-15T11:09:40+02:00 pkg/kamailio: app_lua_sr module relocated to archive [skip ci] --- Modified: pkg/kamailio/alpine/APKBUILD Modified: pkg/kamailio/obs/kamailio.spec --- Diff: https://github.com/kamailio/kamailio/commit/70f19ddd16b392f46e32b41536bde6fba8e7e14a.diff Patch: https://github.com/kamailio/kamailio/commit/70f19ddd16b392f46e32b41536bde6fba8e7e14a.patch --- diff --git a/pkg/kamailio/alpine/APKBUILD b/pkg/kamailio/alpine/APKBUILD index 0696216564a..a2c1f4ac238 100644 --- a/pkg/kamailio/alpine/APKBUILD +++ b/pkg/kamailio/alpine/APKBUILD @@ -157,7 +157,7 @@ _mod_list_presence="presence presence_conference presence_dialoginfo \ rls xcap_client xcap_server" # - modules depending on lua library -_mod_list_lua="app_lua app_lua_sr" +_mod_list_lua="app_lua" # - modules depending on perl library _mod_list_perl="app_perl db_perlvdb" diff --git a/pkg/kamailio/obs/kamailio.spec b/pkg/kamailio/obs/kamailio.spec index 6d79bb8ec9f..a9a33082316 100644 --- a/pkg/kamailio/obs/kamailio.spec +++ b/pkg/kamailio/obs/kamailio.spec @@ -2054,9 +2054,7 @@ fi %files lua %defattr(-,root,root) %doc %{_docdir}/kamailio/modules/README.app_lua -%doc %{_docdir}/kamailio/modules/README.app_lua_sr %{_libdir}/kamailio/modules/app_lua.so -%{_libdir}/kamailio/modules/app_lua_sr.so %endif ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:0c49d30f: app_lua_sr: module relocated to archive
Module: kamailio Branch: master Commit: 0c49d30f9d5ae1b1c4b5210851e30725dfa7aa8b URL: https://github.com/kamailio/kamailio/commit/0c49d30f9d5ae1b1c4b5210851e30725dfa7aa8b Author: Victor Seva Committer: Victor Seva Date: 2024-04-15T11:09:02+02:00 app_lua_sr: module relocated to archive --- Modified: src/Makefile.groups Removed: src/modules/app_lua_sr/Makefile Removed: src/modules/app_lua_sr/README Removed: src/modules/app_lua_sr/app_lua_sr_api.c Removed: src/modules/app_lua_sr/app_lua_sr_api.h Removed: src/modules/app_lua_sr/app_lua_sr_exp.c Removed: src/modules/app_lua_sr/app_lua_sr_exp.h Removed: src/modules/app_lua_sr/app_lua_sr_mod.c Removed: src/modules/app_lua_sr/doc/Makefile Removed: src/modules/app_lua_sr/doc/app_lua_sr.xml Removed: src/modules/app_lua_sr/doc/app_lua_sr_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/0c49d30f9d5ae1b1c4b5210851e30725dfa7aa8b.diff Patch: https://github.com/kamailio/kamailio/commit/0c49d30f9d5ae1b1c4b5210851e30725dfa7aa8b.patch ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] rtpengine: fix pkg mem leak in send_rtpp_command() (PR #3813)
Looks good to me. The lwsc module seems to malloc its own memory for the sdata, so it should be freed in rtpengine module code. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3813#issuecomment-2056319994 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:94b9cd5d: modules: readme files regenerated - cfgutils ... [skip ci]
Module: kamailio Branch: master Commit: 94b9cd5d5ffafde86fbcbede2d9a018fc616b6b1 URL: https://github.com/kamailio/kamailio/commit/94b9cd5d5ffafde86fbcbede2d9a018fc616b6b1 Author: Kamailio Dev Committer: Kamailio Dev Date: 2024-04-15T11:01:29+02:00 modules: readme files regenerated - cfgutils ... [skip ci] --- Modified: src/modules/cfgutils/README --- Diff: https://github.com/kamailio/kamailio/commit/94b9cd5d5ffafde86fbcbede2d9a018fc616b6b1.diff Patch: https://github.com/kamailio/kamailio/commit/94b9cd5d5ffafde86fbcbede2d9a018fc616b6b1.patch --- diff --git a/src/modules/cfgutils/README b/src/modules/cfgutils/README index b7c8075fad9..cb6251b6719 100644 --- a/src/modules/cfgutils/README +++ b/src/modules/cfgutils/README @@ -65,9 +65,9 @@ Daniel-Constantin Mierla 4.12. set_gflag(flag) 4.13. reset_gflag(flag) 4.14. is_gflag(flag) - 4.15. lock(key) - 4.16. trylock(key) - 4.17. unlock(key) + 4.15. lock(key [, key2]) + 4.16. trylock(key [, key2]) + 4.17. unlock(key [, key2]) 4.18. check_route_exists(route) 4.19. route_if_exists(route) 4.20. core_hash(string1, string2, size) @@ -154,9 +154,9 @@ Chapter 1. Admin Guide 4.12. set_gflag(flag) 4.13. reset_gflag(flag) 4.14. is_gflag(flag) -4.15. lock(key) -4.16. trylock(key) -4.17. unlock(key) +4.15. lock(key [, key2]) +4.16. trylock(key [, key2]) +4.17. unlock(key [, key2]) 4.18. check_route_exists(route) 4.19. route_if_exists(route) 4.20. core_hash(string1, string2, size) @@ -304,9 +304,9 @@ modparam("cfgutils", "lock_set_size", 4) 4.12. set_gflag(flag) 4.13. reset_gflag(flag) 4.14. is_gflag(flag) - 4.15. lock(key) - 4.16. trylock(key) - 4.17. unlock(key) + 4.15. lock(key [, key2]) + 4.16. trylock(key [, key2]) + 4.17. unlock(key [, key2]) 4.18. check_route_exists(route) 4.19. route_if_exists(route) 4.20. core_hash(string1, string2, size) @@ -506,16 +506,18 @@ if(is_gflag("4")) }; ... -4.15. lock(key) +4.15. lock(key [, key2]) Lock the key. Can be used to synchronize operations in config file, a - hash id is computed over the key and appropriate lock is set in the + hash id is computed over the keys and appropriate lock is set in the lock array controlled by parameter "lock_set_size". Do not use lock() after another lock() unless you are sure the keys hit different array entries. ???key??? can be static string or string with PVs. + ???key2??? is optional and can be static string or string with PVs. + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE. @@ -524,13 +526,15 @@ if(is_gflag("4")) lock("$rU"); ... -4.16. trylock(key) +4.16. trylock(key [, key2]) Try to lock the key. If the lock can not be obtained (possibly already locked), the function returns an error and script execution continues. ???key??? can be static string or string with PVs. + ???key2??? is optional and can be static string or string with PVs. + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE. @@ -542,12 +546,14 @@ if (trylock("$rU")) { } ... -4.17. unlock(key) +4.17. unlock(key [, key2]) Unlock the key. ???key??? can be static string or string with PVs. + ???key2??? is optional and can be static string or string with PVs. + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE. ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] cfgutils lock (PR #3808)
Merged #3808 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3808#event-12465438211 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:42476974: cfgutils: expose optional second string key for hashing at locks
Module: kamailio Branch: master Commit: 424769743c93dea5a4d2c21f7a0ef8ea8779a5bb URL: https://github.com/kamailio/kamailio/commit/424769743c93dea5a4d2c21f7a0ef8ea8779a5bb Author: Victor Seva Committer: Victor Seva Date: 2024-04-15T10:50:26+02:00 cfgutils: expose optional second string key for hashing at locks --- Modified: src/modules/cfgutils/api.h Modified: src/modules/cfgutils/cfgutils.c --- Diff: https://github.com/kamailio/kamailio/commit/424769743c93dea5a4d2c21f7a0ef8ea8779a5bb.diff Patch: https://github.com/kamailio/kamailio/commit/424769743c93dea5a4d2c21f7a0ef8ea8779a5bb.patch ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:235591cd: cfgutils: document second optional string for hashing on lock functions family [skip ci]
Module: kamailio Branch: master Commit: 235591cd704529589bbde700b6232ac55281d071 URL: https://github.com/kamailio/kamailio/commit/235591cd704529589bbde700b6232ac55281d071 Author: Victor Seva Committer: Victor Seva Date: 2024-04-15T10:50:26+02:00 cfgutils: document second optional string for hashing on lock functions family [skip ci] --- Modified: src/modules/cfgutils/doc/cfgutils_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/235591cd704529589bbde700b6232ac55281d071.diff Patch: https://github.com/kamailio/kamailio/commit/235591cd704529589bbde700b6232ac55281d071.patch --- diff --git a/src/modules/cfgutils/doc/cfgutils_admin.xml b/src/modules/cfgutils/doc/cfgutils_admin.xml index 1cab1284fd5..35721e31c6d 100644 --- a/src/modules/cfgutils/doc/cfgutils_admin.xml +++ b/src/modules/cfgutils/doc/cfgutils_admin.xml @@ -485,10 +485,10 @@ if(is_gflag("4")) - lock(key) + lock(key [, key2]) Lock the key. Can be used to synchronize operations in config file, - a hash id is computed over the key and appropriate lock is set in the + a hash id is computed over the keys and appropriate lock is set in the lock array controlled by parameter "lock_set_size". Do not use lock() after another lock() unless you are sure the keys hit different array entries. @@ -497,6 +497,9 @@ if(is_gflag("4")) key can be static string or string with PVs. + key2 is optional and can be static string or string with PVs. + + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE. @@ -510,7 +513,7 @@ lock("$rU"); - trylock(key) + trylock(key [, key2]) Try to lock the key. If the lock can not be obtained (possibly already locked), the function returns an error and script execution continues. @@ -519,6 +522,9 @@ lock("$rU"); key can be static string or string with PVs. + key2 is optional and can be static string or string with PVs. + + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE. @@ -535,7 +541,7 @@ if (trylock("$rU")) { - unlock(key) + unlock(key [, key2]) Unlock the key. @@ -543,6 +549,9 @@ if (trylock("$rU")) { key can be static string or string with PVs. + key2 is optional and can be static string or string with PVs. + + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE. @@ -854,4 +863,3 @@ if (rand_event()) { - ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:92ac41c1: app_lua_sr: support second str for cfgutils lock
Module: kamailio Branch: master Commit: 92ac41c1e770077d39516fc049358b3c3897d590 URL: https://github.com/kamailio/kamailio/commit/92ac41c1e770077d39516fc049358b3c3897d590 Author: Victor Seva Committer: Victor Seva Date: 2024-04-15T10:50:26+02:00 app_lua_sr: support second str for cfgutils lock --- Modified: src/modules/app_lua_sr/app_lua_sr_exp.c --- Diff: https://github.com/kamailio/kamailio/commit/92ac41c1e770077d39516fc049358b3c3897d590.diff Patch: https://github.com/kamailio/kamailio/commit/92ac41c1e770077d39516fc049358b3c3897d590.patch --- diff --git a/src/modules/app_lua_sr/app_lua_sr_exp.c b/src/modules/app_lua_sr/app_lua_sr_exp.c index 522f0cfb87a..80a4cb69042 100644 --- a/src/modules/app_lua_sr/app_lua_sr_exp.c +++ b/src/modules/app_lua_sr/app_lua_sr_exp.c @@ -2783,20 +2783,29 @@ static const luaL_Reg _sr_sanity_Map[] = { static int lua_sr_cfgutils_lock(lua_State *L) { int ret; - str lkey; + str lkey, lkey2; if(!(_sr_lua_exp_reg_mods & SR_LUA_EXP_MOD_CFGUTILS)) { LM_WARN("weird: cfgutils function executed but module not " "registered\n"); return app_lua_return_error(L); } - if(lua_gettop(L) != 1) { + ret = lua_gettop(L); + if(ret < 1 || ret > 3) { LM_WARN("invalid number of parameters from Lua\n"); return app_lua_return_error(L); } + if(ret > 1) { + lkey2.s = (char *)lua_tostring(L, -1); + lkey2.len = strlen(lkey2.s); + } lkey.s = (char *)lua_tostring(L, -1); lkey.len = strlen(lkey.s); - ret = _lua_cfgutilsb.mlock(); + if(ret > 1) { + ret = _lua_cfgutilsb.mlock(, ); + } else { + ret = _lua_cfgutilsb.mlock(, NULL); + } return app_lua_return_int(L, ret); } @@ -2808,20 +2817,29 @@ static int lua_sr_cfgutils_lock(lua_State *L) static int lua_sr_cfgutils_unlock(lua_State *L) { int ret; - str lkey; + str lkey, lkey2; if(!(_sr_lua_exp_reg_mods & SR_LUA_EXP_MOD_CFGUTILS)) { LM_WARN("weird: cfgutils function executed but module not " "registered\n"); return app_lua_return_error(L); } - if(lua_gettop(L) != 1) { + ret = lua_gettop(L); + if(ret < 1 || ret > 3) { LM_WARN("invalid number of parameters from Lua\n"); return app_lua_return_error(L); } + if(ret > 1) { + lkey2.s = (char *)lua_tostring(L, -1); + lkey2.len = strlen(lkey2.s); + } lkey.s = (char *)lua_tostring(L, -1); lkey.len = strlen(lkey.s); - ret = _lua_cfgutilsb.munlock(); + if(ret > 1) { + ret = _lua_cfgutilsb.munlock(, ); + } else { + ret = _lua_cfgutilsb.munlock(, NULL); + } return app_lua_return_int(L, ret); } ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:0fae1026: pkg/kamailio/deb: version 5.9.0~dev1 [skip ci]
Module: kamailio Branch: master Commit: 0fae1026d49aa765b4451d2534972b57a2c09998 URL: https://github.com/kamailio/kamailio/commit/0fae1026d49aa765b4451d2534972b57a2c09998 Author: Victor Seva Committer: Victor Seva Date: 2024-04-15T08:59:53+02:00 pkg/kamailio/deb: version 5.9.0~dev1 [skip ci] reset debian/changelog for 5.9.x series --- Modified: pkg/kamailio/deb/bionic/changelog Modified: pkg/kamailio/deb/bookworm/changelog Modified: pkg/kamailio/deb/bullseye/changelog Modified: pkg/kamailio/deb/buster/changelog Modified: pkg/kamailio/deb/debian/changelog Modified: pkg/kamailio/deb/focal/changelog Modified: pkg/kamailio/deb/jammy/changelog Modified: pkg/kamailio/deb/jessie/changelog Modified: pkg/kamailio/deb/precise/changelog Modified: pkg/kamailio/deb/sid/changelog Modified: pkg/kamailio/deb/stretch/changelog Modified: pkg/kamailio/deb/trusty/changelog Modified: pkg/kamailio/deb/wheezy/changelog Modified: pkg/kamailio/deb/xenial/changelog --- Diff: https://github.com/kamailio/kamailio/commit/0fae1026d49aa765b4451d2534972b57a2c09998.diff Patch: https://github.com/kamailio/kamailio/commit/0fae1026d49aa765b4451d2534972b57a2c09998.patch ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org