| View previous topic :: View next topic |
| Author |
Message |
Matthias Guest
|
Posted: Fri Aug 04, 2006 2:25 am Post subject: Indy 9 (DevSnapshopt) and TIdFtp List |
|
|
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
|
Posted: Fri Aug 04, 2006 3:33 am Post subject: Re: Indy 9 (DevSnapshopt) and TIdFtp List |
|
|
"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
|
Posted: Fri Aug 04, 2006 8:12 am Post subject: Re: Indy 9 (DevSnapshopt) and TIdFtp List |
|
|
"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
|
Posted: Fri Aug 04, 2006 8:12 am Post subject: Re: Indy 9 (DevSnapshopt) and TIdFtp List |
|
|
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 |
|
 |
|