# HG changeset patch # User Sebastien Decugis # Date 1445140836 -28800 # Node ID 090390e89b1d054e1da90d4716cbc37515563f07 # Parent d8c998e7c535817de7f3fa81919928b4d77d8e31 Fix --dbg-file and --dbg-function usage. However there is something weird on MacOS X still... diff -r d8c998e7c535 -r 090390e89b1d freeDiameterd/main.c --- a/freeDiameterd/main.c Sun Oct 18 11:25:28 2015 +0800 +++ b/freeDiameterd/main.c Sun Oct 18 12:00:36 2015 +0800 @@ -207,6 +207,7 @@ case 'f': /* Full debug for the function with this name. */ #ifdef DEBUG fd_debug_one_function = optarg; + fd_g_debug_lvl = FD_LOG_DEBUG; #else /* DEBUG */ fprintf(stderr, "Error: must compile with DEBUG support to use --dbg_func feature!\n"); return EINVAL; @@ -216,6 +217,7 @@ case 'F': /* Full debug for the file with this name. */ #ifdef DEBUG fd_debug_one_file = basename(optarg); + fd_g_debug_lvl = FD_LOG_DEBUG; #else /* DEBUG */ fprintf(stderr, "Error: must compile with DEBUG support to use --dbg_file feature!\n"); return EINVAL; diff -r d8c998e7c535 -r 090390e89b1d include/freeDiameter/libfdproto.h --- a/include/freeDiameter/libfdproto.h Sun Oct 18 11:25:28 2015 +0800 +++ b/include/freeDiameter/libfdproto.h Sun Oct 18 12:00:36 2015 +0800 @@ -289,7 +289,7 @@ #define __PRETTY_FUNCTION__ __func__ #endif /* __PRETTY_FUNCTION__ */ -/* A version of __FILE__ without the full path */ +/* A version of __FILE__ without the full path. This is specific to each C file being compiled */ static char * file_bname = NULL; static char * file_bname_init(char * full) { file_bname = basename(full); return file_bname; } #define __STRIPPED_FILE__ (file_bname ?: file_bname_init((char *)__FILE__))