# HG changeset patch # User masneyb # Date 1076257166 0 # Node ID 14ef37b62c20c8fb54639332f1a90d21738c1a83 # Parent 151d91e84b39fa8c3b133bc2b4ccaf33f1ea6126 2004-2-8 Brian Masney * src/gtk/gftp-gtk.h src/gtk/gtkui.c - added gftpui_gtk_get_utf8_file_pos() that will return the file in UTF8 format if it is available * src/gtk/gtkui_transfer.c src/gtk/transfer.c - call gftpui_gtk_get_utf8_file_pos() to display the file in the file transfer status. This fixes a bug where non-UTF8 files were being chopped off * src/text/textui.c src/uicommon/gftpui.c src/uicommon/gftpui.h src/text/gtkui_transfer.c - updated declaration of gftpui_add_file_to_transfer() * lib/protocols.c (gftp_swap_socks) - swap the SSL sockets between the two request structures * lib/ftps.c - added ftps_get_next_file() that will pull items from the cache properly * lib/Makefile.am - updated LOCALE_DIR declaration (from Sung-Hyun Nam ) * ChangeLog-old - updated summary of changes since 2.0.16 * TODO - removed several items that were completed diff -r 151d91e84b39 -r 14ef37b62c20 ChangeLog-old --- a/ChangeLog-old Thu Feb 05 03:17:05 2004 +0000 +++ b/ChangeLog-old Sun Feb 08 16:19:26 2004 +0000 @@ -1,3 +1,27 @@ +Changes from 2.0.16 to 2.0.17 + +* Created a user interface common repository. Started to merge the UI + independant parts of the GTK+ and text ports into this. The GTK+ port + can now be controlled from a command line interface in the GUI. There + is an option you have to enable in the options dialog for this. +* Added support for the FTPS protocol. The control connection is the only + one encrypted at the moment. +* File transfers can be resumed/skipped/overwritten in the text port and + whenever files are dropped on gftp. +* FTP: Added support for MVS directory listings +* Added option to show the transfer status in the title bar. +* Added option to disable IPV6 support. +* Fixed the wrong date being displayed when a file was modified last year +* 64 bit cleanups. This also fixed a SSH segfault that was happening on + FreeBSD +* Look for the .gmo translation files in the proper directory +* If a bookmarked site has it's password saved in the config file, then the + passwords are written out in a scrambled format. This isn't secure, but it'll + prevent someone from casually looking over your shoulder and seeing your + password. I would not recommend saving your passwords to disk. +* Fix for systems that do not support the %'ld format argument +* Overall code cleanup in the user interface code and several small bug fixes + Changes from 2.0.15 to 2.0.16 * Fixed bug where the local directory listing was not updated when diff -r 151d91e84b39 -r 14ef37b62c20 TODO --- a/TODO Thu Feb 05 03:17:05 2004 +0000 +++ b/TODO Sun Feb 08 16:19:26 2004 +0000 @@ -4,7 +4,6 @@ * FXP transfers segfault * Does not work with rssh, need to improve the SSH login sequence -* Be able to paste a URL in the host box in the GUI * If the IPV6 connection fails, automatically try a IPV4 connection. * I need to be able to send an event from the core library to the presentation @@ -34,8 +33,6 @@ * Add support for SRP protocol (http://srp.stanford.edu/srp) * Add support for DAV protocol * Add support for rsync protocol -* Add support for ftp-ssl. The URL ftp://ftp.runestig.com/pub/ftp-tls has a FTP - server that supports SSL. Brian Masney diff -r 151d91e84b39 -r 14ef37b62c20 lib/Makefile.am --- a/lib/Makefile.am Thu Feb 05 03:17:05 2004 +0000 +++ b/lib/Makefile.am Sun Feb 08 16:19:26 2004 +0000 @@ -3,5 +3,5 @@ noinst_LIBRARIES = libgftp.a libgftp_a_SOURCES=bookmark.c cache.c config_file.c ftps.c https.c local.c misc.c \ protocols.c pty.c rfc959.c rfc2068.c sshv2.c sslcommon.c -INCLUDES=@GLIB_CFLAGS@ @PTHREAD_CFLAGS@ -I../intl -DSHARE_DIR=\"$(datadir)/gftp\" -DLOCALE_DIR=\"$(localedir)\" +INCLUDES=@GLIB_CFLAGS@ @PTHREAD_CFLAGS@ -I../intl -DSHARE_DIR=\"$(datadir)/gftp\" -DLOCALE_DIR=\"$(datadir)/locale\" noinst_HEADERS=gftp.h ftpcommon.h httpcommon.h options.h diff -r 151d91e84b39 -r 14ef37b62c20 lib/ftps.c --- a/lib/ftps.c Thu Feb 05 03:17:05 2004 +0000 +++ b/lib/ftps.c Sun Feb 08 16:19:26 2004 +0000 @@ -22,12 +22,32 @@ static const char cvsid[] = "$Id$"; -void -ftps_register_module (void) +#ifdef USE_SSL +static int +ftps_get_next_file (gftp_request * request, gftp_file * fle, int fd) { -#ifdef USE_SSL - ssl_register_module (); -#endif + rfc959_parms * params; + int ret, resetptr; + + params = request->protocol_data; + if (request->cached) + { + request->read_function = gftp_fd_read; + request->write_function = gftp_fd_write; + resetptr = 1; + } + else + resetptr = 0; + + ret = rfc959_get_next_file (request, fle, fd); + + if (resetptr) + { + request->read_function = gftp_ssl_read; + request->write_function = gftp_ssl_write; + } + + return (ret); } @@ -78,6 +98,16 @@ return (0); } +#endif + + +void +ftps_register_module (void) +{ +#ifdef USE_SSL + ssl_register_module (); +#endif +} int @@ -94,6 +124,7 @@ params = request->protocol_data; params->auth_tls_start = ftps_auth_tls_start; + request->get_next_file = ftps_get_next_file; request->init = ftps_init; request->post_connect = NULL; request->url_prefix = g_strdup ("ftps"); diff -r 151d91e84b39 -r 14ef37b62c20 lib/protocols.c --- a/lib/protocols.c Thu Feb 05 03:17:05 2004 +0000 +++ b/lib/protocols.c Sun Feb 08 16:19:26 2004 +0000 @@ -2533,10 +2533,17 @@ dest->datafd = source->datafd; dest->cached = 0; +#ifdef USE_SSL + dest->ssl = source->ssl; +#endif + if (!source->always_connected) { source->datafd = -1; source->cached = 1; +#ifdef USE_SSL + source->ssl = NULL; +#endif } if (dest->swap_socks) diff -r 151d91e84b39 -r 14ef37b62c20 src/gtk/gftp-gtk.h --- a/src/gtk/gftp-gtk.h Thu Feb 05 03:17:05 2004 +0000 +++ b/src/gtk/gftp-gtk.h Sun Feb 08 16:19:26 2004 +0000 @@ -264,6 +264,8 @@ void gftpui_chdir_dialog ( gpointer data ); +char * gftpui_gtk_get_utf8_file_pos ( gftp_file * fle ); + /* menu_items.c */ void change_filespec ( gpointer data ); diff -r 151d91e84b39 -r 14ef37b62c20 src/gtk/gtkui.c --- a/src/gtk/gtkui.c Thu Feb 05 03:17:05 2004 +0000 +++ b/src/gtk/gtkui.c Sun Feb 08 16:19:26 2004 +0000 @@ -434,3 +434,22 @@ update_window (wdata); } + +char * +gftpui_gtk_get_utf8_file_pos (gftp_file * fle) +{ + char *disp_item, *pos; + + if (fle->utf8_file != NULL) + disp_item = fle->utf8_file; + else + disp_item = fle->file; + + if ((pos = strrchr (disp_item, '/')) != NULL) + pos++; + else + pos = disp_item; + + return (pos); +} + diff -r 151d91e84b39 -r 14ef37b62c20 src/gtk/gtkui_transfer.c --- a/src/gtk/gtkui_transfer.c Thu Feb 05 03:17:05 2004 +0000 +++ b/src/gtk/gtkui_transfer.c Sun Feb 08 16:19:26 2004 +0000 @@ -47,15 +47,15 @@ void -gftpui_add_file_to_transfer (gftp_transfer * tdata, GList * curfle, - char *filepos) +gftpui_add_file_to_transfer (gftp_transfer * tdata, GList * curfle) { gftpui_common_curtrans_data * transdata; + char *text[2]; gftp_file * fle; - char *text[2]; fle = curfle->data; - text[0] = filepos; + text[0] = gftpui_gtk_get_utf8_file_pos (fle); + if (fle->transfer_action == GFTP_TRANS_ACTION_SKIP) text[1] = _("Skipped"); else diff -r 151d91e84b39 -r 14ef37b62c20 src/gtk/transfer.c --- a/src/gtk/transfer.c Thu Feb 05 03:17:05 2004 +0000 +++ b/src/gtk/transfer.c Sun Feb 08 16:19:26 2004 +0000 @@ -455,8 +455,8 @@ GdkBitmap * closedir_bitmap, * opendir_bitmap; gftpui_common_curtrans_data * transdata; gftp_file * tempfle; - char *pos, *text[2]; GList * templist; + char *text[2]; gftp_get_pixmap (dlwdw, "open_dir.xpm", &opendir_pixmap, &opendir_bitmap); gftp_get_pixmap (dlwdw, "dir.xpm", &closedir_pixmap, &closedir_bitmap); @@ -480,11 +480,8 @@ for (templist = tdata->files; templist != NULL; templist = templist->next) { tempfle = templist->data; - if ((pos = strrchr (tempfle->file, '/')) == NULL) - pos = tempfle->file; - else - pos++; - text[0] = pos; + + text[0] = gftpui_gtk_get_utf8_file_pos (tempfle); if (tempfle->transfer_action == GFTP_TRANS_ACTION_SKIP) text[1] = _("Skipped"); else diff -r 151d91e84b39 -r 14ef37b62c20 src/text/textui.c --- a/src/text/textui.c Thu Feb 05 03:17:05 2004 +0000 +++ b/src/text/textui.c Sun Feb 08 16:19:26 2004 +0000 @@ -85,8 +85,7 @@ void -gftpui_add_file_to_transfer (gftp_transfer * tdata, GList * curfle, - char *filepos ) +gftpui_add_file_to_transfer (gftp_transfer * tdata, GList * curfle) { } diff -r 151d91e84b39 -r 14ef37b62c20 src/uicommon/gftpui.c --- a/src/uicommon/gftpui.c Thu Feb 05 03:17:05 2004 +0000 +++ b/src/uicommon/gftpui.c Sun Feb 08 16:19:26 2004 +0000 @@ -1090,7 +1090,6 @@ gftp_transfer * tdata; gftp_file * tempfle; int show_dialog; - char *pos; for (templist = files; templist != NULL; templist = templist->next) { @@ -1144,12 +1143,7 @@ if (tempfle->transfer_action != GFTP_TRANS_ACTION_SKIP) tdata->total_bytes += tempfle->size; - if ((pos = strrchr (tempfle->file, '/')) == NULL) - pos = tempfle->file; - else - pos++; - - gftpui_add_file_to_transfer (tdata, curfle, pos); + gftpui_add_file_to_transfer (tdata, curfle); } if (g_thread_supported ()) diff -r 151d91e84b39 -r 14ef37b62c20 src/uicommon/gftpui.h --- a/src/uicommon/gftpui.h Thu Feb 05 03:17:05 2004 +0000 +++ b/src/uicommon/gftpui.h Sun Feb 08 16:19:26 2004 +0000 @@ -166,8 +166,7 @@ gftp_request * request ); void gftpui_add_file_to_transfer ( gftp_transfer * tdata, - GList * curfle, - char *filepos ); + GList * curfle ); void gftpui_ask_transfer ( gftp_transfer * tdata );