Mercurial > hg > freeDiameter
diff freeDiameter/main.c @ 205:ff9ade352076
Simplified use of --dbg_file option
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 12 Feb 2010 18:29:08 +0900 |
parents | 2b2f78036749 |
children | c32f48b89cfb |
line wrap: on
line diff
--- a/freeDiameter/main.c Fri Feb 12 16:12:54 2010 +0900 +++ b/freeDiameter/main.c Fri Feb 12 18:29:08 2010 +0900 @@ -233,11 +233,21 @@ break; case 'f': /* Full debug for the function with this name. */ + #ifdef DEBUG fd_debug_one_function = optarg; + #else /* DEBUG */ + TRACE_DEBUG(INFO, "Error: must compile with DEBUG support to use this feature"); + return EINVAL; + #endif /* DEBUG */ break; case 'F': /* Full debug for the file with this name. */ - fd_debug_one_file = optarg; + #ifdef DEBUG + fd_debug_one_file = basename(optarg); + #else /* DEBUG */ + TRACE_DEBUG(INFO, "Error: must compile with DEBUG support to use this feature"); + return EINVAL; + #endif /* DEBUG */ break; case 'q': /* Decrease verbosity then remove debug messages. */