summaryrefslogtreecommitdiff
path: root/src/tests/dlt-test-stress-client.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/tests/dlt-test-stress-client.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/tests/dlt-test-stress-client.c')
-rw-r--r--src/tests/dlt-test-stress-client.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tests/dlt-test-stress-client.c b/src/tests/dlt-test-stress-client.c
index e0ca808..d97099b 100644
--- a/src/tests/dlt-test-stress-client.c
+++ b/src/tests/dlt-test-stress-client.c
@@ -304,7 +304,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)
@@ -320,7 +324,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)