Subject: [libssh2] Linux: Polling is completely broken.

[libssh2] Linux: Polling is completely broken.

From: Paul Thomas <>
Date: Thu, 6 Mar 2008 16:12:01 -0500


I've found a bug. Its causing me some grief.....

I've played and played with trying to poll channels on Linux and the
polling always returns 0, saying theres nothing to read on the
channel. Both

do not work. However, I can get each one to work reliably on Windows
XP. The only way that I can get "polling-like" functionallity is to
always assume there is data to be read.

Here's an example of the code I'm using for libssh2_poll:
        LIBSSH2_POLLFD pfd;
        pfd.type = LIBSSH2_POLLFD_CHANNEL;
        for(int i = 0; i < m_channelList.size(); i++)
                //Sanity check
                if ( ! m_channelList[i].pChannel )

       = m_channelList[i].pChannel;
                if ( libssh2_poll( &pfd, 1, 1) )
                        /****************THIS is NEVER triggered on Linux******************/
                        emit channelHasData(m_channelList[i].channelNumToEmit);

   Gentoo Linux with latest updates
   Kubuntu Linux 7.10 with latest updates

using libssh2 from CVS

Paul Thomas

This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
libssh2-devel mailing list
Received on 2008-03-06