BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Indy 9 (DevSnapshopt) and TIdFtp List

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Matthias
Guest





PostPosted: Fri Aug 04, 2006 2:25 am    Post subject: Indy 9 (DevSnapshopt) and TIdFtp List Reply with quote



Hi out there,

I am having some problems using the ftp component with the current
devSnapshot.

Everytime I call the list-Method the program hangs. So I started debugging
it and found out that it got trapped in the unit IdTcpConnection in a while
loop.

It seems to work if I uncomment the connected, but I am not quite sure if
this is the right solution because obviously its really intended to be
commented.

// RLebeau - don't call Connected() here! ReadBuffer() already
// does that internally. Calling Connected() here can cause an
// EIdConnClosedGracefully exception that breaks the loop
// prematurely and thus leave unread bytes in the InputBuffer.
// Let the loop catch the exception before exiting...
while {Connected and} (LWorkCount > 0) do begin //matt
i := Min(LWorkCount, LBufSize);
//TODO: Improve this - dont like the use of the exception handler
//DONE -oAPR: Dont use a string, use a memory buffer or better yet the
buffer itself.
try

I also got the problem using the ftp client that comes with the indy 9
demos.

thanks for your help.

Matthias
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri Aug 04, 2006 3:33 am    Post subject: Re: Indy 9 (DevSnapshopt) and TIdFtp List Reply with quote



"Matthias" <matthias.nospam (AT) gmx (DOT) net> wrote in message
news:44d269cf$1 (AT) newsgroups (DOT) borland.com...

Quote:
Everytime I call the list-Method the program hangs. So I started debugging
it and found out that it got trapped in the unit IdTcpConnection in a
while
loop.

That is already a known issue.

Inside of ReadStream's loop, change this code:

if not (E is EIdConnClosedGracefully) or not AReadUntilDisconnect then
begin
raise;
end;

To this instead:

if (E is EIdConnClosedGracefully) and AReadUntilDisconnect then begin
Break;
end else begin
raise;
end;


Gambit
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri Aug 04, 2006 8:12 am    Post subject: Re: Indy 9 (DevSnapshopt) and TIdFtp List Reply with quote



"Matthias" <matthias.nospam (AT) gmx (DOT) net> wrote in message
news:44d2e20f (AT) newsgroups (DOT) borland.com...

Quote:
Does that mean there's a more recent version in the repository?

No. You said that you already downloaded the latest one. The change I
mentioned has not been checked into the repository yet.

Quote:
I got it from a mirror, assuming that it is the most recent one.

It is.

Quote:
Where could I look up for known issues like that?

Nowhere.


Gambit
Back to top
Matthias
Guest





PostPosted: Fri Aug 04, 2006 8:12 am    Post subject: Re: Indy 9 (DevSnapshopt) and TIdFtp List Reply with quote

Hi,

thanks for your fast reply. Does that mean there's a more recent version
in the repository? I got it from a mirror, assuming that it is the most
recent one.

Where could I look up for known issues like that?

thanks for your help.

Matthias

Remy Lebeau (TeamB) schrieb:
Quote:
"Matthias" <matthias.nospam (AT) gmx (DOT) net> wrote in message
news:44d269cf$1 (AT) newsgroups (DOT) borland.com...

Everytime I call the list-Method the program hangs. So I started debugging
it and found out that it got trapped in the unit IdTcpConnection in a
while
loop.

That is already a known issue.

Inside of ReadStream's loop, change this code:

if not (E is EIdConnClosedGracefully) or not AReadUntilDisconnect then
begin
raise;
end;

To this instead:

if (E is EIdConnClosedGracefully) and AReadUntilDisconnect then begin
Break;
end else begin
raise;
end;


Gambit

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.