[sr-dev] git:master:1b4afb70: keepalive: manage the `ping_from` config value as str.

Daniel Martínez Ruiz d.martinez at zaleos.net
Wed Jun 24 21:00:19 CEST 2020


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

Author: Daniel Martínez Ruiz <d.martinez at zaleos.net>
Committer: Daniel Martínez Ruiz <d.martinez at zaleos.net>
Date: 2020-06-24T10:38:36+02:00

keepalive: manage the `ping_from` config value as str.

Managing the config value as a string (`char*`) doesn't change the string size, so the value is cut off to the default value size (26 chars).

---

Modified: src/modules/keepalive/keepalive_mod.c

---

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

---

diff --git a/src/modules/keepalive/keepalive_mod.c b/src/modules/keepalive/keepalive_mod.c
index e1da2e9db2..bcf021d461 100644
--- a/src/modules/keepalive/keepalive_mod.c
+++ b/src/modules/keepalive/keepalive_mod.c
@@ -83,8 +83,8 @@ static param_export_t params[] = {
 	{"ping_interval", PARAM_INT, &ka_ping_interval},
 	{"destination", PARAM_STRING | USE_FUNC_PARAM,
 				(void *)ka_mod_add_destination},
-	{"ping_from", PARAM_STRING,	&ka_ping_from},
-	{"delete_counter", PARAM_INT,	&ka_counter_del},
+	{"ping_from", PARAM_STR, &ka_ping_from},
+	{"delete_counter", PARAM_INT, &ka_counter_del},
 	{0, 0, 0}
 };
 




More information about the sr-dev mailing list