How to get client IP address in OnClientError Event?
Posted: Wed 26 Sep 2018 13:46
Hi,
I am using Lazarus and itn the OnclientError Event I have this:
The client IP always comes back as 0.0.0.0
I get the port but not the IP.
The info in the log shows up like this:
SSH Client(0.0.0.0:59654) ERROR for user:N/A:Authentication failed
I am using Lazarus and itn the OnclientError Event I have this:
Code: Select all
if ClientInfo <> nil then
begin
ip:=inet_ntoa(clientinfo.SockAddr^.sin_addr);
port:=intTostr(ntohs(ClientInfo.SockAddr^.sin_port));
The client IP always comes back as 0.0.0.0
I get the port but not the IP.
The info in the log shows up like this:
SSH Client(0.0.0.0:59654) ERROR for user:N/A:Authentication failed