Commit 35354065 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

do not try to send mpd password if it is not set

parent 864559c3
......@@ -209,11 +209,13 @@ bool MPDCli::eventLoop()
LOGERR("MPDCli::eventloop: could not open connection\n");
return false;
}
if (!mpd_run_password(m_idleconn, m_password.c_str())) {
LOGERR("MPDCli::eventloop: password wrong ?\n");
mpd_connection_free(m_idleconn);
m_idleconn = nullptr;
return false;
if (!m_password.empty()) {
if (!mpd_run_password(m_idleconn, m_password.c_str())) {
LOGERR("MPDCli::eventloop: password wrong ?\n");
mpd_connection_free(m_idleconn);
m_idleconn = nullptr;
return false;
}
}
}
MpdStatus::State st;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment