changeset 243:b42e7233533a

2003-7-31 Brian Masney <masneyb@gftp.org> * lib/sshv2.c - fix blocking problem reading the error message from the remote server when there was an error establishing a connection * lib/misc.c (copy_fdata) - copy utf8_file variable in gftp_file structure. (fix double free that was only in development version) * lib/misc.c - added --info argument to the command line. This will call gftp_info(), which will print out some information about how gftp was compiled. * lib/protocols.c lib/bookmarks.c lib/gftp.h src/gtk/bookmarks.c - added local_request parameter to gftp_parse_bookmark(). If this is not NULL, and this bookmark specifies a local directory, it will change to it. * configure.in - increment version to 2.0.15rc2
author masneyb
date Fri, 01 Aug 2003 01:47:54 +0000
parents 2adfdf9a5730
children afbbc72b73e2
files ChangeLog configure.in lib/bookmark.c lib/gftp.h lib/misc.c lib/protocols.c lib/sshv2.c src/gtk/bookmarks.c
diffstat 8 files changed, 101 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jul 30 04:28:12 2003 +0000
+++ b/ChangeLog	Fri Aug 01 01:47:54 2003 +0000
@@ -1,3 +1,21 @@
+2003-7-31 Brian Masney <masneyb@gftp.org>
+	* lib/sshv2.c - fix blocking problem reading the error message from the
+	remote server when there was an error establishing a connection
+
+	* lib/misc.c (copy_fdata) - copy utf8_file variable in gftp_file
+	structure. (fix double free that was only in development version)
+
+	* lib/misc.c - added --info argument to the command line. This will 
+	call gftp_info(), which will print out some information about how
+	gftp was compiled. 
+
+	* lib/protocols.c lib/bookmarks.c lib/gftp.h src/gtk/bookmarks.c -
+	added local_request parameter to gftp_parse_bookmark(). If this is not
+	NULL, and this bookmark specifies a local directory, it will change to
+	it.
+
+	* configure.in - increment version to 2.0.15rc2
+
 2003-07-30  Dmitry G. Mastrukov  <dmitry@taurussoft.org>
 
 	* configure.in: Added Belarusian to ALL_LINGUAS.
@@ -1387,7 +1405,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.123 2003/07/30 04:28:12 dmitrym Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.124 2003/08/01 01:47:52 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/configure.in	Wed Jul 30 04:28:12 2003 +0000
+++ b/configure.in	Fri Aug 01 01:47:54 2003 +0000
@@ -3,7 +3,7 @@
 AC_INIT(lib/gftp.h)
 
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(gftp,2.0.15rc1)
+AM_INIT_AUTOMAKE(gftp,2.0.15rc2)
 
 AC_ARG_ENABLE(gtk20, 
               [  --disable-gtk20	  Don't look for GTK+ 2.0 libraries], 
--- a/lib/bookmark.c	Wed Jul 30 04:28:12 2003 +0000
+++ b/lib/bookmark.c	Fri Aug 01 01:47:54 2003 +0000
@@ -42,7 +42,7 @@
   else
     pos = url;
 
-  return (gftp_parse_bookmark (request, pos));
+  return (gftp_parse_bookmark (request, NULL, pos));
 }
 
 
--- a/lib/gftp.h	Wed Jul 30 04:28:12 2003 +0000
+++ b/lib/gftp.h	Fri Aug 01 01:47:54 2003 +0000
@@ -818,6 +818,7 @@
 #endif
 
 int gftp_parse_bookmark 		( gftp_request * request, 
+					  gftp_request * local_request,
 					  const char * bookmark );
 
 int gftp_parse_url 			( gftp_request * request, 
--- a/lib/misc.c	Wed Jul 30 04:28:12 2003 +0000
+++ b/lib/misc.c	Fri Aug 01 01:47:54 2003 +0000
@@ -346,6 +346,64 @@
 }
 
 
+static void
+gftp_info (void)
+{
+  printf ("%s\n", gftp_version);
+
+#ifdef _LARGEFILE_SOURCE
+  printf ("#define_LARGEFILE_SOURCE\n");
+#endif
+
+#ifdef _FILE_OFFSET_BITS
+  printf ("#define _FILE_OFFSET_BITS %d\n", _FILE_OFFSET_BITS);
+#endif
+
+  printf ("sizeof (off_t) = %d\n", sizeof (off_t));
+
+#ifdef USE_SSL
+  printf ("#define USE_SSL\n");
+#endif
+
+#ifdef HAVE_GETADDRINFO
+  printf ("#define HAVE_GETADDRINFO\n");
+#endif
+
+#ifdef HAVE_GAI_STRERROR
+  printf ("#define HAVE_GAI_STRERROR\n");
+#endif
+
+#ifdef HAVE_GETDTABLESIZE
+  printf ("#define HAVE_GETDTABLESIZE\n");
+#endif
+
+#ifdef G_HAVE_GINT64
+  printf ("#define G_HAVE_GINT64\n");
+#endif
+
+#ifdef HAVE_LIBREADLINE
+  printf ("#define HAVE_LIBREADLINE\n");
+#endif
+
+#ifdef ENABLE_NLS
+  printf ("#define ENABLE_NLS\n");
+#endif
+
+#ifdef HAVE_GETTEXT
+  printf ("#define HAVE_GETTEXT\n");
+#endif
+
+  printf ("glib version: %d.%d.%d\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION,
+          GLIB_MICRO_VERSION);
+
+  printf ("PTY implementation: %s\n", gftp_get_pty_impl ());
+
+#ifdef USE_SSL
+  printf ("OpenSSL version: 0x%lx\n", OPENSSL_VERSION_NUMBER);
+#endif
+}
+
+
 int
 gftp_parse_command_line (int *argc, char ***argv)
 {
@@ -360,6 +418,11 @@
 	  printf ("%s\n", gftp_version);
 	  exit (0);
 	}
+      else if (strcmp (argv[0][1], "--info") == 0)
+	{
+          gftp_info ();
+	  exit (0);
+	}
     }
   return (0);
 }
