From 9d68e992685c29c023bf7e023925a4e0eaf76de6 Mon Sep 17 00:00:00 2001 From: William King Date: Tue, 4 Mar 2014 12:30:14 -0800 Subject: [PATCH] FS-6303 --resolve --- libs/esl/src/esl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/esl/src/esl.c b/libs/esl/src/esl.c index 28c8927b6f..77f2b57b2c 100644 --- a/libs/esl/src/esl.c +++ b/libs/esl/src/esl.c @@ -985,8 +985,8 @@ ESL_DECLARE(esl_status_t) esl_connect_timeout(esl_handle_t *handle, const char * goto fail; } - memcpy(&handle->sockaddr, result->ai_addr, sizeof(handle->sockaddr)); - switch(handle->sockaddr.ss_family) { + memcpy(&handle->sockaddr, result->ai_addr, result->ai_addrlen); + switch(handle->sockaddr.ss_family) { case AF_INET: sockaddr_in = (struct sockaddr_in*)&(handle->sockaddr); sockaddr_in->sin_port = htons(port);