This fixes a bug where ggatessh was consuming 100% cpu because the
error from sftp_open wasn't being checked, now ggatessh will exit
if this fails (and log the failure)...
Add a test to make sure that a second session is launched and
works.. This discovered that the sftp_open wasn't passing in the
correct file name...
Now that there will be multiple IOs in flight, this should improve
performance a bit...
This I believe fixes problems with it. First off, is to call an
internal function to make sure to process any packets that are
pending despite there being no outstanding actions...
The second part is dealing w/ the issue that one channel may read
data for a previously processes channel... There isn't a good way
to get what channels have pending data, instead, use a custom wrapper
around recv, and if ANY data was read/returned, process all the pending
requests again. This will do a bit of extra work, but it a lot more
simple than fixing libssh2 to be sane...
not executed, so the old method won't work. This isn't great if there are
two scripts if/when it gets installed to base, but prefering the package
one seems to make sense over the built in one if it exists..