It is unlikely that this patch solves any eventual issues that you had.
You changed the comparison of a pointer with NULL to 0 and, in C, NULL
and 0 are the same in context of pointers:
 - https://c-faq.com/null/nullor0.html
So practically there is not change in behaviour.
Cheers,
Daniel
On 21.12.22 15:41, Olle E. Johansson wrote:
> I suggest that this patch be backported :-)
>
> Cheers,
> /O
>
>> Begin forwarded message:
>>
>> *From: *Olle E. Johansson <oej(a)edvina.net>
>> *Subject: **[sr-dev] git:master:5c90e6e2: DMQ:
>> dmq_notification_address_list is initialized to NULL*
>> *Date: *21 December 2022 at 15:27:49 CET
>> *To: *sr-dev(a)lists.kamailio.org
>> *Reply-To: *"Kamailio (SER) - Development Mailing List"
>> <sr-dev(a)lists.kamailio.org>
>>
>> Module: kamailio
>> Branch: master
>> Commit: 5c90e6e2885a60a1dc5de5ff697c93d6fe59a9cb
>> URL:
>> https://github.com/kamailio/kamailio/commit/5c90e6e2885a60a1dc5de5ff697c93d…
>>
>> Author: Olle E. Johansson <oej(a)edvina.net>
>> Committer: Olle E. Johansson <oej(a)edvina.net>
>> Date: 2022-12-21T15:27:28+01:00
>>
>> DMQ: dmq_notification_address_list is initialized to NULL
>>
>> This code led to random and unpredictable behaviour when loading a
>> configuration with
>> multiple notification nodes.
>>
>> ---
>>
>> Modified: src/modules/dmq/dmq.c
>>
>> ---
>>
>> Diff:
>>  https://github.com/kamailio/kamailio/commit/5c90e6e2885a60a1dc5de5ff697c93d…
>> Patch:
>> https://github.com/kamailio/kamailio/commit/5c90e6e2885a60a1dc5de5ff697c93d…
>>
>> ---
>>
>> diff --git a/src/modules/dmq/dmq.c b/src/modules/dmq/dmq.c
>> index 843b7e3e4d2..f4a66c3d847 100644
>> --- a/src/modules/dmq/dmq.c
>> +++ b/src/modules/dmq/dmq.c
>> @@ -379,7 +379,7 @@ static int
>> dmq_add_notification_address(modparam_t type, void * val)
>> }
>>
>> /* initial allocation */
>> -if (dmq_notification_address_list == 0) {
>> +if (dmq_notification_address_list == NULL) {
>> dmq_notification_address_list = pkg_malloc(sizeof(str_list_t));
>> if (dmq_notification_address_list == NULL) {
>> PKG_MEM_ERROR;
>>
>> _______________________________________________
>> Kamailio (SER) - Development Mailing List
>> To unsubscribe send an email to sr-dev-leave(a)lists.kamailio.org
>
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Module: kamailio
Branch: master
Commit: 5fedf169d256e7e24fe2ce2b593af9a865ac9578
URL: https://github.com/kamailio/kamailio/commit/5fedf169d256e7e24fe2ce2b593af9a…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-12-20T10:46:41+01:00
modules: readme files regenerated - app_ruby ... [skip ci]
---
Modified: src/modules/app_ruby/README
---
Diff: https://github.com/kamailio/kamailio/commit/5fedf169d256e7e24fe2ce2b593af9a…
Patch: https://github.com/kamailio/kamailio/commit/5fedf169d256e7e24fe2ce2b593af9a…
---
diff --git a/src/modules/app_ruby/README b/src/modules/app_ruby/README
index 7d68583ccd..2554a990f8 100644
--- a/src/modules/app_ruby/README
+++ b/src/modules/app_ruby/README
@@ -135,15 +135,15 @@ modparam("app_ruby", "load", "/usr/local/etc/kamailio/ruby/myscript.rb")
internal functions from the app_ruby module, otherwise the ones from
core are used.
- Note: when set to 1, there were crashing reports that are under
- investigation, this option being provided as intermediary solution to
- preserve the behaviour from older versions.
+ Note: upt to version 5.7, when set to 1, there were crashing reports
+ that are under investigation, this option being provided as
+ intermediary solution to preserve the behaviour from older versions.
- Default value is ���0���.
+ Default value is ���1���.
Example 1.2. Set xval_mode parameter
...
-modparam("app_ruby", "xval_mode", 1)
+modparam("app_ruby", "xval_mode", 0)
...
3.3. modproc (str)
Module: kamailio
Branch: master
Commit: 4b5cdf184a77e60d75f1ddf1cd666c6f36a76d48
URL: https://github.com/kamailio/kamailio/commit/4b5cdf184a77e60d75f1ddf1cd666c6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-12-19T21:36:11+01:00
app_ruby: docs updated for xval_mode param
---
Modified: src/modules/app_ruby/doc/app_ruby_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/4b5cdf184a77e60d75f1ddf1cd666c6…
Patch: https://github.com/kamailio/kamailio/commit/4b5cdf184a77e60d75f1ddf1cd666c6…
---
diff --git a/src/modules/app_ruby/doc/app_ruby_admin.xml b/src/modules/app_ruby/doc/app_ruby_admin.xml
index ff957c6646..ae81a2a961 100644
--- a/src/modules/app_ruby/doc/app_ruby_admin.xml
+++ b/src/modules/app_ruby/doc/app_ruby_admin.xml
@@ -98,20 +98,20 @@ modparam("app_ruby", "load", "/usr/local/etc/kamailio/ruby/myscript.rb")
core are used.
</para>
<para>
- Note: when set to 1, there were crashing reports that are under
- investigation, this option being provided as intermediary
- solution to preserve the behaviour from older versions.
+ Note: upt to version 5.7, when set to 1, there were crashing
+ reports that are under investigation, this option being provided
+ as intermediary solution to preserve the behaviour from older versions.
</para>
<para>
<emphasis>
- Default value is <quote>0</quote>.
+ Default value is <quote>1</quote>.
</emphasis>
</para>
<example>
<title>Set <varname>xval_mode</varname> parameter</title>
<programlisting format="linespecific">
...
-modparam("app_ruby", "xval_mode", 1)
+modparam("app_ruby", "xval_mode", 0)
...
</programlisting>
</example>