Shorten constant a bit. More documentation.
This commit is contained in:
parent
d00283927f
commit
55ede3b41b
@ -370,14 +370,18 @@ typedef struct _LIBSSH2_POLLFD {
|
||||
#define LIBSSH2_ERROR_AGENT_PROTOCOL -42
|
||||
|
||||
/* Global API */
|
||||
#define LIBSSH2_INIT_NO_CRYPTO_INIT 0x0001
|
||||
#define LIBSSH2_INIT_NO_CRYPTO 0x0001
|
||||
|
||||
/*
|
||||
* libssh2_init()
|
||||
*
|
||||
* Initialize the libssh2 functions. flags can be:
|
||||
* Initialize the libssh2 functions. This typically initialize the
|
||||
* crypto library. It uses a global state, and is not thread safe --
|
||||
* you must make sure this function is not called concurrently.
|
||||
*
|
||||
* Flags can be:
|
||||
* 0: Normal initialize
|
||||
* LIBSSH2_INIT_NO_CRYPTO_INIT: Do not initialize the crypto library (ie.
|
||||
* LIBSSH2_INIT_NO_CRYPTO: Do not initialize the crypto library (ie.
|
||||
* OPENSSL_add_cipher_algoritms() for OpenSSL
|
||||
*
|
||||
* Returns 0 if succeeded, or a negative value for error.
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Copyright (c) 2010 Lars Nordin <Lars.Nordin@SDlabs.se>
|
||||
* Copyright (C) 2010 Simon Josefsson <simon@josefsson.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
@ -42,7 +43,7 @@ static int _libssh2_init_flags = 0;
|
||||
|
||||
LIBSSH2_API int libssh2_init(int flags)
|
||||
{
|
||||
if (libssh2_initialized == 0 && !(flags & LIBSSH2_INIT_NO_CRYPTO_INIT)) {
|
||||
if (libssh2_initialized == 0 && !(flags & LIBSSH2_INIT_NO_CRYPTO)) {
|
||||
libssh2_crypto_init();
|
||||
}
|
||||
|
||||
@ -59,7 +60,7 @@ LIBSSH2_API void libssh2_exit()
|
||||
|
||||
libssh2_initialized--;
|
||||
|
||||
if (!(libssh2_init_flags & LIBSSH2_INIT_NO_CRYPTO_INIT)) {
|
||||
if (!(libssh2_init_flags & LIBSSH2_INIT_NO_CRYPTO)) {
|
||||
libssh2_crypto_exit();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user