diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2011-07-20 09:41:39 -0700 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-07-20 09:41:39 -0700 |
commit | 6390849c52cc2d9db306970ce5d967af1810a345 (patch) | |
tree | bafbdcbc0391307c2f09fc4b9d6220a4541b02c4 /main.c | |
parent | fbf5d5c57ff17a22bc23482396e9136c5eaecce8 (diff) | |
download | openconnect-6390849c52cc2d9db306970ce5d967af1810a345.tar.gz openconnect-6390849c52cc2d9db306970ce5d967af1810a345.tar.bz2 openconnect-6390849c52cc2d9db306970ce5d967af1810a345.zip |
Output to stderr too in Android's syslog_progress()
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -628,12 +628,17 @@ void syslog_progress(void *_vpninfo, int level, const char *fmt, ...) ANDROID_LOG_DEBUG, /* PRG_DEBUG */ ANDROID_LOG_DEBUG /* PRG_TRACE */ }; - va_list args; + va_list args, args2; if (verbose >= level) { va_start(args, fmt); + va_copy(args2, args); __android_log_vprint(l[level], "openconnect", fmt, args); + /* Android wants it to stderr too, so the GUI can scrape + it and display it as well as going to syslog */ + vfprintf(stderr, fmt, args2); va_end(args); + va_end(args2); } } #else /* !ANDROID */ |