summaryrefslogtreecommitdiff
path: root/src/console/dlt-receive.c
diff options
context:
space:
mode:
authorRalphNiemeyer <rniemeyer@de.adit-jv.com>2017-03-23 10:04:53 +0100
committerGitHub <noreply@github.com>2017-03-23 10:04:53 +0100
commit7a1c8bd5272a3a8c5d8c88c5c66ebf8a23c6429f (patch)
tree546abe7fa8b7108ff7d76de24532234acca50fdb /src/console/dlt-receive.c
parent84c35df786d30b5fe7828b8400fe7b0d6c087138 (diff)
parent859802afd10d159b9e370058bca53c8c12bba2f5 (diff)
downloadDLT-daemon-7a1c8bd5272a3a8c5d8c88c5c66ebf8a23c6429f.tar.gz
Merge pull request #7 from clipka/devel_dlt_client_cleanup_fix
dlt-client: fix dlt_client_cleanup memory handling
Diffstat (limited to 'src/console/dlt-receive.c')
-rw-r--r--src/console/dlt-receive.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/console/dlt-receive.c b/src/console/dlt-receive.c
index c10fab0..a4aef2e 100644
--- a/src/console/dlt-receive.c
+++ b/src/console/dlt-receive.c
@@ -442,7 +442,11 @@ int main(int argc, char* argv[])
{
for (index = optind; index < argc; index++)
{
- dltclient.servIP = argv[index];
+ if(dlt_client_set_server_ip(&dltclient, argv[index]) == -1)
+ {
+ fprintf(stderr,"set server ip didn't succeed\n");
+ return -1;
+ }
}
if (dltclient.servIP == 0)
@@ -458,7 +462,11 @@ int main(int argc, char* argv[])
{
for (index = optind; index < argc; index++)
{
- dltclient.serialDevice = argv[index];
+ if(dlt_client_set_serial_device(&dltclient, argv[index]) == -1)
+ {
+ fprintf(stderr,"set serial device didn't succeed\n");
+ return -1;
+ }
}
if (dltclient.serialDevice == 0)
@@ -469,7 +477,7 @@ int main(int argc, char* argv[])
return -1;
}
- dlt_client_setbaudrate(&dltclient,dltdata.bvalue);
+ dlt_client_setbaudrate(&dltclient,dltdata.bvalue);
}
/* initialise structure to use DLT file */