Skip to content

Commit

Permalink
Handle error value of shout_set_metadata()
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Oct 8, 2023
1 parent e5afd6d commit dbcb59e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/engine/sidechain/shoutconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit dbcb59e

Please sign in to comment.