Switch to unified view

a/src/ohreceiver.cxx b/src/ohreceiver.cxx
...
...
66
66
67
static const string o_protocolinfo("ohz:*:*:*,ohm:*:*:*,ohu:*.*.*");
67
static const string o_protocolinfo("ohz:*:*:*,ohm:*:*:*,ohu:*.*.*");
68
68
69
bool OHReceiver::makestate(unordered_map<string, string> &st)
69
bool OHReceiver::makestate(unordered_map<string, string> &st)
70
{
70
{
71
    const MpdStatus &mpds = m_dev->getMpdStatusNoUpdate();
72
    if (m_pm == OHReceiverParams::OHRP_MPD) {
71
    if (m_pm == OHReceiverParams::OHRP_MPD) {
72
        const MpdStatus &mpds = m_dev->getMpdStatusNoUpdate();
73
        if (m_cmd && mpds.state != MpdStatus::MPDS_PLAY && 
73
        if (m_cmd && mpds.state != MpdStatus::MPDS_PLAY && 
74
            mpds.state != MpdStatus::MPDS_PAUSE) {
74
            mpds.state != MpdStatus::MPDS_PAUSE) {
75
            // playing was stopped through ohplaylist or
75
            // playing was stopped through ohplaylist or
76
            // avtransport. I'm not sure we're supposed to let this
76
            // avtransport. I'm not sure we're supposed to let this
77
            // happen, but we do. Stop too.
77
            // happen, but we do. Stop too.
78
            iStop();
78
            iStop();
79
        }
80
    } else {
81
        if (m_cmd) {
82
            int status;
83
            if (m_cmd->maybereap(&status)) {
84
                LOGDEB("OHReceiver: sc2cmd exited with status " << status << endl);
85
                m_cmd = shared_ptr<ExecCmd>(new ExecCmd());
86
            }
79
        }
87
        }
80
    }
88
    }
81
89
82
    st.clear();
90
    st.clear();
83
91