login about faq

Hi!

Again problem with 100% CPU Load. Problem in function CksshDispose, if connection unsuccesful, function CkSshDispose(ssh) waiting near 20 seconds, then 1 core load 100% near 30 seconds, then programm continuing... If connection without socks proxy, Ckssh_Dispose work fine. ChilkatDelphiXE.dll

Here is simple function.

function ssh(ip,port,user,pass,socksip,socksport,sockstype:String):string;
var task:HCkTask;
ssh: HCkSsh;
success: Boolean;

begin
 ssh := CkSsh_Create();

 if socksip<>'' then
 begin

  CkSsh_putSocksHostname(ssh,pchar(socksip));
  CkSsh_putSocksPort(ssh,strtoint(socksport));
 if sockstype='SOCKS5' then CkSsh_putSocksVersion(ssh,5) else
 CkSsh_putSocksVersion(ssh,4);
 end;

 task := CkSsh_ConnectAsync(ssh,pchar(ip),strtoint(port));
 success:=CkTask_Run(task);

   CkTask_Wait(task,10000);

if (success <> True) then
  begin
    CkTask_Dispose(task);
    CkSsh_Dispose(ssh);
    Exit;
  end;

success:=CkTask_GetResultBool (task);

if (success <> True) then
  begin

   CkTask_Dispose(task);
   CkSsh_Dispose(ssh);   // HERE IS BUG!!!!!!!!!!!!!!!!!!!!
    Exit;
  end;
 CkTask_Dispose(task);
 CkSsh_Disconnect(ssh);
 CkSsh_Dispose(ssh);
end;

asked Jun 16 at 13:43

Striker's gravatar image

Striker
11


The same problem, if i use CkSsh_Disconnect(ssh)...

I think there is some problem, with disconnect from socks proxy, that did not work.

> if (success <> True) then   begin
> 
>    CkTask_Dispose(task);   
>    CkSsh_Disconnect(ssh) //Now bug is here!
>    CkSsh_Dispose(ssh);   // Work fast and fine.
>     Exit;   end;
link

answered Jun 16 at 14:42

Striker's gravatar image

Striker
11

Now bug appear on function CkSsh__lastErrorText(ssh);

> if (success <> True) then   begin   
> Form1.Mmo1.Lines.Add(CkSsh__lastErrorText(ssh)); //BUG 
> CkTask_Dispose(task);                           //FINE
> CkSsh_Dispose(ssh);                             //FINE
>     Exit;   end;

CkSsh__lastErrorText result:

> ChilkatLog:   Connect_Ssh:
>     DllDate: May 16 2017
>     ChilkatVersion: 9.5.0.67
>     UnlockPrefix: trial
>     Architecture: Little Endian; 32-bit
>     Language: Delphi/C++ Builder XE2/XE3
>     VerboseLogging: 0
>     Component successfully unlocked using trial key
>     connectInner:
>       hostname: ***.***.216.231
>       port: 22
>       sshConnect:
>         SOCKS5:
>           socksHostname: ***.***.252.36
>           socksPort: 21002
>           socksUsername: 
>         --SOCKS5
>         No SOCKS5 username and/or password, requesting No-Authentication...
>         Failed to receive method-select reply from SOCKS5 server.
>         Failed to establish initial TCP/IP connection
>       --sshConnect
>     --connectInner
>     Failed.   --Connect_Ssh
> --ChilkatLog
link

answered Jun 16 at 14:57

Striker's gravatar image

Striker
11

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×103

Asked: Jun 16 at 13:43

Seen: 138 times

Last updated: Jun 16 at 14:57

powered by OSQA