summaryrefslogtreecommitdiff
path: root/src/console/dlt-control.c
diff options
context:
space:
mode:
authorOnkar Palkar <onkar.palkar@wipro.com>2017-02-02 17:49:34 +0900
committerChristoph Lipka <clipka@jp.adit-jv.com>2017-02-06 11:51:52 +0900
commit859802afd10d159b9e370058bca53c8c12bba2f5 (patch)
treec0d21e00fb567120deac8f3911f8f958716f7e7a /src/console/dlt-control.c
parenta961dba0013ed2119aa719546c63212459753549 (diff)
downloadDLT-daemon-859802afd10d159b9e370058bca53c8c12bba2f5.tar.gz
dlt-client: fix dlt_client_cleanup memory handling
Setter function introduced for seting up string parameters which are free'd in dlt_client_cleanup Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Diffstat (limited to 'src/console/dlt-control.c')
-rw-r--r--src/console/dlt-control.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/console/dlt-control.c b/src/console/dlt-control.c
index 8a66d0a..832343b 100644
--- a/src/console/dlt-control.c
+++ b/src/console/dlt-control.c
@@ -473,9 +473,12 @@ int main(int argc, char* argv[])
{
for (index = optind; index < argc; index++)
{
- g_dltclient.servIP = argv[index];
+ if(dlt_client_set_server_ip(&g_dltclient, argv[index]) == -1)
+ {
+ pr_error("set server ip didn't succeed\n");
+ return -1;
+ }
}
-
if (g_dltclient.servIP == 0)
{
/* no hostname selected, show usage and terminate */
@@ -489,9 +492,12 @@ int main(int argc, char* argv[])
{
for (index = optind; index < argc; index++)
{
- g_dltclient.serialDevice = argv[index];
+ if(dlt_client_set_serial_device(&g_dltclient, argv[index]) == -1)
+ {
+ pr_error("set serial device didn't succeed\n");
+ return -1;
+ }
}
-
if (g_dltclient.serialDevice == 0)
{
/* no serial device name selected, show usage and terminate */