From 3ce9f78fb48bccfe6f24f142753dffe91f760524 Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Tue, 12 Mar 2019 11:32:23 +0100 Subject: [PATCH] The ssh_channel_callbacks_struct member name is channel_data_function. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addressing client.c: In function ‘show_remote_uptime’: client.c:107:6: error: ‘struct ssh_channel_callbacks_struct’ has no member named ‘channel_data’ .channel_data = my_channel_data_function, ^~~~~~~~~~~~ client.c:107:21: warning: initialization of ‘long unsigned int’ from ‘int (*)(struct ssh_session_struct *, struct ssh_channel_struct *, void *, uint32_t, int, void *)’ {aka ‘int (*)(struct ssh_session_struct *, struct ssh_channel_struct *, void *, unsigned int, int, void *)’} makes integer from pointer without a cast [-Wint-conversion] .channel_data = my_channel_data_function, ^~~~~~~~~~~~~~~~~~~~~~~~ client.c:107:21: note: (near initialization for ‘cb.size’) Signed-off-by: Jan Pazdziora Reviewed-by: Andreas Schneider --- include/libssh/callbacks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libssh/callbacks.h b/include/libssh/callbacks.h index 4e71b3b9..554527c7 100644 --- a/include/libssh/callbacks.h +++ b/include/libssh/callbacks.h @@ -854,7 +854,7 @@ typedef struct ssh_channel_callbacks_struct *ssh_channel_callbacks; * @code * struct ssh_channel_callbacks_struct cb = { * .userdata = data, - * .channel_data = my_channel_data_function + * .channel_data_function = my_channel_data_function * }; * ssh_callbacks_init(&cb); * ssh_set_channel_callbacks(channel, &cb);