mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 18:02:13 +02:00
put gnutls_free fix in DTLSSession header
This commit is contained in:
parent
2c96ce08ae
commit
97444eac1c
2 changed files with 13 additions and 12 deletions
|
@ -33,17 +33,6 @@ void DTLSClientSession::globalDeinit() {
|
|||
gnutls_global_deinit();
|
||||
}
|
||||
|
||||
// fix for lnk2001 link error on windows
|
||||
// call xgnutls_free instead of gnutls_free
|
||||
// http://stackoverflow.com/questions/14593949/getting-error-lnk2001-unresolved-external-symbol-gnutls-free-when-using-gnut
|
||||
|
||||
typedef void (*gnutls_free_function) (void *);
|
||||
__declspec(dllimport) extern gnutls_free_function gnutls_free;
|
||||
|
||||
void xgnutls_free(void* p){
|
||||
gnutls_free(p);
|
||||
}
|
||||
|
||||
int DTLSClientSession::verifyServerCertificate(gnutls_session_t session) {
|
||||
unsigned int verifyStatus = 0;
|
||||
|
||||
|
@ -63,7 +52,6 @@ int DTLSClientSession::verifyServerCertificate(gnutls_session_t session) {
|
|||
|
||||
gnutls_datum_t printOut;
|
||||
|
||||
|
||||
certReturn = gnutls_certificate_verification_status_print(verifyStatus, typeReturn, &printOut, 0);
|
||||
|
||||
if (certReturn < 0) {
|
||||
|
|
|
@ -19,6 +19,19 @@
|
|||
#include "DummyDTLSSession.h"
|
||||
#include "HifiSockAddr.h"
|
||||
|
||||
// fix for lnk2001 link error on windows
|
||||
// call xgnutls_free instead of gnutls_free
|
||||
// http://stackoverflow.com/questions/14593949/getting-error-lnk2001-unresolved-external-symbol-gnutls-free-when-using-gnut
|
||||
|
||||
#ifdef WIN32
|
||||
typedef void (*gnutls_free_function) (void *);
|
||||
__declspec(dllimport) extern gnutls_free_function gnutls_free;
|
||||
#endif
|
||||
|
||||
void xgnutls_free(void* gnutlsPtr){
|
||||
gnutls_free(gnutlsPtr);
|
||||
}
|
||||
|
||||
class DTLSSession : public DummyDTLSSession {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue