diff lib/cache.c @ 87:6df043359b41

2003-1-11 Brian Masney <masneyb@gftp.org> * autogen.sh - removed --intl and --no-changelog flags to gettextize * aclocal.m4 - updated * configure.in - and intl and po directories to AC_OUTPUT * cvsclean - remove more stuff * lib/bookmark.c (bookmark_parse_url) - use gftp_parse_bookmark function * lib/cache.c - remove gftp_cache_get_url_prefix(). Use request->url_prefix instead * lib/config_file.c - use proper exit codes. Also complain if the default protocol specified in the config file is invalid * lib/gftp.h lib/local.c lib/protocols.c - removed isblock, ischar, issocket and isfifo in struct gftp_file (not used anymore) * lib/gftp.h lib/misc.c - removed file_countlf (not used anymore) * lib/local.c lib/misc.c lib/protocols.c - various small cleanups * lib/misc.c (string_hash_function) - check key[i] instead of key[0] * lib/protocols.c lib/gftp.h - added gftp_parse_bookmark() * lib/rfc2068.c - if we are connected to a FTP url via a proxy, set request->url_prefix to be ftp. Added rfc2068_destroy() to free url_prefix whenever the structure is to be freed
author masneyb
date Sat, 11 Jan 2003 15:47:09 +0000
parents aa971a4bb16f
children fe36ed90aedd
line wrap: on
line diff
--- a/lib/cache.c	Mon Dec 30 01:32:19 2002 +0000
+++ b/lib/cache.c	Sat Jan 11 15:47:09 2003 +0000
@@ -20,16 +20,6 @@
 #include "gftp.h"
 static const char cvsid[] = "$Id$";
 
-char *
-gftp_cache_get_url_prefix (gftp_request * request)
-{
-  if (strcmp (request->protocol_name, "HTTP") == 0 &&
-      strcmp (request->proxy_config, "ftp") == 0)
-    return ("ftp");
-
-  return (request->url_prefix);
-}
-
 
 int
 gftp_new_cache_entry (gftp_request * request)
@@ -81,7 +71,7 @@
 
   lseek (fd, 0, SEEK_END);
   temp1str = g_strdup_printf ("%s://%s@%s:%d%s\t%s\n", 
-                           gftp_cache_get_url_prefix (request),
+                           request->url_prefix,
                            request->username == NULL ? "" : request->username,
                            request->hostname == NULL ? "" : request->hostname,
                            request->port, 
@@ -115,7 +105,7 @@
   size_t len;
 
   g_snprintf (description, sizeof (description), "%s://%s@%s:%d%s",
-              gftp_cache_get_url_prefix (request),
+              request->url_prefix,
               request->username == NULL ? "" : request->username,
               request->hostname == NULL ? "" : request->hostname,
               request->port, 
@@ -229,7 +219,7 @@
   int remove;
 
   g_snprintf (description, sizeof (description), "%s://%s@%s:%d%s",
-              gftp_cache_get_url_prefix (request),
+              request->url_prefix,
               request->username == NULL ? "" : request->username,
               request->hostname == NULL ? "" : request->hostname,
               request->port,