Switch to unified view

a/src/ohproduct.cxx b/src/ohproduct.cxx
...
...
200
    return UPNP_E_SUCCESS;
200
    return UPNP_E_SUCCESS;
201
}
201
}
202
202
203
int OHProduct::iSetSourceIndex(int sindex)
203
int OHProduct::iSetSourceIndex(int sindex)
204
{
204
{
205
    LOGDEB("OHProduct::setSourceIndex: " << sindex << endl);
205
    LOGDEB("OHProduct::iSetSourceIndex: " << sindex << endl);
206
    if (sindex < 0 || sindex >= int(o_sources.size())) {
206
    if (sindex < 0 || sindex >= int(o_sources.size())) {
207
        LOGERR("OHProduct::setSourceIndex: bad index: " << sindex << endl);
207
        LOGERR("OHProduct::setSourceIndex: bad index: " << sindex << endl);
208
        return UPNP_E_INVALID_PARAM;
208
        return UPNP_E_INVALID_PARAM;
209
    }
209
    }
210
    m_sourceIndex = sindex;
210
    m_sourceIndex = sindex;
...
...
221
    return iSetSourceIndex(sindex);
221
    return iSetSourceIndex(sindex);
222
}
222
}
223
223
224
int OHProduct::setSourceIndexByName(const SoapIncoming& sc, SoapOutgoing& data)
224
int OHProduct::setSourceIndexByName(const SoapIncoming& sc, SoapOutgoing& data)
225
{
225
{
226
    LOGDEB("OHProduct::setSourceIndexByName" << endl);
227
226
228
    string name;
227
    string name;
229
    if (!sc.get("Value", &name)) {
228
    if (!sc.get("Value", &name)) {
229
        LOGERR("OHProduct::setSourceIndexByName: no Value" << endl);
230
        return UPNP_E_INVALID_PARAM;
230
        return UPNP_E_INVALID_PARAM;
231
    }
231
    }
232
    LOGDEB("OHProduct::setSourceIndexByName: " << name << endl);
232
    for (unsigned int i = 0; i < o_sources.size(); i++) {
233
    for (unsigned int i = 0; i < o_sources.size(); i++) {
233
        if (o_sources[i] == name) {
234
        if (o_sources[i] == name) {
234
            m_sourceIndex = i;
235
            return iSetSourceIndex(i);
235
            m_dev->loopWakeup();
236
            return UPNP_E_SUCCESS;
237
        }
236
        }
238
    }
237
    }
239
            
238
            
240
    LOGERR("OHProduct::setSoaurceIndexByName: no such name: " << name << endl);
239
    LOGERR("OHProduct::setSoaurceIndexByName: no such name: " << name << endl);
241
    return UPNP_E_INVALID_PARAM;
240
    return UPNP_E_INVALID_PARAM;