mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
misc: reindent ssh_analyze_banner, update docs
No changes to code, only whitespace indentation and an update to the function docs. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
14d8e940e6
commit
a97db12f4f
@@ -780,8 +780,7 @@ char *ssh_path_expand_escape(ssh_session session, const char *s) {
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @brief Analyze the SSH banner to find out if we have a SSHv1 or SSHv2
|
||||
* server.
|
||||
* @brief Analyze the SSH banner to extract version information.
|
||||
*
|
||||
* @param session The session to analyze the banner from.
|
||||
* @param server 0 means we are a client, 1 a server.
|
||||
@@ -790,7 +789,7 @@ char *ssh_path_expand_escape(ssh_session session, const char *s) {
|
||||
*
|
||||
* @return 0 on success, < 0 on error.
|
||||
*
|
||||
* @see ssh_get_banner()
|
||||
* @see ssh_get_issue_banner()
|
||||
*/
|
||||
int ssh_analyze_banner(ssh_session session, int server, int *ssh1, int *ssh2) {
|
||||
const char *banner;
|
||||
@@ -824,7 +823,7 @@ int ssh_analyze_banner(ssh_session session, int server, int *ssh1, int *ssh2) {
|
||||
|
||||
SSH_LOG(SSH_LOG_RARE, "Analyzing banner: %s", banner);
|
||||
|
||||
switch(banner[4]) {
|
||||
switch (banner[4]) {
|
||||
case '1':
|
||||
*ssh1 = 1;
|
||||
if (strlen(banner) > 6) {
|
||||
@@ -877,7 +876,6 @@ int ssh_analyze_banner(ssh_session session, int server, int *ssh1, int *ssh2) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user