|
a/libupnpp/upnpplib.cxx |
|
b/libupnpp/upnpplib.cxx |
|
... |
|
... |
12 |
* You should have received a copy of the GNU General Public License
|
12 |
* You should have received a copy of the GNU General Public License
|
13 |
* along with this program; if not, write to the
|
13 |
* along with this program; if not, write to the
|
14 |
* Free Software Foundation, Inc.,
|
14 |
* Free Software Foundation, Inc.,
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
|
|
17 |
#include "config.h"
|
17 |
|
18 |
|
18 |
#include "upnpplib.hxx"
|
19 |
#include "upnpplib.hxx"
|
19 |
|
20 |
|
20 |
#include <ctype.h> // for toupper
|
21 |
#include <ctype.h> // for toupper
|
21 |
#include <stdio.h> // for sprintf
|
22 |
#include <stdio.h> // for sprintf
|
22 |
#include <string.h> // for strncpy
|
23 |
#include <string.h> // for strncpy
|
23 |
#include <time.h> // for timespec
|
24 |
#include <time.h> // for timespec
|
24 |
|
25 |
|
25 |
#include <upnp/ixml.h> // for ixmlRelaxParser
|
26 |
#include <upnp/ixml.h> // for ixmlRelaxParser
|
26 |
#include <upnp/upnptools.h> // for UpnpGetErrorMessage
|
27 |
#include <upnp/upnptools.h> // for UpnpGetErrorMessage
|
|
|
28 |
#include <upnp/upnpdebug.h>
|
27 |
|
29 |
|
28 |
#include <iostream> // for operator<<, basic_ostream, etc
|
30 |
#include <iostream> // for operator<<, basic_ostream, etc
|
29 |
#include <map> // for map, _Rb_tree_iterator, etc
|
31 |
#include <map> // for map, _Rb_tree_iterator, etc
|
30 |
#include <set> // for set
|
32 |
#include <set> // for set
|
31 |
#include <sstream> // for ostringstream
|
33 |
#include <sstream> // for ostringstream
|
32 |
#include <string> // for string, basic_string, etc
|
34 |
#include <string> // for string, basic_string, etc
|
33 |
#include <utility> // for pair
|
35 |
#include <utility> // for pair
|
34 |
#include <vector> // for vector
|
36 |
#include <vector> // for vector
|
35 |
|
37 |
|
36 |
#include "config.h" // for HAVE_UPNPSETLOGLEVEL
|
|
|
37 |
#include "getsyshwaddr.h" // for getsyshwaddr
|
38 |
#include "getsyshwaddr.h" // for getsyshwaddr
|
38 |
|
39 |
|
39 |
#include "libupnpp/ptmutex.hxx" // for PTMutexLocker
|
40 |
#include "libupnpp/ptmutex.hxx" // for PTMutexLocker
|
40 |
|
41 |
|
41 |
#include "log.hxx" // for LOGERR, LOGDEB1, LOGDEB, etc
|
42 |
#include "log.hxx" // for LOGERR, LOGDEB1, LOGDEB, etc
|
|
... |
|
... |
128 |
{
|
129 |
{
|
129 |
int res = UpnpRegisterRootDevice2(
|
130 |
int res = UpnpRegisterRootDevice2(
|
130 |
UPNPREG_BUF_DESC,
|
131 |
UPNPREG_BUF_DESC,
|
131 |
description.c_str(),
|
132 |
description.c_str(),
|
132 |
description.size(), /* Desc filename len, ignored */
|
133 |
description.size(), /* Desc filename len, ignored */
|
133 |
1, /* URLBase*/
|
134 |
1, /* config_baseURL */
|
134 |
o_callback, (void *)this, dvh);
|
135 |
o_callback, (void *)this, dvh);
|
135 |
|
136 |
|
136 |
if (res != UPNP_E_SUCCESS) {
|
137 |
if (res != UPNP_E_SUCCESS) {
|
137 |
LOGERR(errAsString("UpnpRegisterRootDevice2", m_init_error) << endl);
|
138 |
LOGERR(errAsString("UpnpRegisterRootDevice2", res) << endl);
|
138 |
}
|
139 |
}
|
139 |
return res;
|
140 |
return res;
|
140 |
}
|
141 |
}
|
141 |
|
142 |
|
142 |
void LibUPnP::setMaxContentLength(int bytes)
|
143 |
void LibUPnP::setMaxContentLength(int bytes)
|