aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-05-04 06:48:04 +0000
committerAndreas Schneider <mail@cynapses.org>2009-05-04 06:48:04 +0000
commit137669db3fc33e8575cb1dddeffcb600db068326 (patch)
tree0530fa9b5b785dc125b496661e6e23272cefda4c
parent98fbe3020d068ddae454cc5c4163943de04ce92c (diff)
downloadlibssh-137669db3fc33e8575cb1dddeffcb600db068326.tar.gz
libssh-137669db3fc33e8575cb1dddeffcb600db068326.tar.xz
libssh-137669db3fc33e8575cb1dddeffcb600db068326.zip
Improve channel_set_blocking().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@691 7dcaeef0-15fb-0310-b436-a5af3365683c
-rw-r--r--libssh/channels.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index b4ab1786..8a485604 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -982,14 +982,18 @@ int channel_is_eof(CHANNEL *channel) {
return (channel->remote_eof != 0);
}
-/** \brief put the channel into nonblocking mode
- * \param channel channel
- * \param blocking boolean for blocking or nonblocking
- * \bug This functionnality is still under development and
- * doesn't work correctly
+/**
+ * @brief Put the channel into blocking or nonblocking mode.
+ *
+ * @param channel The channel to use.
+ *
+ * @param blocking A boolean for blocking or nonblocking.
+ *
+ * @bug This functionnality is still under development and
+ * doesn't work correctly.
*/
-void channel_set_blocking(CHANNEL *channel, int blocking){
- channel->blocking=blocking;
+void channel_set_blocking(CHANNEL *channel, int blocking) {
+ channel->blocking = (blocking == 0 ? 0 : 1);
}
static int channel_request(CHANNEL *channel, const char *request,