diff options
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r-- | source3/lib/util.c | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index da98f5a3cf..4f564b332a 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1040,7 +1040,7 @@ BOOL get_mydomname(fstring my_domname) Interpret a protocol description string, with a default. ****************************************************************************/ -int interpret_protocol(const char *str,int def) +int interpret_protocol(char *str,int def) { if (strequal(str,"NT1")) return(PROTOCOL_NT1); @@ -1400,24 +1400,20 @@ void smb_panic(const char *why) { char *cmd; int result; - size_t i; - void *backtrace_stack[BACKTRACE_STACK_SIZE]; - size_t backtrace_size; - char **backtrace_strings; #ifdef DEVELOPER { extern char *global_clobber_region_function; extern unsigned int global_clobber_region_line; - + if (global_clobber_region_function) { DEBUG(0,("smb_panic: clobber_region() last called from [%s(%u)]\n", - global_clobber_region_function, - global_clobber_region_line)); + global_clobber_region_function, + global_clobber_region_line)); } } #endif - + cmd = lp_panic_action(); if (cmd && *cmd) { DEBUG(0, ("smb_panic(): calling panic action [%s]\n", cmd)); @@ -1425,35 +1421,19 @@ void smb_panic(const char *why) if (result == -1) DEBUG(0, ("smb_panic(): fork failed in panic action: %s\n", - strerror(errno))); + strerror(errno))); else DEBUG(0, ("smb_panic(): action returned status %d\n", - WEXITSTATUS(result))); + WEXITSTATUS(result))); } DEBUG(0,("PANIC: %s\n", why)); - DEBUG(0, ("%d stack frames:\n", backtrace_size)); - -#ifdef HAVE_BACKTRACE_SYMBOLS - /* get the backtrace (stack frames) */ - backtrace_size = backtrace(backtrace_stack,BACKTRACE_STACK_SIZE); - backtrace_strings = backtrace_symbols(backtrace_stack, backtrace_size); - - if (backtrace_strings) { - for (i = 0; i < backtrace_size; i++) - DEBUG(0, (" #%u %s\n", i, backtrace_strings[i])); - - SAFE_FREE(backtrace_strings); - } - -#endif - dbgflush(); abort(); } /******************************************************************* - A readdir wrapper which just returns the file name. - ********************************************************************/ + A readdir wrapper which just returns the file name. +********************************************************************/ const char *readdirname(DIR *p) { |