# HG changeset patch # User masneyb # Date 1102852337 0 # Node ID efe90b739e988055c57a97b755948cb1b5d00252 # Parent cad45ebbc5204d0ec5a39d539a2094e8ba026c0e 2004-12-12 Brian Masney * lib/gftp.h lib/protocols.c (gftp_connect_server) - if getaddrinfo() is not defined in the system, save the current index of the host that we are connected to diff -r cad45ebbc520 -r efe90b739e98 ChangeLog --- a/ChangeLog Sun Dec 12 11:26:15 2004 +0000 +++ b/ChangeLog Sun Dec 12 11:52:17 2004 +0000 @@ -1,4 +1,8 @@ 2004-12-12 Brian Masney + * lib/gftp.h lib/protocols.c (gftp_connect_server) - if getaddrinfo() + is not defined in the system, save the current index of the host that we + are connected to + * src/gtk/gftp-gtk.c (toolbar_hostedit) - use gftp_disconnect() instead of gftpui_disconnect(). The gftpui_disconnect() function will clear out the directory in the request structure @@ -3139,7 +3143,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.376 2004/12/12 11:26:15 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.377 2004/12/12 11:52:17 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r cad45ebbc520 -r efe90b739e98 lib/gftp.h --- a/lib/gftp.h Sun Dec 12 11:26:15 2004 +0000 +++ b/lib/gftp.h Sun Dec 12 11:52:17 2004 +0000 @@ -386,6 +386,7 @@ *current_hostp; #else struct hostent host, *hostp; + int curhost; #endif int ai_family; diff -r cad45ebbc520 -r efe90b739e98 lib/protocols.c --- a/lib/protocols.c Sun Dec 12 11:26:15 2004 +0000 +++ b/lib/protocols.c Sun Dec 12 11:52:17 2004 +0000 @@ -2240,7 +2240,6 @@ #else /* !HAVE_GETADDRINFO */ struct sockaddr_in remote_address; struct servent serv_struct; - int curhost; if ((request->use_proxy = gftp_need_proxy (request, service, proxy_hostname, proxy_port)) < 0) @@ -2306,10 +2305,13 @@ } disphost = NULL; - for (curhost = 0; request->host.h_addr_list[curhost] != NULL; curhost++) + for (request->curhost = 0; + request->host.h_addr_list[request->curhost] != NULL; + request->curhost++) { disphost = request->host.h_name; - memcpy (&remote_address.sin_addr, request->host.h_addr_list[curhost], + memcpy (&remote_address.sin_addr, + request->host.h_addr_list[request->curhost], request->host.h_length); request->logging_function (gftp_logging_misc, request, _("Trying %s:%d\n"), @@ -2325,7 +2327,7 @@ break; } - if (request->host.h_addr_list[curhost] == NULL) + if (request->host.h_addr_list[request->curhost] == NULL) { close (sock); return (GFTP_ERETRYABLE);