GNU bug report logs -
#67865
[PATCH] ange-ftp fails with tnftp client
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 18 Dec 2023 11:16:10 +0100
with message-id <87cyv3u87p.fsf <at> gmx.de>
and subject line Re: bug#67865: [PATCH] ange-ftp fails with tnftp client
has caused the debbugs.gnu.org bug report #67865,
regarding [PATCH] ange-ftp fails with tnftp client
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
67865: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67865
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
* bug description
When used with the tnftp client (https://en.wikipedia.org/wiki/Tnftp),
ange-ftp fails when trying to enable passive mode.
* fix description
Passive mode is enabled by function ange-ftp-passive-mode:
(defun ange-ftp-passive-mode (proc on-or-off)
(if (string-match (concat "Passive mode " on-or-off)
(cdr (ange-ftp-raw-send-cmd
proc (concat "passive " on-or-off)
"Trying passive mode..." nil)))
(ange-ftp-message (concat "Trying passive mode..." on-or-off))
(error "Trying passive mode...failed")))
that expects to get a result string containing the string "Passive
mode on" (when on-or-off is "on"), however tnftp includes a colon in
its answer (extract from the buffer the ftp process is run in):
ftp> passive on
Passive mode: on; fallback to active mode: off.
I suggest slightly changing the regexp used in string-match to allow
for this colon, as shown below:
(defun ange-ftp-passive-mode (proc on-or-off)
(if (string-match (concat "Passive mode:? " on-or-off)
[...]
The attached patch does just that.
For information, in debian bookworm the ftp package has changed from
netkit-ftp to being a dummy transitional package for tnftp.
regards,
[0001-ange-ftp-fix-passive-mode-result-string-for-tntfp-cl.patch (text/x-diff, attachment)]
[Message part 5 (message/rfc822, inline)]
Version: 29.2
Eli Zaretskii <eliz <at> gnu.org> writes:
Hi,
>> > I suggest slightly changing the regexp used in string-match to allow
>> > for this colon, as shown below:
>> >
>> > (defun ange-ftp-passive-mode (proc on-or-off)
>> > (if (string-match (concat "Passive mode:? " on-or-off)
>> > [...]
>> >
>> > The attached patch does just that.
>>
>> Looks OK to me.
>>
>> Eli, do we want this in emacs-29 or master?
>
> It's okay to install this on emacs-29, thanks.
Done, closing the bug.
Best regards, Michael.
This bug report was last modified 1 year and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.