I added debug information to check which ssh_options_set() on earth returned the random error. I found it was always this line.
|
_CKERR(ssh_options_set(ses, SSH_OPTIONS_TIMEOUT, &contim)); |
I searched the libssh documentation, and it stated SSH_OPTIONS_TIMEOUT and SSH_OPTIONS_TIMEOUT_USEC should be of type long1. 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!
|
int zero = 0; |
|
int verbosity = 0; |
|
int char_limit = 0; |
|
int time_limit = 0; |
|
int contim = 10; |
I added debug information to check which
ssh_options_set()on earth returned the random error. I found it was always this line.sshping/src/sshping.cxx
Line 544 in b2e7c40
I searched the libssh documentation, and it stated
SSH_OPTIONS_TIMEOUTandSSH_OPTIONS_TIMEOUT_USECshould be of typelong1. I've got a 64-bit machine, so typically,intis 4-byte long, whereaslongis 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!sshping/src/sshping.cxx
Lines 78 to 82 in b2e7c40
Footnotes
https://api.libssh.org/master/group__libssh__session.html#ga7a801b85800baa3f4e16f5b47db0a73d. ↩