aboutsummaryrefslogtreecommitdiff
path: root/include/libssh/channels.h
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-01-24 23:03:56 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2010-01-24 23:03:56 +0100
commit3407509ed72a9b387187e91e9a5274b5ef39bb88 (patch)
tree1db3314f6421f70938649761eb7f2fc792036b65 /include/libssh/channels.h
parent3ac62dda514e253ae4a08d8f755895cc6aa5ecac (diff)
downloadlibssh-3407509ed72a9b387187e91e9a5274b5ef39bb88.tar.gz
libssh-3407509ed72a9b387187e91e9a5274b5ef39bb88.tar.xz
libssh-3407509ed72a9b387187e91e9a5274b5ef39bb88.zip
Correctly handle channel failures and chan states
Diffstat (limited to 'include/libssh/channels.h')
-rw-r--r--include/libssh/channels.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/libssh/channels.h b/include/libssh/channels.h
index 5e4901ba..56e660fc 100644
--- a/include/libssh/channels.h
+++ b/include/libssh/channels.h
@@ -40,6 +40,13 @@ enum ssh_channel_request_state_e {
SSH_CHANNEL_REQ_STATE_ERROR
};
+enum ssh_channel_state_e {
+ SSH_CHANNEL_STATE_NOT_OPEN = 0,
+ SSH_CHANNEL_STATE_OPEN_DENIED,
+ SSH_CHANNEL_STATE_OPEN,
+ SSH_CHANNEL_STATE_CLOSED
+};
+
struct ssh_channel_struct {
struct ssh_channel_struct *prev;
struct ssh_channel_struct *next;
@@ -53,7 +60,7 @@ struct ssh_channel_struct {
uint32_t remote_window;
int remote_eof; /* end of file received */
uint32_t remote_maxpacket;
- int open; /* shows if the channel is still opened */
+ enum ssh_channel_state_e state;
int delayed_close;
ssh_buffer stdout_buffer;
ssh_buffer stderr_buffer;