Re: cvs commit: squid3/src ftp.cc

From: Guido Serassio <guido.serassio@dont-contact.us>
Date: Mon, 13 Aug 2007 10:45:36 +0200

Hi Amos,

At 01.57 13/08/2007, Amos Jeffries wrote:
>amosjeffries 2007/08/12 17:57:28 MDT
>
> Modified files:
> src ftp.cc
> Log:
> Fix bug 1560 : Bad filedescriptor in ftpSend actions.
>

Something is missing in your commit:

if /usr/bin/g++-3.4 -DHAVE_CONFIG_H
-DDEFAULT_CONFIG_FILE=\"/usr/local/squid3/etc/squid.conf\" -I. -I.
-I../include -I. -I. -I../include -I../include
-I../lib/libTrie/include -I/usr/include/libxml2 -Werror -Wall
-Wpointer-arith -Wwrite-strings -Wcomments -D_REENTRANT -m32
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -MT ftp.o -MD -MP
-MF "$depbase.Tpo" -c -o ftp.o ftp.cc; \
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
ftp.cc: In function `void ftpSendUser(FtpStateData*)':
ftp.cc:1859: error: `haveControlChannel' undeclared (first use this function)
ftp.cc:1859: error: (Each undeclared identifier is reported only once
for each function it appears in.)
ftp.cc: In function `void ftpSendPass(FtpStateData*)':
ftp.cc:1893: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendType(FtpStateData*)':
ftp.cc:1922: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendCwd(FtpStateData*)':
ftp.cc:2047: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendMkdir(FtpStateData*)':
ftp.cc:2101: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendMdtm(FtpStateData*)':
ftp.cc:2155: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendSize(FtpStateData*)':
ftp.cc:2185: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendPasv(FtpStateData*)':
ftp.cc:2234: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendPort(FtpStateData*)':
ftp.cc:2510: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendStor(FtpStateData*)':
ftp.cc:2639: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendRest(FtpStateData*)':
ftp.cc:2704: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendList(FtpStateData*)':
ftp.cc:2762: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendNlst(FtpStateData*)':
ftp.cc:2779: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendRetr(FtpStateData*)':
ftp.cc:2833: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `void ftpSendQuit(FtpStateData*)':
ftp.cc:2940: error: `haveControlChannel' undeclared (first use this function)
ftp.cc: In function `bool haveControlChannel(const char*)':
ftp.cc:3405: error: `bool haveControlChannel(const char*)' used prior
to declaration
ftp.cc:3406: error: `doneWithServer' undeclared (first use this function)
make[3]: *** [ftp.o] Error 1
make[3]: Leaving directory `/home/serassio/squid-cache.org/squid3/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/serassio/squid-cache.org/squid3/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/serassio/squid-cache.org/squid3/src'
make: *** [all-recursive] Error 1

Regards

Guido

> This was caused by some FTP operations failing and calling the ftpFail
> properly, but then going on to call an ftpSend.
> It may also occur when a ftpSend event is scheduled prior to the server
> control channel dying or being closed.
>
> This patch adds a function haveControlChannel(const char *caller_name)
> which displays a debug notice at level 3 and returns false if the server
> control channels are not available. This is now called by each Sending
> operation before it begins.
>
> Revision Changes Path
> 1.433 +76 -3 squid3/src/ftp.cc

-
========================================================
Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1 10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135 Fax. : +39.011.9781115
Email: guido.serassio@acmeconsulting.it
WWW: http://www.acmeconsulting.it/
Received on Mon Aug 13 2007 - 02:45:43 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Aug 31 2007 - 12:00:05 MDT