char #0 (General questions)

by Ryan Hafey @, (6963 days ago)

Hi,
I am currently using the waitFor method in the SSH component to wait for a particular string.
However, the response i am getting from the server contains a char #0 which is the string terminator in delphi.
I beleive this is causing the waitFor to fail as it always times out.
eg.
I am waiting for who=test and the response i am getting is #0who=test .

Once the wait times out, the receive event fires with a large byte count of 90 characters but when i call the recieive method i only get up to the #0.

Is there a way to overcome the #0 problem i am experiencing?

Thanks.

locked

Re: char #0

by wodDrazen @, (6963 days ago) @ Ryan Hafey

Hi Ryan,


What do you want to do after you get that prompt from WaitFor Method?

Please send us code snippet of you code, maybe there is some other problem in your code.

Hope I helped.


Regards,
Drazen

locked

Re: char #0

by Jasmine, (6963 days ago) @ wodDrazen

Ryan,

I think setting Ssh1.StripAnsi := True should help here too.

If it doesn't, as Drazen mentioned it would help if we could connect to your host and duplicate the isse.

BTW which version of wodSSH do you have?

Kreso

locked

Re: char #0

by Ryan Hafey @, (6962 days ago) @ Jasmine

Hi,
Setting the StripAnsi = true worked like a charm!

Many thanx.

locked