# HG changeset patch # User masneyb # Date 1095157012 0 # Node ID b2b4f5fa8fc733762df61c6a12ecd40ca400dd17 # Parent 3774d35667f066580a905b1b3361796897a21944 2004-9-14 Brian Masney * lib/gftp.h lib/bookmark.c lib/local.c lib/rfc2068.c lib/rfc959.c lib/sshv2.c src/gtk/transfer.c src/uicommon/gftpui.c - removed need_userpass from the gftp_request structure. Added need_username and need_password in it's place * autogen.sh - updated CFLAGS variable that is passed to configure diff -r 3774d35667f0 -r b2b4f5fa8fc7 ChangeLog --- a/ChangeLog Mon Sep 13 17:42:33 2004 +0000 +++ b/ChangeLog Tue Sep 14 10:16:52 2004 +0000 @@ -1,3 +1,11 @@ +2004-9-14 Brian Masney + * lib/gftp.h lib/bookmark.c lib/local.c lib/rfc2068.c lib/rfc959.c + lib/sshv2.c src/gtk/transfer.c src/uicommon/gftpui.c - removed + need_userpass from the gftp_request structure. Added need_username and + need_password in it's place + + * autogen.sh - updated CFLAGS variable that is passed to configure + 2004-9-6 Brian Masney * lib/gftp.h - make sure the _GNU_SOURCE is always defined. @@ -2809,7 +2817,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.319 2004/09/08 01:36:10 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.320 2004/09/14 10:16:52 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r 3774d35667f0 -r b2b4f5fa8fc7 autogen.sh --- a/autogen.sh Mon Sep 13 17:42:33 2004 +0000 +++ b/autogen.sh Tue Sep 14 10:16:52 2004 +0000 @@ -89,7 +89,7 @@ cd $ORIGDIR if test -z "$AUTOGEN_SUBDIR_MODE"; then - CFLAGS="-Wall -ansi -D_GNU_SOURCE -O -g" $srcdir/configure "$@" + CFLAGS="-Wall -W -Wno-long-long -Wno-unused-parameter -ansi -D_GNU_SOURCE -O -g" $srcdir/configure "$@" echo echo "Now type 'make' to compile $PROJECT." diff -r 3774d35667f0 -r b2b4f5fa8fc7 lib/bookmark.c --- a/lib/bookmark.c Mon Sep 13 17:42:33 2004 +0000 +++ b/lib/bookmark.c Tue Sep 14 10:16:52 2004 +0000 @@ -85,7 +85,8 @@ request->parse_url = bookmark_parse_url; request->url_prefix = "bookmark"; request->need_hostport = 0; - request->need_userpass = 0; + request->need_username = 0; + request->need_password = 0; request->use_cache = 0; request->always_connected = 0; diff -r 3774d35667f0 -r b2b4f5fa8fc7 lib/gftp.h --- a/lib/gftp.h Mon Sep 13 17:42:33 2004 +0000 +++ b/lib/gftp.h Tue Sep 14 10:16:52 2004 +0000 @@ -354,6 +354,9 @@ gftp_request * request, const char *string, ... ); +#define gftp_need_username(request) ((request)->need_username && ((request)->username == NULL || *(request)->username == '\0') +#define gftp_need_password(request) ((request)->need_password && (request)->username != NULL && *(request)->username != '\0' && strcmp ((request)->username, "anonymous") != 0 && ((request)->password == NULL || *(request)->password == '\0')) + struct gftp_request_tag { int protonum; /* Current number of the protocol this is @@ -391,7 +394,8 @@ use_proxy : 1, always_connected : 1, need_hostport : 1, - need_userpass : 1, + need_username : 1, + need_password : 1, use_cache : 1, /* Enable or disable the cache */ cached : 1, /* Is this directory listing cached? */ cancel : 1, /* If a signal is received, should diff -r 3774d35667f0 -r b2b4f5fa8fc7 lib/local.c --- a/lib/local.c Mon Sep 13 17:42:33 2004 +0000 +++ b/lib/local.c Tue Sep 14 10:16:52 2004 +0000 @@ -608,7 +608,8 @@ request->swap_socks = NULL; request->url_prefix = "file"; request->need_hostport = 0; - request->need_userpass = 0; + request->need_username = 0; + request->need_password = 0; request->use_cache = 0; request->always_connected = 1; diff -r 3774d35667f0 -r b2b4f5fa8fc7 lib/rfc2068.c --- a/lib/rfc2068.c Mon Sep 13 17:42:33 2004 +0000 +++ b/lib/rfc2068.c Tue Sep 14 10:16:52 2004 +0000 @@ -927,7 +927,8 @@ request->set_config_options = rfc2068_set_config_options; request->url_prefix = g_strdup ("http"); request->need_hostport = 1; - request->need_userpass = 0; + request->need_username = 0; + request->need_password = 0; request->use_cache = 1; request->always_connected = 1; diff -r 3774d35667f0 -r b2b4f5fa8fc7 lib/rfc959.c --- a/lib/rfc959.c Mon Sep 13 17:42:33 2004 +0000 +++ b/lib/rfc959.c Tue Sep 14 10:16:52 2004 +0000 @@ -1900,7 +1900,8 @@ request->set_config_options = rfc959_set_config_options; request->url_prefix = "ftp"; request->need_hostport = 1; - request->need_userpass = 1; + request->need_username = 0; + request->need_password = 1; request->use_cache = 1; request->always_connected = 0; diff -r 3774d35667f0 -r b2b4f5fa8fc7 lib/sshv2.c --- a/lib/sshv2.c Mon Sep 13 17:42:33 2004 +0000 +++ b/lib/sshv2.c Tue Sep 14 10:16:52 2004 +0000 @@ -2006,7 +2006,7 @@ intptr_t ssh_need_userpass; gftp_lookup_request_option (request, "ssh_need_userpass", &ssh_need_userpass); - request->need_userpass = ssh_need_userpass; + request->need_username = ssh_need_userpass; return (0); } @@ -2111,7 +2111,8 @@ request->swap_socks = sshv2_swap_socks; request->url_prefix = "ssh2"; request->need_hostport = 1; - request->need_userpass = 1; + request->need_username = 1; + request->need_password = 1; request->use_cache = 1; request->always_connected = 0; request->protocol_data = g_malloc0 (sizeof (sshv2_params)); diff -r 3774d35667f0 -r b2b4f5fa8fc7 src/gtk/transfer.c --- a/src/gtk/transfer.c Mon Sep 13 17:42:33 2004 +0000 +++ b/src/gtk/transfer.c Tue Sep 14 10:16:52 2004 +0000 @@ -532,8 +532,7 @@ transdata); } - if (!tdata->toreq->stopable && tdata->toreq->need_userpass && - (tdata->toreq->password == NULL || *tdata->toreq->password == '\0')) + if (!tdata->toreq->stopable && gftp_need_password (tdata->toreq)) { tdata->toreq->stopable = 1; MakeEditDialog (_("Enter Password"), @@ -543,8 +542,7 @@ cancel_get_trans_password, tdata); } - if (!tdata->fromreq->stopable && tdata->fromreq->need_userpass && - (tdata->fromreq->password == NULL || *tdata->fromreq->password == '\0')) + if (!tdata->fromreq->stopable && gftp_need_password (tdata->fromreq)) { tdata->fromreq->stopable = 1; MakeEditDialog (_("Enter Password"), diff -r 3774d35667f0 -r b2b4f5fa8fc7 src/uicommon/gftpui.c --- a/src/uicommon/gftpui.c Mon Sep 13 17:42:33 2004 +0000 +++ b/src/uicommon/gftpui.c Tue Sep 14 10:16:52 2004 +0000 @@ -667,16 +667,11 @@ return (1); } - if (request->need_userpass) - { - if (request->username == NULL || *request->username == '\0') - gftpui_prompt_username (uidata, request); + if (gftp_need_username (request)) + gftpui_prompt_username (uidata, request); - if (request->username != NULL && - strcmp (request->username, "anonymous") != 0 && - (request->password == NULL || *request->password == '\0')) - gftpui_prompt_password (uidata, request); - } + if (gftp_need_password (request)) + gftpui_prompt_password (uidata, request); gftp_lookup_request_option (request, "retries", &retries);