# HG changeset patch # User masneyb # Date 1153363065 0 # Node ID f6a3f567733963ceaba03a8993ef21e3a4a167e0 # Parent 26d6b4b533454b2279f3a06b378287e82a87db92 2006-7-19 Brian Masney * lib/misc.c (gftp_copy_request) - fixes when doing an IPv6 transfer or using ignore PASV address (from (from Aurelien Jarno ) (closes #169671) diff -r 26d6b4b53345 -r f6a3f5677339 ChangeLog --- a/ChangeLog Thu Jul 20 02:32:58 2006 +0000 +++ b/ChangeLog Thu Jul 20 02:37:45 2006 +0000 @@ -1,4 +1,8 @@ 2006-7-19 Brian Masney + * lib/misc.c (gftp_copy_request) - fixes when doing an IPv6 transfer or + using ignore PASV address (from (from Aurelien Jarno + ) (closes #169671) + * lib/protocols.c (gftp_get_all_subdirs) - make sure that the memory is properly allocated for the directory. This fixes a crash when stopping a file transfer (from Rob Wilkens ) @@ -3446,7 +3450,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.448 2006/07/20 02:32:57 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.449 2006/07/20 02:37:44 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r 26d6b4b53345 -r f6a3f5677339 lib/misc.c --- a/lib/misc.c Thu Jul 20 02:32:58 2006 +0000 +++ b/lib/misc.c Thu Jul 20 02:37:45 2006 +0000 @@ -568,8 +568,24 @@ newreq->use_proxy = req->use_proxy; newreq->logging_function = req->logging_function; newreq->ai_family = req->ai_family; - newreq->free_hostp = 0; - newreq->hostp = NULL; + + if (req->hostp) + { +#if defined (HAVE_GETADDRINFO) && defined (HAVE_GAI_STRERROR) + newreq->hostp = g_malloc (sizeof(struct addrinfo)); + memcpy(newreq->hostp, req->hostp, sizeof(struct addrinfo)); + if (req->current_hostp) + newreq->current_hostp = newreq->hostp + (req->current_hostp - req->hostp); +#else + newreq->hostp = g_malloc (sizeof(struct hostent)); + memcpy(newreq->hostp, req->hostp, sizeof(struct hostent)); + newreq->host = req->host; + newreq->curhost = req->curhost; +#endif + } + else + newreq->hostp = NULL; + newreq->free_hostp = 1; gftp_copy_local_options (&newreq->local_options_vars, &newreq->local_options_hash,