From 8460fac28583f96c039f94d42f1035c266f9a45f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 25 Mar 2009 02:50:57 +0100 Subject: don't show full so path in backtrace --- src/pulsecore/log.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/pulsecore/log.c') diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c index d4d3b76e..e1b67948 100644 --- a/src/pulsecore/log.c +++ b/src/pulsecore/log.c @@ -156,7 +156,7 @@ static char* get_backtrace(unsigned show_nframes) { for (j = 0; j < n; j++) { if (j > 0) a += 2; - a += strlen(symbols[j]); + a += strlen(pa_path_get_filename(symbols[j])); } r = pa_xnew(char, a); @@ -165,13 +165,17 @@ static char* get_backtrace(unsigned show_nframes) { e = r + 2; for (j = 0; j < n; j++) { + const char *sym; + if (j > 0) { strcpy(e, "<<"); e += 2; } - strcpy(e, symbols[j]); - e += strlen(symbols[j]); + sym = pa_path_get_filename(symbols[j]); + + strcpy(e, sym); + e += strlen(sym); } strcpy(e, ")"); -- cgit