Not a big deal, but valgrind pauses during debugging.

#1. During SEMS startup, INFO log, complains that
AmConfig::SIP_interface::tcp_connect_timeout is not initialized.
==2256== Use of uninitialised value of size 8
==2256==    at 0x331CA43AAB: _itoa_word (_itoa.c:195)
==2256==    by 0x331CA46662: vfprintf (vfprintf.c:1640)
==2256==    by 0x331CA6F761: vsnprintf (vsnprintf.c:120)
==2256==    by 0x331CA4F232: snprintf (snprintf.c:35)
==2256==    by 0x48BC92: AmConfig::dump_Ifs() (AmConfig.cpp:1181)
==2256==    by 0x521491: main (sems.cpp:405)
==2256==  Uninitialised value was created by a stack allocation
==2256==    at 0x48ED31: AmConfig::finalizeIPConfig()
(AmConfig.cpp:1102)

#2. AmRtpStream::compile_and_send() calls AmRtpPacket::send(), valgrind
will complain 
"Conditional jump or move depends on uninitialised value(s)".
This is due from AmConfig::IP_interface::NetIfIdx not being initialized.



**** the following fixes take care of problems ****


diff --git a/core/AmConfig.cpp b/core/AmConfig.cpp
index 5cd8455..03ca856 100644
--- a/core/AmConfig.cpp
+++ b/core/AmConfig.cpp
@@ -153,7 +153,8 @@ static int readInterfaces(AmConfigReader& cfg);

 AmConfig::IP_interface::IP_interface()
   : LocalIP(),
-    PublicIP()
+    PublicIP(),
+    NetIfIdx(0)
 {
 }

@@ -161,7 +162,9 @@ AmConfig::SIP_interface::SIP_interface()
   : IP_interface(),
     LocalPort(5060),
     SigSockOpts(0),
-    RtpInterface(-1)
+    RtpInterface(-1),
+    tcp_connect_timeout(DEFAULT_TCP_CONNECT_TIMEOUT),
+    tcp_idle_timeout(DEFAULT_TCP_IDLE_TIMEOUT)
 {
 }


Kind Regards,
Joseph Stusick



_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to