aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2015-07-07 21:06:47 +0200
committerAndreas Schneider <asn@cryptomilk.org>2016-05-02 16:57:13 +0200
commit0701745cbcebd8a378814b5f61cbfa1723465fb6 (patch)
treeb290df907bed20106b345c4ebdd8e865682f314d
parentbbe437dbb163ef912f7778a1cb7ce346d687e440 (diff)
downloadlibssh-0701745cbcebd8a378814b5f61cbfa1723465fb6.tar.gz
libssh-0701745cbcebd8a378814b5f61cbfa1723465fb6.tar.xz
libssh-0701745cbcebd8a378814b5f61cbfa1723465fb6.zip
channels: Move ssh_channel_write_stderr out of server-only
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--include/libssh/libssh.h3
-rw-r--r--include/libssh/server.h3
-rw-r--r--src/channels.c3
3 files changed, 5 insertions, 4 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index ac5418ca..e384ba04 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -414,6 +414,9 @@ LIBSSH_API void ssh_channel_set_blocking(ssh_channel channel, int blocking);
LIBSSH_API void ssh_channel_set_counter(ssh_channel channel,
ssh_counter counter);
LIBSSH_API int ssh_channel_write(ssh_channel channel, const void *data, uint32_t len);
+LIBSSH_API int ssh_channel_write_stderr(ssh_channel channel,
+ const void *data,
+ uint32_t len);
LIBSSH_API uint32_t ssh_channel_window_size(ssh_channel channel);
LIBSSH_API char *ssh_basename (const char *path);
diff --git a/include/libssh/server.h b/include/libssh/server.h
index 385a10a7..6564f7c7 100644
--- a/include/libssh/server.h
+++ b/include/libssh/server.h
@@ -316,9 +316,6 @@ LIBSSH_API int ssh_channel_request_send_exit_signal(ssh_channel channel,
int core,
const char *errmsg,
const char *lang);
-LIBSSH_API int ssh_channel_write_stderr(ssh_channel channel,
- const void *data,
- uint32_t len);
LIBSSH_API int ssh_send_keepalive(ssh_session session);
diff --git a/src/channels.c b/src/channels.c
index 3b374fbb..c804bb46 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -3192,7 +3192,6 @@ void ssh_channel_set_counter(ssh_channel channel,
}
}
-#if WITH_SERVER
/**
* @brief Blocking write on a channel stderr.
*
@@ -3210,6 +3209,8 @@ int ssh_channel_write_stderr(ssh_channel channel, const void *data, uint32_t len
return channel_write_common(channel, data, len, 1);
}
+#if WITH_SERVER
+
/**
* @brief Open a TCP/IP reverse forwarding channel.
*