From 9c0aa9f3073a37e961a90a973b8d007685c9e184 Mon Sep 17 00:00:00 2001 From: Thierry Bultel Date: Fri, 7 Sep 2018 16:13:55 +0200 Subject: fixed crash upon misconfiguration of capture/playback devices The null pcmplug case was not correctly handled in various places. Also fixed some typos in the log Signed-off-by: Thierry Bultel --- plugins/alsa/alsa-core-pcm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/alsa/alsa-core-pcm.c') diff --git a/plugins/alsa/alsa-core-pcm.c b/plugins/alsa/alsa-core-pcm.c index 50e1384..1205a81 100644 --- a/plugins/alsa/alsa-core-pcm.c +++ b/plugins/alsa/alsa-core-pcm.c @@ -781,15 +781,15 @@ PUBLIC int AlsaPcmCopy(SoftMixerT *mixer, AlsaStreamAudioT *stream, AlsaPcmCtlT /// start a thread for writing if ((error = pthread_create(&cHandle->wthread, NULL, &readThreadEntry, cHandle)) < 0) { AFB_ApiError(mixer->api, - "%s Fail create waiting thread pcmIn=%s err=%d", - __func__, ALSA_PCM_UID(pcmIn->handle, string), error); + "%s Fail create write thread pcmOut=%s err=%d", + __func__, ALSA_PCM_UID(pcmOut->handle, string), error); goto OnErrorExit; } // start a thread for reading if ((error = pthread_create(&cHandle->rthread, NULL, &writeThreadEntry, cHandle)) < 0) { AFB_ApiError(mixer->api, - "%s Fail create waiting thread pcmIn=%s err=%d", + "%s Fail create read thread pcmIn=%s err=%d", __func__, ALSA_PCM_UID(pcmIn->handle, string), error); goto OnErrorExit; } @@ -809,7 +809,7 @@ PUBLIC int AlsaPcmCopy(SoftMixerT *mixer, AlsaStreamAudioT *stream, AlsaPcmCtlT if (error) { AFB_ApiWarning(mixer->api, "%s: Failed to increase stream write thread priority pcmIn=%s err=%s", - __func__, ALSA_PCM_UID(pcmIn->handle, string), strerror(error)); + __func__, ALSA_PCM_UID(pcmOut->handle, string), strerror(error)); } return 0; -- cgit 1.2.3-korg