session: Reformat ssh_new()
Fixes T194 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
c54fd03e50
Коммит
3f64fb3b3b
@ -56,7 +56,8 @@
|
||||
*
|
||||
* @returns A new ssh_session pointer, NULL on error.
|
||||
*/
|
||||
ssh_session ssh_new(void) {
|
||||
ssh_session ssh_new(void)
|
||||
{
|
||||
ssh_session session;
|
||||
char *id = NULL;
|
||||
int rc;
|
||||
@ -81,7 +82,7 @@ ssh_session ssh_new(void) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
session->in_buffer=ssh_buffer_new();
|
||||
session->in_buffer = ssh_buffer_new();
|
||||
if (session->in_buffer == NULL) {
|
||||
goto err;
|
||||
}
|
||||
@ -107,10 +108,14 @@ ssh_session ssh_new(void) {
|
||||
session->opts.StrictHostKeyChecking = 1;
|
||||
session->opts.port = 0;
|
||||
session->opts.fd = -1;
|
||||
session->opts.compressionlevel=7;
|
||||
session->opts.compressionlevel = 7;
|
||||
session->opts.nodelay = 0;
|
||||
session->opts.flags = SSH_OPT_FLAG_PASSWORD_AUTH | SSH_OPT_FLAG_PUBKEY_AUTH |
|
||||
SSH_OPT_FLAG_KBDINT_AUTH | SSH_OPT_FLAG_GSSAPI_AUTH;
|
||||
|
||||
session->opts.flags = SSH_OPT_FLAG_PASSWORD_AUTH |
|
||||
SSH_OPT_FLAG_PUBKEY_AUTH |
|
||||
SSH_OPT_FLAG_KBDINT_AUTH |
|
||||
SSH_OPT_FLAG_GSSAPI_AUTH;
|
||||
|
||||
session->opts.identity = ssh_list_new();
|
||||
if (session->opts.identity == NULL) {
|
||||
goto err;
|
||||
@ -120,6 +125,7 @@ ssh_session ssh_new(void) {
|
||||
if (id == NULL) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
rc = ssh_list_append(session->opts.identity, id);
|
||||
if (rc == SSH_ERROR) {
|
||||
goto err;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user