Mercurial > gftp.yaz
changeset 67:aa971a4bb16f
2002-11-27 Brian Masney <masneyb@gftp.org>
* Officially release 2.0.14rc1
* lib/cache.c - take out a warning message
* lib/misc.c lib/protocols.c lib/gftp.h lib/gtk/dnd.c lib/transfer.c -
add second argument (free_request) to gftp_request_destroy
* lib/protocols.c (gftp_parse_url) - make sure the request structure
is cleared before we start to modify it
* src/gtk/gftp-text.c - fixed crash if you didn't enter a username
author | masneyb |
---|---|
date | Wed, 27 Nov 2002 14:29:57 +0000 |
parents | cd3e457cbc85 |
children | 7ee055577229 |
files | ChangeLog debian/changelog lib/cache.c lib/gftp.h lib/misc.c lib/protocols.c src/gtk/dnd.c src/gtk/transfer.c src/text/gftp-text.c |
diffstat | 9 files changed, 50 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Nov 27 02:23:51 2002 +0000 +++ b/ChangeLog Wed Nov 27 14:29:57 2002 +0000 @@ -1,3 +1,16 @@ +2002-11-27 Brian Masney <masneyb@gftp.org> + * Officially release 2.0.14rc1 + + * lib/cache.c - take out a warning message + + * lib/misc.c lib/protocols.c lib/gftp.h lib/gtk/dnd.c lib/transfer.c - + add second argument (free_request) to gftp_request_destroy + + * lib/protocols.c (gftp_parse_url) - make sure the request structure + is cleared before we start to modify it + + * src/gtk/gftp-text.c - fixed crash if you didn't enter a username + 2002-11-26 Brian Masney <masneyb@gftp.org> * configure.in - change version to 2.0.14rc1 @@ -327,7 +340,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.41 2002/11/27 02:23:50 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.42 2002/11/27 14:29:54 masneyb Exp $ tags * debian/* - updated files from Debian maintainer
--- a/debian/changelog Wed Nov 27 02:23:51 2002 +0000 +++ b/debian/changelog Wed Nov 27 14:29:57 2002 +0000 @@ -1,3 +1,9 @@ +gftp (2.0.14rc1-1) unstable; urgency=low + + * New release. See ChangeLog for details on changes in this release + + -- Brian Masney <masneyb@gftp.org> Wed, 27 Nov 2002 09:24:42 -0500 + gftp (2.0.13-1) unstable; urgency=low * Added a gftp mini logo (gftp-mini-logo.xpm) and using it in the menu file
--- a/lib/cache.c Wed Nov 27 02:23:51 2002 +0000 +++ b/lib/cache.c Wed Nov 27 14:29:57 2002 +0000 @@ -238,11 +238,6 @@ oldindexfile = expand_path (BASE_CONF_DIR "/cache/index.db"); if ((indexfd = open (oldindexfile, O_RDONLY)) == -1) { - if (request != NULL) - request->logging_function (gftp_logging_error, request->user_data, - _("Error: Cannot open local file %s: %s\n"), - oldindexfile, g_strerror (errno)); - g_free (oldindexfile); return; }
--- a/lib/gftp.h Wed Nov 27 02:23:51 2002 +0000 +++ b/lib/gftp.h Wed Nov 27 14:29:57 2002 +0000 @@ -653,7 +653,8 @@ gftp_request *gftp_request_new ( void ); -void gftp_request_destroy ( gftp_request * request ); +void gftp_request_destroy ( gftp_request * request, + int free_request ); void gftp_file_destroy ( gftp_file *file );
--- a/lib/misc.c Wed Nov 27 02:23:51 2002 +0000 +++ b/lib/misc.c Wed Nov 27 14:29:57 2002 +0000 @@ -556,9 +556,9 @@ if (tdata->structmutex) g_free (tdata->structmutex); if (tdata->fromreq != NULL) - gftp_request_destroy (tdata->fromreq); + gftp_request_destroy (tdata->fromreq, 1); if (tdata->toreq != NULL) - gftp_request_destroy (tdata->toreq); + gftp_request_destroy (tdata->toreq, 1); free_file_list (tdata->files); g_free (tdata); }
--- a/lib/protocols.c Wed Nov 27 02:23:51 2002 +0000 +++ b/lib/protocols.c Wed Nov 27 14:29:57 2002 +0000 @@ -35,7 +35,7 @@ void -gftp_request_destroy (gftp_request * request) +gftp_request_destroy (gftp_request * request, int free_request) { g_return_if_fail (request != NULL); @@ -76,8 +76,18 @@ g_free (request->protocol_data); if (request->sftpserv_path) g_free (request->sftpserv_path); + memset (request, 0, sizeof (*request)); - g_free (request); + + if (free_request) + g_free (request); + else + { + request->sockfd = -1; + request->datafd = -1; + request->cachefd = -1; + request->data_type = GFTP_TYPE_BINARY; + } } @@ -368,12 +378,17 @@ gftp_parse_url (gftp_request * request, const char *url) { char *pos, *endpos, *endhostpos, *str, tempchar; + gftp_logging_func logging_function; const char *stpos; int len, i; g_return_val_if_fail (request != NULL, -2); g_return_val_if_fail (url != NULL, -2); + logging_function = request->logging_function; + gftp_request_destroy (request, 0); + request->logging_function = logging_function; + for (stpos = url; *stpos == ' '; stpos++); if ((pos = strstr (stpos, "://")) != NULL)
--- a/src/gtk/dnd.c Wed Nov 27 02:23:51 2002 +0000 +++ b/src/gtk/dnd.c Wed Nov 27 14:29:57 2002 +0000 @@ -54,7 +54,7 @@ { ftp_log (gftp_logging_misc, NULL, _("Drag-N-Drop: Ignoring url %s: Not a valid url\n"), url); - gftp_request_destroy (current_ftpdata); + gftp_request_destroy (current_ftpdata, 1); free_fdata (newfle); return (0); } @@ -62,7 +62,7 @@ *pos++ = '\0'; if (compare_request (current_ftpdata, wdata->request, 1)) { - gftp_request_destroy (current_ftpdata); + gftp_request_destroy (current_ftpdata, 1); return (0); } @@ -92,7 +92,7 @@ templist->next = NULL; add_file_transfer (current_ftpdata, wdata->request, fromwdata, wdata, templist, 1); - gftp_request_destroy (current_ftpdata); + gftp_request_destroy (current_ftpdata, 1); /* FIXME resume files and download entire directories */
--- a/src/gtk/transfer.c Wed Nov 27 02:23:51 2002 +0000 +++ b/src/gtk/transfer.c Wed Nov 27 14:29:57 2002 +0000 @@ -998,8 +998,8 @@ { if (!copy_req) { - gftp_request_destroy (fromreq); - gftp_request_destroy (toreq); + gftp_request_destroy (fromreq, 1); + gftp_request_destroy (toreq, 1); } fromreq = NULL; toreq = NULL; @@ -1405,7 +1405,7 @@ { fromreq = tdata->fromwdata != NULL ? ((gftp_window_data *) tdata->fromwdata)->request : NULL; if (!tdata->fromreq->stopable && tdata->fromwdata && - fromreq->sockfd < 0 && fromreq->cached && + ((fromreq->sockfd < 0 && fromreq->cached) || fromreq->always_connected) && (tdata->fromreq->sockfd > 0 || tdata->fromreq->always_connected) && compare_request (tdata->fromreq, fromreq, 0)) {
--- a/src/text/gftp-text.c Wed Nov 27 02:23:51 2002 +0000 +++ b/src/text/gftp-text.c Wed Nov 27 14:29:57 2002 +0000 @@ -323,7 +323,7 @@ return (1); } - if (strcmp (GFTP_GET_USERNAME (request), "anonymous") == 0) + if (GFTP_GET_USERNAME (request) == NULL) { if ((pos = gftp_text_ask_question ("Username [anonymous]", 1, tempstr, sizeof (tempstr))) != NULL) @@ -335,6 +335,8 @@ request->password = NULL; } } + else + gftp_set_username (request, "anonymous"); } if (strcmp (GFTP_GET_USERNAME (request), "anonymous") != 0 &&