|
a/libupnpp/upnpplib.cxx |
|
b/libupnpp/upnpplib.cxx |
|
... |
|
... |
113 |
|
113 |
|
114 |
// Servers sometimes make errors (e.g.: minidlna returns bad utf-8).
|
114 |
// Servers sometimes make errors (e.g.: minidlna returns bad utf-8).
|
115 |
ixmlRelaxParser(1);
|
115 |
ixmlRelaxParser(1);
|
116 |
}
|
116 |
}
|
117 |
|
117 |
|
118 |
int LibUPnP::setupWebServer(const string& description)
|
118 |
int LibUPnP::setupWebServer(const string& description, UpnpDevice_Handle *dvh)
|
119 |
{
|
119 |
{
|
120 |
int res = UpnpRegisterRootDevice2(
|
120 |
int res = UpnpRegisterRootDevice2(
|
121 |
UPNPREG_BUF_DESC,
|
121 |
UPNPREG_BUF_DESC,
|
122 |
description.c_str(),
|
122 |
description.c_str(),
|
123 |
description.size(), /* Desc filename len, ignored */
|
123 |
description.size(), /* Desc filename len, ignored */
|
124 |
1, /* URLBase*/
|
124 |
1, /* URLBase*/
|
125 |
o_callback, (void *)this, &m_dvh);
|
125 |
o_callback, (void *)this, dvh);
|
126 |
|
126 |
|
127 |
if (res != UPNP_E_SUCCESS) {
|
127 |
if (res != UPNP_E_SUCCESS) {
|
128 |
LOGERR(errAsString("UpnpRegisterRootDevice2", m_init_error) << endl);
|
128 |
LOGERR(errAsString("UpnpRegisterRootDevice2", m_init_error) << endl);
|
129 |
}
|
129 |
}
|
130 |
return res;
|
130 |
return res;
|