Subject: [libssh2] [ libssh2-Bugs-1860989 ] libssh2_poll handles -1 timeout incorrectly

[libssh2] [ libssh2-Bugs-1860989 ] libssh2_poll handles -1 timeout incorrectly

From: <>
Date: Sun, 30 Dec 2007 09:08:28 -0800

Bugs item #1860989, was opened at 2007-12-30 12:08
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: API
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: jls (apjenkins)
Assigned to: Nobody/Anonymous (nobody)
Summary: libssh2_poll handles -1 timeout incorrectly

Initial Comment:
The documentation for libssh2_poll says the semantics are like poll(2). However poll(2) accepts a -1 timeout, which means to wait indefinitely. libssh2_poll does not correctly handle a -1 timeout. It seems like the only way to indicate an indefinite wait is to pass a really large timeout to libssh2_poll. I think either the documentation should mention that libssh2_poll differs from poll(2) in this way, or a -1 timeout should be supported as meaning wait indefinitely.

Currently, if you look in libssh2_poll code, it performs arithmetic on timeout_remaining without first checking to see if it's negative. I can submit a patch to make libssh2_poll support -1 like poll(2) if you'd like.


You can respond by visiting:

This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
libssh2-devel mailing list
Received on 2007-12-30