Improve ssh_get_issue_banner().

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@489 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2009-04-16 08:49:39 +00:00
parent 2bbb005980
commit c8269682fc

View File

@@ -568,16 +568,22 @@ int ssh_connect(SSH_SESSION *session) {
return 0;
}
/** this is the banner showing a disclaimer to users who log in,
* typically their right or the fact that they will be monitored
* \brief get the issue banner from the server
* \param session ssh session
* \return NULL if there is no issue banner, else a string containing it.
/**
* @brief Get the issue banner from the server.
*
* This is the banner showing a disclaimer to users who log in,
* typically their right or the fact that they will be monitored.
*
* @param session The SSH session to use.
*
* @return A newly allocated string with the banner, NULL on error.
*/
char *ssh_get_issue_banner(SSH_SESSION *session){
if(!session->banner)
return NULL;
return string_to_char(session->banner);
char *ssh_get_issue_banner(SSH_SESSION *session) {
if (session == NULL || session->banner == NULL) {
return NULL;
}
return string_to_char(session->banner);
}
/** \brief disconnect from a session (client or server)