Changeset 793:ada5366bca4e in freeDiameter for tests
- Timestamp:
- Jul 14, 2012, 5:28:43 PM (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/tests.h
r740 r793 130 130 GCRY_THREAD_OPTION_PTHREAD_IMPL; 131 131 132 /* gnutls debug */ 133 static void fd_gnutls_debug(int level, const char * str) { 134 fd_log_debug(" [gnutls:%d] %s", level, str); 135 } 136 static int gnutls_debug = 0; 137 138 132 139 static inline void parse_cmdline(int argc, char * argv[]) { 133 140 int c; 134 141 int no_timeout = 0; 135 while ((c = getopt (argc, argv, "dqnf:F: ")) != -1) {142 while ((c = getopt (argc, argv, "dqnf:F:g:")) != -1) { 136 143 switch (c) { 137 144 case 'd': /* Increase verbosity of debug messages. */ … … 161 168 TRACE_DEBUG(INFO, "Error: must compile with DEBUG support to use this feature"); 162 169 #endif /* DEBUG */ 170 break; 171 172 case 'g': /* Set a debug level and function for GNU TLS calls. */ 173 gnutls_debug = (int)atoi(optarg); 163 174 break; 164 175 … … 194 205 (void) gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); 195 206 CHECK( 0, gnutls_global_init()); 207 /* Set gnutls debug level ? */ 208 if (gnutls_debug) { 209 gnutls_global_set_log_function((gnutls_log_func)fd_gnutls_debug); 210 gnutls_global_set_log_level (gnutls_debug); 211 TRACE_DEBUG(INFO, "Enabled GNUTLS debug at level %d", gnutls_debug); 212 } 196 213 197 214 /* Initialize the config */
Note: See TracChangeset
for help on using the changeset viewer.