diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-05-30 16:25:56 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-05-30 16:25:56 +0200 |
commit | 02f7d876553d278f73e5d57603d1d20a11cd16ea (patch) | |
tree | 44c8f9eb09f0bb82db73d66fe777d9985b49bd78 | |
parent | 4db507f7d53a09cf3f572dedcc304f334970ce06 (diff) |
fix bug in hooking verbose calls
Change-Id: I879d05968521a25cab73f65dad02a52357e62dab
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r-- | src/afb-ditf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/afb-ditf.c b/src/afb-ditf.c index 9160a9d4..4ee5af7f 100644 --- a/src/afb-ditf.c +++ b/src/afb-ditf.c @@ -106,8 +106,11 @@ static int queue_job_cb(void *closure, void (*callback)(int signum, void *arg), static void hooked_vverbose_cb(void *closure, int level, const char *file, int line, const char *function, const char *fmt, va_list args) { struct afb_ditf *ditf = closure; + va_list ap; + va_copy(ap, args); vverbose_cb(closure, level, file, line, function, fmt, args); - afb_hook_ditf_vverbose(ditf, level, file, line, function, fmt, args); + afb_hook_ditf_vverbose(ditf, level, file, line, function, fmt, ap); + va_end(ap); } static void hooked_old_vverbose_cb(void *closure, int level, const char *file, int line, const char *fmt, va_list args) |