aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-03-13 21:58:11 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-07-13 14:54:15 +0200
commite809fa881ef999286455236db071224d08405773 (patch)
tree992f797f2a366a60af28a98820e24592c7dc810e /examples
parent52d9e15c25d776f53edca0060aa8678a7e0bb3a0 (diff)
downloadlibssh-e809fa881ef999286455236db071224d08405773.tar.gz
libssh-e809fa881ef999286455236db071224d08405773.tar.xz
libssh-e809fa881ef999286455236db071224d08405773.zip
examples: adapt samplesshd-cb to new callback
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/samplesshd-cb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/samplesshd-cb.c b/examples/samplesshd-cb.c
index e6651550..e43443c9 100644
--- a/examples/samplesshd-cb.c
+++ b/examples/samplesshd-cb.c
@@ -101,16 +101,16 @@ struct ssh_channel_callbacks_struct channel_cb = {
.channel_shell_request_function = shell_request
};
-static int new_session_channel(ssh_session session, ssh_channel channel, void *userdata){
+static ssh_channel new_session_channel(ssh_session session, void *userdata){
(void) session;
(void) userdata;
if(chan != NULL)
- return -1;
+ return NULL;
printf("Allocated session channel\n");
- chan = channel;
+ chan = ssh_channel_new(session);
ssh_callbacks_init(&channel_cb);
- ssh_set_channel_callbacks(channel, &channel_cb);
- return 0;
+ ssh_set_channel_callbacks(chan, &channel_cb);
+ return chan;
}