X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fverbose.c;h=e0e382488c1d1fc39895c2ea29d791ad55aa1ec7;hb=170aef20bc3a59d5139c2eff8794d9ba4c83a2e5;hp=2d60dfca93668f32df7190f418ce23a884324604;hpb=6d8d9dc5aad148a74bcdf8965bee9f7058a08166;p=src%2Fapp-framework-binder.git diff --git a/src/verbose.c b/src/verbose.c index 2d60dfca..e0e38248 100644 --- a/src/verbose.c +++ b/src/verbose.c @@ -132,12 +132,16 @@ void verbose(int loglevel, const char *file, int line, const char *function, con void vverbose(int loglevel, const char *file, int line, const char *function, const char *fmt, va_list args) { - if (verbose_observer) { + void (*observer)(int loglevel, const char *file, int line, const char *function, const char *fmt, va_list args) = verbose_observer; + + if (!observer) + _vverbose_(loglevel, file, line, function, fmt, args); + else { va_list ap; va_copy(ap, args); - verbose_observer(loglevel, file, line, function, fmt, ap); + _vverbose_(loglevel, file, line, function, fmt, args); + observer(loglevel, file, line, function, fmt, ap); va_end(ap); } - _vverbose_(loglevel, file, line, function, fmt, args); }