Thread View: borland.public.cppbuilder.internet.socket
8 messages
8 total messages
Started by Frank Gruber
Sun, 08 Oct 2006 19:41
@RLebau - Modification of IdTCPConnection breaks existing apps
Author: Frank Gruber
Date: Sun, 08 Oct 2006 19:41
Date: Sun, 08 Oct 2006 19:41
45 lines
2667 bytes
2667 bytes
Hi Remy,
the last modification you made in IdTCPConnection::ReadStream breaks
existing code of my application. I'm not sure if it is intended by the
new design or is simply a bug. Maybe you could take a look at.
// 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
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
try
ReadBuffer(LBuf[0], i);
except
on E: Exception do begin
// RLebeau - ReadFromStack() inside of ReadBuffer()
// could have filled the InputBuffer with more bytes
// than actually requested, so don't extract too
// many bytes here...
i := Min(i, InputBuffer.Size);
Move(InputBuffer.Memory^, LBuf[0], i);
InputBuffer.Remove(i);
if not (E is EIdConnClosedGracefully) or not
AReadUntilDisconnect then begin
raise;
end;
end;
--------
My app (TIdHTTP) allways gets into an infinite loop at the code shown.
When running with the debugger an EIdConnClosedGracefully exception is
thrown endless but the loop is never left. The server is a TIdHTTPServer
descendant. Any ideas how to fix this? The previous version of
IdTCPConnection does not show this problem.
Thanks.
Regards,
Frank.
Re: @RLebau - Modification of IdTCPConnection breaks existing apps
Author: Remy Lebeau (TeamB)
Date: Mon, 09 Oct 2006 17:03
Date: Mon, 09 Oct 2006 17:03
25 lines
1578 bytes
1578 bytes
"Frank Gruber" <HVFDMIPUMFPS@spammotel.com> wrote in message
news:4529537f$1@newsgroups.borland.com...
> the last modification you made in IdTCPConnection::ReadStream
> breaks existing code of my application.
You are not using the latest code. That has already been fixed 5 months
ago. You are showing the old code that was buggy. These lines:
if not (E is EIdConnClosedGracefully) or not AReadUntilDisconnect then
begin
raise;
end;
Where changed to the following:
if (E is EIdConnClosedGracefully) and AReadUntilDisconnect then begin
Break;
end else begin
raise;
end;
Gambit
Re: @RLebau - Modification of IdTCPConnection breaks existing apps
Author: Frank Gruber
Date: Tue, 10 Oct 2006 09:05
Date: Tue, 10 Oct 2006 09:05
22 lines
1689 bytes
1689 bytes
Remy Lebeau (TeamB) schrieb: > "Frank Gruber" <HVFDMIPUMFPS@spammotel.com> wrote in message > news:4529537f$1@newsgroups.borland.com... > >> the last modification you made in IdTCPConnection::ReadStream >> breaks existing code of my application. > > You are not using the latest code. That has already been fixed 5 months > ago. You are showing the old code that was buggy. These lines: [snip] Hi Remy, maybe I'm confusing anything here but I downloaded the source I have shown on 9th September 2006. To be sure I just downloaded the zip again and it still contains the source code I have shown. Maybe there is a more accurate mirror to get the sources? I used ftp.fulgan.com. Thanks. Regards Frank.
Re: @RLebau - Modification of IdTCPConnection breaks existing apps
Author: Remy Lebeau (TeamB)
Date: Tue, 10 Oct 2006 17:45
Date: Tue, 10 Oct 2006 17:45
22 lines
1704 bytes
1704 bytes
"Frank Gruber" <HVFDMIPUMFPS@spammotel.com> wrote in message news:452b6145@newsgroups.borland.com... > maybe I'm confusing anything here but I downloaded the source I > have shown on 9th September 2006. To be sure I just downloaded > the zip again and it still contains the source code I have shown. As it turns out, Fulgan's mirror has been broken for some time now. It hasn't been pulling the latest Indy code properly, and so its zip file does not contain all of the latest fixes yet. > Maybe there is a more accurate mirror to get the sources? There is not. > I used ftp.fulgan.com. Fulgan has already been notified of the problem. Gambit
Re: @RLebau - Modification of IdTCPConnection breaks existing apps
Author: Frank Gruber
Date: Wed, 11 Oct 2006 08:28
Date: Wed, 11 Oct 2006 08:28
11 lines
1330 bytes
1330 bytes
Remy Lebeau (TeamB) schrieb: >> I used ftp.fulgan.com. > > Fulgan has already been notified of the problem. Ok I will watch out if the current sources get uploaded. Thanks for your assistance. Regards, Frank.
Re: @RLebau - Modification of IdTCPConnection breaks existing apps
Author: Frank Gruber
Date: Sat, 21 Oct 2006 10:09
Date: Sat, 21 Oct 2006 10:09
28 lines
2038 bytes
2038 bytes
Hi Remy, > "Frank Gruber" <HVFDMIPUMFPS@spammotel.com> wrote in message > news:452b6145@newsgroups.borland.com... > >> maybe I'm confusing anything here but I downloaded the source I >> have shown on 9th September 2006. To be sure I just downloaded >> the zip again and it still contains the source code I have shown. > > As it turns out, Fulgan's mirror has been broken for some time now. It > hasn't been pulling the latest Indy code properly, and so its zip file does > not contain all of the latest fixes yet. > >> Maybe there is a more accurate mirror to get the sources? > > There is not. > >> I used ftp.fulgan.com. > > Fulgan has already been notified of the problem. I see that Indy9 source on the mirror has changed (IdVCard.pas). However the changes you mentioned is still not in IdTCPConnection. Is the mirror still broken or was the change not made public to the development snapshot? Regards Frank.
Re: @RLebau - Modification of IdTCPConnection breaks existing apps
Author: Remy Lebeau (TeamB)
Date: Sat, 21 Oct 2006 11:52
Date: Sat, 21 Oct 2006 11:52
13 lines
1593 bytes
1593 bytes
"Frank Gruber" <ZJQBBYSESPEZ@spammotel.com> wrote in message news:4539f152$1@newsgroups.borland.com... > I see that Indy9 source on the mirror has changed (IdVCard.pas). > However the changes you mentioned is still not in IdTCPConnection. I just double-checked the source control and sure enough, the change is missing. I could have sworn I saw it in there earlier. But I have checked it in again to make sure. Give the mirror another day to catch up. Gambit
Re: @RLebau - Modification of IdTCPConnection breaks existing apps
Author: Frank Gruber
Date: Mon, 23 Oct 2006 16:41
Date: Mon, 23 Oct 2006 16:41
16 lines
1701 bytes
1701 bytes
Remy Lebeau (TeamB) schrieb: > "Frank Gruber" <ZJQBBYSESPEZ@spammotel.com> wrote in message > news:4539f152$1@newsgroups.borland.com... > >> I see that Indy9 source on the mirror has changed (IdVCard.pas). >> However the changes you mentioned is still not in IdTCPConnection. > > I just double-checked the source control and sure enough, the change is > missing. I could have sworn I saw it in there earlier. But I have checked > it in again to make sure. Give the mirror another day to catch up. The change is now part of the archive. Thanks. Regards, Frank.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads