Mercurial > gftp.yaz
diff lib/protocols.c @ 56:a12bcbc2fce4
2002-11-11 Brian Masney <masneyb@gftp.org>
* src/gtk/dnd.c - fixes to DnD code
* src/gtk/gftp-gtk.[ch] - added main_thread_id variable
* src/gtk/misc-gtk.c (ftp_log) - don't check the user_data to see if
we're in a child thread, instead compare the value of pthread_self()
with main_thread_id
* src/gtk/chmod_dialog.c src/gtk/delete_dialog.c src/gtk/menu-items.c
src/gtk/mkdir_dialog.c src/gtk/rename_dialog.c src/gtk/transfer.c -
don't set user_data to 0x1 if we're in a child thread
* lib/gftp.h src/gtk/misc-gtk.c src/text/gftp-text.c - make
r_getservbyname() available even if HAVE_GERADDRINFO is defined
* lib/misc.c (make_ssh_exec_args) - if port is zero, lookup the default
port for the ssh service
* lib/protocols.c (gftp_connect_server) - if the port is zero, store
the default port for that protocol there
* src/gtk/transfer.c - added function update_window_transfer_bytes().
Be able to update the directory download progress in window1 now
* lib/config_file.c lib/misc.c lib/protocols.c lib/ssh.c lib/sshv2.c
src/text/gftp-text.c - use g_strdup() instead of g_strconcat() where
needed
author | masneyb |
---|---|
date | Mon, 11 Nov 2002 23:16:12 +0000 |
parents | e5f6054590b5 |
children | c01d91c10f6c |
line wrap: on
line diff
--- a/lib/protocols.c Mon Nov 11 11:20:13 2002 +0000 +++ b/lib/protocols.c Mon Nov 11 23:16:12 2002 +0000 @@ -109,13 +109,14 @@ if (request->sftpserv_path == NULL) { + /* FIXME - move this to per protocol files */ switch (request->protonum) { case GFTP_SSH_NUM: - request->sftpserv_path = g_strconcat (ssh1_sftp_path, NULL); + request->sftpserv_path = g_strdup (ssh1_sftp_path); break; case GFTP_SSHV2_NUM: - request->sftpserv_path = g_strconcat (ssh2_sftp_path, NULL); + request->sftpserv_path = g_strdup (ssh2_sftp_path); break; } } @@ -1792,6 +1793,9 @@ { disphost = res->ai_canonname ? res->ai_canonname : connect_host; port = get_port (res); + if (!request->use_proxy) + request->port = port; + if ((sock = socket (res->ai_family, res->ai_socktype, res->ai_protocol)) < 0) { @@ -1862,6 +1866,9 @@ port = serv_struct.s_port; request->port = ntohs (serv_struct.s_port); } + + if (!request->use_proxy) + request->port = ntohs (port); } remote_address.sin_port = port; @@ -1917,6 +1924,7 @@ void gftp_set_config_options (gftp_request * request) { + /* FIXME - move this to per protocol files */ request->transfer_type = passive_transfer ? gftp_transfer_passive : gftp_transfer_active; request->network_timeout = network_timeout; request->retries = retries;