[genivi-dlt] [Patch] Several patchs for Bugfix and improvements

Andersson, Gunnar gunnar.x.andersson at volvocars.com
Tue Aug 30 05:30:55 EDT 2016

A really big set of patches.  Thanks for the input.

I only reviewed the first patch, sorry.  It is not something I have time
to do personally very often. :-)

But there's something here that I have seen in this and other
project in many places:

+  if( *buf != NULL )
+  {
+    free(*buf);
+    *buf = NULL;
+  }

It is actually not necessary to check if a pointer is NULL before free().  
The C standard requires free(NULL) to have no effect.  I still agree you 
are doing the right thing to assign NULL to the variable itself, especially
in this case when it is an indirect pointer that lives inside of some
other data structure.

- Gunnar 
[1] http://linux.die.net/man/3/free  "If ptr is NULL, no operation is performed"
[2] http://stackoverflow.com/questions/1912325/checking-for-null-before-calling-free
(and the C standard says the same)

Gunnar Andersson
Lead Architect, GENIVI Alliance
Infotainment, Volvo Car Corporation

-----Original Message-----
From: genivi-diagnostic-log-and-trace [mailto:genivi-diagnostic-log-and-trace-bounces at mailman1.genivi.org] On Behalf Of yusuke-sato at apn.alpine.co.jp
Sent: den 30 augusti 2016 11:03
To: genivi-diagnostic-log-and-trace at lists.genivi.org
Cc: k-takahashi at apn.alpine.co.jp
Subject: [genivi-dlt] [Patch] Several patchs for Bugfix and improvements

Hello, Alex & mailing List listeners,

please find attached patches for bugfix and improvements.
I hope some of these patches helps you.

Short description of patches:

Fix memory leak issue in dlt-dbus.

Fix file name broken issue then file is transferred on 64 bit OS.

Accelerate file transfer speed in dlt-system

Fix segmentation fault issue in checking buffer usage.

Add debug log for file transfer feature of dlt-system

Fix the issue that handle of /tmp/dlt (daemon FIFO) never reset if 
dlt-daemon is killed

Add configuration of daemon FIFO size

Add configuration of option of Get Log Info response during context 
If we change the option in dlt.conf, we can reduce unnecessary context 
Option value is as follows.
# Apid and Ctid Only = 3, with LogLevel = 4, with TraceStatus = 5, with LL 
and TS = 6, with LL, TS, and Description = 7 

Fix the issue that dlt-daemon overwrites ECU ID even if user log message 
already has the ECU ID that is not default value

Fix the issue that memory for context description is not freed.

Any feedback is very appreciated.

Best regards.
Yusuke Sato
ATTENTION:This e-mail and any files transmitted with it are the property of 
Alpine Electronics, Inc and/or its affiliates, may be privileged and/or 
confidential, and are intended solely for the use of the individual or entity 
to whom this e-mail is addressed. If you are not one of the named recipients 
or otherwise have reason to believe that you have received this e-mail in 
error, please notify the sender and delete this message immediately from your
computer. Any other use, retention, dissemination, forwarding, printing or 
copying of this e-mail is strictly prohibited.


More information about the genivi-diagnostic-log-and-trace mailing list