From dbcb59e10744967cb74ddbf6a65b99675a39c2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 12 Apr 2022 12:54:23 +0200 Subject: [PATCH] Handle error value of shout_set_metadata() --- src/engine/sidechain/shoutconnection.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/engine/sidechain/shoutconnection.cpp b/src/engine/sidechain/shoutconnection.cpp index b4e0aebeeaeb..12844a5c3cf4 100644 --- a/src/engine/sidechain/shoutconnection.cpp +++ b/src/engine/sidechain/shoutconnection.cpp @@ -713,7 +713,7 @@ bool ShoutConnection::writeSingle(const unsigned char* data, size_t len) { kLogger.warning() << "writeSingle() SHOUTERR_BUSY, trying again"; usleep(10000); // wait 10 ms until "busy" is over. TODO() tweak for an optimum. // if this fails, the queue is transmitted after the next regular shout_send_raw() - (void)shout_send_raw(m_pShout, nullptr, 0); + (void)!shout_send_raw(m_pShout, nullptr, 0); } else if (ret < SHOUTERR_SUCCESS) { m_lastErrorStr = shout_get_error(m_pShout); kLogger.warning() @@ -892,7 +892,10 @@ void ShoutConnection::updateMetaData() { } setFunctionCode(13); - shout_set_metadata(m_pShout, m_pShoutMetaData); + int ret = shout_set_metadata(m_pShout, m_pShoutMetaData); + if (ret != SHOUTERR_SUCCESS) { + kLogger.warning() << "shout_set_metadata fails with error code" << ret; + } m_firstCall = true; } }