From 3113d8756628f463fda33b93801aee3c6ee9aa32 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Fri, 8 Jul 2005 21:52:00 +0000 Subject: [PATCH] ssh_accept() implementation begining in server.c it just accepts a socket and send a banner right now. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@5 7dcaeef0-15fb-0310-b436-a5af3365683c --- libssh/server.c | 1 + samplesshd.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libssh/server.c b/libssh/server.c index 716d63d1..25f760ad 100644 --- a/libssh/server.c +++ b/libssh/server.c @@ -127,6 +127,7 @@ SSH_SESSION *ssh_bind_accept(SSH_BIND *ssh_bind){ session=ssh_new(ssh_options_copy(ssh_bind->options)); session->server=1; session->fd=fd; + session->options=ssh_options_copy(ssh_bind->options); return session; } diff --git a/samplesshd.c b/samplesshd.c index 0775a3b3..249f35df 100644 --- a/samplesshd.c +++ b/samplesshd.c @@ -40,6 +40,7 @@ int main(int argc, char **argv){ return 1; } printf("Socket connecté : %d\n",ssh_get_fd(session)); + ssh_accept(session); return 0; }