🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #2013

Re: Go from Indy 9 to Indy 8

#2013
From: Joe Pasquariello
Date: Sat, 09 Sep 2006 20:01
97 lines
4159 bytes
Hi Remy Lebeau,

I'm using Indy9 with C++ Builder, but haven't done too much with it yet
except some very simple Tcp Client/Server stuff. I chose Indy9 in the
BDS2006 installation. Can you please point me to instructions for
downloading and updating Indy9 to the latest development snapshot? It sounds
like that is something I should do.

Thanks,

Joe

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:44fdbe50$1@newsgroups.borland.com...
>
> "Skaarak" <skaarak@NOakamailSPAM.com> wrote in message
> news:44fda587$1@newsgroups.borland.com...
>
> > I wish I knew.
>
> Well, you are obviously trying to do something, and something is not
working
> correctly for you.  So what is that something that you are seeing not work
> for you?
>
> > As per my post about a month ago:
> > Indy 9 TIdFTP EIdConnClosedGracefully etc...
> > It is still throwing that disconnect.
>
> As I would have explained to you earlier, that can only occur if the
server
> is actually closing the connection.
>
> Incidently, did you try upgrading to the latest snapshot yet?
>
> >         try {
> >             if (FTP2->Connected()) {
>
> You do not need to call Connected() if Connect() returns without throwing
an
> exception.
>
> >                 try {
> >                     FTP2->ChangeDir("AddOns");
> >                 } catch(const Exception &) {
> >                     return;
> >                 }
>
> You don't need an inner try..catch block around the call to ChangeDir(),
> since you already have an outer try..catch that would be able to handle
the
> same exception.
>
> >                 delete names;
>
> You are not freeing the TStringList if an exception occurs.  That is a
> memory leak.
>
> In fact, you do not even need the TStringList at all.  Pass the
> RemoteDir->Items to ParseDirectory() directly instead.
>
> >     try {
> >         FTP2->List(RawDir->Items,"*", true);
> >     } catch(const Exception &) {
> >         return;    // Every time w/o fail this Exception is thrown!
> >     }
>
> The FTP protocol opens a second connection to transfer directory listing
> data.  The only way you could be getting an EIdConnClosedGracefully
> exception in your own code is if the exception is coming from that second
> connection and Indy is not catching it properly.  Which, again, goes back
to
> my question of whether you are actually using the latest snapshot version
or
> not.
>
> >         temp = RawDir->Items->Strings[i].SubString(0,10);    //directory
> //0
>
> AnsiString is 1-based.  0 is an invalid index.
>
> >         if (temp.c_str()[0] == 'd' || temp.c_str()[0] == 'D') {
>
> You should be using AnsiString's '[]' operator instead.  You also need to
> test for an empty string before accessing its characters:
>
>     if (!temp.IsEmpty() && ((temp[1] == 'd') || (temp[1] == 'D'))
>
> > Yes, Indy 9.0.50 snapshot w/ 9.0.17 RSP I think.
>
> When exactly did you download the snapshot, though?  All of the latest
> snapshot releases have been 9.0.50 for awhile now.
>
>
> Gambit
>
>
Technical Details
Message-ID: <45031d8d@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44f86696$1@newsgroups.borland.com> <44f89ea5$1@newsgroups.borland.com> <44f8ae89$1@newsgroups.borland.com> <44f8b9ba@newsgroups.borland.com> <44fda587$1@newsgroups.borland.com> <44fdbe50$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f4215290349cd894
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Joe Pasquariello" <joep@fenway.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <44f86696$1@newsgroups.borland.com> <44f89ea5$1@newsgroups.borland.com> <44f8ae89$1@newsgroups.borland.com> <44f8b9ba@newsgroups.borland.com> <44fda587$1@newsgroups.borland.com> <44fdbe50$1@newsgroups.borland.com>
Subject: Re: Go from Indy 9 to Indy 8
Date: Sat, 9 Sep 2006 13:01:11 -0700
Lines: 99
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1807
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807
NNTP-Posting-Host: 71.131.24.58
Message-ID: <45031d8d@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1157832077 71.131.24.58 (9 Sep 2006 13:01:17 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail