Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how abort a tranfer with IdFTP method...??

195 views
Skip to first unread message

Sebastian Schmidt

unread,
Jun 28, 2002, 3:10:06 PM6/28/02
to
Hi..
I use IdFTP1->Abort() in my source but it generate a exception in..

try
{
IdFTP1->Connect( true, 5000 );
}
catch( Exception &E )
{
E.Message .. -> Showing "Not Connected"
}

I want Abort without this exception...
Thanks...


Luis Espinosa Márquez

unread,
Jun 28, 2002, 3:29:49 PM6/28/02
to
What Indy version are you using?

If you are using 8, you're having the same problem than me. When
you abort a transfer, automatically disconnects eveything.

The only solution that Indy Support have given me is to update to 9. That's
very easy to say...

They don't offer support for 8... A simple thing like aborting a transfer is
not allowed in this version. They don't provide a simple fixing for that
either...

So, why dont you guys REMOVE THE INDY 8 from the website?

Really sad...

Yes, I know it's free and I thank you that you offer us with such a
good component... but there are things that should be done in a different
way...

"Sebastian Schmidt" <sebastia...@enexpro.com.ar> wrote in message
news:3d1cb63a_2@dnews...
> something more, when Abort (after the exception) happens the event
> OnWorkEnd, but i want showing it when the file upload is finished
> successfully...
>
>
>


Sebastian Schmidt

unread,
Jun 28, 2002, 3:15:53 PM6/28/02
to

Kudzu

unread,
Jun 28, 2002, 4:48:40 PM6/28/02
to
"Luis Espinosa M rquez" <espinos...@nexo.es> wrote in
news:3d1cb993$1_1@dnews:
> The only solution that Indy Support have given me is to update to 9.
> That's very easy to say...

We are not currently maintaining 8. Borland doesnt maintain Delphi 5 anymore.

> They don't offer support for 8... A simple thing like aborting a transfer
> is not allowed in this version. They don't provide a simple fixing for
> that either...

9 is pretty much RC status. There is no reason to support 8.

> So, why dont you guys REMOVE THE INDY 8 from the website?

Archival purposes and because people still want it. You dont remove it for
one bug.

> Yes, I know it's free and I thank you that you offer us with such a
> good component... but there are things that should be done in a different
> way...

Upgrade to the current code base. I'm sorry - but we dont fix bugs in the
older code base. If you really want it - you have the source.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Want priority commercial Indy support?

Qualified help fast with Indy Experts Support
from the experts themselves:

http://www.atozedsoftware.com/indy/support/


Posted by ELKNews 1.0.4-B
Empower your News Reader! http://www.atozedsoftware.com

Sebastian Schmidt

unread,
Jun 28, 2002, 4:39:29 PM6/28/02
to
I'm using the last version; i think that is 9.some; from ftp of indy...
download its less than two weeks ago.
I suppose that it should have some solution... or not??

thanks.


Luis Espinosa Márquez

unread,
Jun 28, 2002, 5:22:37 PM6/28/02
to
Kudzu, I understand your points. What I cannot understand
if why you only give support for a version that is only beta and you're
making changes every day.

From my point of view, support should be given for an stable version, not
for one
that is still being developed.

Luis

"Kudzu" <cp...@hower.org> wrote in message
news:Xns923C7C638...@127.0.0.1...

Sebastian Schmidt

unread,
Jun 28, 2002, 5:48:07 PM6/28/02
to
Kudzu:
I have installed the version 9 from the ftp... the last version!!
and i have the same problems...
You have a solution?
Thanks...

Don Siders [Team Indy]

unread,
Jun 28, 2002, 6:56:29 PM6/28/02
to

"Sebastian Schmidt" <sebastia...@enexpro.com.ar> wrote in message
news:3d1cb4de_2@dnews...

I see no use of TIdFTP->Abort() in this example. If you're saying that the
exception message is being displayed anyway - try it outside of the IDE.

In any case, Abort only affects the data channel for an FTP sesssion - not
the control channel or the connection state.

If you're trying to close an active FTP session, call TIdFTP->Quit().

hth...
--
Don

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.370 / Virus Database: 205 - Release Date: 6/5/2002

Remy Lebeau [TeamB]

unread,
Jun 28, 2002, 8:55:11 PM6/28/02
to
Could you please post actual compilable source code that demonstrates the
problem?


Gambit

"Sebastian Schmidt" <sebastia...@enexpro.com.ar> wrote in message

news:3d1cd9ee$1_1@dnews...

Kudzu

unread,
Jun 29, 2002, 5:30:16 AM6/29/02
to
"Sebastian Schmidt" <sebastia...@enexpro.com.ar> wrote in news:3d1cd9ee
$1_1@dnews:

> I have installed the version 9 from the ftp... the last version!!
> and i have the same problems...
> You have a solution?

File a bug report on it. Did you get the DEV snapshot?

Kudzu

unread,
Jun 29, 2002, 5:30:14 AM6/29/02
to
"Sebastian Schmidt" <sebastia...@enexpro.com.ar> wrote in news:3d1cc9db_
1@dnews:

> I'm using the last version; i think that is 9.some; from ftp of indy...
> download its less than two weeks ago.
> I suppose that it should have some solution... or not??

Was it the DEV snapshot?


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Want more Indy stuff? Try the Atozed Indy Portal at
http://www.atozedsoftware.com/
* More Demos
* Articles
* Commercial Support

Kudzu

unread,
Jun 29, 2002, 5:30:17 AM6/29/02
to
"Luis Espinosa M?rquez" <espinos...@nexo.es> wrote in news:3d1cd402$1_2
@dnews:

> Kudzu, I understand your points. What I cannot understand
> if why you only give support for a version that is only beta and you're
> making changes every day.
>
> From my point of view, support should be given for an stable version, not
> for one that is still being developed.

9 is stable. Its pretty much in RC status and has been administratively locked
for a few weeks now. And even before then it was pretty stable and there are
many commercial product which have been using 9 for months.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

IntraWeb & FinalBuilder - http://www.AToZedSoftware.com

Sebastian Schmidt

unread,
Jun 29, 2002, 2:50:38 PM6/29/02
to
"Remy Lebeau [TeamB]" <gamb...@yahoo.com> escribió en el mensaje
news:3d1d061c$1_2@dnews...

> Could you please post actual compilable source code that demonstrates the
> problem?
> Gambit

I have the next problems...
- when call to Abort() method, this abort the transaction and then
*catch() capture a exception "not connected"...
And then happens the event OnWorkEnd (would not this have to happen if
the transaction concludes?)
don't care if when I abort the transaction stays connected or
disconnect... but not this well that it throws an exception
- while is trying to connect or login it block the application --- still
using ProcessMessages...

I using C++ Builder 5 - Indy from ftp - adsl internet - Windows xp pro -
athlon 1200 - 512mb

this is a example...

void __fastcall TForm1::ConnectClick...
{
IdFTP1->Port = Edit1->Text.ToInt();
IdFTP1->Host = Edit2->Text.ToInt();
IdFTP1->Username = Edit3->Text.ToInt();
IdFTP1->Password = Edit4->Text.ToInt();
// with the same parameters connect and login with dreamweaver
quickly..


try
{
IdFTP1->Connect( true, 5000 );
}

*catch(Exception &E)
{
ShowMessage( E.Message ); //this show the message "Not
Connected" when Abort() or Quit()
}
}
void __fastcall TForm1::IdFTP1AfterClientLogin...
{
if( FileExists( LocalFile ) )
Put( LocalFile, ExtractFileName( LocalFile ), false );
}
void __fastcall TForm1::AbortClick...
{
IdFTP1->Abort(); // or Quit();
}
void __fastcall TForm1::IdFTP1WorkEnd...
{
ShowMessage();
//in teory here is when the transaction is concluded. (Work END) But
if Abort or Quit also raise WordEnd..
//I don't understand..
}

I don't want to molest anybody with my doubts, I really like Indy and I'm
looking for the form that it serves me...
Thanks.

Sebas


Remy Lebeau [TeamB]

unread,
Jun 29, 2002, 4:00:39 PM6/29/02
to

"Sebastian Schmidt" <sebastia...@enexpro.com.ar> wrote in message
news:3d1e01ec_1@dnews...

> *catch(Exception &E)

Well, first off, that is wrong. You shouldn't be using '*' with exception
handlers at all. Why are you doing that?

> Put( LocalFile, ExtractFileName( LocalFile ), false );

Perhaps you meant IdFTP1->Put() instead?

> void __fastcall TForm1::IdFTP1WorkEnd...
> {
> ShowMessage();
> //in teory here is when the transaction is concluded. (Work END)
But
> if Abort or Quit also raise WordEnd..
> //I don't understand..
> }

That's fine. OnWorkEnd is supposed to be triggered in an abort, because the
transferring code uses a try...__finally block to trigger OnWorkBegin and
OnWorkEnd regardless of errors.


Gambit


Sebastian Schmidt

unread,
Jun 29, 2002, 4:15:54 PM6/29/02
to
> > *catch(Exception &E) - * it was alone a mark to locate ...
and yes i'm sorry, I forgot to put the IdFTP1-> (this is pseudo code)

> > Put( LocalFile, ExtractFileName( LocalFile ), false );
>
> Perhaps you meant IdFTP1->Put() instead?


The application run perfectly, the errors happen when I use Abort or Quit...
in all ways, I'm opting to use NMFTP... (although i can't modify the size of
the buffers)

> That's fine. OnWorkEnd is supposed to be triggered in an abort, because
the
> transferring code uses a try...__finally block to trigger OnWorkBegin and
> OnWorkEnd regardless of errors.
> Gambit

Ok gambit... but you didn't solve me anything
thank you equally...


Remy Lebeau [TeamB]

unread,
Jun 29, 2002, 6:53:06 PM6/29/02
to
I wouldn't recommend that you do that. The Netmasters components a very
buggy.


Gambit

"Sebastian Schmidt" <sebastia...@enexpro.com.ar> wrote in message

news:3d1e15f6_1@dnews...

Espen

unread,
Jul 1, 2002, 9:12:32 AM7/1/02
to

Here's a sample code, using abort and quit.
void __fastcall TForm1::StopButtonClick(TObject *Sender)
{
if(FTPC->Connected())
{
if(Application->MessageBox("Quit will close the connection to the server, continue with quit?", "Warning",
MB_YESNO) == mrYes)
{
TransferInProg();
try{FTPC->Abort();}
catch ( EIdException& exc)
{
Memo1->Lines->Add(exc.Message);
}
TransferStop();
Memo1->Lines->Add("Abort current transfer");


// DISCONNECT
TransferInProg();
try{FTPC->Quit();}
catch ( EIdException& exc)
{
Memo1->Lines->Add(exc.Message);
}
TransferStop();
}
}
}

I use both abort & quit to stop a transfer.

Sincerely
Espen

Luis Espinosa Márquez

unread,
Jun 28, 2002, 3:29:49 PM6/28/02
to
What Indy version are you using?

If you are using 8, you're having the same problem than me. When
you abort a transfer, automatically disconnects eveything.

The only solution that Indy Support have given me is to update to 9. That's
very easy to say...

They don't offer support for 8... A simple thing like aborting a transfer is


not allowed in this version. They don't provide a simple fixing for that
either...

So, why dont you guys REMOVE THE INDY 8 from the website?

Really sad...

Yes, I know it's free and I thank you that you offer us with such a
good component... but there are things that should be done in a different
way...

"Sebastian Schmidt" <sebastia...@enexpro.com.ar> wrote in message
news:3d1cb63a_2@dnews...

Kudzu

unread,
Jun 28, 2002, 4:48:40 PM6/28/02
to
"Luis Espinosa M rquez" <espinos...@nexo.es> wrote in
news:3d1cb993$1_1@dnews:
> The only solution that Indy Support have given me is to update to 9.
> That's very easy to say...

We are not currently maintaining 8. Borland doesnt maintain Delphi 5 anymore.

> They don't offer support for 8... A simple thing like aborting a transfer


> is not allowed in this version. They don't provide a simple fixing for
> that either...

9 is pretty much RC status. There is no reason to support 8.

> So, why dont you guys REMOVE THE INDY 8 from the website?

Archival purposes and because people still want it. You dont remove it for
one bug.

> Yes, I know it's free and I thank you that you offer us with such a


> good component... but there are things that should be done in a different
> way...

Upgrade to the current code base. I'm sorry - but we dont fix bugs in the

older code base. If you really want it - you have the source.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Want priority commercial Indy support?

Qualified help fast with Indy Experts Support
from the experts themselves:

http://www.atozedsoftware.com/indy/support/


Sebastian Schmidt

unread,
Jun 28, 2002, 3:15:53 PM6/28/02
to

Luis Espinosa Márquez

unread,
Jun 28, 2002, 5:22:37 PM6/28/02
to
Kudzu, I understand your points. What I cannot understand
if why you only give support for a version that is only beta and you're
making changes every day.

From my point of view, support should be given for an stable version, not
for one
that is still being developed.

Luis

"Kudzu" <cp...@hower.org> wrote in message
news:Xns923C7C638...@127.0.0.1...

0 new messages