Changeset 501:e5f06199cee7 in freeDiameter for freeDiameter/main.c
- Timestamp:
- Aug 18, 2010, 6:13:09 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameter/main.c
r453 r501 180 180 } 181 181 182 /* gnutls debug */ 183 static void fd_gnutls_debug(int level, const char * str) { 184 fd_log_debug(" [gnutls:%d] %s", level, str); 185 } 186 182 187 /* Parse the command-line */ 183 188 static int main_cmdline(int argc, char *argv[]) … … 196 201 { "dbg_func", required_argument, NULL, 'f' }, 197 202 { "dbg_file", required_argument, NULL, 'F' }, 203 { "dbg_gnutls", required_argument, NULL, 'g' }, 198 204 { NULL, 0, NULL, 0 } 199 205 }; … … 247 253 #ifdef DEBUG 248 254 fd_debug_one_file = basename(optarg); 255 #else /* DEBUG */ 256 TRACE_DEBUG(INFO, "Error: must compile with DEBUG support to use this feature"); 257 return EINVAL; 258 #endif /* DEBUG */ 259 break; 260 261 case 'g': /* Full debug for the function with this name. */ 262 #ifdef DEBUG 263 { 264 int l = (int)atoi(optarg); 265 if (l) { 266 gnutls_global_set_log_function((gnutls_log_func)fd_gnutls_debug); 267 gnutls_global_set_log_level (l); 268 TRACE_DEBUG(INFO, "Enabled GNUTLS debug at level %d", l); 269 } 270 } 249 271 #else /* DEBUG */ 250 272 TRACE_DEBUG(INFO, "Error: must compile with DEBUG support to use this feature");
Note: See TracChangeset
for help on using the changeset viewer.