channel: Detect bad usage of libssh2_channel_process_startup

A common novice programmer error (at least among those using the
wrapping Perl module Net::SSH2), is to try to reuse channels.

This patchs detects that incorrect usage and fails with a
LIBSSH2_ERROR_BAD_USE error instead of hanging.

Signed-off-by: Salvador Fandino <sfandino-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
2 files changed