mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
Reformat sftp_parse_attr().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@594 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -1108,17 +1108,20 @@ int buffer_add_attributes(BUFFER *buffer, SFTP_ATTRIBUTES *attr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SFTP_ATTRIBUTES *sftp_parse_attr(SFTP_SESSION *session, BUFFER *buf,int expectname){
|
SFTP_ATTRIBUTES *sftp_parse_attr(SFTP_SESSION *session, BUFFER *buf,
|
||||||
switch(session->version){
|
int expectname) {
|
||||||
case 4:
|
switch(session->version) {
|
||||||
return sftp_parse_attr_4(session,buf,expectname);
|
case 4:
|
||||||
case 3:
|
return sftp_parse_attr_4(session, buf, expectname);
|
||||||
return sftp_parse_attr_3(session,buf,expectname);
|
case 3:
|
||||||
default:
|
return sftp_parse_attr_3(session, buf, expectname);
|
||||||
ssh_set_error(session->session,SSH_FATAL,"Version %d unsupported by client",session->server_version);
|
default:
|
||||||
return NULL;
|
ssh_set_error(session->session, SSH_FATAL,
|
||||||
}
|
"Version %d unsupported by client", session->server_version);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the version of the SFTP protocol supported by the server */
|
/* Get the version of the SFTP protocol supported by the server */
|
||||||
|
|||||||
Reference in New Issue
Block a user