Skip to content

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

Description

@sunziping2016

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!

sshping/src/sshping.cxx

Lines 78 to 82 in b2e7c40

int zero = 0;
int verbosity = 0;
int char_limit = 0;
int time_limit = 0;
int contim = 10;

Footnotes

  1. https://api.libssh.org/master/group__libssh__session.html#ga7a801b85800baa3f4e16f5b47db0a73d.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions