[sr-dev] git:master:fa74be53: Erlang: Erlang module assumes pvi.type is zero

Daniel-Constantin Mierla miconda at gmail.com
Fri Feb 18 15:40:09 CET 2022


Module: kamailio
Branch: master
Commit: fa74be53232d56797209a630823a20346f9d2597
URL: https://github.com/kamailio/kamailio/commit/fa74be53232d56797209a630823a20346f9d2597

Author: James Van Vleet <james at vanvleet.net>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-02-18T15:40:04+01:00

Erlang: Erlang module assumes pvi.type is zero

Related to this commit: https://github.com/kamailio/kamailio/commit/7bb2669528a819ec29a8193eebc9c641edd69993

---

Modified: src/modules/erlang/pv_atom.c
Modified: src/modules/erlang/pv_pid.c
Modified: src/modules/erlang/pv_ref.c
Modified: src/modules/erlang/pv_xbuff.c

---

Diff:  https://github.com/kamailio/kamailio/commit/fa74be53232d56797209a630823a20346f9d2597.diff
Patch: https://github.com/kamailio/kamailio/commit/fa74be53232d56797209a630823a20346f9d2597.patch

---

diff --git a/src/modules/erlang/pv_atom.c b/src/modules/erlang/pv_atom.c
index b37f01560f..092672751c 100644
--- a/src/modules/erlang/pv_atom.c
+++ b/src/modules/erlang/pv_atom.c
@@ -51,6 +51,9 @@ int pv_atom_parse_name(pv_spec_t *sp, str *in)
 
 	name.s = p;
 
+	/*pvi.type now defaults to 4, breaking the erlang module's type management*/
+	sp->pvp.pvi.type = 0;
+
 	while (is_in_str(p, in)) {
 		if (*p == '[' || *p== '=')
 			break;
diff --git a/src/modules/erlang/pv_pid.c b/src/modules/erlang/pv_pid.c
index 2de3f5e698..acb2bee5b2 100644
--- a/src/modules/erlang/pv_pid.c
+++ b/src/modules/erlang/pv_pid.c
@@ -54,6 +54,9 @@ int pv_pid_parse_name(pv_spec_t *sp, str *in)
 
 	name.s = p;
 
+	/*pvi.type now defaults to 4, breaking the erlang module's type management*/
+	sp->pvp.pvi.type = 0;
+
 	while (is_in_str(p, in)) {
 		if (*p == '[' || *p== '=')
 			break;
diff --git a/src/modules/erlang/pv_ref.c b/src/modules/erlang/pv_ref.c
index 052f7ced90..927cb4b855 100644
--- a/src/modules/erlang/pv_ref.c
+++ b/src/modules/erlang/pv_ref.c
@@ -54,6 +54,9 @@ int pv_ref_parse_name(pv_spec_t *sp, str *in)
 
 	name.s = p;
 
+	/*pvi.type now defaults to 4, breaking the erlang module's type management*/
+	sp->pvp.pvi.type = 0;
+
 	while (is_in_str(p, in)) {
 		if (*p == '[' || *p== '=')
 			break;
diff --git a/src/modules/erlang/pv_xbuff.c b/src/modules/erlang/pv_xbuff.c
index ce6e2bd2eb..894c36784c 100644
--- a/src/modules/erlang/pv_xbuff.c
+++ b/src/modules/erlang/pv_xbuff.c
@@ -198,6 +198,9 @@ int pv_xbuff_parse_name(pv_spec_t *sp, str *in)
 
 	name.s = p;
 
+	/*pvi.type now defaults to 4, breaking the erlang module's type management*/
+	sp->pvp.pvi.type = 0;
+
 	while (is_in_str(p, in)) {
 		if (*p == '[' || *p== '=')
 			break;




More information about the sr-dev mailing list