channels: Fix integer and bool argument of channel_default_bufferize()
Fixes T188 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Этот коммит содержится в:
родитель
6f39deefcd
Коммит
dad2720355
@ -97,8 +97,9 @@ SSH_PACKET_CALLBACK(channel_rcv_close);
|
||||
SSH_PACKET_CALLBACK(channel_rcv_request);
|
||||
SSH_PACKET_CALLBACK(channel_rcv_data);
|
||||
|
||||
int channel_default_bufferize(ssh_channel channel, void *data, int len,
|
||||
int is_stderr);
|
||||
int channel_default_bufferize(ssh_channel channel,
|
||||
void *data, size_t len,
|
||||
bool is_stderr);
|
||||
int ssh_channel_flush(ssh_channel channel);
|
||||
uint32_t ssh_channel_new_id(ssh_session session);
|
||||
ssh_channel ssh_channel_from_local(ssh_session session, uint32_t id);
|
||||
|
@ -844,8 +844,10 @@ SSH_PACKET_CALLBACK(channel_rcv_request) {
|
||||
*
|
||||
* FIXME is the window changed?
|
||||
*/
|
||||
int channel_default_bufferize(ssh_channel channel, void *data, int len,
|
||||
int is_stderr) {
|
||||
int channel_default_bufferize(ssh_channel channel,
|
||||
void *data, size_t len,
|
||||
bool is_stderr)
|
||||
{
|
||||
ssh_session session;
|
||||
|
||||
if(channel == NULL) {
|
||||
@ -860,8 +862,10 @@ int channel_default_bufferize(ssh_channel channel, void *data, int len,
|
||||
}
|
||||
|
||||
SSH_LOG(SSH_LOG_PACKET,
|
||||
"placing %d bytes into channel buffer (stderr=%d)", len, is_stderr);
|
||||
if (is_stderr == 0) {
|
||||
"placing %zu bytes into channel buffer (%s)",
|
||||
len,
|
||||
is_stderr ? "stderr" : "stdout");
|
||||
if (!is_stderr) {
|
||||
/* stdout */
|
||||
if (channel->stdout_buffer == NULL) {
|
||||
channel->stdout_buffer = ssh_buffer_new();
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user