Mercurial > hg > freeDiameter
comparison tests/tests.h @ 1357:925470fbe59d
Avoid deprecated functions (like in libfdcore/core.c).
author | Thomas Klausner <tk@giga.or.at> |
---|---|
date | Sat, 18 May 2019 17:58:48 +0200 |
parents | 1af09cc156d6 |
children | 566bb46cc73f |
comparison
equal
deleted
inserted
replaced
1356:b68fb21c2f72 | 1357:925470fbe59d |
---|---|
129 | 129 |
130 return NULL; | 130 return NULL; |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 #ifndef GNUTLS_VERSION_210 | |
134 GCRY_THREAD_OPTION_PTHREAD_IMPL; | 135 GCRY_THREAD_OPTION_PTHREAD_IMPL; |
136 #endif /* GNUTLS_VERSION_210 */ | |
135 | 137 |
136 /* gnutls debug. */ | 138 /* gnutls debug. */ |
137 static void fd_gnutls_debug(int level, const char * str) { | 139 static void fd_gnutls_debug(int level, const char * str) { |
138 const char * __thn = ((char *)pthread_getspecific(fd_log_thname) ?: "unnamed"); | 140 const char * __thn = ((char *)pthread_getspecific(fd_log_thname) ?: "unnamed"); |
139 fd_log_debug("tid:%-20s[gnutls:%d] %s", __thn, level, str); | 141 fd_log_debug("tid:%-20s[gnutls:%d] %s", __thn, level, str); |
211 | 213 |
212 /* Parse the command line */ | 214 /* Parse the command line */ |
213 parse_cmdline(argc, argv); | 215 parse_cmdline(argc, argv); |
214 | 216 |
215 /* Initialize gcrypt and gnutls */ | 217 /* Initialize gcrypt and gnutls */ |
218 #ifndef GNUTLS_VERSION_210 | |
216 (void) gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); | 219 (void) gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); |
217 (void) gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); | 220 (void) gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); |
221 #endif /* GNUTLS_VERSION_210 */ | |
218 CHECK( 0, gnutls_global_init()); | 222 CHECK( 0, gnutls_global_init()); |
219 /* Set gnutls debug level ? */ | 223 /* Set gnutls debug level ? */ |
220 if (gnutls_debug) { | 224 if (gnutls_debug) { |
221 gnutls_global_set_log_function((gnutls_log_func)fd_gnutls_debug); | 225 gnutls_global_set_log_function((gnutls_log_func)fd_gnutls_debug); |
222 gnutls_global_set_log_level (gnutls_debug); | 226 gnutls_global_set_log_level (gnutls_debug); |