diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-01-24 19:44:58 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-01-24 19:48:36 +0100 |
commit | a83ff2c7ca091af646dd787f426694d889eed46a (patch) | |
tree | e715e4ad7934c15ad2f688b85a8d189323ab2d71 /src/common.h | |
parent | 0ebce0cd4d61bc02f0fc1d587a4ffbecf220f76c (diff) | |
download | gnutls-a83ff2c7ca091af646dd787f426694d889eed46a.tar.gz |
corrected push/pull function setting
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common.h b/src/common.h index f5d66ff356..927c175987 100644 --- a/src/common.h +++ b/src/common.h @@ -68,7 +68,8 @@ pin_callback(void *user, int attempt, const char *token_url, void pkcs11_common(void); #ifdef _WIN32 -static int neterrno() +# include <errno.h> +static int neterrno(void) { int err = WSAGetLastError(); @@ -93,11 +94,12 @@ system_read(gnutls_transport_ptr_t ptr, void *data, size_t data_size) return recv((long)ptr, data, data_size, 0); } +static void set_read_funcs(gnutls_session_t session) { - gnutls_transport_set_push_function(vpninfo->https_sess, system_write); - gnutls_transport_set_pull_function(vpninfo->https_sess, system_read); - gnutls_transport_set_errno_function(vpninfo->https_sess, neterrno); + gnutls_transport_set_push_function(session, system_write); + gnutls_transport_set_pull_function(session, system_read); + gnutls_transport_set_errno_function(session, neterrno); } #else |