mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
alsa_error_handler should note source of errors
When an error gets passed up from alsa-lib via alsa_error_handler, it's unclear the source of the error. alsa_error_handler should note that the error came from alsa-lib. (Closes #341)
This commit is contained in:
parent
8df5b2de92
commit
3d07cc8112
1 changed files with 6 additions and 1 deletions
|
|
@ -896,12 +896,17 @@ void pa_alsa_dump_status(snd_pcm_t *pcm) {
|
||||||
|
|
||||||
static void alsa_error_handler(const char *file, int line, const char *function, int err, const char *fmt,...) {
|
static void alsa_error_handler(const char *file, int line, const char *function, int err, const char *fmt,...) {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
char *alsa_file;
|
||||||
|
|
||||||
|
alsa_file = pa_sprintf_malloc("(alsa-lib)%s", file);
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
|
||||||
pa_log_levelv_meta(PA_LOG_WARN, file, line, function, fmt, ap);
|
pa_log_levelv_meta(PA_LOG_INFO, alsa_file, line, function, fmt, ap);
|
||||||
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
|
pa_xfree(alsa_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static pa_atomic_t n_error_handler_installed = PA_ATOMIC_INIT(0);
|
static pa_atomic_t n_error_handler_installed = PA_ATOMIC_INIT(0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue