EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTP Simple Client Open

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#3902
Posted: 10/01/2007 08:02:18
by Carl Pates (Standard support level)
Joined: 10/01/2007
Posts: 3

Hi folks,

Running on Delphi 7, using SecureBlackbox - version 5.1.112 - Released May 12, 2007

I've got an issue with the TElSimpleSFTPClient Open() method. Basically there's something like this (very simplified):

Code
   try
      
      sftpClient.open();
      try
         // stuff ....
      finally
         sftpClient.close();
      end;
   except
      on e:exception do
      begin
         sendEmail( e.message );
      end
   end;


If the open method raises an exception like "Connection Lost" the sendEmail call will also raise an exception. The sendEmail method is a basic Indy SMTPClient with an SSL IO Handler defined. The exception raised by the SMPTClient is "Unable to connect to SSL"

Is there something in TElSimpleSFTPClient that is not being cleaned up properly when the open() fails?

Thanks

Carl

#3904
Posted: 10/01/2007 08:16:10
by Eugene Mayevski (EldoS Corp.)

I'd suggest that you move SendEMail out of the exception block.
This is pretty easy:

Code
errmsg := '';
try
  ...
except
  on E : Exception do errmsg := e.message;
end;
if  err.msg <> '' then
try
  SendEMail(errmsg);
except
  ...
end;


Sincerely yours
Eugene Mayevski
#3905
Posted: 10/01/2007 08:36:51
by Carl Pates (Standard support level)
Joined: 10/01/2007
Posts: 3

Hi Eugune,

Thanks for the quick reply. I moved the sendEMail call outside the exception block as you suggested but the problem is still the same. I also upgraded to the latest version "SecureBlackbox - version 5.2.122 - Released September 25, 2007" just to be on the safe side - still no change.

Regards

Carl

#3906
Posted: 10/01/2007 09:15:36
by Eugene Mayevski (EldoS Corp.)

Does the SendEMail fail ONLY after SFTP fails? They are not related in any way. Can it be that you have network issues?


Sincerely yours
Eugene Mayevski
#3925
Posted: 10/02/2007 10:17:51
by Carl Pates (Standard support level)
Joined: 10/01/2007
Posts: 3

Hi Eugene,

After some investigation and several emails backwards and forwards it appears that the SMTP server wasn't set up correctly thus causing the failure, so the problem is now sorted and we're working again.

Thanks for your help.

Regards

Carl
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 2176 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!