Mercurial > gftp.yaz
changeset 143:5c952c5cb438
2003-4-23 Brian Masney <masneyb@gftp.org>
* Makefile.am - removed config.rpath from EXTRA_DIST
* configure.in - added 'sr' to ALL_LINGUAS. Incremented
version to 2.0.15 (will be a little while before this is released.
Still have lots to do)
* docs/sample.gftp/gftprc - removed old unused SSH options. These were
used by the SSH protocol I ripped out
* lib/config_file.c - fix for gftp_set_request_option(). Implemented
gftp_lookup_request_options(). Overriding of configuration options now
works across the board :)
* lib/protocols.c - extra checks for freeing memory
* src/text/gftp-text.c - renamed ssh_use_sftp_subsys to the proper
name of sshv2_use_sftp_subsys
* src/gtk/transfer.c - renamed append_file_transfers option
to the proper name of append_transfers. Also, added quick fix for
start_file_transfers option that is still missing
* debian/gftp-text.postinst - this will add add an alternative for the
ftp command and point it to gftp-text
author | masneyb |
---|---|
date | Thu, 24 Apr 2003 02:21:58 +0000 |
parents | 3671d5325b7e |
children | f7251c70153a |
files | ChangeLog Makefile.am aclocal.m4 configure.in docs/sample.gftp/gftprc lib/config_file.c lib/protocols.c src/gtk/transfer.c src/text/gftp-text.c |
diffstat | 9 files changed, 175 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Apr 23 23:38:23 2003 +0000 +++ b/ChangeLog Thu Apr 24 02:21:58 2003 +0000 @@ -1,3 +1,29 @@ +2003-4-23 Brian Masney <masneyb@gftp.org> + * Makefile.am - removed config.rpath from EXTRA_DIST + + * configure.in - added 'sr' to ALL_LINGUAS. Incremented + version to 2.0.15 (will be a little while before this is released. + Still have lots to do) + + * docs/sample.gftp/gftprc - removed old unused SSH options. These were + used by the SSH protocol I ripped out + + * lib/config_file.c - fix for gftp_set_request_option(). Implemented + gftp_lookup_request_options(). Overriding of configuration options now + works across the board :) + + * lib/protocols.c - extra checks for freeing memory + + * src/text/gftp-text.c - renamed ssh_use_sftp_subsys to the proper + name of sshv2_use_sftp_subsys + + * src/gtk/transfer.c - renamed append_file_transfers option + to the proper name of append_transfers. Also, added quick fix for + start_file_transfers option that is still missing + + * debian/gftp-text.postinst - this will add add an alternative for the + ftp command and point it to gftp-text + 2003-4-21 Brian Masney <masneyb@gftp.org> * lib/gftp.h - added ui_cancel_function to struct gftp_option_type_var @@ -741,7 +767,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.72 2003/04/22 01:42:05 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.73 2003/04/24 02:21:54 masneyb Exp $ tags * debian/* - updated files from Debian maintainer
--- a/Makefile.am Wed Apr 23 23:38:23 2003 +0000 +++ b/Makefile.am Thu Apr 24 02:21:58 2003 +0000 @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in SUBDIRS= intl docs lib po src -EXTRA_DIST= config.rpath mkinstalldirs ChangeLog-old README THANKS TODO \ +EXTRA_DIST= mkinstalldirs ChangeLog-old README THANKS TODO \ gftp.spec.in debian/changelog debian/control debian/copyright \ debian/dirs debian/docs debian/menu debian/rules
--- a/aclocal.m4 Wed Apr 23 23:38:23 2003 +0000 +++ b/aclocal.m4 Thu Apr 24 02:21:58 2003 +0000 @@ -10,6 +10,122 @@ dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. +#serial 4 + +dnl By default, many hosts won't let programs access large files; +dnl one must use special compiler options to get large-file access to work. +dnl For more details about this brain damage please see: +dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html + +dnl Written by Paul Eggert <eggert@twinsun.com>. + +dnl Internal subroutine of AC_SYS_LARGEFILE. +dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME) +AC_DEFUN(AC_SYS_LARGEFILE_FLAGS, + [AC_CACHE_CHECK([for $1 value to request large file support], + ac_cv_sys_largefile_$1, + [ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || { + ac_cv_sys_largefile_$1=no + ifelse($1, CFLAGS, + [case "$host_os" in + # IRIX 6.2 and later require cc -n32. +changequote(, )dnl + irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*) +changequote([, ])dnl + if test "$GCC" != yes; then + ac_cv_sys_largefile_CFLAGS=-n32 + fi + ac_save_CC="$CC" + CC="$CC $ac_cv_sys_largefile_CFLAGS" + AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no) + CC="$ac_save_CC" + esac]) + }])]) + +dnl Internal subroutine of AC_SYS_LARGEFILE. +dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL) +AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND, + [case $2 in + no) ;; + ?*) + case "[$]$1" in + '') $1=$2 ;; + *) $1=[$]$1' '$2 ;; + esac ;; + esac]) + +dnl Internal subroutine of AC_SYS_LARGEFILE. +dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT) +AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE, + [AC_CACHE_CHECK([for $1], $2, + [$2=no +changequote(, )dnl + $4 + for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do + case "$ac_flag" in + -D$1) + $2=1 ;; + -D$1=*) + $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;; + esac + done +changequote([, ])dnl + ]) + if test "[$]$2" != no; then + AC_DEFINE_UNQUOTED([$1], [$]$2, [$3]) + fi]) + +AC_DEFUN(AC_SYS_LARGEFILE, + [AC_REQUIRE([AC_CANONICAL_HOST]) + AC_ARG_ENABLE(largefile, + [ --disable-largefile omit support for large files]) + if test "$enable_largefile" != no; then + AC_CHECK_TOOL(GETCONF, getconf) + AC_SYS_LARGEFILE_FLAGS(CFLAGS) + AC_SYS_LARGEFILE_FLAGS(LDFLAGS) + AC_SYS_LARGEFILE_FLAGS(LIBS) + + for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do + case "$ac_flag" in + no) ;; + -D_FILE_OFFSET_BITS=*) ;; + -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;; + -D_LARGE_FILES | -D_LARGE_FILES=*) ;; + -D?* | -I?*) + AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;; + *) + AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;; + esac + done + AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS") + AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS") + AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, + ac_cv_sys_file_offset_bits, + [Number of bits in a file offset, on hosts where this is settable.] + [case "$host_os" in + # HP-UX 10.20 and later + hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) + ac_cv_sys_file_offset_bits=64 ;; + esac]) + AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, + ac_cv_sys_largefile_source, + [Define to make fseeko etc. visible, on some hosts.], + [case "$host_os" in + # HP-UX 10.20 and later + hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) + ac_cv_sys_largefile_source=1 ;; + esac]) + AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, + ac_cv_sys_large_files, + [Define for large files, on AIX-style hosts.], + [case "$host_os" in + # AIX 4.2 and later + aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*) + ac_cv_sys_large_files=1 ;; + esac]) + fi + ]) + # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN([AM_CONFIG_HEADER],
--- a/configure.in Wed Apr 23 23:38:23 2003 +0000 +++ b/configure.in Thu Apr 24 02:21:58 2003 +0000 @@ -3,7 +3,7 @@ AC_INIT(lib/gftp.h) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(gftp,2.0.14) +AM_INIT_AUTOMAKE(gftp,2.0.15) AC_ARG_ENABLE(gtk20, [ --disable-gtk20 Don't look for GTK+ 2.0 libraries], @@ -24,7 +24,7 @@ AC_SUBST(VERSION) AC_SUBST(PREFIX) -ALL_LINGUAS="am ar bg ca cs da de es fi fr hu it ja ko nl no pl pt pt_BR ro ru sv tr uk zh_CN zh_TW" +ALL_LINGUAS="am ar bg ca cs da de es fi fr hu it ja ko nl no pl pt pt_BR ro ru sr sv tr uk zh_CN zh_TW" AC_DEFINE(_GNU_SOURCE, 1, [Define for setting a GNU environment])
--- a/docs/sample.gftp/gftprc Wed Apr 23 23:38:23 2003 +0000 +++ b/docs/sample.gftp/gftprc Thu Apr 24 02:21:58 2003 +0000 @@ -101,9 +101,6 @@ # Extra parameters to pass to the SSH program ssh_extra_params= -# Default remote SSH sftpserv path -ssh1_sftp_path= - # Default remote SSH2 sftp-server path ssh2_sftp_path= @@ -117,10 +114,6 @@ # know the remote path to the remote sftp-server sshv2_use_sftp_subsys=0 -# Enable the old SSH protocol. You will need to download the sftp server from -# http:///www.xbill.org/sftp -enable_old_ssh=0 - # This defines what will happen when you double click a file in the file # listboxes. 0=View file 1=Edit file 2=Transfer file list_dblclk_action=2
--- a/lib/config_file.c Wed Apr 23 23:38:23 2003 +0000 +++ b/lib/config_file.c Thu Apr 24 02:21:58 2003 +0000 @@ -1063,7 +1063,14 @@ void gftp_lookup_request_option (gftp_request * request, char * key, void *value) { - gftp_lookup_global_option (key, value); + gftp_config_vars * tmpconfigvar; + + if (request != NULL && request->local_options_hash != NULL && + (tmpconfigvar = g_hash_table_lookup (request->local_options_hash, + key)) != NULL) + memcpy (value, &tmpconfigvar->value, sizeof (value)); + else + gftp_lookup_global_option (key, value); } @@ -1095,10 +1102,10 @@ if ((tmpconfigvar = g_hash_table_lookup (request->local_options_hash, key)) != NULL) - memcpy (&tmpconfigvar->value, value, sizeof (tmpconfigvar->value)); + memcpy (&tmpconfigvar->value, &value, sizeof (tmpconfigvar->value)); else { - if (gftp_global_options_htable == NULL && + if (gftp_global_options_htable == NULL || (tmpconfigvar = g_hash_table_lookup (gftp_global_options_htable, key)) == NULL) { @@ -1110,10 +1117,13 @@ request->local_options_vars = g_realloc (request->local_options_vars, sizeof (gftp_config_vars) * (request->num_local_options_vars + 1)); - memcpy (&request->local_options_vars[request->num_local_options_vars], + memcpy (&request->local_options_vars[request->num_local_options_vars - 1], tmpconfigvar, sizeof (*tmpconfigvar)); - memcpy (&request->local_options_vars[request->num_local_options_vars].value, value, sizeof (value)); - + memcpy (&request->local_options_vars[request->num_local_options_vars - 1].value, &value, sizeof (value)); + + memset (&request->local_options_vars[request->num_local_options_vars].value, 0, sizeof (value)); + + g_hash_table_insert (request->local_options_hash, request->local_options_vars[request->num_local_options_vars - 1].key, &request->local_options_vars[request->num_local_options_vars - 1]); } }
--- a/lib/protocols.c Wed Apr 23 23:38:23 2003 +0000 +++ b/lib/protocols.c Thu Apr 24 02:21:58 2003 +0000 @@ -76,8 +76,11 @@ request->cachefd = -1; } - g_free (request->local_options_vars); - g_hash_table_destroy (request->local_options_hash); + if (request->local_options_vars != NULL) + { + g_free (request->local_options_vars); + g_hash_table_destroy (request->local_options_hash); + } }
--- a/src/gtk/transfer.c Wed Apr 23 23:38:23 2003 +0000 +++ b/src/gtk/transfer.c Thu Apr 24 02:21:58 2003 +0000 @@ -765,7 +765,7 @@ gftp_window_data * fromwdata, gftp_window_data * towdata, GList * files, int copy_req) { - int dialog, append_file_transfers; + int dialog, append_transfers; gftp_curtrans_data * transdata; GList * templist, *curfle; gftp_transfer * tdata; @@ -780,10 +780,10 @@ } dialog = templist != NULL; - gftp_lookup_request_option (fromreq, "append_file_transfers", - &append_file_transfers); + gftp_lookup_request_option (fromreq, "append_transfers", + &append_transfers); - if (append_file_transfers) + if (append_transfers) { pthread_mutex_lock (&transfer_mutex); for (templist = gftp_file_transfers; templist != NULL; templist = templist->next) @@ -1429,8 +1429,7 @@ { gftp_lookup_global_option ("do_one_transfer_at_a_time", &do_one_transfer_at_a_time); - gftp_lookup_global_option ("start_file_transfers", /* FIXME - this is gone now */ - &start_file_transfers); + start_file_transfers = 1; /* FIXME */ if (!tdata->started && start_file_transfers && (num_transfers_in_progress == 0 || !do_one_transfer_at_a_time))
--- a/src/text/gftp-text.c Wed Apr 23 23:38:23 2003 +0000 +++ b/src/text/gftp-text.c Thu Apr 24 02:21:58 2003 +0000 @@ -124,15 +124,16 @@ gftp_text_remreq = gftp_request_new (); gftp_set_request_option (gftp_text_remreq, "ssh_use_askpass", GINT_TO_POINTER(0)); - gftp_set_request_option (gftp_text_remreq, "ssh_use_sftp_subsys", + gftp_set_request_option (gftp_text_remreq, "sshv2_use_sftp_subsys", GINT_TO_POINTER(0)); gftp_text_remreq->logging_function = gftp_text_log; gftp_text_locreq = gftp_request_new (); gftp_set_request_option (gftp_text_locreq, "ssh_use_askpass", GINT_TO_POINTER(0)); - gftp_set_request_option (gftp_text_locreq, "ssh_use_sftp_subsys", + gftp_set_request_option (gftp_text_locreq, "sshv2_use_sftp_subsys", GINT_TO_POINTER(0)); + gftp_text_locreq->logging_function = gftp_text_log; gftp_protocols[GFTP_LOCAL_NUM].init (gftp_text_locreq);