From b4c4ca0b824cfd92d8e2f19d343d88ddefc580ec Mon Sep 17 00:00:00 2001 From: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> Date: Tue, 18 Mar 2008 12:18:14 -0400 Subject: [PATCH] Client error handling - ALSA error If an error occured at startup when opening an audio device --> notification --- src/managerimpl.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index b0c1a15ee6..735268b923 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -451,6 +451,9 @@ ManagerImpl::initRegisterAccounts() } iter++; } + // calls the client notification here in case of errors at startup... + if( _audiodriver -> getErrorMessage() != "" ) + notifyErrClient( _audiodriver -> getErrorMessage() ); return true; } @@ -1419,8 +1422,10 @@ ManagerImpl::setRingtoneChoice( const std::string& tone ) void ManagerImpl::notifyErrClient( const std::string& errMsg ) { - _debug("Call notifyErrClient: %s\n" , errMsg.c_str()); - if( _dbus ) _dbus -> getConfigurationManager() -> errorAlert( errMsg , 0 ); + if( _dbus ) { + _debug("Call notifyErrClient: %s\n" , errMsg.c_str()); + _dbus -> getConfigurationManager() -> errorAlert( errMsg , 0 ); + } } int -- GitLab