summaryrefslogtreecommitdiff
path: root/src/gateway/dlt_gateway.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/gateway/dlt_gateway.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/gateway/dlt_gateway.c')
-rw-r--r--src/gateway/dlt_gateway.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gateway/dlt_gateway.c b/src/gateway/dlt_gateway.c
index 902822a..04237c2 100644
--- a/src/gateway/dlt_gateway.c
+++ b/src/gateway/dlt_gateway.c
@@ -425,8 +425,13 @@ int dlt_gateway_store_connection(DltGateway *gateway,
gateway->connections[i].client.sock,
DLT_DAEMON_RCVBUFSIZESOCK);
/* setup DltClient Structure */
- gateway->connections[i].client.servIP =
- strdup(gateway->connections[i].ip_address);
+ if(dlt_client_set_server_ip(&gateway->connections[i].client,
+ gateway->connections[i].ip_address) == -1)
+ {
+ dlt_log(LOG_ERR,
+ "dlt_client_set_server_ip() failed for gateway connection \n");
+ return -1;
+ }
if (ret != 0)
{