diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-14 00:51:08 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-14 00:51:08 +0200 |
commit | b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c (patch) | |
tree | d4fe8f4c4aa71c6cebe7d1d92dc25ea145d98cd1 /tests/test_exec.c | |
parent | 46b249f5ce552bba2e0a170cb0b8052b1419924b (diff) | |
download | libssh-b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c.tar.gz libssh-b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c.tar.xz libssh-b23b3f1d9951df3ea7cc074de40db04bdf0d3a1c.zip |
Sanitize libssh namespace + legacy wrappers
Diffstat (limited to 'tests/test_exec.c')
-rw-r--r-- | tests/test_exec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_exec.c b/tests/test_exec.c index 1b2081d0..9f10520c 100644 --- a/tests/test_exec.c +++ b/tests/test_exec.c @@ -26,26 +26,26 @@ void do_connect(SSH_SESSION *session) { return; } printf("Authenticated\n"); - channel = channel_new(session); - channel_open_session(channel); + channel = ssh_channel_new(session); + ssh_channel_open_session(channel); printf("Execute 'ls' on the channel\n"); - error = channel_request_exec(channel, "ls"); + error = ssh_channel_request_exec(channel, "ls"); if(error != SSH_OK){ fprintf(stderr, "Error executing command: %s\n", ssh_get_error(session)); return; } printf("--------------------output----------------------\n"); - while (channel_read(channel, buf, sizeof(buf), 0)) { + while (ssh_channel_read(channel, buf, sizeof(buf), 0)) { printf("%s", buf); } printf("\n"); printf("---------------------end------------------------\n"); - channel_send_eof(channel); - fprintf(stderr, "Exit status: %d\n", channel_get_exit_status(channel)); + ssh_channel_send_eof(channel); + fprintf(stderr, "Exit status: %d\n", ssh_channel_get_exit_status(channel)); printf("\nChannel test finished\n"); - channel_close(channel); - channel_free(channel); + ssh_channel_close(channel); + ssh_channel_free(channel); } int main(int argc, char **argv){ |