aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-08-09 18:47:13 +0200
committerAndreas Schneider <asn@cynapses.org>2010-08-09 20:54:43 +0200
commit561df8d9a23bc3ba37b30a699be5247b83ecac24 (patch)
tree87fce7f101b5f83674b73d5fd2cbf4eb60a2c57e
parent48a20a61379999c4e4342c0cc23389e1a4c69449 (diff)
downloadlibssh-561df8d9a23bc3ba37b30a699be5247b83ecac24.tar.gz
libssh-561df8d9a23bc3ba37b30a699be5247b83ecac24.tar.xz
libssh-561df8d9a23bc3ba37b30a699be5247b83ecac24.zip
server: Rename ssh_accept to ssh_bind_accept.
-rw-r--r--examples/samplesshd.c4
-rw-r--r--include/libssh/server.h6
-rw-r--r--libssh/server.c2
3 files changed, 7 insertions, 5 deletions
diff --git a/examples/samplesshd.c b/examples/samplesshd.c
index ecb23c2..758e08a 100644
--- a/examples/samplesshd.c
+++ b/examples/samplesshd.c
@@ -210,8 +210,8 @@ int main(int argc, char **argv){
printf("error accepting a connection : %s\n",ssh_get_error(sshbind));
return 1;
}
- if(ssh_accept(session)){
- printf("ssh_accept: %s\n",ssh_get_error(session));
+ if (ssh_bind_accept(session)) {
+ printf("ssh_bind_accept: %s\n", ssh_get_error(session));
return 1;
}
do {
diff --git a/include/libssh/server.h b/include/libssh/server.h
index 7e660ce..1c315d5 100644
--- a/include/libssh/server.h
+++ b/include/libssh/server.h
@@ -132,13 +132,15 @@ LIBSSH_API int ssh_bind_accept(ssh_bind ssh_bind_o, ssh_session session);
LIBSSH_API void ssh_bind_free(ssh_bind ssh_bind_o);
/**
- * @brief Exchange the banner and cryptographic keys.
+ * @brief Accept the incoming connections.
+ *
+ * This exchanges the banner and cryptographic keys.
*
* @param session The ssh session to accept a connection.
*
* @return 0 on success, < 0 on error.
*/
-LIBSSH_API int ssh_accept(ssh_session session);
+LIBSSH_API int ssh_bind_accept(ssh_session session);
LIBSSH_API int channel_write_stderr(ssh_channel channel, const void *data, uint32_t len);
diff --git a/libssh/server.c b/libssh/server.c
index b1cd9b3..a9a4083 100644
--- a/libssh/server.c
+++ b/libssh/server.c
@@ -751,7 +751,7 @@ static int callback_receive_banner(const void *data, size_t len, void *user) {
}
/* Do the banner and key exchange */
-int ssh_accept(ssh_session session) {
+int ssh_bind_accept(ssh_session session) {
int rc;
rc = ssh_send_banner(session, 1);