@@ -443,6 +506,9 @@
   if (fle->file)
     newfle->file = g_strdup (fle->file);
 
+  if (fle->utf8_file)
+    newfle->utf8_file = g_strdup (fle->utf8_file);
+
   if (fle->user)
     newfle->user = g_strdup (fle->user);
 
--- a/lib/protocols.c	Wed Jul 30 04:28:12 2003 +0000
+++ b/lib/protocols.c	Fri Aug 01 01:47:54 2003 +0000
@@ -476,7 +476,8 @@
 
 
 int
-gftp_parse_bookmark (gftp_request * request, const char * bookmark)
+gftp_parse_bookmark (gftp_request * request, gftp_request * local_request, 
+                     const char * bookmark)
 {
   gftp_logging_func logging_function;
   gftp_bookmarks_var * tempentry;
@@ -518,6 +519,11 @@
   gftp_set_directory (request, tempentry->remote_dir);
   gftp_set_port (request, tempentry->port);
 
+  if (local_request != NULL &&
+      tempentry->local_dir != NULL &&
+      *tempentry->local_dir != '\0')
+    gftp_set_directory (local_request, tempentry->local_dir);
+
   for (i = 0; gftp_protocols[i].name; i++)
     {
       if (strcmp (gftp_protocols[i].name, tempentry->protocol) == 0)
--- a/lib/sshv2.c	Wed Jul 30 04:28:12 2003 +0000
+++ b/lib/sshv2.c	Fri Aug 01 01:47:54 2003 +0000
@@ -639,7 +639,10 @@
 
           request->logging_function (gftp_logging_error, request, "%s", buf);
 
-          while ((numread = gftp_fd_read (NULL, error_buffer, 
+          if (gftp_fd_set_sockblocking (request, fd, 0) == -1)
+            return (GFTP_EFATAL);
+
+          if ((numread = gftp_fd_read (NULL, error_buffer, 
                                           sizeof (error_buffer) - 1, 
                                           fd)) > 0)
             {
--- a/src/gtk/bookmarks.c	Wed Jul 30 04:28:12 2003 +0000
+++ b/src/gtk/bookmarks.c	Fri Aug 01 01:47:54 2003 +0000
@@ -39,7 +39,8 @@
       return;
     }
 
-  if (gftp_parse_bookmark (current_wdata->request, (char *) data) < 0)
+  if (gftp_parse_bookmark (current_wdata->request, other_wdata->request,
+                           (char *) data) < 0)
     return;
 
   if (GFTP_IS_CONNECTED (current_wdata->request))