Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
16099833
Commit
16099833
authored
Mar 03, 2016
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3651 from libgit2/cmn/init-libssh2
ssh: initialize libssh2
parents
839bdb05
22f3d3aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletions
+31
-1
src/global.c
+3
-1
src/transports/ssh.c
+16
-0
src/transports/ssh.h
+12
-0
No files found.
src/global.c
View file @
16099833
...
...
@@ -12,6 +12,7 @@
#include "openssl_stream.h"
#include "thread-utils.h"
#include "git2/global.h"
#include "transports/ssh.h"
#if defined(GIT_MSVC_CRTDBG)
#include "win32/w32_stack.h"
...
...
@@ -56,7 +57,8 @@ static int init_common(void)
/* Initialize any other subsystems that have global state */
if
((
ret
=
git_hash_global_init
())
==
0
&&
(
ret
=
git_sysdir_global_init
())
==
0
&&
(
ret
=
git_filter_global_init
())
==
0
)
(
ret
=
git_filter_global_init
())
==
0
&&
(
ret
=
git_transport_ssh_global_init
())
==
0
)
ret
=
git_openssl_stream_global_init
();
GIT_MEMORY_BARRIER
;
...
...
src/transports/ssh.c
View file @
16099833
...
...
@@ -15,6 +15,7 @@
#include "smart.h"
#include "cred.h"
#include "socket_stream.h"
#include "ssh.h"
#ifdef GIT_SSH
...
...
@@ -876,3 +877,18 @@ int git_transport_ssh_with_paths(git_transport **out, git_remote *owner, void *p
return
-
1
;
#endif
}
int
git_transport_ssh_global_init
(
void
)
{
#ifdef GIT_SSH
libssh2_init
(
0
);
return
0
;
#else
/* Nothing to initialize */
return
0
;
#endif
}
src/transports/ssh.h
0 → 100644
View file @
16099833
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_ssh_h__
#define INCLUDE_ssh_h__
int
git_transport_ssh_global_init
(
void
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment