sshping icon indicating copy to clipboard operation
sshping copied to clipboard

[bug] random Invalid argument error returned by ssh_options_set()

Open sunziping2016 opened this issue 1 year ago • 1 comments

I added debug information to check which ssh_options_set() on earth returned the random error. I found it was always this line.

https://github.com/spook/sshping/blob/b2e7c40820646561ffc03046ed85e5645a7c27eb/src/sshping.cxx#L544

I searched the libssh documentation, and it stated SSH_OPTIONS_TIMEOUT and SSH_OPTIONS_TIMEOUT_USEC should be of type long^1. I've got a 64-bit machine, so typically, int is 4-byte long, whereas long is 8-byte long on my machine. So I suspected the mismatched integer type in L78 and L82 is the root cause. I haven't verified it. Thks!

https://github.com/spook/sshping/blob/b2e7c40820646561ffc03046ed85e5645a7c27eb/src/sshping.cxx#L78-L82

sunziping2016 avatar Feb 04 '24 06:02 sunziping2016

Hello, I've encountered with a similar issue. Please check #48

Jerry-Terrasse avatar Feb 11 '25 13:02 Jerry-Terrasse