diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2016-03-03 22:26:31 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2016-03-03 22:26:31 +0100 |
| commit | 22f3d3aa6b2500a0c587938f7939c05a28afacf2 (patch) | |
| tree | b05d36e992c8321a528d0705ce6b22966b9a72a5 /src/transports/ssh.c | |
| parent | 839bdb05a0a2957c0362cdbab219dcfa463a0e94 (diff) | |
| download | libgit2-22f3d3aa6b2500a0c587938f7939c05a28afacf2.tar.gz | |
ssh: initialize libssh2cmn/init-libssh2
We should have been doing this, but it initializes itself upon first
use, which works as long as nobody's doing concurrent network
operations. Initialize it on our init to make sure it's not getting
initialized concurrently.
Diffstat (limited to 'src/transports/ssh.c')
| -rw-r--r-- | src/transports/ssh.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/transports/ssh.c b/src/transports/ssh.c index 239e0bae7..35739abe3 100644 --- a/src/transports/ssh.c +++ b/src/transports/ssh.c @@ -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 +} |
