diff options
Diffstat (limited to 'src/transports')
| -rw-r--r-- | src/transports/ssh.c | 16 | ||||
| -rw-r--r-- | src/transports/ssh.h | 12 |
2 files changed, 28 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 +} diff --git a/src/transports/ssh.h b/src/transports/ssh.h new file mode 100644 index 000000000..2db2cc5df --- /dev/null +++ b/src/transports/ssh.h @@ -0,0 +1,12 @@ +/* + * 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 |
