[twsocket] TFtpClient Multi-threaded mode trouble.

Raptor G g_ates@hotmail.com
Fri, 09 Jun 2000 12:04:36 EEST


Actually I said it a little bit wrong. I should say it stops functioning 
though the GUI is still functional. I guess the FTP->USer() has a bug in 
itself.

Regards,

Raptor


From: "Raptor G" <g_ates@hotmail.com>
Reply-To: twsocket@elists.org
To: twsocket@elists.org
Subject: Re: [twsocket] TFtpClient Multi-threaded mode trouble.
Date: Fri, 09 Jun 2000 11:50:29 EEST

Only the program freezes nothing wrong with the OS and IDE. But I think I
found out this is a problem with FTP->User() command in the following code:

void __fastcall TMainForm::ConnectButtonClick(TObject *Sender)
{
        // launch LogForm which fills the currentSite with
        // necessary information.

        // LogForm = new TLogForm(Application);
        LogForm->ShowModal();

        if(SetTarget())
        {

                UpdateStatusBar("Connecting to " + currentSite.Address);
                ConnectButton->Enabled = false;
                AbortButton->Enabled = true;

                try
                {
                        if(FTP->Connect())
                        {
                                if(FTP->User())
                                {
                                        if(FTP->Pass()) // almost never
reaches here, only works in local servers.
                                        {

ChangeAndList(currentSite.Initial_Directory);
                                                DisconnectButton->Enabled =
true;
                                        }
                                        else
                                        {
                                                DisconnectButtonClick(this);
                                                ShowError("Authentication
with server failed. Please check the password.");
                                                ConnectButton->Enabled =
true;
                                        }
                                }
                                else // usually drops here eventhough the
username/password is correct.
                                {
                                        DisconnectButtonClick(this);
                                        ShowError("Authentication with
server failed. Please check the username.");
                                        ConnectButton->Enabled = true;
                                }
                        }
                        else
                        {
                                ShowError("Connection with server failed.
Please check the address/port and your network connection.");
                                ConnectButton->Enabled = true;
                        }
                }
                catch(FtpException &e) // never reach here
                {
                        ShowError(e.Message);
                }
        }
}

It used to work fine until I put the FTP->User() in if. I couldn't find the
bug above. Why does the FTP->User() fail?

Regards,

Raptor

From: Davie <smatters@smatters.com>
Reply-To: twsocket@elists.org
To: twsocket@elists.org
Subject: Re: [twsocket] TFtpClient Multi-threaded mode trouble.
Date: Thu, 08 Jun 2000 18:14:12 -0500

How do you know it's freeeeeezing up? Do you have to reboot? Is your
delphi
still operable (IDE), does your mouse stop moving? What exactly is
"frozen"?
And can you "PAUSE" your program?

Davie

Raptor G wrote:

 > Hi Everybody,
 >
 > I am facing freeze-ups during .Dir procedure. This is similar to
what
I saw
 > with Netmasters stuff (which caused me to move towards ICS). At
that
time I
 > found out that was because of critical regions. Now, in ICS, I saw
that
 > there is a property called ShareMode. Now the question is, what
should
be
 > the value of ShareMode for distinct working thread-safe ICS
TFtpClient
 > instances?
 >
 > Regards,
 >
 > Raptor
 >

________________________________________________________________________
 > Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com
 >
 > _______________________________________________
 > TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
 > Visit our website at http://www.rtfm.be/fpiette/indexuk.htm



_______________________________________________
TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
Visit our website at http://www.rtfm.be/fpiette/indexuk.htm

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


_______________________________________________
TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
Visit our website at http://www.rtfm.be/fpiette/indexuk.htm

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com