[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] doc: correct ssh_channel_read_timeout units


Attached is a quick doc fix for the timeout units used by ssh_channel_read.


-Jon
From b38c371218af7a767a45eec68844c29ae1c7446d Mon Sep 17 00:00:00 2001
From: Jon Simons <jon@xxxxxxxxxxxxx>
Date: Tue, 28 Jan 2014 20:42:59 -0800
Subject: [PATCH] doc: correct ssh_channel_read_timeout units

---
 include/libssh/libssh.h |  2 +-
 src/channels.c          | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index 31bcc86..b3f6ae4 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -377,7 +377,7 @@ LIBSSH_API int ssh_channel_open_x11(ssh_channel channel, const char *orig_addr,
 LIBSSH_API int ssh_channel_poll(ssh_channel channel, int is_stderr);
 LIBSSH_API int ssh_channel_poll_timeout(ssh_channel channel, int timeout, int is_stderr);
 LIBSSH_API int ssh_channel_read(ssh_channel channel, void *dest, uint32_t count, int is_stderr);
-LIBSSH_API int ssh_channel_read_timeout(ssh_channel channel, void *dest, uint32_t count, int is_stderr, int timeout);
+LIBSSH_API int ssh_channel_read_timeout(ssh_channel channel, void *dest, uint32_t count, int is_stderr, int timeout_ms);
 LIBSSH_API int ssh_channel_read_nonblocking(ssh_channel channel, void *dest, uint32_t count,
     int is_stderr);
 LIBSSH_API int ssh_channel_request_env(ssh_channel channel, const char *name, const char *value);
diff --git a/src/channels.c b/src/channels.c
index b77ad0a..fbdf9d6 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -2716,16 +2716,16 @@ int ssh_channel_read(ssh_channel channel, void *dest, uint32_t count, int is_std
 /**
  * @brief Reads data from a channel.
  *
- * @param[in]  channel  The channel to read from.
+ * @param[in]  channel     The channel to read from.
  *
- * @param[in]  dest     The destination buffer which will get the data.
+ * @param[in]  dest        The destination buffer which will get the data.
  *
- * @param[in]  count    The count of bytes to be read.
+ * @param[in]  count       The count of bytes to be read.
  *
- * @param[in]  is_stderr A boolean value to mark reading from the stderr flow.
+ * @param[in]  is_stderr   A boolean value to mark reading from the stderr flow.
  *
- * @param[in]  timeout  A timeout in seconds. A value of -1 means infinite
- *                      timeout.
+ * @param[in]  timeout_ms  A timeout in milliseconds. A value of -1 means
+ *                         infinite timeout.
  *
  * @return              The number of bytes read, 0 on end of file or SSH_ERROR
  *                      on error. In nonblocking mode it Can return 0 if no data
-- 
1.8.4.21.g992c386



Archive administrator: postmaster@lists.cynapses.org