Compare commits
195 Commits
release-1.
...
branch-1.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc335f5df7 | ||
|
|
cf31814e55 | ||
|
|
3b0fd070fd | ||
|
|
9f69fb1b80 | ||
|
|
c124ae6507 | ||
|
|
51a01cdba1 | ||
|
|
6905714a7e | ||
|
|
72460df747 | ||
|
|
a596abfbe3 | ||
|
|
fbbb24f406 | ||
|
|
0508fb0d6e | ||
|
|
848d66e69d | ||
|
|
04fb684323 | ||
|
|
faaef39a3c | ||
|
|
a1193f385e | ||
|
|
c20f2bd3a1 | ||
|
|
3fc0f9ad1d | ||
|
|
2211cc14e6 | ||
|
|
bf60dc06e0 | ||
|
|
908785fba7 | ||
|
|
1a28e8ff51 | ||
|
|
89ad5e6779 | ||
|
|
062ac0c926 | ||
|
|
06aa3b17c4 | ||
|
|
9f444a680e | ||
|
|
8e3a71905b | ||
|
|
72c29ef1f6 | ||
|
|
f6a3102b48 | ||
|
|
9a9c4e829e | ||
|
|
7a571f513e | ||
|
|
f10730f616 | ||
|
|
c70f5ce323 | ||
|
|
a3c540bc9b | ||
|
|
7b1aa4c9e3 | ||
|
|
907c7c2621 | ||
|
|
25c27b8af7 | ||
|
|
dcbbc30f5c | ||
|
|
3509991872 | ||
|
|
6279b7fa5f | ||
|
|
6cd1f11154 | ||
|
|
f015a132e8 | ||
|
|
40e90e89fc | ||
|
|
40ddff1096 | ||
|
|
692813d03e | ||
|
|
d9e90499b7 | ||
|
|
6db2271ac3 | ||
|
|
4d21d45da7 | ||
|
|
708ea30806 | ||
|
|
39dfad2cba | ||
|
|
3d7c1dbd59 | ||
|
|
e52e7e0bd3 | ||
|
|
d5d680d131 | ||
|
|
7ee266076d | ||
|
|
90fad896c4 | ||
|
|
0ea9c438e5 | ||
|
|
c661180d15 | ||
|
|
1a98394781 | ||
|
|
89fe655aee | ||
|
|
d72bb5cff5 | ||
|
|
e02753736a | ||
|
|
1c21e6e54f | ||
|
|
a383cbb8e2 | ||
|
|
34a77cc095 | ||
|
|
e10bc2ec0c | ||
|
|
777c936f4c | ||
|
|
04c1bf3fb0 | ||
|
|
ab792e4223 | ||
|
|
d0b16d056e | ||
|
|
dc4eda529f | ||
|
|
c154c63cdc | ||
|
|
49af91fe48 | ||
|
|
df27ba505f | ||
|
|
9a33782ab5 | ||
|
|
e0e81e6cd2 | ||
|
|
02afbb09c9 | ||
|
|
804088d859 | ||
|
|
679ebeec48 | ||
|
|
19ec877b2a | ||
|
|
01d7c05fb8 | ||
|
|
952492b44e | ||
|
|
a04c36f47e | ||
|
|
e13ffe3bf8 | ||
|
|
d3d17da6e5 | ||
|
|
e0444b26e6 | ||
|
|
cb07623dde | ||
|
|
c9f3e26f24 | ||
|
|
a3d038c885 | ||
|
|
731512b0e5 | ||
|
|
76eb3f869b | ||
|
|
b116d10f37 | ||
|
|
1a083479a9 | ||
|
|
850e6b4849 | ||
|
|
d48d73720b | ||
|
|
b7f83bb7c6 | ||
|
|
05fb3f8026 | ||
|
|
7178f300bb | ||
|
|
f7a801c3ae | ||
|
|
f299d6597a | ||
|
|
35819a7a44 | ||
|
|
f1c4ffefda | ||
|
|
a692e591de | ||
|
|
ad7272d2b5 | ||
|
|
86bef09787 | ||
|
|
c40d2bc0c9 | ||
|
|
8e39b2af85 | ||
|
|
2eb3e069ba | ||
|
|
db532afb9b | ||
|
|
1b38cc963a | ||
|
|
c67187ac94 | ||
|
|
d45f3c28cf | ||
|
|
06660b6383 | ||
|
|
41412c16ef | ||
|
|
04e5767ea0 | ||
|
|
5944960e17 | ||
|
|
d952ebfb44 | ||
|
|
56b44fee91 | ||
|
|
ff635f92c0 | ||
|
|
19a23dafba | ||
|
|
bd7f83feb5 | ||
|
|
e4678168fa | ||
|
|
a0dc3482dc | ||
|
|
87d1d3c3ec | ||
|
|
194397b6d6 | ||
|
|
b78eaf4e43 | ||
|
|
a54d6e7e83 | ||
|
|
18bf3b1c9c | ||
|
|
bb140000c0 | ||
|
|
7aef73d7eb | ||
|
|
77c73884b8 | ||
|
|
72eecacf56 | ||
|
|
601332f88f | ||
|
|
4605314569 | ||
|
|
e95b4cc53a | ||
|
|
e722d8c375 | ||
|
|
29ee36b1ca | ||
|
|
2fb791c9bb | ||
|
|
d909297aa7 | ||
|
|
9b616a08df | ||
|
|
3ab8d536a0 | ||
|
|
4f34a12a83 | ||
|
|
97a17ff5ad | ||
|
|
9965f02727 | ||
|
|
861a538cea | ||
|
|
c12d33aca6 | ||
|
|
4c3532585d | ||
|
|
71ab707e81 | ||
|
|
cec9d55c4c | ||
|
|
56c26b5199 | ||
|
|
0469388b73 | ||
|
|
268abf72fb | ||
|
|
288ef35cee | ||
|
|
7ef089b09a | ||
|
|
c13b1f7e37 | ||
|
|
3e7bf14488 | ||
|
|
a8bcbe9491 | ||
|
|
1a1570fe0f | ||
|
|
30badb44c7 | ||
|
|
3504b13eae | ||
|
|
d6f1e4112e | ||
|
|
e5887c9036 | ||
|
|
eeab71082f | ||
|
|
f6e88d5b0a | ||
|
|
add51536fc | ||
|
|
40864da7c1 | ||
|
|
5caaf3ad07 | ||
|
|
26c3f87eca | ||
|
|
20372ccef6 | ||
|
|
47c86542bc | ||
|
|
da244683cf | ||
|
|
7301f46269 | ||
|
|
bd203e780e | ||
|
|
69f3fe2330 | ||
|
|
52df3081df | ||
|
|
71e77a5b27 | ||
|
|
a79a149e6a | ||
|
|
0693adc7dc | ||
|
|
076f8e5be6 | ||
|
|
60f9df425b | ||
|
|
fa83dd4a00 | ||
|
|
795de3e077 | ||
|
|
a567576100 | ||
|
|
bc473d5e68 | ||
|
|
2940cbf94a | ||
|
|
d87c966ec5 | ||
|
|
e88d9dbedc | ||
|
|
33fcfeb79f | ||
|
|
a9c24fc7f3 | ||
|
|
537581d8ad | ||
|
|
66ea2ab11d | ||
|
|
4ca0b382ea | ||
|
|
c155d3c68f | ||
|
|
03bd7759cd | ||
|
|
80a65e5f61 | ||
|
|
3b33626e2f | ||
|
|
b35761e893 |
15
.gitignore
vendored
15
.gitignore
vendored
@@ -73,6 +73,14 @@ GRTAGS
|
|||||||
GSYMS
|
GSYMS
|
||||||
GTAGS
|
GTAGS
|
||||||
|
|
||||||
|
# QT-Creator files
|
||||||
|
Makefile.am.user
|
||||||
|
pupnp.config
|
||||||
|
pupnp.creator
|
||||||
|
pupnp.creator.user
|
||||||
|
pupnp.files
|
||||||
|
pupnp.includes
|
||||||
|
|
||||||
*.orig
|
*.orig
|
||||||
*~
|
*~
|
||||||
\#*#
|
\#*#
|
||||||
@@ -101,5 +109,12 @@ upnp/inc/upnpconfig.h
|
|||||||
upnp/sample/tv_combo
|
upnp/sample/tv_combo
|
||||||
upnp/sample/tv_ctrlpt
|
upnp/sample/tv_ctrlpt
|
||||||
upnp/sample/tv_device
|
upnp/sample/tv_device
|
||||||
|
upnp/unittest/unittest
|
||||||
|
upnp/unittest/*.pp.c
|
||||||
docs/doxygen
|
docs/doxygen
|
||||||
|
|
||||||
|
|
||||||
|
/build/vc10/out.vc9.Win32/Debug
|
||||||
|
/build/vc10/out.vc10.Win32
|
||||||
|
/build/vc10/out.vc10.x64
|
||||||
|
/pthreads
|
||||||
|
|||||||
2
Doxyfile
2
Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME = libUPnP
|
|||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 1.6.14
|
PROJECT_NUMBER = 1.6.20
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
|
|||||||
12
README
12
README
@@ -266,12 +266,24 @@ In order to build libupnp under Windows the pthreads-w32 package is required.
|
|||||||
You can download a self-extracting ZIP file from the following location:
|
You can download a self-extracting ZIP file from the following location:
|
||||||
|
|
||||||
ftp://sources.redhat.com/pub/pthreads-win32/pthreads-w32-2-7-0-release.exe
|
ftp://sources.redhat.com/pub/pthreads-win32/pthreads-w32-2-7-0-release.exe
|
||||||
|
or possibly newer versions if available.
|
||||||
|
|
||||||
Execute the self-extracting archive and copy the Pre-build.2 folder to the
|
Execute the self-extracting archive and copy the Pre-build.2 folder to the
|
||||||
top level source folder.
|
top level source folder.
|
||||||
Rename Pre-build.2 to pthreads.
|
Rename Pre-build.2 to pthreads.
|
||||||
Open the provided workspace build\libupnp.dsw with Visual C++ 6.0 and select
|
Open the provided workspace build\libupnp.dsw with Visual C++ 6.0 and select
|
||||||
Build->Build libupnp.dll (F7)
|
Build->Build libupnp.dll (F7)
|
||||||
|
In the build directory there are also VC8, VC9 and VC10 folders containing
|
||||||
|
solution files for Visual Studio 2005/2008/2010 respectively.
|
||||||
|
|
||||||
|
If you use newer versions to build libupnp, eg Visual Studio 2003 or later,
|
||||||
|
then you need to rebuild the pthreads package so it uses the same VC runtime
|
||||||
|
as libupnp to prevent cross boundary runtime problems
|
||||||
|
(see http://msdn.microsoft.com/en-us/library/ms235460%28v=VS.100%29.aspx).
|
||||||
|
Just replace the files in the Pre-build.2 folder (renamed to pthreads as
|
||||||
|
mentioned above) with the newly build versions.
|
||||||
|
If you also use a newer version of pthreads-win32 then you should also
|
||||||
|
replace the header files in that directory structure (obviously).
|
||||||
|
|
||||||
For building a static library instead of a DLL and for using the static
|
For building a static library instead of a DLL and for using the static
|
||||||
pthreads-w32 library following switches need to be defined additionally:
|
pthreads-w32 library following switches need to be defined additionally:
|
||||||
|
|||||||
19
THANKS
19
THANKS
@@ -8,13 +8,14 @@ exempt of errors.
|
|||||||
|
|
||||||
- Alex (afaucher)
|
- Alex (afaucher)
|
||||||
- Andre Sodermans (wienerschnitzel)
|
- Andre Sodermans (wienerschnitzel)
|
||||||
|
- Anoop Mohan (an00p)
|
||||||
- Anthony Viallard (homer242)
|
- Anthony Viallard (homer242)
|
||||||
- Apostolos Syropoulos
|
- Apostolos Syropoulos
|
||||||
- Arno Willig
|
- Arno Willig
|
||||||
- Bob Ciora
|
- Bob Ciora
|
||||||
- Carlo Parata
|
- Carlo Parata
|
||||||
- Carl Benson
|
- Carl Benson
|
||||||
- Chandra (inactiveneurons)
|
- Chandra Penke (inactiveneurons)
|
||||||
- Chaos
|
- Chaos
|
||||||
- Charles Nepveu (cnepveu)
|
- Charles Nepveu (cnepveu)
|
||||||
- Chris Pickel
|
- Chris Pickel
|
||||||
@@ -22,19 +23,22 @@ exempt of errors.
|
|||||||
- Craig Nelson
|
- Craig Nelson
|
||||||
- David Blanchet
|
- David Blanchet
|
||||||
- David Maass
|
- David Maass
|
||||||
|
- Dirk (dirk_vdb)
|
||||||
- Emil Ljungdahl
|
- Emil Ljungdahl
|
||||||
- Erik Johansson
|
- Erik Johansson
|
||||||
- Eric Tanguy
|
- Eric Tanguy
|
||||||
- Erwan Velu
|
- Erwan Velu
|
||||||
- Eugene Christensen
|
- Eugene Christensen
|
||||||
- Fabrice Fontaine
|
- Fabrice Fontaine (ffontaine)
|
||||||
- Fredrik Svensson
|
- Fredrik Svensson
|
||||||
- Glen Masgai
|
- Glen Masgai
|
||||||
|
- Gustavo Zacarias (gustavoz)
|
||||||
- Hartmut Holzgraefe (hholzgra)
|
- Hartmut Holzgraefe (hholzgra)
|
||||||
- Iain Denniston (ectotropic)
|
- Iain Denniston (ectotropic)
|
||||||
- Ingo Hofmann
|
- Ingo Hofmann
|
||||||
- Ivan Romanov (ivanromanov)
|
- Ivan Romanov (ivanromanov)
|
||||||
- Jiri Zouhar
|
- Jiri Zouhar
|
||||||
|
- Jean-Francois Dockes (medoc)
|
||||||
- John Dennis
|
- John Dennis
|
||||||
- Jonathan Casiot (no_dice)
|
- Jonathan Casiot (no_dice)
|
||||||
- Josh Carroll
|
- Josh Carroll
|
||||||
@@ -52,15 +56,26 @@ exempt of errors.
|
|||||||
- Oskar Liljeblad
|
- Oskar Liljeblad
|
||||||
- Michael (oxygenic)
|
- Michael (oxygenic)
|
||||||
- Paul Vixie
|
- Paul Vixie
|
||||||
|
- Peng
|
||||||
- Peter Hartley
|
- Peter Hartley
|
||||||
|
- Philipp Matthias Hahn
|
||||||
|
- Pino Toscano (pinotree)
|
||||||
- Rene Hexel
|
- Rene Hexel
|
||||||
|
- Robert Buckley (rbuckley)
|
||||||
- Robert Gingher (robsbox)
|
- Robert Gingher (robsbox)
|
||||||
- Ronan Menard
|
- Ronan Menard
|
||||||
|
- Sebastian Brandt
|
||||||
|
- Shaun Marko (semarko)
|
||||||
- Siva Chandran
|
- Siva Chandran
|
||||||
- Stefan Sommerfeld (zerocom)
|
- Stefan Sommerfeld (zerocom)
|
||||||
- Stéphane Corthésy
|
- Stéphane Corthésy
|
||||||
- Steve Bresson
|
- Steve Bresson
|
||||||
|
- Thijs Schreijer
|
||||||
- Timothy Redaelli
|
- Timothy Redaelli
|
||||||
- Titus Winters
|
- Titus Winters
|
||||||
- Tom (tomdev2)
|
- Tom (tomdev2)
|
||||||
|
- Yoichi Nakayama (yoichi)
|
||||||
|
- zephyrus (zephyrus00jp)
|
||||||
|
- zexian chen
|
||||||
|
- Zheng Peng (darkelf2010)
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
#define PACKAGE_NAME "libupnp"
|
#define PACKAGE_NAME "libupnp"
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
/* Define to the full name and version of this package. */
|
||||||
#define PACKAGE_STRING "libupnp 1.6.14"
|
#define PACKAGE_STRING "libupnp 1.6.20"
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
/* Define to the one symbol short name of this package. */
|
||||||
#define PACKAGE_TARNAME "libupnp"
|
#define PACKAGE_TARNAME "libupnp"
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
#define PACKAGE_URL ""
|
#define PACKAGE_URL ""
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#define PACKAGE_VERSION "1.6.14"
|
#define PACKAGE_VERSION "1.6.20"
|
||||||
|
|
||||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||||
your system. */
|
your system. */
|
||||||
@@ -132,6 +132,9 @@
|
|||||||
/* see upnpconfig.h */
|
/* see upnpconfig.h */
|
||||||
#define UPNP_ENABLE_NOTIFICATION_REORDERING 1
|
#define UPNP_ENABLE_NOTIFICATION_REORDERING 1
|
||||||
|
|
||||||
|
/* see upnpconfig.h */
|
||||||
|
/* #undef UPNP_ENABLE_UNSPECIFIED_SERVER */
|
||||||
|
|
||||||
/* see upnpconfig.h */
|
/* see upnpconfig.h */
|
||||||
#define UPNP_HAVE_CLIENT 1
|
#define UPNP_HAVE_CLIENT 1
|
||||||
|
|
||||||
@@ -141,6 +144,18 @@
|
|||||||
/* see upnpconfig.h */
|
/* see upnpconfig.h */
|
||||||
#define UPNP_HAVE_DEVICE 1
|
#define UPNP_HAVE_DEVICE 1
|
||||||
|
|
||||||
|
/* see upnpconfig.h */
|
||||||
|
#define UPNP_HAVE_GENA 1
|
||||||
|
|
||||||
|
/* see upnpconfig.h */
|
||||||
|
#define UPNP_HAVE_OPTSSDP 1
|
||||||
|
|
||||||
|
/* see upnpconfig.h */
|
||||||
|
#define UPNP_HAVE_SOAP 1
|
||||||
|
|
||||||
|
/* see upnpconfig.h */
|
||||||
|
#define UPNP_HAVE_SSDP 1
|
||||||
|
|
||||||
/* see upnpconfig.h */
|
/* see upnpconfig.h */
|
||||||
#define UPNP_HAVE_TOOLS 1
|
#define UPNP_HAVE_TOOLS 1
|
||||||
|
|
||||||
@@ -157,13 +172,13 @@
|
|||||||
#define UPNP_VERSION_MINOR 6
|
#define UPNP_VERSION_MINOR 6
|
||||||
|
|
||||||
/* see upnpconfig.h */
|
/* see upnpconfig.h */
|
||||||
#define UPNP_VERSION_PATCH 14
|
#define UPNP_VERSION_PATCH 20
|
||||||
|
|
||||||
/* see upnpconfig.h */
|
/* see upnpconfig.h */
|
||||||
#define UPNP_VERSION_STRING "1.6.14"
|
#define UPNP_VERSION_STRING "1.6.20"
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#define VERSION "1.6.14"
|
#define VERSION "1.6.20"
|
||||||
|
|
||||||
/* File Offset size */
|
/* File Offset size */
|
||||||
#define _FILE_OFFSET_BITS 64
|
#define _FILE_OFFSET_BITS 64
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/** The library version (string) e.g. "1.3.0" */
|
/** The library version (string) e.g. "1.3.0" */
|
||||||
#define UPNP_VERSION_STRING "1.6.14"
|
#define UPNP_VERSION_STRING "1.6.20"
|
||||||
|
|
||||||
/** Major version of the library */
|
/** Major version of the library */
|
||||||
#define UPNP_VERSION_MAJOR 1
|
#define UPNP_VERSION_MAJOR 1
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
#define UPNP_VERSION_MINOR 6
|
#define UPNP_VERSION_MINOR 6
|
||||||
|
|
||||||
/** Patch version of the library */
|
/** Patch version of the library */
|
||||||
#define UPNP_VERSION_PATCH 14
|
#define UPNP_VERSION_PATCH 20
|
||||||
|
|
||||||
/** The library version (numeric) e.g. 10300 means version 1.3.0 */
|
/** The library version (numeric) e.g. 10300 means version 1.3.0 */
|
||||||
#define UPNP_VERSION \
|
#define UPNP_VERSION \
|
||||||
@@ -100,6 +100,26 @@
|
|||||||
#define UPNP_HAVE_WEBSERVER 1
|
#define UPNP_HAVE_WEBSERVER 1
|
||||||
|
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with the SSDP part enabled
|
||||||
|
* (i.e. configure --enable-ssdp) */
|
||||||
|
#define UPNP_HAVE_SSDP 1
|
||||||
|
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with optional SSDP headers
|
||||||
|
* support (i.e. configure --enable-optssdp) */
|
||||||
|
#define UPNP_HAVE_OPTSSDP 1
|
||||||
|
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with the SOAP part enabled
|
||||||
|
* (i.e. configure --enable-soap) */
|
||||||
|
#define UPNP_HAVE_SOAP 1
|
||||||
|
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with the GENA part enabled
|
||||||
|
* (i.e. configure --enable-gena) */
|
||||||
|
#define UPNP_HAVE_GENA 1
|
||||||
|
|
||||||
|
|
||||||
/** Defined to 1 if the library has been compiled with helper API
|
/** Defined to 1 if the library has been compiled with helper API
|
||||||
* (i.e. configure --enable-tools) : <upnp/upnptools.h> file is available */
|
* (i.e. configure --enable-tools) : <upnp/upnptools.h> file is available */
|
||||||
#define UPNP_HAVE_TOOLS 1
|
#define UPNP_HAVE_TOOLS 1
|
||||||
@@ -108,5 +128,9 @@
|
|||||||
* (i.e. configure --enable-ipv6) */
|
* (i.e. configure --enable-ipv6) */
|
||||||
/* #undef UPNP_ENABLE_IPV6 */
|
/* #undef UPNP_ENABLE_IPV6 */
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with unspecified SERVER
|
||||||
|
* header (i.e. configure --enable-unspecified_server) */
|
||||||
|
/* #undef UPNP_ENABLE_UNSPECIFIED_SERVER */
|
||||||
|
|
||||||
#endif /* UPNP_CONFIG_H */
|
#endif /* UPNP_CONFIG_H */
|
||||||
|
|
||||||
|
|||||||
3
build/vc10/.gitignore
vendored
Normal file
3
build/vc10/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
361
build/vc10/ixml.vcxproj
Normal file
361
build/vc10/ixml.vcxproj
Normal file
@@ -0,0 +1,361 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug Lib|Win32">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug Lib|x64">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|Win32">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|x64">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{9C2C266D-35A3-465F-A297-0E21D54E5C89}</ProjectGuid>
|
||||||
|
<RootNamespace>ixml</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EnableManagedIncrementalBuild>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</EnableManagedIncrementalBuild>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableManagedIncrementalBuild>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</EnableManagedIncrementalBuild>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">true</EnableManagedIncrementalBuild>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">true</EnableManagedIncrementalBuild>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">true</EnableManagedIncrementalBuild>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<EnableManagedIncrementalBuild Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">true</EnableManagedIncrementalBuild>
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
<BuildLog>
|
||||||
|
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
|
||||||
|
</BuildLog>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\ixml\src\attr.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\document.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\element.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixml.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixmldebug.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixmlmembuf.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixmlparser.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\namedNodeMap.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\node.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\nodeList.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\ixml\inc\ixml.h" />
|
||||||
|
<ClInclude Include="..\..\ixml\inc\ixmldebug.h" />
|
||||||
|
<ClInclude Include="..\..\ixml\src\inc\ixmlmembuf.h" />
|
||||||
|
<ClInclude Include="..\..\ixml\src\inc\ixmlparser.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
59
build/vc10/ixml.vcxproj.filters
Normal file
59
build/vc10/ixml.vcxproj.filters
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\ixml\src\attr.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\document.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\element.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixml.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixmldebug.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixmlmembuf.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixmlparser.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\namedNodeMap.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\node.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\nodeList.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\ixml\inc\ixml.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\ixml\inc\ixmldebug.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\ixml\src\inc\ixmlmembuf.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\ixml\src\inc\ixmlparser.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
147
build/vc10/libupnp.sln
Normal file
147
build/vc10/libupnp.sln
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libupnp", "libupnp.vcxproj", "{6227F51A-1498-4C4A-B213-F6FDED605125}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ixml", "ixml.vcxproj", "{9C2C266D-35A3-465F-A297-0E21D54E5C89}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "threadutil", "threadutil.vcxproj", "{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvctrlpt", "tvctrlpt.vcxproj", "{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvdevice", "tvdevice.vcxproj", "{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvcombo", "tvcombo.vcxproj", "{6365804B-22C6-4D5E-91F3-0C052EB55B4F}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{55AF07A8-18AA-45B8-A231-5082F1C6FC08}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
..\..\AUTHORS = ..\..\AUTHORS
|
||||||
|
..\..\bootstrap = ..\..\bootstrap
|
||||||
|
..\..\ChangeLog = ..\..\ChangeLog
|
||||||
|
..\..\configure.ac = ..\..\configure.ac
|
||||||
|
..\..\COPYING = ..\..\COPYING
|
||||||
|
..\..\Doxyfile = ..\..\Doxyfile
|
||||||
|
..\..\INSTALL = ..\..\INSTALL
|
||||||
|
..\..\libupnp.pc.in = ..\..\libupnp.pc.in
|
||||||
|
..\..\libupnp.spec = ..\..\libupnp.spec
|
||||||
|
..\..\LICENSE = ..\..\LICENSE
|
||||||
|
..\..\Makefile.am = ..\..\Makefile.am
|
||||||
|
..\..\NEWS = ..\..\NEWS
|
||||||
|
..\..\README = ..\..\README
|
||||||
|
..\..\THANKS = ..\..\THANKS
|
||||||
|
..\..\TODO = ..\..\TODO
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug Lib|Win32 = Debug Lib|Win32
|
||||||
|
Debug Lib|x64 = Debug Lib|x64
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Release Lib|Win32 = Release Lib|Win32
|
||||||
|
Release Lib|x64 = Release Lib|x64
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug Lib|x64.Build.0 = Debug Lib|x64
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|Win32.Build.0 = Release Lib|Win32
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|x64.ActiveCfg = Release Lib|x64
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release Lib|x64.Build.0 = Release Lib|x64
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{6227F51A-1498-4C4A-B213-F6FDED605125}.Release|x64.Build.0 = Release|x64
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug Lib|x64.Build.0 = Debug Lib|x64
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|Win32.Build.0 = Release Lib|Win32
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|x64.ActiveCfg = Release Lib|x64
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release Lib|x64.Build.0 = Release Lib|x64
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{9C2C266D-35A3-465F-A297-0E21D54E5C89}.Release|x64.Build.0 = Release|x64
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug Lib|x64.Build.0 = Debug Lib|x64
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|Win32.Build.0 = Release Lib|Win32
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|x64.ActiveCfg = Release Lib|x64
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release Lib|x64.Build.0 = Release Lib|x64
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}.Release|x64.Build.0 = Release|x64
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug Lib|x64.Build.0 = Debug Lib|x64
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|Win32.Build.0 = Release Lib|Win32
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|x64.ActiveCfg = Release Lib|x64
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release Lib|x64.Build.0 = Release Lib|x64
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}.Release|x64.Build.0 = Release|x64
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug Lib|x64.Build.0 = Debug Lib|x64
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|Win32.Build.0 = Release Lib|Win32
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|x64.ActiveCfg = Release Lib|x64
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release Lib|x64.Build.0 = Release Lib|x64
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}.Release|x64.Build.0 = Release|x64
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|Win32.ActiveCfg = Debug Lib|Win32
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|Win32.Build.0 = Debug Lib|Win32
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|x64.ActiveCfg = Debug Lib|x64
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug Lib|x64.Build.0 = Debug Lib|x64
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|Win32.ActiveCfg = Release Lib|Win32
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|Win32.Build.0 = Release Lib|Win32
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|x64.ActiveCfg = Release Lib|x64
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release Lib|x64.Build.0 = Release Lib|x64
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{6365804B-22C6-4D5E-91F3-0C052EB55B4F}.Release|x64.Build.0 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
706
build/vc10/libupnp.vcxproj
Normal file
706
build/vc10/libupnp.vcxproj
Normal file
@@ -0,0 +1,706 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug Lib|Win32">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug Lib|x64">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|Win32">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|x64">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{6227F51A-1498-4C4A-B213-F6FDED605125}</ProjectGuid>
|
||||||
|
<RootNamespace>libupnp</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<TargetEnvironment>Win32</TargetEnvironment>
|
||||||
|
<TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
|
||||||
|
<HeaderFileName>
|
||||||
|
</HeaderFileName>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>
|
||||||
|
</BrowseInformation>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Culture>0x0407</Culture>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||||
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
|
<DataExecutionPrevention>
|
||||||
|
</DataExecutionPrevention>
|
||||||
|
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<Bscmake>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<OutputFile>.\Release/libupnp.bsc</OutputFile>
|
||||||
|
</Bscmake>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>
|
||||||
|
</Command>
|
||||||
|
<Message>Add pthreadVC2.dll to output</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Midl>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
<TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
|
||||||
|
<HeaderFileName>
|
||||||
|
</HeaderFileName>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)\..\inc;$(SolutionDir)\..\msvc;$(SolutionDir)\..\..\upnp\inc;$(SolutionDir)\..\..\upnp\src\inc;$(SolutionDir)\..\..\ixml\inc;$(SolutionDir)\..\..\ixml\src\inc;$(SolutionDir)\..\..\threadutil\inc;$(SolutionDir)\..\..\pthreads;$(SolutionDir)\..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>
|
||||||
|
</BrowseInformation>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Culture>0x0407</Culture>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||||
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
|
<DataExecutionPrevention>
|
||||||
|
</DataExecutionPrevention>
|
||||||
|
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<Bscmake>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<OutputFile>.\Release/libupnp.bsc</OutputFile>
|
||||||
|
</Bscmake>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<TargetEnvironment>Win32</TargetEnvironment>
|
||||||
|
<TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
|
||||||
|
<HeaderFileName>
|
||||||
|
</HeaderFileName>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>
|
||||||
|
</BrowseInformation>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Culture>0x0407</Culture>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
|
<DataExecutionPrevention>
|
||||||
|
</DataExecutionPrevention>
|
||||||
|
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<Bscmake>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<OutputFile>$(OutDir)libupnp.bsc</OutputFile>
|
||||||
|
</Bscmake>
|
||||||
|
<BuildLog>
|
||||||
|
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
|
||||||
|
</BuildLog>
|
||||||
|
<PostBuildEvent />
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message>
|
||||||
|
</Message>
|
||||||
|
<Command>
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Midl>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
<TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
|
||||||
|
<HeaderFileName>
|
||||||
|
</HeaderFileName>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)\..\inc;$(SolutionDir)\..\msvc;$(SolutionDir)\..\..\upnp\inc;$(SolutionDir)\..\..\upnp\src\inc;$(SolutionDir)\..\..\ixml\inc;$(SolutionDir)\..\..\ixml\src\inc;$(SolutionDir)\..\..\threadutil\inc;$(SolutionDir)\..\..\pthreads;$(SolutionDir)\..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>
|
||||||
|
</BrowseInformation>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Culture>0x0407</Culture>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadvc2.lib;ws2_32.lib;iphlpapi.lib;ixml.lib;threadutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
|
<DataExecutionPrevention>
|
||||||
|
</DataExecutionPrevention>
|
||||||
|
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<Bscmake>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<OutputFile>$(OutDir)libupnp.bsc</OutputFile>
|
||||||
|
</Bscmake>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<TargetEnvironment>Win32</TargetEnvironment>
|
||||||
|
<TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
|
||||||
|
<HeaderFileName>
|
||||||
|
</HeaderFileName>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>
|
||||||
|
</BrowseInformation>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Culture>0x0407</Culture>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
<Bscmake>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<OutputFile>$(OutDir)libupnp.bsc</OutputFile>
|
||||||
|
</Bscmake>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
<TypeLibraryName>.\Debug/libupnp.tlb</TypeLibraryName>
|
||||||
|
<HeaderFileName>
|
||||||
|
</HeaderFileName>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)\..\inc;$(SolutionDir)\..\msvc;$(SolutionDir)\..\..\upnp\inc;$(SolutionDir)\..\..\upnp\src\inc;$(SolutionDir)\..\..\ixml\inc;$(SolutionDir)\..\..\ixml\src\inc;$(SolutionDir)\..\..\threadutil\inc;$(SolutionDir)\..\..\pthreads;$(SolutionDir)\..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>
|
||||||
|
</BrowseInformation>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Culture>0x0407</Culture>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
<Bscmake>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<OutputFile>$(OutDir)libupnp.bsc</OutputFile>
|
||||||
|
</Bscmake>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
|
||||||
|
<Midl>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<TargetEnvironment>Win32</TargetEnvironment>
|
||||||
|
<TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
|
||||||
|
<HeaderFileName>
|
||||||
|
</HeaderFileName>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<AdditionalIncludeDirectories>..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>
|
||||||
|
</BrowseInformation>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Culture>0x0407</Culture>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
<Bscmake>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<OutputFile>.\Release/libupnp.bsc</OutputFile>
|
||||||
|
</Bscmake>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
<TypeLibraryName>.\Release/libupnp.tlb</TypeLibraryName>
|
||||||
|
<HeaderFileName>
|
||||||
|
</HeaderFileName>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<AdditionalIncludeDirectories>$(SolutionDir)\..\inc;$(SolutionDir)\..\msvc;$(SolutionDir)\..\..\upnp\inc;$(SolutionDir)\..\..\upnp\src\inc;$(SolutionDir)\..\..\ixml\inc;$(SolutionDir)\..\..\ixml\src\inc;$(SolutionDir)\..\..\threadutil\inc;$(SolutionDir)\..\..\pthreads;$(SolutionDir)\..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>
|
||||||
|
</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>
|
||||||
|
</BrowseInformation>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Culture>0x0407</Culture>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\ixml;$(OutDir)..\lib\threadutil;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
<Bscmake>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<OutputFile>.\Release/libupnp.bsc</OutputFile>
|
||||||
|
</Bscmake>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\ActionComplete.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\ActionRequest.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\attr.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\client_table\client_table.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\client_table\ClientSubscription.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\Discovery.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\document.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\element.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\Event.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\EventSubscribe.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\FileInfo.c" />
|
||||||
|
<ClCompile Include="..\..\threadutil\src\FreeList.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\gena\gena_callback2.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\gena\gena_ctrlpt.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\gena\gena_device.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\http\httpparser.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\http\httpreadwrite.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixml.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixmlmembuf.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixmlparser.c" />
|
||||||
|
<ClCompile Include="..\..\threadutil\src\LinkedList.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\uuid\md5.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\util\membuffer.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\miniserver\miniserver.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\namedNodeMap.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\node.c" />
|
||||||
|
<ClCompile Include="..\..\ixml\src\nodeList.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\http\parsetools.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\service_table\service_table.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\soap\soap_common.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\soap\soap_ctrlpt.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\soap\soap_device.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\sock.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_ctrlpt.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_device.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_ResultData.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_server.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\http\statcodes.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\StateVarComplete.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\StateVarRequest.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\util\strintmap.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\SubscriptionRequest.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\uuid\sysdep.c" />
|
||||||
|
<ClCompile Include="..\..\threadutil\src\ThreadPool.c" />
|
||||||
|
<ClCompile Include="..\..\threadutil\src\TimerThread.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\util\upnp_timeout.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\upnpapi.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\upnpdebug.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\UpnpString.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\upnptools.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\uri\uri.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\urlconfig\urlconfig.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\util\util.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\uuid\uuid.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\http\webserver.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\src\win_dll.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\ActionComplete.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\ActionRequest.h" />
|
||||||
|
<ClInclude Include="..\inc\autoconfig.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\Callback.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\client_table.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\config.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\Discovery.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\Event.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\EventSubscribe.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\FileInfo.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\gena.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\gena_ctrlpt.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\gena_device.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\global.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\gmtdate.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\httpparser.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\httpreadwrite.h" />
|
||||||
|
<ClInclude Include="..\msvc\inttypes.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\md5.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\membuffer.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\miniserver.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\netall.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\parsetools.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\server.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\service_table.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\soaplib.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\sock.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\ssdp\ssdp_ResultData.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\ssdplib.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\statcodes.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\StateVarComplete.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\StateVarRequest.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\statuscodes.h" />
|
||||||
|
<ClInclude Include="..\msvc\stdint.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\strintmap.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\SubscriptionRequest.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\sysdep.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\TemplateInclude.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\TemplateSource.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\TemplateUndef.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\unixutil.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\upnp.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\upnp_timeout.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\upnpapi.h" />
|
||||||
|
<ClInclude Include="..\inc\upnpconfig.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\upnpdebug.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpGlobal.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpInet.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpIntTypes.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpStdInt.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpString.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\upnptools.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpUniStd.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\upnputil.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\uri.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\urlconfig.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\uuid.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\VirtualDir.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\webserver.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="ixml.vcxproj">
|
||||||
|
<Project>{9c2c266d-35a3-465f-a297-0e21d54e5c89}</Project>
|
||||||
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="threadutil.vcxproj">
|
||||||
|
<Project>{1d3eef7a-d248-48c0-b6b5-eca229fe4b3d}</Project>
|
||||||
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
362
build/vc10/libupnp.vcxproj.filters
Normal file
362
build/vc10/libupnp.vcxproj.filters
Normal file
@@ -0,0 +1,362 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="sources">
|
||||||
|
<UniqueIdentifier>{47d40159-145c-4ff3-98f5-9b2c96c80092}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="headers">
|
||||||
|
<UniqueIdentifier>{2a8d348a-a429-4b41-9934-050df3866f50}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\ActionComplete.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\ActionRequest.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\attr.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\client_table\client_table.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\client_table\ClientSubscription.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\Discovery.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\document.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\element.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\Event.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\EventSubscribe.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\FileInfo.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\threadutil\src\FreeList.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\gena\gena_callback2.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\gena\gena_ctrlpt.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\gena\gena_device.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\http\httpparser.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\http\httpreadwrite.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixml.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixmlmembuf.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\ixmlparser.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\threadutil\src\LinkedList.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\uuid\md5.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\util\membuffer.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\miniserver\miniserver.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\namedNodeMap.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\node.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\ixml\src\nodeList.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\http\parsetools.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\service_table\service_table.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\soap\soap_common.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\soap\soap_ctrlpt.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\soap\soap_device.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\sock.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_ctrlpt.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_device.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_ResultData.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\ssdp\ssdp_server.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\http\statcodes.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\StateVarComplete.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\StateVarRequest.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\util\strintmap.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\SubscriptionRequest.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\uuid\sysdep.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\threadutil\src\ThreadPool.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\threadutil\src\TimerThread.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\util\upnp_timeout.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\upnpapi.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\upnpdebug.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\UpnpString.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\api\upnptools.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\uri\uri.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\urlconfig\urlconfig.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\util\util.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\uuid\uuid.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\genlib\net\http\webserver.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\src\win_dll.c">
|
||||||
|
<Filter>sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\ActionComplete.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\ActionRequest.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\inc\autoconfig.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\Callback.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\client_table.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\config.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\Discovery.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\Event.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\EventSubscribe.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\FileInfo.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\gena.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\gena_ctrlpt.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\gena_device.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\global.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\gmtdate.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\httpparser.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\httpreadwrite.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\msvc\inttypes.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\md5.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\membuffer.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\miniserver.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\netall.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\parsetools.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\server.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\service_table.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\soaplib.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\sock.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\ssdp\ssdp_ResultData.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\ssdplib.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\statcodes.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\StateVarComplete.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\StateVarRequest.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\statuscodes.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\msvc\stdint.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\strintmap.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\SubscriptionRequest.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\sysdep.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\TemplateInclude.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\TemplateSource.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\TemplateUndef.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\unixutil.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\upnp.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\upnp_timeout.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\upnpapi.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\inc\upnpconfig.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\upnpdebug.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpGlobal.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpInet.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpIntTypes.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpStdInt.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpString.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\upnptools.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\inc\UpnpUniStd.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\upnputil.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\uri.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\urlconfig.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\uuid.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\VirtualDir.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\src\inc\webserver.h">
|
||||||
|
<Filter>headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
332
build/vc10/threadutil.vcxproj
Normal file
332
build/vc10/threadutil.vcxproj
Normal file
@@ -0,0 +1,332 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug Lib|Win32">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug Lib|x64">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|Win32">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|x64">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}</ProjectGuid>
|
||||||
|
<RootNamespace>threadutil</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\lib\$(ProjectName)\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
<BuildLog>
|
||||||
|
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
|
||||||
|
</BuildLog>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>DEBUG;WIN32;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\threadutil\src\FreeList.c" />
|
||||||
|
<ClCompile Include="..\..\threadutil\src\LinkedList.c" />
|
||||||
|
<ClCompile Include="..\..\threadutil\src\ThreadPool.c" />
|
||||||
|
<ClCompile Include="..\..\threadutil\src\TimerThread.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\threadutil\inc\FreeList.h" />
|
||||||
|
<ClInclude Include="..\..\threadutil\inc\ithread.h" />
|
||||||
|
<ClInclude Include="..\..\threadutil\inc\LinkedList.h" />
|
||||||
|
<ClInclude Include="..\..\threadutil\inc\threadpool.h" />
|
||||||
|
<ClInclude Include="..\..\threadutil\inc\TimerThread.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
44
build/vc10/threadutil.vcxproj.filters
Normal file
44
build/vc10/threadutil.vcxproj.filters
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\threadutil\src\FreeList.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\threadutil\src\LinkedList.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\threadutil\src\ThreadPool.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\threadutil\src\TimerThread.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\threadutil\inc\FreeList.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\threadutil\inc\ithread.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\threadutil\inc\LinkedList.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\threadutil\inc\threadpool.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\threadutil\inc\TimerThread.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
416
build/vc10/tvcombo.vcxproj
Normal file
416
build/vc10/tvcombo.vcxproj
Normal file
@@ -0,0 +1,416 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug Lib|Win32">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug Lib|x64">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|Win32">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|x64">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{6365804B-22C6-4D5E-91F3-0C052EB55B4F}</ProjectGuid>
|
||||||
|
<RootNamespace>tvcombo</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">false</LinkIncremental>
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<BuildLog>
|
||||||
|
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
|
||||||
|
</BuildLog>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\sample_util.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\sample\linux\tv_combo_main.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\tv_ctrlpt.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\tv_device.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\sample_util.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\tv_ctrlpt.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\tv_device.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="libupnp.vcxproj">
|
||||||
|
<Project>{6227f51a-1498-4c4a-b213-f6fded605125}</Project>
|
||||||
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
38
build/vc10/tvcombo.vcxproj.filters
Normal file
38
build/vc10/tvcombo.vcxproj.filters
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\sample_util.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\linux\tv_combo_main.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\tv_ctrlpt.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\tv_device.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\sample_util.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\tv_ctrlpt.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\tv_device.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
414
build/vc10/tvctrlpt.vcxproj
Normal file
414
build/vc10/tvctrlpt.vcxproj
Normal file
@@ -0,0 +1,414 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug Lib|Win32">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug Lib|x64">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|Win32">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|x64">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{8FB56F1C-E617-4B79-96AE-1FA499A3A9B5}</ProjectGuid>
|
||||||
|
<RootNamespace>sample</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)\out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">false</LinkIncremental>
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<BuildLog>
|
||||||
|
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
|
||||||
|
</BuildLog>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\sample_util.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\tv_ctrlpt.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\sample\linux\tv_ctrlpt_main.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\sample_util.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\tv_ctrlpt.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="libupnp.vcxproj">
|
||||||
|
<Project>{6227f51a-1498-4c4a-b213-f6fded605125}</Project>
|
||||||
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
32
build/vc10/tvctrlpt.vcxproj.filters
Normal file
32
build/vc10/tvctrlpt.vcxproj.filters
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\sample_util.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\tv_ctrlpt.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\linux\tv_ctrlpt_main.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\sample_util.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\tv_ctrlpt.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
423
build/vc10/tvdevice.vcxproj
Normal file
423
build/vc10/tvdevice.vcxproj
Normal file
@@ -0,0 +1,423 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug Lib|Win32">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug Lib|x64">
|
||||||
|
<Configuration>Debug Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|Win32">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release Lib|x64">
|
||||||
|
<Configuration>Release Lib</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{7FB5F4A6-74F9-471D-B358-BAA0AC1CCA0A}</ProjectGuid>
|
||||||
|
<RootNamespace>tvdevice</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">$(SolutionDir)out.vc10.$(Platform)\$(Configuration)\tmp\$(ProjectName)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">false</LinkIncremental>
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<BuildLog>
|
||||||
|
<Path>$(IntDir)$(MSBuildProjectName).log</Path>
|
||||||
|
</BuildLog>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;RELEASE;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;DEBUG;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib\libupnp;$(OutDir)..\lib\threadutil;$(OutDir)..\lib\ixml;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy "$(SolutionDir)..\..\pthreads\lib\pthread*.dll" "$(OutDir)"
|
||||||
|
mkdir "$(OutDir)web"
|
||||||
|
xcopy "$(SolutionDir)..\..\upnp\sample\web" "$(OutDir)web" /S /E /Y
|
||||||
|
</Command>
|
||||||
|
<Message>Copy sample web folder and pthreadVC2.dll to output dir</Message>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Lib|x64'">
|
||||||
|
<Midl>
|
||||||
|
<TargetEnvironment>X64</TargetEnvironment>
|
||||||
|
</Midl>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;RELEASE;_WINDOWS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_NONSTDC_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL;_SCL_SECURE_NO_WARNINGS;_SCL_SECURE_NO_DEPRECATE;_AFX_SECURE_NO_WARNINGS;_AFX_SECURE_NO_DEPRECATE;_SECURE_ATL;_ATL_NO_COM_SUPPORT;_ATL_SECURE_NO_WARNINGS;_ATL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||||
|
<ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<AdditionalDependencies>pthreadVC2.lib;ixml.lib;threadutil.lib;libupnp.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>..\..\pthreads\;..\..\pthreads\lib;$(OutDir)..\lib;$(OutDir)..\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\sample_util.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\tv_device.c" />
|
||||||
|
<ClCompile Include="..\..\upnp\sample\linux\tv_device_main.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\sample_util.h" />
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\tv_device.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="libupnp.vcxproj">
|
||||||
|
<Project>{6227f51a-1498-4c4a-b213-f6fded605125}</Project>
|
||||||
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\..\upnp\sample\web\tvcombodesc.xml" />
|
||||||
|
<None Include="..\..\upnp\sample\web\tvcontrolSCPD.xml" />
|
||||||
|
<None Include="..\..\upnp\sample\web\tvdevicedesc.xml" />
|
||||||
|
<None Include="..\..\upnp\sample\web\tvdevicepres.html" />
|
||||||
|
<None Include="..\..\upnp\sample\web\tvpictureSCPD.xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
52
build/vc10/tvdevice.vcxproj.filters
Normal file
52
build/vc10/tvdevice.vcxproj.filters
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="SampleDeviceXMLs">
|
||||||
|
<UniqueIdentifier>{3953a023-20c4-4d35-860e-ec802019076c}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\sample_util.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\common\tv_device.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\upnp\sample\linux\tv_device_main.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\sample_util.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\upnp\sample\common\tv_device.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\..\upnp\sample\web\tvcombodesc.xml">
|
||||||
|
<Filter>SampleDeviceXMLs</Filter>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\upnp\sample\web\tvcontrolSCPD.xml">
|
||||||
|
<Filter>SampleDeviceXMLs</Filter>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\upnp\sample\web\tvdevicedesc.xml">
|
||||||
|
<Filter>SampleDeviceXMLs</Filter>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\upnp\sample\web\tvdevicepres.html">
|
||||||
|
<Filter>SampleDeviceXMLs</Filter>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\upnp\sample\web\tvpictureSCPD.xml">
|
||||||
|
<Filter>SampleDeviceXMLs</Filter>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -103,8 +103,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc"
|
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
|
||||||
PreprocessorDefinitions="WIN32;IXML_INLINE="
|
PreprocessorDefinitions="WIN32;DEBUG;IXML_INLINE="
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="true"
|
Detect64BitPortabilityProblems="true"
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
Optimization="2"
|
Optimization="2"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
AdditionalIncludeDirectories="..\..\pthreads\include;..\..\ixml\src\inc;..\..\ixml\inc;..\..\threadutil\inc;..\..\upnp\inc;..\..\upnp\src\inc;..\inc;..\msvc"
|
AdditionalIncludeDirectories="..\..\pthreads\include;..\..\ixml\src\inc;..\..\ixml\inc;..\..\threadutil\inc;..\..\upnp\inc;..\..\upnp\src\inc;..\inc;..\msvc"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;PTW32_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS"
|
||||||
StringPooling="true"
|
StringPooling="true"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
EnableFunctionLevelLinking="true"
|
EnableFunctionLevelLinking="true"
|
||||||
@@ -80,8 +80,8 @@
|
|||||||
OutputFile="$(OutDir)\libupnp.dll"
|
OutputFile="$(OutDir)\libupnp.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
ProgramDatabaseFile=".\Release/libupnp.pdb"
|
ProgramDatabaseFile="$(OutDir)\libupnp.pdb"
|
||||||
ImportLibrary=".\Release/libupnp.lib"
|
ImportLibrary="$(OutDir)\libupnp.lib"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile=".\Release/libupnp.bsc"
|
OutputFile="$(OutDir)\libupnp.bsc"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCFxCopTool"
|
Name="VCFxCopTool"
|
||||||
@@ -218,14 +218,6 @@
|
|||||||
Name="sources"
|
Name="sources"
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
>
|
>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\ActionComplete.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\ActionRequest.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\ixml\src\attr.c"
|
RelativePath="..\..\ixml\src\attr.c"
|
||||||
>
|
>
|
||||||
@@ -234,10 +226,6 @@
|
|||||||
RelativePath="..\..\upnp\src\genlib\client_table\client_table.c"
|
RelativePath="..\..\upnp\src\genlib\client_table\client_table.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\Discovery.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\ixml\src\document.c"
|
RelativePath="..\..\ixml\src\document.c"
|
||||||
>
|
>
|
||||||
@@ -246,18 +234,6 @@
|
|||||||
RelativePath="..\..\ixml\src\element.c"
|
RelativePath="..\..\ixml\src\element.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\Event.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\EventSubscribe.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\FileInfo.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\threadutil\src\FreeList.c"
|
RelativePath="..\..\threadutil\src\FreeList.c"
|
||||||
>
|
>
|
||||||
@@ -358,10 +334,6 @@
|
|||||||
RelativePath="..\..\upnp\src\ssdp\ssdp_device.c"
|
RelativePath="..\..\upnp\src\ssdp\ssdp_device.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\ssdp\ssdp_ResultData.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\ssdp\ssdp_server.c"
|
RelativePath="..\..\upnp\src\ssdp\ssdp_server.c"
|
||||||
>
|
>
|
||||||
@@ -370,22 +342,10 @@
|
|||||||
RelativePath="..\..\upnp\src\genlib\net\http\statcodes.c"
|
RelativePath="..\..\upnp\src\genlib\net\http\statcodes.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\StateVarComplete.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\StateVarRequest.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\genlib\util\strintmap.c"
|
RelativePath="..\..\upnp\src\genlib\util\strintmap.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\SubscriptionRequest.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\uuid\sysdep.c"
|
RelativePath="..\..\upnp\src\uuid\sysdep.c"
|
||||||
>
|
>
|
||||||
@@ -447,14 +407,6 @@
|
|||||||
Name="headers"
|
Name="headers"
|
||||||
Filter="h;hpp;hxx;hm;inl"
|
Filter="h;hpp;hxx;hm;inl"
|
||||||
>
|
>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\ActionComplete.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\actionrequest.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\inc\client_table.h"
|
RelativePath="..\..\upnp\src\inc\client_table.h"
|
||||||
>
|
>
|
||||||
@@ -463,22 +415,6 @@
|
|||||||
RelativePath="..\..\upnp\src\inc\config.h"
|
RelativePath="..\..\upnp\src\inc\config.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\discovery.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\Event.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\EventSubscribe.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\FileInfo.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\inc\gena.h"
|
RelativePath="..\..\upnp\src\inc\gena.h"
|
||||||
>
|
>
|
||||||
@@ -563,14 +499,6 @@
|
|||||||
RelativePath="..\..\upnp\src\inc\statcodes.h"
|
RelativePath="..\..\upnp\src\inc\statcodes.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\StateVarComplete.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\statevarrequest.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\inc\statuscodes.h"
|
RelativePath="..\..\upnp\src\inc\statuscodes.h"
|
||||||
>
|
>
|
||||||
@@ -579,10 +507,6 @@
|
|||||||
RelativePath="..\..\upnp\src\inc\strintmap.h"
|
RelativePath="..\..\upnp\src\inc\strintmap.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\SubscriptionRequest.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\inc\sysdep.h"
|
RelativePath="..\..\upnp\src\inc\sysdep.h"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include"
|
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include"
|
||||||
PreprocessorDefinitions="WIN32;DEBUG"
|
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
@@ -80,9 +80,9 @@
|
|||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
|
||||||
ConfigurationType="1"
|
ConfigurationType="4"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
>
|
>
|
||||||
@@ -103,6 +103,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include"
|
||||||
|
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="true"
|
Detect64BitPortabilityProblems="true"
|
||||||
@@ -118,18 +120,11 @@
|
|||||||
Name="VCPreLinkEventTool"
|
Name="VCPreLinkEventTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLibrarianTool"
|
||||||
GenerateDebugInformation="true"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
TargetMachine="1"
|
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXDCMakeTool"
|
Name="VCXDCMakeTool"
|
||||||
/>
|
/>
|
||||||
@@ -139,12 +134,6 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCFxCopTool"
|
Name="VCFxCopTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvcombo;..\..\upnp\sample\tvcombo\linux"
|
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvcombo;..\..\upnp\sample\tvcombo\linux"
|
||||||
PreprocessorDefinitions="WIN32;DEBUG"
|
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
@@ -91,8 +91,8 @@
|
|||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -114,6 +114,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvcombo;..\..\upnp\sample\tvcombo\linux"
|
||||||
|
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="true"
|
Detect64BitPortabilityProblems="true"
|
||||||
@@ -130,6 +132,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
|
||||||
|
AdditionalLibraryDirectories=""$(OutDir)";"out.vc8.$(ConfigurationName)\ixml";"out.vc8.$(ConfigurationName)\threadutil";"out.vc8.$(ConfigurationName)\libupnp""
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
@@ -174,15 +178,15 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\sample\tvcombo\linux\upnp_tv_combo_main.c"
|
RelativePath="..\..\upnp\sample\linux\tv_combo_main.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_ctrlpt.c"
|
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_device.c"
|
RelativePath="..\..\upnp\sample\common\tv_device.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt;..\..\upnp\sample\tvctrlpt\linux"
|
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt;..\..\upnp\sample\tvctrlpt\linux"
|
||||||
PreprocessorDefinitions="WIN32;DEBUG"
|
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
@@ -91,8 +91,8 @@
|
|||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -114,6 +114,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt;..\..\upnp\sample\tvctrlpt\linux"
|
||||||
|
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="true"
|
Detect64BitPortabilityProblems="true"
|
||||||
@@ -130,6 +132,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
|
||||||
|
AdditionalLibraryDirectories=""$(OutDir)";"out.vc8.$(ConfigurationName)\ixml";"out.vc8.$(ConfigurationName)\threadutil";"out.vc8.$(ConfigurationName)\libupnp""
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
@@ -174,11 +178,11 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\sample\tvctrlpt\upnp_tv_ctrlpt.c"
|
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\sample\tvctrlpt\linux\upnp_tv_ctrlpt_main.c"
|
RelativePath="..\..\upnp\sample\linux\tv_ctrlpt_main.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
|
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
|
||||||
PreprocessorDefinitions="WIN32;DEBUG"
|
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
@@ -91,8 +91,8 @@
|
|||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -114,6 +114,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
|
||||||
|
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="true"
|
Detect64BitPortabilityProblems="true"
|
||||||
@@ -130,6 +132,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
|
||||||
|
AdditionalLibraryDirectories=""$(OutDir)";"out.vc8.$(ConfigurationName)\ixml";"out.vc8.$(ConfigurationName)\threadutil";"out.vc8.$(ConfigurationName)\libupnp""
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
@@ -174,11 +178,11 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\sample\tvdevice\upnp_tv_device.c"
|
RelativePath="..\..\upnp\sample\common\tv_device.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\sample\tvdevice\linux\upnp_tv_device_main.c"
|
RelativePath="..\..\upnp\sample\linux\tv_device_main.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
EnableManagedIncrementalBuild="1"
|
EnableManagedIncrementalBuild="1"
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|x64"
|
Name="Debug|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
EnableManagedIncrementalBuild="1"
|
EnableManagedIncrementalBuild="1"
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|x64"
|
Name="Release|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -297,7 +297,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|Win32"
|
Name="Debug Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
EnableManagedIncrementalBuild="1"
|
EnableManagedIncrementalBuild="1"
|
||||||
@@ -364,7 +364,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|x64"
|
Name="Debug Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
EnableManagedIncrementalBuild="1"
|
EnableManagedIncrementalBuild="1"
|
||||||
@@ -432,7 +432,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|Win32"
|
Name="Release Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -502,7 +502,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|x64"
|
Name="Release Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="2"
|
ConfigurationType="2"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|x64"
|
Name="Release|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="2"
|
ConfigurationType="2"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="2"
|
ConfigurationType="2"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
@@ -329,7 +329,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|x64"
|
Name="Debug|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="2"
|
ConfigurationType="2"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
@@ -427,7 +427,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|Win32"
|
Name="Debug Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
@@ -508,7 +508,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|x64"
|
Name="Debug Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
@@ -589,7 +589,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|Win32"
|
Name="Release Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
@@ -674,7 +674,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|x64"
|
Name="Release Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
@@ -764,14 +764,6 @@
|
|||||||
Name="sources"
|
Name="sources"
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
>
|
>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\ActionComplete.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\ActionRequest.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\ixml\src\attr.c"
|
RelativePath="..\..\ixml\src\attr.c"
|
||||||
>
|
>
|
||||||
@@ -780,14 +772,6 @@
|
|||||||
RelativePath="..\..\upnp\src\genlib\client_table\client_table.c"
|
RelativePath="..\..\upnp\src\genlib\client_table\client_table.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\genlib\client_table\ClientSubscription.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\Discovery.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\ixml\src\document.c"
|
RelativePath="..\..\ixml\src\document.c"
|
||||||
>
|
>
|
||||||
@@ -796,18 +780,6 @@
|
|||||||
RelativePath="..\..\ixml\src\element.c"
|
RelativePath="..\..\ixml\src\element.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\Event.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\EventSubscribe.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\FileInfo.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\threadutil\src\FreeList.c"
|
RelativePath="..\..\threadutil\src\FreeList.c"
|
||||||
>
|
>
|
||||||
@@ -904,10 +876,6 @@
|
|||||||
RelativePath="..\..\upnp\src\ssdp\ssdp_device.c"
|
RelativePath="..\..\upnp\src\ssdp\ssdp_device.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\ssdp\ssdp_ResultData.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\ssdp\ssdp_server.c"
|
RelativePath="..\..\upnp\src\ssdp\ssdp_server.c"
|
||||||
>
|
>
|
||||||
@@ -916,22 +884,10 @@
|
|||||||
RelativePath="..\..\upnp\src\genlib\net\http\statcodes.c"
|
RelativePath="..\..\upnp\src\genlib\net\http\statcodes.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\StateVarComplete.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\StateVarRequest.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\genlib\util\strintmap.c"
|
RelativePath="..\..\upnp\src\genlib\util\strintmap.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\src\api\SubscriptionRequest.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\uuid\sysdep.c"
|
RelativePath="..\..\upnp\src\uuid\sysdep.c"
|
||||||
>
|
>
|
||||||
@@ -993,14 +949,6 @@
|
|||||||
Name="headers"
|
Name="headers"
|
||||||
Filter="h;hpp;hxx;hm;inl"
|
Filter="h;hpp;hxx;hm;inl"
|
||||||
>
|
>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\ActionComplete.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\ActionRequest.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\inc\autoconfig.h"
|
RelativePath="..\inc\autoconfig.h"
|
||||||
>
|
>
|
||||||
@@ -1017,22 +965,6 @@
|
|||||||
RelativePath="..\..\upnp\src\inc\config.h"
|
RelativePath="..\..\upnp\src\inc\config.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\Discovery.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\Event.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\EventSubscribe.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\FileInfo.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\inc\gena.h"
|
RelativePath="..\..\upnp\src\inc\gena.h"
|
||||||
>
|
>
|
||||||
@@ -1113,14 +1045,6 @@
|
|||||||
RelativePath="..\..\upnp\src\inc\statcodes.h"
|
RelativePath="..\..\upnp\src\inc\statcodes.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\StateVarComplete.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\StateVarRequest.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\inc\statuscodes.h"
|
RelativePath="..\..\upnp\src\inc\statuscodes.h"
|
||||||
>
|
>
|
||||||
@@ -1133,10 +1057,6 @@
|
|||||||
RelativePath="..\..\upnp\src\inc\strintmap.h"
|
RelativePath="..\..\upnp\src\inc\strintmap.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\upnp\inc\SubscriptionRequest.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\upnp\src\inc\sysdep.h"
|
RelativePath="..\..\upnp\src\inc\sysdep.h"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
>
|
>
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|x64"
|
Name="Debug|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
>
|
>
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|x64"
|
Name="Release|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -289,7 +289,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|Win32"
|
Name="Debug Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
>
|
>
|
||||||
@@ -354,7 +354,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|x64"
|
Name="Debug Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
>
|
>
|
||||||
@@ -420,7 +420,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|Win32"
|
Name="Release Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -488,7 +488,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|x64"
|
Name="Release Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
>
|
>
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|x64"
|
Name="Debug|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
>
|
>
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|x64"
|
Name="Release|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -339,7 +339,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|Win32"
|
Name="Debug Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
>
|
>
|
||||||
@@ -416,7 +416,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|x64"
|
Name="Debug Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
>
|
>
|
||||||
@@ -494,7 +494,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|Win32"
|
Name="Release Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -575,7 +575,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|x64"
|
Name="Release Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
>
|
>
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|x64"
|
Name="Debug|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
>
|
>
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|x64"
|
Name="Release|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -339,7 +339,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|Win32"
|
Name="Debug Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
>
|
>
|
||||||
@@ -416,7 +416,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|x64"
|
Name="Debug Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
>
|
>
|
||||||
@@ -494,7 +494,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|Win32"
|
Name="Release Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -575,7 +575,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|x64"
|
Name="Release Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
>
|
>
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|x64"
|
Name="Debug|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
>
|
>
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|x64"
|
Name="Release|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -339,7 +339,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|Win32"
|
Name="Debug Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
>
|
>
|
||||||
@@ -416,7 +416,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug Lib|x64"
|
Name="Debug Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
>
|
>
|
||||||
@@ -494,7 +494,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|Win32"
|
Name="Release Lib|Win32"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
@@ -575,7 +575,7 @@
|
|||||||
<Configuration
|
<Configuration
|
||||||
Name="Release Lib|x64"
|
Name="Release Lib|x64"
|
||||||
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
|
||||||
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\"
|
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="2"
|
CharacterSet="2"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
|
|||||||
119
configure.ac
119
configure.ac
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
AC_PREREQ(2.60)
|
AC_PREREQ(2.60)
|
||||||
|
|
||||||
AC_INIT([libupnp], [1.6.14], [mroberto@users.sourceforge.net])
|
AC_INIT([libupnp], [1.6.20], [mroberto@users.sourceforge.net])
|
||||||
dnl ############################################################################
|
dnl ############################################################################
|
||||||
dnl # *Independently* of the above libupnp package version, the libtool version
|
dnl # *Independently* of the above libupnp package version, the libtool version
|
||||||
dnl # of the 3 libraries need to be updated whenever there is a change released:
|
dnl # of the 3 libraries need to be updated whenever there is a change released:
|
||||||
@@ -270,9 +270,90 @@ dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
|
|||||||
dnl #AC_SUBST([LT_VERSION_UPNP], [8:0:2])
|
dnl #AC_SUBST([LT_VERSION_UPNP], [8:0:2])
|
||||||
dnl #
|
dnl #
|
||||||
dnl ############################################################################
|
dnl ############################################################################
|
||||||
AC_SUBST([LT_VERSION_IXML], [2:6:0])
|
dnl # Release 1.6.15:
|
||||||
AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
|
dnl # "current:revision:age"
|
||||||
AC_SUBST([LT_VERSION_UPNP], [8:0:2])
|
dnl #
|
||||||
|
dnl # - Code has changed in upnp
|
||||||
|
dnl # revision: 0 -> 1
|
||||||
|
dnl #
|
||||||
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_UPNP], [8:1:2])
|
||||||
|
dnl #
|
||||||
|
dnl ############################################################################
|
||||||
|
dnl # Release 1.6.16:
|
||||||
|
dnl # "current:revision:age"
|
||||||
|
dnl #
|
||||||
|
dnl # - Code has changed in ixml
|
||||||
|
dnl # revision: 6 -> 7
|
||||||
|
dnl # - Code has changed in threadutil
|
||||||
|
dnl # revision: 0 -> 1
|
||||||
|
dnl # - Code has changed in upnp
|
||||||
|
dnl # revision: 1 -> 2
|
||||||
|
dnl # - interface changed/added/removed in upnp
|
||||||
|
dnl # current++(9); revision = 0
|
||||||
|
dnl # - interface added in upnp
|
||||||
|
dnl # age++(3)
|
||||||
|
dnl #
|
||||||
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:7:0])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:1:0])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_UPNP], [9:0:3])
|
||||||
|
dnl #
|
||||||
|
dnl ############################################################################
|
||||||
|
dnl # Release 1.6.17:
|
||||||
|
dnl # "current:revision:age"
|
||||||
|
dnl #
|
||||||
|
dnl # - Code has changed in threadutil
|
||||||
|
dnl # revision: 1 -> 2
|
||||||
|
dnl # - Code has changed in upnp
|
||||||
|
dnl # revision: 0 -> 1
|
||||||
|
dnl #
|
||||||
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:7:0])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:2:0])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_UPNP], [9:1:3])
|
||||||
|
dnl #
|
||||||
|
dnl ############################################################################
|
||||||
|
dnl # Release 1.6.18:
|
||||||
|
dnl # "current:revision:age"
|
||||||
|
dnl #
|
||||||
|
dnl # - Code has changed in ixml
|
||||||
|
dnl # revision: 7 -> 8
|
||||||
|
dnl # - Code has changed in threadutil
|
||||||
|
dnl # revision: 2 -> 3
|
||||||
|
dnl # - Code has changed in upnp
|
||||||
|
dnl # revision: 1 -> 2
|
||||||
|
dnl #
|
||||||
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:8:0])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:3:0])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_UPNP], [9:2:3])
|
||||||
|
dnl #
|
||||||
|
dnl ############################################################################
|
||||||
|
dnl # Release 1.6.19:
|
||||||
|
dnl # "current:revision:age"
|
||||||
|
dnl #
|
||||||
|
dnl # - Code has changed in threadutil
|
||||||
|
dnl # revision: 3 -> 4
|
||||||
|
dnl # - Code has changed in upnp
|
||||||
|
dnl # revision: 2 -> 3
|
||||||
|
dnl #
|
||||||
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:8:0])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:4:0])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_UPNP], [9:3:3])
|
||||||
|
dnl #
|
||||||
|
dnl ############################################################################
|
||||||
|
dnl # Release 1.6.20:
|
||||||
|
dnl # "current:revision:age"
|
||||||
|
dnl #
|
||||||
|
dnl # -
|
||||||
|
dnl #
|
||||||
|
dnl #AC_SUBST([LT_VERSION_IXML], [::])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [::])
|
||||||
|
dnl #AC_SUBST([LT_VERSION_UPNP], [::])
|
||||||
|
dnl #
|
||||||
|
dnl ############################################################################
|
||||||
|
AC_SUBST([LT_VERSION_IXML], [2:8:0])
|
||||||
|
AC_SUBST([LT_VERSION_THREADUTIL], [6:4:0])
|
||||||
|
AC_SUBST([LT_VERSION_UPNP], [9:3:3])
|
||||||
dnl ############################################################################
|
dnl ############################################################################
|
||||||
dnl # Repeating the algorithm to place it closer to the modificatin place:
|
dnl # Repeating the algorithm to place it closer to the modificatin place:
|
||||||
dnl # - library code modified: revision++
|
dnl # - library code modified: revision++
|
||||||
@@ -360,6 +441,29 @@ if test "x$enable_webserver" = xyes ; then
|
|||||||
AC_DEFINE(UPNP_HAVE_WEBSERVER, 1, [see upnpconfig.h])
|
AC_DEFINE(UPNP_HAVE_WEBSERVER, 1, [see upnpconfig.h])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
RT_BOOL_ARG_ENABLE([ssdp], [yes], [SSDP part])
|
||||||
|
if test "x$enable_ssdp" = xyes ; then
|
||||||
|
AC_DEFINE(UPNP_HAVE_SSDP, 1, [see upnpconfig.h])
|
||||||
|
fi
|
||||||
|
|
||||||
|
RT_BOOL_ARG_ENABLE([optssdp], [yes], [optionnal SSDP headers support)])
|
||||||
|
if test "x$enable_optssdp" = xyes ; then
|
||||||
|
AC_DEFINE(UPNP_HAVE_OPTSSDP, 1, [see upnpconfig.h])
|
||||||
|
enable_uuid=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
RT_BOOL_ARG_ENABLE([soap], [yes], [SOAP part])
|
||||||
|
if test "x$enable_soap" = xyes ; then
|
||||||
|
AC_DEFINE(UPNP_HAVE_SOAP, 1, [see upnpconfig.h])
|
||||||
|
fi
|
||||||
|
|
||||||
|
RT_BOOL_ARG_ENABLE([gena], [yes], [GENA part])
|
||||||
|
if test "x$enable_gena" = xyes ; then
|
||||||
|
AC_DEFINE(UPNP_HAVE_GENA, 1, [see upnpconfig.h])
|
||||||
|
enable_uuid=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(ENABLE_UUID, test x"$enable_uuid" = xyes)
|
||||||
|
|
||||||
RT_BOOL_ARG_ENABLE([tools], [yes], [helper APIs in upnptools.h])
|
RT_BOOL_ARG_ENABLE([tools], [yes], [helper APIs in upnptools.h])
|
||||||
if test "x$enable_tools" = xyes ; then
|
if test "x$enable_tools" = xyes ; then
|
||||||
@@ -371,6 +475,11 @@ if test "x$enable_ipv6" = xyes ; then
|
|||||||
AC_DEFINE(UPNP_ENABLE_IPV6, 1, [see upnpconfig.h])
|
AC_DEFINE(UPNP_ENABLE_IPV6, 1, [see upnpconfig.h])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
RT_BOOL_ARG_ENABLE([unspecified_server], [no], [unspecified SERVER header])
|
||||||
|
if test "x$enable_unspecified_server" = xyes ; then
|
||||||
|
AC_DEFINE(UPNP_ENABLE_UNSPECIFIED_SERVER, 1, [see upnpconfig.h])
|
||||||
|
fi
|
||||||
|
|
||||||
RT_BOOL_ARG_ENABLE([notification_reordering], [yes], [GENA notification reordering in gena_device.c])
|
RT_BOOL_ARG_ENABLE([notification_reordering], [yes], [GENA notification reordering in gena_device.c])
|
||||||
if test "x$enable_notification_reordering" = xyes ; then
|
if test "x$enable_notification_reordering" = xyes ; then
|
||||||
AC_DEFINE(UPNP_ENABLE_NOTIFICATION_REORDERING, 1, [see upnpconfig.h])
|
AC_DEFINE(UPNP_ENABLE_NOTIFICATION_REORDERING, 1, [see upnpconfig.h])
|
||||||
@@ -422,6 +531,7 @@ AC_MSG_RESULT($docdir)
|
|||||||
#
|
#
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
|
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
@@ -615,6 +725,7 @@ AC_OUTPUT
|
|||||||
# Files copied for windows compilation.
|
# Files copied for windows compilation.
|
||||||
#
|
#
|
||||||
echo "configure: copying \"autoconfig.h\" to \"build/inc/autoconfig.h\""
|
echo "configure: copying \"autoconfig.h\" to \"build/inc/autoconfig.h\""
|
||||||
|
test -d build/inc || mkdir -p build/inc
|
||||||
cp autoconfig.h build/inc/autoconfig.h
|
cp autoconfig.h build/inc/autoconfig.h
|
||||||
echo "configure: copying \"upnp/inc/upnpconfig.h\" to \"build/inc/upnpconfig.h\""
|
echo "configure: copying \"upnp/inc/upnpconfig.h\" to \"build/inc/upnpconfig.h\""
|
||||||
cp upnp/inc/upnpconfig.h build/inc/upnpconfig.h
|
cp upnp/inc/upnpconfig.h build/inc/upnpconfig.h
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
SUBDIRS = doc
|
SUBDIRS = doc
|
||||||
|
|
||||||
AM_CPPFLAGS = -I$(srcdir)/inc -I$(srcdir)/src/inc
|
AM_CPPFLAGS = -I$(srcdir)/inc -I$(srcdir)/src/inc \
|
||||||
|
-I$(top_srcdir)/upnp/inc
|
||||||
AM_CFLAGS =
|
AM_CFLAGS =
|
||||||
|
|
||||||
LDADD = libixml.la
|
LDADD = libixml.la
|
||||||
|
|||||||
@@ -738,7 +738,7 @@ EXPORT_SPEC int ixmlDocument_createDocumentEx(
|
|||||||
* \return A pointer to the new \b Document object with the nodeName set to
|
* \return A pointer to the new \b Document object with the nodeName set to
|
||||||
* "#document" or \c NULL on failure.
|
* "#document" or \c NULL on failure.
|
||||||
*/
|
*/
|
||||||
EXPORT_SPEC IXML_Document *ixmlDocument_createDocument();
|
EXPORT_SPEC IXML_Document *ixmlDocument_createDocument(void);
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -143,6 +144,7 @@ int ixmlDocument_createElementEx(
|
|||||||
newElement->n.nodeType = eELEMENT_NODE;
|
newElement->n.nodeType = eELEMENT_NODE;
|
||||||
newElement->n.nodeName = strdup(tagName);
|
newElement->n.nodeName = strdup(tagName);
|
||||||
if (newElement->n.nodeName == NULL) {
|
if (newElement->n.nodeName == NULL) {
|
||||||
|
free(newElement->tagName);
|
||||||
ixmlElement_free(newElement);
|
ixmlElement_free(newElement);
|
||||||
newElement = NULL;
|
newElement = NULL;
|
||||||
errCode = IXML_INSUFFICIENT_MEMORY;
|
errCode = IXML_INSUFFICIENT_MEMORY;
|
||||||
@@ -163,8 +165,14 @@ IXML_Element *ixmlDocument_createElement(
|
|||||||
const DOMString tagName)
|
const DOMString tagName)
|
||||||
{
|
{
|
||||||
IXML_Element *newElement = NULL;
|
IXML_Element *newElement = NULL;
|
||||||
|
int ret = IXML_SUCCESS;
|
||||||
|
|
||||||
ixmlDocument_createElementEx(doc, tagName, &newElement);
|
ret = ixmlDocument_createElementEx(doc, tagName, &newElement);
|
||||||
|
if (ret != IXML_SUCCESS) {
|
||||||
|
IxmlPrintf(__FILE__, __LINE__, "ixmlDocument_createElement",
|
||||||
|
"Error %d\n", ret);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
return newElement;
|
return newElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +191,7 @@ int ixmlDocument_createDocumentEx(IXML_Document **rtDoc)
|
|||||||
|
|
||||||
ixmlDocument_init(doc);
|
ixmlDocument_init(doc);
|
||||||
|
|
||||||
doc->n.nodeName = strdup(DOCUMENTNODENAME);
|
doc->n.nodeName = strdup((const char*)DOCUMENTNODENAME);
|
||||||
if (doc->n.nodeName == NULL) {
|
if (doc->n.nodeName == NULL) {
|
||||||
ixmlDocument_free(doc);
|
ixmlDocument_free(doc);
|
||||||
doc = NULL;
|
doc = NULL;
|
||||||
@@ -232,7 +240,7 @@ int ixmlDocument_createTextNodeEx(
|
|||||||
/* initialize the node */
|
/* initialize the node */
|
||||||
ixmlNode_init(returnNode);
|
ixmlNode_init(returnNode);
|
||||||
|
|
||||||
returnNode->nodeName = strdup(TEXTNODENAME);
|
returnNode->nodeName = strdup((const char*)TEXTNODENAME);
|
||||||
if (returnNode->nodeName == NULL) {
|
if (returnNode->nodeName == NULL) {
|
||||||
ixmlNode_free(returnNode);
|
ixmlNode_free(returnNode);
|
||||||
returnNode = NULL;
|
returnNode = NULL;
|
||||||
@@ -318,7 +326,8 @@ IXML_Attr *ixmlDocument_createAttribute(
|
|||||||
{
|
{
|
||||||
IXML_Attr *attrNode = NULL;
|
IXML_Attr *attrNode = NULL;
|
||||||
|
|
||||||
ixmlDocument_createAttributeEx(doc, name, &attrNode);
|
if(ixmlDocument_createAttributeEx(doc, name, &attrNode) != IXML_SUCCESS)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
return attrNode;
|
return attrNode;
|
||||||
}
|
}
|
||||||
@@ -401,7 +410,7 @@ int ixmlDocument_createCDATASectionEx(
|
|||||||
|
|
||||||
ixmlCDATASection_init(cDSectionNode);
|
ixmlCDATASection_init(cDSectionNode);
|
||||||
cDSectionNode->n.nodeType = eCDATA_SECTION_NODE;
|
cDSectionNode->n.nodeType = eCDATA_SECTION_NODE;
|
||||||
cDSectionNode->n.nodeName = strdup(CDATANODENAME);
|
cDSectionNode->n.nodeName = strdup((const char*)CDATANODENAME);
|
||||||
if (cDSectionNode->n.nodeName == NULL) {
|
if (cDSectionNode->n.nodeName == NULL) {
|
||||||
ixmlCDATASection_free(cDSectionNode);
|
ixmlCDATASection_free(cDSectionNode);
|
||||||
cDSectionNode = NULL;
|
cDSectionNode = NULL;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -232,55 +233,42 @@ int ixmlElement_setAttributeNode(
|
|||||||
IXML_Node *preSib = NULL;
|
IXML_Node *preSib = NULL;
|
||||||
IXML_Node *nextSib = NULL;
|
IXML_Node *nextSib = NULL;
|
||||||
|
|
||||||
if (element == NULL || newAttr == NULL) {
|
if (!element || !newAttr)
|
||||||
return IXML_INVALID_PARAMETER;
|
return IXML_INVALID_PARAMETER;
|
||||||
}
|
if (newAttr->n.ownerDocument != element->n.ownerDocument)
|
||||||
|
|
||||||
if (newAttr->n.ownerDocument != element->n.ownerDocument) {
|
|
||||||
return IXML_WRONG_DOCUMENT_ERR;
|
return IXML_WRONG_DOCUMENT_ERR;
|
||||||
}
|
if (newAttr->ownerElement)
|
||||||
|
|
||||||
if (newAttr->ownerElement != NULL) {
|
|
||||||
return IXML_INUSE_ATTRIBUTE_ERR;
|
return IXML_INUSE_ATTRIBUTE_ERR;
|
||||||
}
|
|
||||||
|
|
||||||
newAttr->ownerElement = element;
|
newAttr->ownerElement = element;
|
||||||
node = (IXML_Node *)newAttr;
|
node = (IXML_Node *)newAttr;
|
||||||
|
|
||||||
attrNode = element->n.firstAttr;
|
attrNode = element->n.firstAttr;
|
||||||
while (attrNode != NULL) {
|
while (attrNode) {
|
||||||
if (strcmp(attrNode->nodeName, node->nodeName) == 0) {
|
if (!strcmp(attrNode->nodeName, node->nodeName))
|
||||||
/* Found it */
|
/* Found it */
|
||||||
break;
|
break;
|
||||||
} else {
|
else
|
||||||
attrNode = attrNode->nextSibling;
|
attrNode = attrNode->nextSibling;
|
||||||
}
|
}
|
||||||
}
|
if (attrNode) {
|
||||||
|
|
||||||
if (attrNode != NULL) {
|
|
||||||
/* Already present, will replace by newAttr */
|
/* Already present, will replace by newAttr */
|
||||||
preSib = attrNode->prevSibling;
|
preSib = attrNode->prevSibling;
|
||||||
nextSib = attrNode->nextSibling;
|
nextSib = attrNode->nextSibling;
|
||||||
if (preSib != NULL) {
|
if (preSib)
|
||||||
preSib->nextSibling = node;
|
preSib->nextSibling = node;
|
||||||
}
|
if (nextSib)
|
||||||
if (nextSib != NULL) {
|
|
||||||
nextSib->prevSibling = node;
|
nextSib->prevSibling = node;
|
||||||
}
|
if (element->n.firstAttr == attrNode)
|
||||||
if (element->n.firstAttr == attrNode) {
|
|
||||||
element->n.firstAttr = node;
|
element->n.firstAttr = node;
|
||||||
}
|
if (rtAttr)
|
||||||
if (rtAttr != NULL) {
|
|
||||||
*rtAttr = (IXML_Attr *)attrNode;
|
*rtAttr = (IXML_Attr *)attrNode;
|
||||||
} else {
|
else
|
||||||
ixmlAttr_free((IXML_Attr *)attrNode);
|
ixmlAttr_free((IXML_Attr *)attrNode);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* Add this attribute */
|
/* Add this attribute */
|
||||||
if (element->n.firstAttr != NULL) {
|
if (element->n.firstAttr) {
|
||||||
prevAttr = element->n.firstAttr;
|
prevAttr = element->n.firstAttr;
|
||||||
nextAttr = prevAttr->nextSibling;
|
nextAttr = prevAttr->nextSibling;
|
||||||
while (nextAttr != NULL) {
|
while (nextAttr) {
|
||||||
prevAttr = nextAttr;
|
prevAttr = nextAttr;
|
||||||
nextAttr = prevAttr->nextSibling;
|
nextAttr = prevAttr->nextSibling;
|
||||||
}
|
}
|
||||||
@@ -292,11 +280,9 @@ int ixmlElement_setAttributeNode(
|
|||||||
node->prevSibling = NULL;
|
node->prevSibling = NULL;
|
||||||
node->nextSibling = NULL;
|
node->nextSibling = NULL;
|
||||||
}
|
}
|
||||||
|
if (rtAttr)
|
||||||
if (rtAttr != NULL) {
|
|
||||||
*rtAttr = NULL;
|
*rtAttr = NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return IXML_SUCCESS;
|
return IXML_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -445,7 +431,7 @@ int ixmlElement_setAttributeNS(
|
|||||||
|
|
||||||
/* see DOM 2 spec page 59 */
|
/* see DOM 2 spec page 59 */
|
||||||
if ((newAttrNode.prefix != NULL && namespaceURI == NULL) ||
|
if ((newAttrNode.prefix != NULL && namespaceURI == NULL) ||
|
||||||
(strcmp(newAttrNode.prefix, "xml") == 0 &&
|
(newAttrNode.prefix != NULL && strcmp(newAttrNode.prefix, "xml") == 0 &&
|
||||||
strcmp(namespaceURI, "http://www.w3.org/XML/1998/namespace") != 0) ||
|
strcmp(namespaceURI, "http://www.w3.org/XML/1998/namespace") != 0) ||
|
||||||
(strcmp(qualifiedName, "xmlns") == 0 &&
|
(strcmp(qualifiedName, "xmlns") == 0 &&
|
||||||
strcmp(namespaceURI, "http://www.w3.org/2000/xmlns/") != 0)) {
|
strcmp(namespaceURI, "http://www.w3.org/2000/xmlns/") != 0)) {
|
||||||
@@ -469,11 +455,14 @@ int ixmlElement_setAttributeNS(
|
|||||||
free(attrNode->prefix);
|
free(attrNode->prefix);
|
||||||
}
|
}
|
||||||
/* replace it with the new prefix */
|
/* replace it with the new prefix */
|
||||||
|
if (newAttrNode.prefix != NULL) {
|
||||||
attrNode->prefix = strdup( newAttrNode.prefix );
|
attrNode->prefix = strdup( newAttrNode.prefix );
|
||||||
if (attrNode->prefix == NULL) {
|
if (attrNode->prefix == NULL) {
|
||||||
Parser_freeNodeContent(&newAttrNode);
|
Parser_freeNodeContent(&newAttrNode);
|
||||||
return IXML_INSUFFICIENT_MEMORY;
|
return IXML_INSUFFICIENT_MEMORY;
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
attrNode->prefix = newAttrNode.prefix;
|
||||||
|
|
||||||
if (attrNode->nodeValue != NULL) {
|
if (attrNode->nodeValue != NULL) {
|
||||||
free(attrNode->nodeValue);
|
free(attrNode->nodeValue);
|
||||||
@@ -492,15 +481,18 @@ int ixmlElement_setAttributeNS(
|
|||||||
qualifiedName,
|
qualifiedName,
|
||||||
&newAttr);
|
&newAttr);
|
||||||
if (rc != IXML_SUCCESS) {
|
if (rc != IXML_SUCCESS) {
|
||||||
|
Parser_freeNodeContent(&newAttrNode);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
newAttr->n.nodeValue = strdup(value);
|
newAttr->n.nodeValue = strdup(value);
|
||||||
if (newAttr->n.nodeValue == NULL) {
|
if (newAttr->n.nodeValue == NULL) {
|
||||||
ixmlAttr_free(newAttr);
|
ixmlAttr_free(newAttr);
|
||||||
|
Parser_freeNodeContent(&newAttrNode);
|
||||||
return IXML_INSUFFICIENT_MEMORY;
|
return IXML_INSUFFICIENT_MEMORY;
|
||||||
}
|
}
|
||||||
if (ixmlElement_setAttributeNodeNS(element, newAttr, NULL) != IXML_SUCCESS) {
|
if (ixmlElement_setAttributeNodeNS(element, newAttr, &newAttr) != IXML_SUCCESS) {
|
||||||
ixmlAttr_free(newAttr);
|
ixmlAttr_free(newAttr);
|
||||||
|
Parser_freeNodeContent(&newAttrNode);
|
||||||
return IXML_FAILED;
|
return IXML_FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -49,7 +50,7 @@
|
|||||||
#define MAXVAL(a, b) ( (a) > (b) ? (a) : (b) )
|
#define MAXVAL(a, b) ( (a) > (b) ? (a) : (b) )
|
||||||
|
|
||||||
|
|
||||||
#define MEMBUF_DEF_SIZE_INC 20
|
#define MEMBUF_DEF_SIZE_INC 20u
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ static void copy_with_escape(
|
|||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return;
|
return;
|
||||||
plen = strlen(p);
|
plen = strlen(p);
|
||||||
for (i = 0; i < plen; ++i) {
|
for (i = (size_t)0; i < plen; ++i) {
|
||||||
switch (p[i]) {
|
switch (p[i]) {
|
||||||
case '<':
|
case '<':
|
||||||
ixml_membuf_append_str(buf, "<");
|
ixml_membuf_append_str(buf, "<");
|
||||||
@@ -175,7 +175,7 @@ static void ixmlPrintDomTreeRecursive(
|
|||||||
default:
|
default:
|
||||||
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTreeRecursive",
|
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTreeRecursive",
|
||||||
"Warning, unknown node type %d\n",
|
"Warning, unknown node type %d\n",
|
||||||
ixmlNode_getNodeType(nodeptr));
|
(int)ixmlNode_getNodeType(nodeptr));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,7 +247,7 @@ static void ixmlPrintDomTree(
|
|||||||
default:
|
default:
|
||||||
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTree",
|
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTree",
|
||||||
"Warning, unknown node type %d\n",
|
"Warning, unknown node type %d\n",
|
||||||
ixmlNode_getNodeType(nodeptr));
|
(int)ixmlNode_getNodeType(nodeptr));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,7 +318,7 @@ static void ixmlDomTreetoString(
|
|||||||
default:
|
default:
|
||||||
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTreeRecursive",
|
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTreeRecursive",
|
||||||
"Warning, unknown node type %d\n",
|
"Warning, unknown node type %d\n",
|
||||||
ixmlNode_getNodeType(nodeptr));
|
(int)ixmlNode_getNodeType(nodeptr));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -87,11 +88,11 @@ static int ixml_membuf_set_size(
|
|||||||
|
|
||||||
assert(alloc_len >= new_length);
|
assert(alloc_len >= new_length);
|
||||||
|
|
||||||
temp_buf = realloc(m->buf, alloc_len + 1);
|
temp_buf = realloc(m->buf, alloc_len + (size_t)1);
|
||||||
if (temp_buf == NULL) {
|
if (temp_buf == NULL) {
|
||||||
/* try smaller size */
|
/* try smaller size */
|
||||||
alloc_len = new_length;
|
alloc_len = new_length;
|
||||||
temp_buf = realloc(m->buf, alloc_len + 1);
|
temp_buf = realloc(m->buf, alloc_len + (size_t)1);
|
||||||
if (temp_buf == NULL) {
|
if (temp_buf == NULL) {
|
||||||
return IXML_INSUFFICIENT_MEMORY;
|
return IXML_INSUFFICIENT_MEMORY;
|
||||||
}
|
}
|
||||||
@@ -110,8 +111,8 @@ void ixml_membuf_init(ixml_membuf *m)
|
|||||||
|
|
||||||
m->size_inc = MEMBUF_DEF_SIZE_INC;
|
m->size_inc = MEMBUF_DEF_SIZE_INC;
|
||||||
m->buf = NULL;
|
m->buf = NULL;
|
||||||
m->length = 0;
|
m->length = (size_t)0;
|
||||||
m->capacity = 0;
|
m->capacity = (size_t)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -171,7 +172,7 @@ int ixml_membuf_append(
|
|||||||
{
|
{
|
||||||
assert(m != NULL);
|
assert(m != NULL);
|
||||||
|
|
||||||
return ixml_membuf_insert(m, buf, 1, m->length);
|
return ixml_membuf_insert(m, buf, (size_t)1, m->length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -197,7 +198,7 @@ int ixml_membuf_insert(
|
|||||||
return IXML_INDEX_SIZE_ERR;
|
return IXML_INDEX_SIZE_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf == NULL || buf_len == 0) {
|
if (buf == NULL || buf_len == (size_t)0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* alloc mem */
|
/* alloc mem */
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -409,7 +410,7 @@ static void Parser_skipWhiteSpaces(
|
|||||||
Parser *xmlParser)
|
Parser *xmlParser)
|
||||||
{
|
{
|
||||||
while( ( *( xmlParser->curPtr ) != 0 ) &&
|
while( ( *( xmlParser->curPtr ) != 0 ) &&
|
||||||
( strchr( WHITESPACE, *( xmlParser->curPtr ) ) != NULL ) ) {
|
( strchr( WHITESPACE, ( int ) *( xmlParser->curPtr ) ) != NULL ) ) {
|
||||||
xmlParser->curPtr++;
|
xmlParser->curPtr++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -693,12 +694,12 @@ static BOOL Parser_isNameChar(
|
|||||||
/*! [in] TRUE if you also want to check in the NameChar table. */
|
/*! [in] TRUE if you also want to check in the NameChar table. */
|
||||||
BOOL bNameChar)
|
BOOL bNameChar)
|
||||||
{
|
{
|
||||||
if (Parser_isCharInTable(c, Letter, LETTERTABLESIZE)) {
|
if (Parser_isCharInTable(c, Letter, (int)LETTERTABLESIZE)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bNameChar &&
|
if (bNameChar &&
|
||||||
Parser_isCharInTable(c, NameChar, NAMECHARTABLESIZE)) {
|
Parser_isCharInTable(c, NameChar, (int)NAMECHARTABLESIZE)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -745,7 +746,7 @@ static int Parser_getChar(
|
|||||||
|
|
||||||
*cLen = 0;
|
*cLen = 0;
|
||||||
if (*src != '&') {
|
if (*src != '&') {
|
||||||
if (*src > 0 && Parser_isXmlChar(*src)) {
|
if (*src > 0 && Parser_isXmlChar((int)*src)) {
|
||||||
*cLen = 1;
|
*cLen = 1;
|
||||||
ret = *src;
|
ret = *src;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
@@ -762,30 +763,30 @@ static int Parser_getChar(
|
|||||||
ret = i;
|
ret = i;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else if (strncasecmp(src, QUOT, strlen(QUOT)) == 0) {
|
} else if (strncasecmp(src, QUOT, strlen(QUOT)) == 0) {
|
||||||
*cLen = strlen(QUOT);
|
*cLen = (int)strlen(QUOT);
|
||||||
ret = '"';
|
ret = '"';
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else if (strncasecmp(src, LT, strlen(LT)) == 0) {
|
} else if (strncasecmp(src, LT, strlen(LT)) == 0) {
|
||||||
*cLen = strlen(LT);
|
*cLen = (int)strlen(LT);
|
||||||
ret = '<';
|
ret = '<';
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else if (strncasecmp(src, GT, strlen(GT)) == 0) {
|
} else if (strncasecmp(src, GT, strlen(GT)) == 0) {
|
||||||
*cLen = strlen(GT);
|
*cLen = (int)strlen(GT);
|
||||||
ret = '>';
|
ret = '>';
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else if (strncasecmp(src, APOS, strlen(APOS)) == 0) {
|
} else if (strncasecmp(src, APOS, strlen(APOS)) == 0) {
|
||||||
*cLen = strlen(APOS);
|
*cLen = (int)strlen(APOS);
|
||||||
ret = '\'';
|
ret = '\'';
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else if (strncasecmp(src, AMP, strlen(AMP)) == 0) {
|
} else if (strncasecmp(src, AMP, strlen(AMP)) == 0) {
|
||||||
*cLen = strlen(AMP);
|
*cLen = (int)strlen(AMP);
|
||||||
ret = '&';
|
ret = '&';
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else if (strncasecmp(src, ESC_HEX, strlen(ESC_HEX)) == 0) {
|
} else if (strncasecmp(src, ESC_HEX, strlen(ESC_HEX)) == 0) {
|
||||||
/* Read in escape characters of type &#xnn where nn is a hexadecimal value */
|
/* Read in escape characters of type &#xnn where nn is a hexadecimal value */
|
||||||
pnum = src + strlen( ESC_HEX );
|
pnum = src + strlen( ESC_HEX );
|
||||||
sum = 0;
|
sum = 0;
|
||||||
while (strchr(HEX_NUMBERS, *pnum) != 0) {
|
while (strchr(HEX_NUMBERS, (int)*pnum) != 0) {
|
||||||
c = *pnum;
|
c = *pnum;
|
||||||
if (c <= '9') {
|
if (c <= '9') {
|
||||||
sum = sum * 16 + ( c - '0' );
|
sum = sum * 16 + ( c - '0' );
|
||||||
@@ -807,7 +808,7 @@ static int Parser_getChar(
|
|||||||
/* Read in escape characters of type &#nn where nn is a decimal value */
|
/* Read in escape characters of type &#nn where nn is a decimal value */
|
||||||
pnum = src + strlen(ESC_DEC);
|
pnum = src + strlen(ESC_DEC);
|
||||||
sum = 0;
|
sum = 0;
|
||||||
while (strchr(DEC_NUMBERS, *pnum) != 0) {
|
while (strchr(DEC_NUMBERS, (int)*pnum) != 0) {
|
||||||
sum = sum * 10 + ( *pnum - '0' );
|
sum = sum * 10 + ( *pnum - '0' );
|
||||||
pnum++;
|
pnum++;
|
||||||
}
|
}
|
||||||
@@ -1095,7 +1096,7 @@ static char *safe_strdup(
|
|||||||
assert(s != NULL);
|
assert(s != NULL);
|
||||||
|
|
||||||
if (s == NULL) {
|
if (s == NULL) {
|
||||||
return strdup("");
|
return strdup((const char*)"");
|
||||||
}
|
}
|
||||||
return strdup(s);
|
return strdup(s);
|
||||||
}
|
}
|
||||||
@@ -1214,7 +1215,7 @@ static int Parser_processCDSect(
|
|||||||
IXML_Node *node)
|
IXML_Node *node)
|
||||||
{
|
{
|
||||||
char *pEnd;
|
char *pEnd;
|
||||||
size_t tokenLength = 0;
|
size_t tokenLength = (size_t)0;
|
||||||
char *pCDataStart;
|
char *pCDataStart;
|
||||||
|
|
||||||
if( *pSrc == NULL ) {
|
if( *pSrc == NULL ) {
|
||||||
@@ -1223,7 +1224,7 @@ static int Parser_processCDSect(
|
|||||||
|
|
||||||
pCDataStart = *pSrc + strlen( CDSTART );
|
pCDataStart = *pSrc + strlen( CDSTART );
|
||||||
pEnd = pCDataStart;
|
pEnd = pCDataStart;
|
||||||
while( ( Parser_isXmlChar( *pEnd ) == TRUE ) && ( *pEnd != '\0' ) ) {
|
while( ( Parser_isXmlChar( (int)*pEnd ) == TRUE ) && ( *pEnd != '\0' ) ) {
|
||||||
if( strncmp( pEnd, CDEND, strlen( CDEND ) ) == 0 ) {
|
if( strncmp( pEnd, CDEND, strlen( CDEND ) ) == 0 ) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@@ -1232,8 +1233,8 @@ static int Parser_processCDSect(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( ( pEnd - pCDataStart > 0 ) && ( *pEnd != '\0' ) ) {
|
if( ( pEnd - pCDataStart > 0 ) && ( *pEnd != '\0' ) ) {
|
||||||
tokenLength = (size_t)(pEnd - pCDataStart);
|
tokenLength = (size_t)pEnd - (size_t)pCDataStart;
|
||||||
node->nodeValue = (char *)malloc(tokenLength + 1);
|
node->nodeValue = (char *)malloc(tokenLength + (size_t)1);
|
||||||
if( node->nodeValue == NULL ) {
|
if( node->nodeValue == NULL ) {
|
||||||
return IXML_INSUFFICIENT_MEMORY;
|
return IXML_INSUFFICIENT_MEMORY;
|
||||||
}
|
}
|
||||||
@@ -1268,7 +1269,6 @@ static int Parser_processContent(
|
|||||||
int ret = IXML_SUCCESS;
|
int ret = IXML_SUCCESS;
|
||||||
int line = 0;
|
int line = 0;
|
||||||
char *pEndContent;
|
char *pEndContent;
|
||||||
BOOL bReadContent;
|
|
||||||
ptrdiff_t tokenLength;
|
ptrdiff_t tokenLength;
|
||||||
const char *notAllowed = "]]>";
|
const char *notAllowed = "]]>";
|
||||||
char *pCurToken = NULL;
|
char *pCurToken = NULL;
|
||||||
@@ -1324,10 +1324,6 @@ static int Parser_processContent(
|
|||||||
pEndContent++;
|
pEndContent++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*pEndContent == '\0') {
|
|
||||||
bReadContent = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strncmp(pEndContent, (const char *)notAllowed, strlen(notAllowed)) == 0) {
|
if (strncmp(pEndContent, (const char *)notAllowed, strlen(notAllowed)) == 0) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = IXML_SYNTAX_ERR;
|
ret = IXML_SYNTAX_ERR;
|
||||||
@@ -1455,6 +1451,7 @@ ExitFunction:
|
|||||||
*
|
*
|
||||||
* \return IXML_SUCCESS.
|
* \return IXML_SUCCESS.
|
||||||
*/
|
*/
|
||||||
|
#if 0
|
||||||
static int Parser_parseReference(
|
static int Parser_parseReference(
|
||||||
/*! [in] Currently unused. */
|
/*! [in] Currently unused. */
|
||||||
char *pStr)
|
char *pStr)
|
||||||
@@ -1463,6 +1460,7 @@ static int Parser_parseReference(
|
|||||||
return IXML_SUCCESS;
|
return IXML_SUCCESS;
|
||||||
pStr = pStr;
|
pStr = pStr;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -1508,40 +1506,32 @@ static int Parser_addNamespace(
|
|||||||
|
|
||||||
pNode = xmlParser->pNeedPrefixNode;
|
pNode = xmlParser->pNeedPrefixNode;
|
||||||
pCur = xmlParser->pCurElement;
|
pCur = xmlParser->pCurElement;
|
||||||
|
if (!pNode->prefix) {
|
||||||
if( pNode->prefix == NULL ) {
|
|
||||||
/* element does not have prefix */
|
/* element does not have prefix */
|
||||||
if( strcmp( pNode->nodeName, pCur->element ) != 0 ) {
|
if (strcmp(pNode->nodeName, pCur->element) != 0)
|
||||||
return IXML_FAILED;
|
return IXML_FAILED;
|
||||||
}
|
if (pCur->namespaceUri) {
|
||||||
if( pCur->namespaceUri != NULL ) {
|
|
||||||
/* it would be wrong that pNode->namespace != NULL. */
|
/* it would be wrong that pNode->namespace != NULL. */
|
||||||
assert( pNode->namespaceURI == NULL );
|
assert(pNode->namespaceURI == NULL);
|
||||||
|
pNode->namespaceURI = safe_strdup(pCur->namespaceUri);
|
||||||
pNode->namespaceURI = safe_strdup( pCur->namespaceUri );
|
if (!pNode->namespaceURI)
|
||||||
if( pNode->namespaceURI == NULL ) {
|
|
||||||
return IXML_INSUFFICIENT_MEMORY;
|
return IXML_INSUFFICIENT_MEMORY;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
xmlParser->pNeedPrefixNode = NULL;
|
xmlParser->pNeedPrefixNode = NULL;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if( ( strcmp( pNode->nodeName, pCur->element ) != 0 ) &&
|
if (!pCur->prefix ||
|
||||||
( strcmp( pNode->prefix, pCur->prefix ) != 0 ) ) {
|
((strcmp(pNode->nodeName, pCur->element) != 0) &&
|
||||||
|
(strcmp(pNode->prefix, pCur->prefix) != 0)))
|
||||||
return IXML_FAILED;
|
return IXML_FAILED;
|
||||||
}
|
namespaceUri = Parser_getNameSpace(xmlParser, pCur->prefix);
|
||||||
|
if (namespaceUri) {
|
||||||
namespaceUri = Parser_getNameSpace( xmlParser, pCur->prefix );
|
pNode->namespaceURI = safe_strdup(namespaceUri);
|
||||||
if( namespaceUri != NULL ) {
|
if (!pNode->namespaceURI)
|
||||||
pNode->namespaceURI = safe_strdup( namespaceUri );
|
|
||||||
if( pNode->namespaceURI == NULL ) {
|
|
||||||
return IXML_INSUFFICIENT_MEMORY;
|
return IXML_INSUFFICIENT_MEMORY;
|
||||||
}
|
|
||||||
|
|
||||||
xmlParser->pNeedPrefixNode = NULL;
|
xmlParser->pNeedPrefixNode = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return IXML_SUCCESS;
|
return IXML_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1593,6 +1583,9 @@ static int Parser_xmlNamespace(
|
|||||||
}
|
}
|
||||||
if (pCur->prefix != NULL &&
|
if (pCur->prefix != NULL &&
|
||||||
strcmp(pCur->prefix, newNode->localName) == 0) {
|
strcmp(pCur->prefix, newNode->localName) == 0) {
|
||||||
|
if (pCur->namespaceUri != NULL) {
|
||||||
|
free(pCur->namespaceUri);
|
||||||
|
}
|
||||||
pCur->namespaceUri = safe_strdup(newNode->nodeValue);
|
pCur->namespaceUri = safe_strdup(newNode->nodeValue);
|
||||||
if (pCur->namespaceUri == NULL) {
|
if (pCur->namespaceUri == NULL) {
|
||||||
ret = IXML_INSUFFICIENT_MEMORY;
|
ret = IXML_INSUFFICIENT_MEMORY;
|
||||||
@@ -1755,9 +1748,9 @@ static int Parser_processAttribute(
|
|||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
if (*pCur == '&') {
|
/*if (*pCur == '&') {
|
||||||
Parser_parseReference(++pCur);
|
Parser_parseReference(++pCur);
|
||||||
}
|
}*/
|
||||||
pCur++;
|
pCur++;
|
||||||
}
|
}
|
||||||
/* clear token buffer */
|
/* clear token buffer */
|
||||||
@@ -1843,7 +1836,7 @@ static int Parser_getNextNode(
|
|||||||
{
|
{
|
||||||
char *pCurToken = NULL;
|
char *pCurToken = NULL;
|
||||||
char *lastElement = NULL;
|
char *lastElement = NULL;
|
||||||
IXML_ERRORCODE ret = IXML_SUCCESS;
|
int ret = IXML_SUCCESS;
|
||||||
int line = 0;
|
int line = 0;
|
||||||
ptrdiff_t tokenLen = 0;
|
ptrdiff_t tokenLen = 0;
|
||||||
|
|
||||||
@@ -1855,11 +1848,12 @@ static int Parser_getNextNode(
|
|||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xmlParser->state == eCONTENT) {
|
switch (xmlParser->state) {
|
||||||
|
case eCONTENT:
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = Parser_processContent(xmlParser, node);
|
ret = Parser_processContent(xmlParser, node);
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else {
|
default:
|
||||||
Parser_skipWhiteSpaces(xmlParser);
|
Parser_skipWhiteSpaces(xmlParser);
|
||||||
tokenLen = Parser_getNextToken(xmlParser);
|
tokenLen = Parser_getNextToken(xmlParser);
|
||||||
if (tokenLen == 0 &&
|
if (tokenLen == 0 &&
|
||||||
@@ -1869,7 +1863,7 @@ static int Parser_getNextNode(
|
|||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = IXML_SUCCESS;
|
ret = IXML_SUCCESS;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else if ((xmlParser->tokenBuf).length == 0) {
|
} else if ((xmlParser->tokenBuf).length == (size_t)0) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = IXML_SYNTAX_ERR;
|
ret = IXML_SYNTAX_ERR;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
@@ -1909,12 +1903,20 @@ static int Parser_getNextNode(
|
|||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = IXML_SUCCESS;
|
ret = IXML_SUCCESS;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else if (xmlParser->state == eATTRIBUTE && xmlParser->pCurElement != NULL) {
|
} else if (xmlParser->pCurElement != NULL) {
|
||||||
|
switch (xmlParser->state) {
|
||||||
|
case eATTRIBUTE:
|
||||||
if (Parser_processAttribute(xmlParser, node) != IXML_SUCCESS) {
|
if (Parser_processAttribute(xmlParser, node) != IXML_SUCCESS) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = IXML_SYNTAX_ERR;
|
ret = IXML_SYNTAX_ERR;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
line = __LINE__;
|
||||||
|
ret = IXML_SYNTAX_ERR;
|
||||||
|
goto ExitFunction;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = IXML_SYNTAX_ERR;
|
ret = IXML_SYNTAX_ERR;
|
||||||
@@ -2050,11 +2052,15 @@ static int Parser_processAttributeName(
|
|||||||
|
|
||||||
rc = ixmlNode_setNodeProperties( ( IXML_Node * ) attr, newNode );
|
rc = ixmlNode_setNodeProperties( ( IXML_Node * ) attr, newNode );
|
||||||
if( rc != IXML_SUCCESS ) {
|
if( rc != IXML_SUCCESS ) {
|
||||||
|
ixmlAttr_free( attr );
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = ixmlElement_setAttributeNode(
|
rc = ixmlElement_setAttributeNode(
|
||||||
(IXML_Element *)xmlParser->currentNodePtr, attr, NULL );
|
(IXML_Element *)xmlParser->currentNodePtr, attr, NULL );
|
||||||
|
if( rc != IXML_SUCCESS ) {
|
||||||
|
ixmlAttr_free( attr );
|
||||||
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2142,8 +2148,6 @@ static int isTopLevelElement(
|
|||||||
static BOOL Parser_hasDefaultNamespace(
|
static BOOL Parser_hasDefaultNamespace(
|
||||||
/*! [in] The XML parser. */
|
/*! [in] The XML parser. */
|
||||||
Parser *xmlParser,
|
Parser *xmlParser,
|
||||||
/*! [in] The Node to process. */
|
|
||||||
IXML_Node *newNode,
|
|
||||||
/*! [in,out] The name space URI. */
|
/*! [in,out] The name space URI. */
|
||||||
char **nsURI )
|
char **nsURI )
|
||||||
{
|
{
|
||||||
@@ -2159,7 +2163,6 @@ static BOOL Parser_hasDefaultNamespace(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
newNode = newNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2212,11 +2215,17 @@ static int Parser_processElementName(
|
|||||||
} else {
|
} else {
|
||||||
/* does element has default namespace */
|
/* does element has default namespace */
|
||||||
/* the node may have default namespace definition */
|
/* the node may have default namespace definition */
|
||||||
if (Parser_hasDefaultNamespace(xmlParser, newNode, &nsURI)) {
|
if (Parser_hasDefaultNamespace(xmlParser, &nsURI)) {
|
||||||
Parser_setElementNamespace(newElement, nsURI);
|
Parser_setElementNamespace(newElement, nsURI);
|
||||||
} else if (xmlParser->state == eATTRIBUTE) {
|
} else {
|
||||||
|
switch (xmlParser->state) {
|
||||||
|
case eATTRIBUTE:
|
||||||
/* the default namespace maybe defined later */
|
/* the default namespace maybe defined later */
|
||||||
xmlParser->pNeedPrefixNode = (IXML_Node *)newElement;
|
xmlParser->pNeedPrefixNode = (IXML_Node *)newElement;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2246,14 +2255,14 @@ static int Parser_isValidEndElement(
|
|||||||
IXML_Node *newNode)
|
IXML_Node *newNode)
|
||||||
{
|
{
|
||||||
assert(xmlParser);
|
assert(xmlParser);
|
||||||
assert(xmlParser->pCurElement->element);
|
|
||||||
assert(newNode);
|
|
||||||
assert(newNode->nodeName);
|
|
||||||
|
|
||||||
if (xmlParser->pCurElement == NULL) {
|
if (xmlParser->pCurElement == NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(xmlParser->pCurElement->element);
|
||||||
|
assert(newNode);
|
||||||
|
assert(newNode->nodeName);
|
||||||
return strcmp(xmlParser->pCurElement->element, newNode->nodeName) == 0;
|
return strcmp(xmlParser->pCurElement->element, newNode->nodeName) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2297,13 +2306,17 @@ static int Parser_eTagVerification(
|
|||||||
assert( newNode->nodeName );
|
assert( newNode->nodeName );
|
||||||
assert( xmlParser->currentNodePtr );
|
assert( xmlParser->currentNodePtr );
|
||||||
|
|
||||||
if( newNode->nodeType == eELEMENT_NODE ) {
|
switch( newNode->nodeType ) {
|
||||||
|
case eELEMENT_NODE:
|
||||||
if( Parser_isValidEndElement( xmlParser, newNode ) == TRUE ) {
|
if( Parser_isValidEndElement( xmlParser, newNode ) == TRUE ) {
|
||||||
Parser_popElement( xmlParser );
|
Parser_popElement( xmlParser );
|
||||||
} else {
|
} else {
|
||||||
/* syntax error */
|
/* syntax error */
|
||||||
return IXML_SYNTAX_ERR;
|
return IXML_SYNTAX_ERR;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( strcmp( newNode->nodeName, xmlParser->currentNodePtr->nodeName ) ==
|
if( strcmp( newNode->nodeName, xmlParser->currentNodePtr->nodeName ) ==
|
||||||
@@ -2460,16 +2473,16 @@ ErrorHandler:
|
|||||||
BOOL Parser_isValidXmlName(const DOMString name)
|
BOOL Parser_isValidXmlName(const DOMString name)
|
||||||
{
|
{
|
||||||
const char *pstr = NULL;
|
const char *pstr = NULL;
|
||||||
size_t i = 0;
|
size_t i = (size_t)0;
|
||||||
size_t nameLen = 0;
|
size_t nameLen = (size_t)0;
|
||||||
|
|
||||||
assert(name != NULL);
|
assert(name != NULL);
|
||||||
|
|
||||||
nameLen = strlen(name);
|
nameLen = strlen(name);
|
||||||
pstr = name;
|
pstr = name;
|
||||||
if (Parser_isNameChar(*pstr, FALSE) == TRUE) {
|
if (Parser_isNameChar((int)*pstr, FALSE) == TRUE) {
|
||||||
for (i = 1; i < nameLen; ++i) {
|
for (i = (size_t)1; i < nameLen; ++i) {
|
||||||
if (Parser_isNameChar(*(pstr + i), TRUE) == FALSE) {
|
if (Parser_isNameChar((int)*(pstr + i), TRUE) == FALSE) {
|
||||||
/* illegal char */
|
/* illegal char */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -2522,7 +2535,7 @@ static int Parser_readFileOrBuffer(
|
|||||||
BOOL file)
|
BOOL file)
|
||||||
{
|
{
|
||||||
long fileSize = 0;
|
long fileSize = 0;
|
||||||
size_t bytesRead = 0;
|
size_t bytesRead = (size_t)0;
|
||||||
FILE *xmlFilePtr = NULL;
|
FILE *xmlFilePtr = NULL;
|
||||||
|
|
||||||
if( file ) {
|
if( file ) {
|
||||||
@@ -2532,12 +2545,12 @@ static int Parser_readFileOrBuffer(
|
|||||||
} else {
|
} else {
|
||||||
fseek( xmlFilePtr, 0, SEEK_END );
|
fseek( xmlFilePtr, 0, SEEK_END );
|
||||||
fileSize = ftell( xmlFilePtr );
|
fileSize = ftell( xmlFilePtr );
|
||||||
if( fileSize == 0 ) {
|
if( fileSize <= 0 ) {
|
||||||
fclose( xmlFilePtr );
|
fclose( xmlFilePtr );
|
||||||
return IXML_SYNTAX_ERR;
|
return IXML_SYNTAX_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
xmlParser->dataBuffer = (char *)malloc((size_t)fileSize + 1);
|
xmlParser->dataBuffer = (char *)malloc((size_t)fileSize + (size_t)1);
|
||||||
if( xmlParser->dataBuffer == NULL ) {
|
if( xmlParser->dataBuffer == NULL ) {
|
||||||
fclose( xmlFilePtr );
|
fclose( xmlFilePtr );
|
||||||
return IXML_INSUFFICIENT_MEMORY;
|
return IXML_INSUFFICIENT_MEMORY;
|
||||||
@@ -2545,7 +2558,7 @@ static int Parser_readFileOrBuffer(
|
|||||||
|
|
||||||
fseek( xmlFilePtr, 0, SEEK_SET );
|
fseek( xmlFilePtr, 0, SEEK_SET );
|
||||||
bytesRead =
|
bytesRead =
|
||||||
fread(xmlParser->dataBuffer, 1, (size_t)fileSize, xmlFilePtr);
|
fread(xmlParser->dataBuffer, (size_t)1, (size_t)fileSize, xmlFilePtr);
|
||||||
/* append null */
|
/* append null */
|
||||||
xmlParser->dataBuffer[bytesRead] = '\0';
|
xmlParser->dataBuffer[bytesRead] = '\0';
|
||||||
fclose( xmlFilePtr );
|
fclose( xmlFilePtr );
|
||||||
@@ -2652,12 +2665,12 @@ int Parser_setNodePrefixAndLocalName(
|
|||||||
/* fill in the local name and prefix */
|
/* fill in the local name and prefix */
|
||||||
pLocalName = ( char * )pStrPrefix + 1;
|
pLocalName = ( char * )pStrPrefix + 1;
|
||||||
nPrefix = pStrPrefix - node->nodeName;
|
nPrefix = pStrPrefix - node->nodeName;
|
||||||
node->prefix = malloc((size_t)nPrefix + 1);
|
node->prefix = malloc((size_t)nPrefix + (size_t)1);
|
||||||
if (!node->prefix) {
|
if (!node->prefix) {
|
||||||
return IXML_INSUFFICIENT_MEMORY;
|
return IXML_INSUFFICIENT_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(node->prefix, 0, (size_t)nPrefix + 1);
|
memset(node->prefix, 0, (size_t)nPrefix + (size_t)1);
|
||||||
strncpy(node->prefix, node->nodeName, (size_t)nPrefix);
|
strncpy(node->prefix, node->nodeName, (size_t)nPrefix);
|
||||||
|
|
||||||
node->localName = safe_strdup( pLocalName );
|
node->localName = safe_strdup( pLocalName );
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -53,11 +54,11 @@ static unsigned long ixmlNamedNodeMap_getItemNumber(
|
|||||||
IN const char *name)
|
IN const char *name)
|
||||||
{
|
{
|
||||||
IXML_Node *tempNode;
|
IXML_Node *tempNode;
|
||||||
unsigned long returnItemNo = 0;
|
unsigned long returnItemNo = 0lu;
|
||||||
|
|
||||||
assert(nnMap != NULL && name != NULL);
|
assert(nnMap != NULL && name != NULL);
|
||||||
if (nnMap == NULL || name == NULL) {
|
if (nnMap == NULL || name == NULL) {
|
||||||
return IXML_INVALID_ITEM_NUMBER;
|
return (unsigned long)IXML_INVALID_ITEM_NUMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
tempNode = nnMap->nodeItem;
|
tempNode = nnMap->nodeItem;
|
||||||
@@ -69,7 +70,7 @@ static unsigned long ixmlNamedNodeMap_getItemNumber(
|
|||||||
returnItemNo++;
|
returnItemNo++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return IXML_INVALID_ITEM_NUMBER;
|
return (unsigned long)IXML_INVALID_ITEM_NUMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -92,7 +93,7 @@ IXML_Node *ixmlNamedNodeMap_getNamedItem(
|
|||||||
}
|
}
|
||||||
|
|
||||||
index = ixmlNamedNodeMap_getItemNumber(nnMap, name);
|
index = ixmlNamedNodeMap_getItemNumber(nnMap, name);
|
||||||
if (index == IXML_INVALID_ITEM_NUMBER) {
|
if (index == (unsigned long)IXML_INVALID_ITEM_NUMBER) {
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
return ixmlNamedNodeMap_item(nnMap, index);
|
return ixmlNamedNodeMap_item(nnMap, index);
|
||||||
@@ -111,12 +112,12 @@ IXML_Node *ixmlNamedNodeMap_item(
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index > ixmlNamedNodeMap_getLength(nnMap) - 1) {
|
if (index > ixmlNamedNodeMap_getLength(nnMap) - 1lu) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
tempNode = nnMap->nodeItem;
|
tempNode = nnMap->nodeItem;
|
||||||
for (i = 0; i < index && tempNode != NULL; ++i) {
|
for (i = 0u; i < index && tempNode != NULL; ++i) {
|
||||||
tempNode = tempNode->nextSibling;
|
tempNode = tempNode->nextSibling;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,11 +128,11 @@ IXML_Node *ixmlNamedNodeMap_item(
|
|||||||
unsigned long ixmlNamedNodeMap_getLength(IXML_NamedNodeMap *nnMap)
|
unsigned long ixmlNamedNodeMap_getLength(IXML_NamedNodeMap *nnMap)
|
||||||
{
|
{
|
||||||
IXML_Node *tempNode;
|
IXML_Node *tempNode;
|
||||||
unsigned long length = 0;
|
unsigned long length = 0lu;
|
||||||
|
|
||||||
if (nnMap != NULL) {
|
if (nnMap != NULL) {
|
||||||
tempNode = nnMap->nodeItem;
|
tempNode = nnMap->nodeItem;
|
||||||
for (length = 0; tempNode != NULL; ++length) {
|
for (length = 0lu; tempNode != NULL; ++length) {
|
||||||
tempNode = tempNode->nextSibling;
|
tempNode = tempNode->nextSibling;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
125
ixml/src/node.c
125
ixml/src/node.c
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -90,9 +91,13 @@ static void ixmlNode_freeSingleNode(
|
|||||||
if (nodeptr->localName != NULL) {
|
if (nodeptr->localName != NULL) {
|
||||||
free(nodeptr->localName);
|
free(nodeptr->localName);
|
||||||
}
|
}
|
||||||
if (nodeptr->nodeType == eELEMENT_NODE) {
|
switch (nodeptr->nodeType ) {
|
||||||
|
case eELEMENT_NODE:
|
||||||
element = (IXML_Element *)nodeptr;
|
element = (IXML_Element *)nodeptr;
|
||||||
free(element->tagName);
|
free(element->tagName);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
free(nodeptr);
|
free(nodeptr);
|
||||||
}
|
}
|
||||||
@@ -280,7 +285,7 @@ unsigned short ixmlNode_getNodeType(IXML_Node *nodeptr)
|
|||||||
if (nodeptr != NULL) {
|
if (nodeptr != NULL) {
|
||||||
return nodeptr->nodeType;
|
return nodeptr->nodeType;
|
||||||
} else {
|
} else {
|
||||||
return eINVALID_NODE;
|
return (unsigned short)eINVALID_NODE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,6 +402,7 @@ static BOOL ixmlNode_isParent(
|
|||||||
|
|
||||||
assert(nodeptr != NULL && toFind != NULL);
|
assert(nodeptr != NULL && toFind != NULL);
|
||||||
|
|
||||||
|
if (nodeptr != NULL && toFind != NULL)
|
||||||
found = toFind->parentNode == nodeptr;
|
found = toFind->parentNode == nodeptr;
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
@@ -422,17 +428,22 @@ static BOOL ixmlNode_allowChildren(
|
|||||||
case eTEXT_NODE:
|
case eTEXT_NODE:
|
||||||
case eCDATA_SECTION_NODE:
|
case eCDATA_SECTION_NODE:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
|
||||||
|
|
||||||
case eELEMENT_NODE:
|
case eELEMENT_NODE:
|
||||||
if (newChild->nodeType == eATTRIBUTE_NODE ||
|
switch (newChild->nodeType) {
|
||||||
newChild->nodeType == eDOCUMENT_NODE) {
|
case eATTRIBUTE_NODE:
|
||||||
|
case eDOCUMENT_NODE:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case eDOCUMENT_NODE:
|
case eDOCUMENT_NODE:
|
||||||
if (newChild->nodeType != eELEMENT_NODE) {
|
switch (newChild->nodeType) {
|
||||||
|
case eELEMENT_NODE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,7 +511,7 @@ int ixmlNode_insertBefore(
|
|||||||
|
|
||||||
if (refChild != NULL) {
|
if (refChild != NULL) {
|
||||||
if (ixmlNode_isParent(nodeptr, newChild) == TRUE) {
|
if (ixmlNode_isParent(nodeptr, newChild) == TRUE) {
|
||||||
ixmlNode_removeChild(nodeptr, newChild, NULL);
|
ixmlNode_removeChild(nodeptr, newChild, &newChild);
|
||||||
newChild->nextSibling = NULL;
|
newChild->nextSibling = NULL;
|
||||||
newChild->prevSibling = NULL;
|
newChild->prevSibling = NULL;
|
||||||
}
|
}
|
||||||
@@ -566,31 +577,23 @@ int ixmlNode_removeChild(
|
|||||||
IXML_Node *oldChild,
|
IXML_Node *oldChild,
|
||||||
IXML_Node **returnNode)
|
IXML_Node **returnNode)
|
||||||
{
|
{
|
||||||
if (nodeptr == NULL || oldChild == NULL) {
|
if (!nodeptr || !oldChild)
|
||||||
return IXML_INVALID_PARAMETER;
|
return IXML_INVALID_PARAMETER;
|
||||||
}
|
if (!ixmlNode_isParent(nodeptr, oldChild))
|
||||||
|
|
||||||
if (ixmlNode_isParent(nodeptr, oldChild) == FALSE ) {
|
|
||||||
return IXML_NOT_FOUND_ERR;
|
return IXML_NOT_FOUND_ERR;
|
||||||
}
|
if (oldChild->prevSibling)
|
||||||
|
|
||||||
if (oldChild->prevSibling != NULL) {
|
|
||||||
oldChild->prevSibling->nextSibling = oldChild->nextSibling;
|
oldChild->prevSibling->nextSibling = oldChild->nextSibling;
|
||||||
}
|
if (nodeptr->firstChild == oldChild)
|
||||||
if (nodeptr->firstChild == oldChild) {
|
|
||||||
nodeptr->firstChild = oldChild->nextSibling;
|
nodeptr->firstChild = oldChild->nextSibling;
|
||||||
}
|
if (oldChild->nextSibling)
|
||||||
if (oldChild->nextSibling != NULL) {
|
|
||||||
oldChild->nextSibling->prevSibling = oldChild->prevSibling;
|
oldChild->nextSibling->prevSibling = oldChild->prevSibling;
|
||||||
}
|
|
||||||
oldChild->nextSibling = NULL;
|
oldChild->nextSibling = NULL;
|
||||||
oldChild->prevSibling = NULL;
|
oldChild->prevSibling = NULL;
|
||||||
oldChild->parentNode = NULL;
|
oldChild->parentNode = NULL;
|
||||||
if (returnNode != NULL) {
|
if (returnNode)
|
||||||
*returnNode = oldChild;
|
*returnNode = oldChild;
|
||||||
} else {
|
else
|
||||||
ixmlNode_free(oldChild);
|
ixmlNode_free(oldChild);
|
||||||
}
|
|
||||||
|
|
||||||
return IXML_SUCCESS;
|
return IXML_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -619,7 +622,7 @@ int ixmlNode_appendChild(IXML_Node *nodeptr, IXML_Node *newChild)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ixmlNode_isParent(nodeptr, newChild) == TRUE ) {
|
if (ixmlNode_isParent(nodeptr, newChild) == TRUE ) {
|
||||||
ixmlNode_removeChild(nodeptr, newChild, NULL);
|
ixmlNode_removeChild(nodeptr, newChild, &newChild);
|
||||||
}
|
}
|
||||||
/* set the parent node pointer */
|
/* set the parent node pointer */
|
||||||
newChild->parentNode = nodeptr;
|
newChild->parentNode = nodeptr;
|
||||||
@@ -652,6 +655,7 @@ static IXML_Node *ixmlNode_cloneTextNode(
|
|||||||
IXML_Node *nodeptr)
|
IXML_Node *nodeptr)
|
||||||
{
|
{
|
||||||
IXML_Node *newNode = NULL;
|
IXML_Node *newNode = NULL;
|
||||||
|
int rc;
|
||||||
|
|
||||||
assert(nodeptr != NULL);
|
assert(nodeptr != NULL);
|
||||||
|
|
||||||
@@ -660,8 +664,16 @@ static IXML_Node *ixmlNode_cloneTextNode(
|
|||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
ixmlNode_init(newNode);
|
ixmlNode_init(newNode);
|
||||||
ixmlNode_setNodeName(newNode, nodeptr->nodeName);
|
rc = ixmlNode_setNodeName(newNode, nodeptr->nodeName);
|
||||||
ixmlNode_setNodeValue(newNode, nodeptr->nodeValue);
|
if (rc != IXML_SUCCESS) {
|
||||||
|
ixmlNode_free(newNode);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
rc = ixmlNode_setNodeValue(newNode, nodeptr->nodeValue);
|
||||||
|
if (rc != IXML_SUCCESS) {
|
||||||
|
ixmlNode_free(newNode);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
newNode->nodeType = eTEXT_NODE;
|
newNode->nodeType = eTEXT_NODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -680,15 +692,24 @@ static IXML_CDATASection *ixmlNode_cloneCDATASect(
|
|||||||
IXML_CDATASection *newCDATA = NULL;
|
IXML_CDATASection *newCDATA = NULL;
|
||||||
IXML_Node *newNode;
|
IXML_Node *newNode;
|
||||||
IXML_Node *srcNode;
|
IXML_Node *srcNode;
|
||||||
|
int rc;
|
||||||
|
|
||||||
assert(nodeptr != NULL);
|
assert(nodeptr != NULL);
|
||||||
newCDATA = (IXML_CDATASection *)malloc(sizeof (IXML_CDATASection));
|
newCDATA = (IXML_CDATASection *)malloc(sizeof (IXML_CDATASection));
|
||||||
if (newCDATA != NULL) {
|
if (newCDATA != NULL) {
|
||||||
newNode = (IXML_Node *)newCDATA;
|
newNode = (IXML_Node *)newCDATA;
|
||||||
ixmlNode_init(newNode);
|
ixmlCDATASection_init(newCDATA);
|
||||||
srcNode = (IXML_Node *)nodeptr;
|
srcNode = (IXML_Node *)nodeptr;
|
||||||
ixmlNode_setNodeName(newNode, srcNode->nodeName);
|
rc = ixmlNode_setNodeName(newNode, srcNode->nodeName);
|
||||||
ixmlNode_setNodeValue(newNode, srcNode->nodeValue);
|
if (rc != IXML_SUCCESS) {
|
||||||
|
ixmlCDATASection_free(newCDATA);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
rc = ixmlNode_setNodeValue(newNode, srcNode->nodeValue);
|
||||||
|
if (rc != IXML_SUCCESS) {
|
||||||
|
ixmlCDATASection_free(newCDATA);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
newNode->nodeType = eCDATA_SECTION_NODE;
|
newNode->nodeType = eCDATA_SECTION_NODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -763,42 +784,32 @@ static IXML_Element *ixmlNode_cloneElement(
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns a clone of a document node.
|
* \brief Returns a new document node.
|
||||||
*
|
*
|
||||||
* Currently, the IXML_Document struct is just a node, so this function
|
* Currently, the IXML_Document struct is just a node, so this function
|
||||||
* just mallocs the IXML_Document, sets the node type and name. Curiously,
|
* just mallocs the IXML_Document, sets the node type and name.
|
||||||
* the parameter nodeptr is not actually used.
|
|
||||||
*
|
*
|
||||||
* \return A clone of a document node.
|
* \return A new document node.
|
||||||
*/
|
*/
|
||||||
static IXML_Document *ixmlNode_cloneDoc(
|
static IXML_Document *ixmlNode_newDoc(void)
|
||||||
/*! [in] The \b Node to clone. */
|
|
||||||
IXML_Document *nodeptr)
|
|
||||||
{
|
{
|
||||||
IXML_Document *newDoc;
|
IXML_Document *newDoc;
|
||||||
IXML_Node *docNode;
|
IXML_Node *docNode;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
assert(nodeptr != NULL);
|
|
||||||
|
|
||||||
newDoc = (IXML_Document *)malloc(sizeof (IXML_Document));
|
newDoc = (IXML_Document *)malloc(sizeof (IXML_Document));
|
||||||
if (newDoc == NULL) {
|
if (!newDoc)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
ixmlDocument_init(newDoc);
|
ixmlDocument_init(newDoc);
|
||||||
docNode = (IXML_Node *)newDoc;
|
docNode = (IXML_Node *)newDoc;
|
||||||
|
|
||||||
rc = ixmlNode_setNodeName(docNode, DOCUMENTNODENAME);
|
rc = ixmlNode_setNodeName(docNode, DOCUMENTNODENAME);
|
||||||
if (rc != IXML_SUCCESS) {
|
if (rc != IXML_SUCCESS) {
|
||||||
ixmlDocument_free(newDoc);
|
ixmlDocument_free(newDoc);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
newDoc->n.nodeType = eDOCUMENT_NODE;
|
newDoc->n.nodeType = eDOCUMENT_NODE;
|
||||||
|
|
||||||
return newDoc;
|
return newDoc;
|
||||||
nodeptr = nodeptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -923,6 +934,8 @@ static IXML_Node *ixmlNode_cloneNodeTreeRecursive(
|
|||||||
switch (nodeptr->nodeType) {
|
switch (nodeptr->nodeType) {
|
||||||
case eELEMENT_NODE:
|
case eELEMENT_NODE:
|
||||||
newElement = ixmlNode_cloneElement((IXML_Element *)nodeptr);
|
newElement = ixmlNode_cloneElement((IXML_Element *)nodeptr);
|
||||||
|
if (newElement == NULL)
|
||||||
|
return NULL;
|
||||||
newElement->n.firstAttr = ixmlNode_cloneNodeTreeRecursive(
|
newElement->n.firstAttr = ixmlNode_cloneNodeTreeRecursive(
|
||||||
nodeptr->firstAttr, deep);
|
nodeptr->firstAttr, deep);
|
||||||
if (deep) {
|
if (deep) {
|
||||||
@@ -943,6 +956,8 @@ static IXML_Node *ixmlNode_cloneNodeTreeRecursive(
|
|||||||
|
|
||||||
case eATTRIBUTE_NODE:
|
case eATTRIBUTE_NODE:
|
||||||
newAttr = ixmlNode_cloneAttr((IXML_Attr *)nodeptr);
|
newAttr = ixmlNode_cloneAttr((IXML_Attr *)nodeptr);
|
||||||
|
if (newAttr == NULL)
|
||||||
|
return NULL;
|
||||||
nextSib = ixmlNode_cloneNodeTreeRecursive(nodeptr->nextSibling, deep);
|
nextSib = ixmlNode_cloneNodeTreeRecursive(nodeptr->nextSibling, deep);
|
||||||
newAttr->n.nextSibling = nextSib;
|
newAttr->n.nextSibling = nextSib;
|
||||||
if (nextSib != NULL) {
|
if (nextSib != NULL) {
|
||||||
@@ -961,7 +976,9 @@ static IXML_Node *ixmlNode_cloneNodeTreeRecursive(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case eDOCUMENT_NODE:
|
case eDOCUMENT_NODE:
|
||||||
newDoc = ixmlNode_cloneDoc((IXML_Document *)nodeptr);
|
newDoc = ixmlNode_newDoc();
|
||||||
|
if (newDoc == NULL)
|
||||||
|
return NULL;
|
||||||
newNode = (IXML_Node *)newDoc;
|
newNode = (IXML_Node *)newDoc;
|
||||||
if (deep) {
|
if (deep) {
|
||||||
newNode->firstChild = ixmlNode_cloneNodeTreeRecursive(
|
newNode->firstChild = ixmlNode_cloneNodeTreeRecursive(
|
||||||
@@ -1008,6 +1025,8 @@ static IXML_Node *ixmlNode_cloneNodeTree(
|
|||||||
switch (nodeptr->nodeType) {
|
switch (nodeptr->nodeType) {
|
||||||
case eELEMENT_NODE:
|
case eELEMENT_NODE:
|
||||||
newElement = ixmlNode_cloneElement((IXML_Element *)nodeptr);
|
newElement = ixmlNode_cloneElement((IXML_Element *)nodeptr);
|
||||||
|
if (newElement == NULL)
|
||||||
|
return NULL;
|
||||||
newElement->n.firstAttr = ixmlNode_cloneNodeTreeRecursive(nodeptr->firstAttr, deep);
|
newElement->n.firstAttr = ixmlNode_cloneNodeTreeRecursive(nodeptr->firstAttr, deep);
|
||||||
if (deep) {
|
if (deep) {
|
||||||
newElement->n.firstChild = ixmlNode_cloneNodeTreeRecursive(
|
newElement->n.firstChild = ixmlNode_cloneNodeTreeRecursive(
|
||||||
@@ -1048,6 +1067,7 @@ static IXML_Node *ixmlNode_cloneNodeTree(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* by spec, the duplicate node has no parent */
|
/* by spec, the duplicate node has no parent */
|
||||||
|
if (newNode != NULL)
|
||||||
newNode->parentNode = NULL;
|
newNode->parentNode = NULL;
|
||||||
|
|
||||||
return newNode;
|
return newNode;
|
||||||
@@ -1119,7 +1139,8 @@ IXML_NamedNodeMap *ixmlNode_getAttributes(IXML_Node *nodeptr)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nodeptr->nodeType == eELEMENT_NODE) {
|
switch(nodeptr->nodeType) {
|
||||||
|
case eELEMENT_NODE:
|
||||||
returnNamedNodeMap = (IXML_NamedNodeMap *)malloc(sizeof(IXML_NamedNodeMap));
|
returnNamedNodeMap = (IXML_NamedNodeMap *)malloc(sizeof(IXML_NamedNodeMap));
|
||||||
if(returnNamedNodeMap == NULL) {
|
if(returnNamedNodeMap == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -1137,7 +1158,7 @@ IXML_NamedNodeMap *ixmlNode_getAttributes(IXML_Node *nodeptr)
|
|||||||
tempNode = tempNode->nextSibling;
|
tempNode = tempNode->nextSibling;
|
||||||
}
|
}
|
||||||
return returnNamedNodeMap;
|
return returnNamedNodeMap;
|
||||||
} else {
|
default:
|
||||||
/* if not an ELEMENT_NODE */
|
/* if not an ELEMENT_NODE */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1157,8 +1178,13 @@ BOOL ixmlNode_hasChildNodes(IXML_Node *nodeptr)
|
|||||||
BOOL ixmlNode_hasAttributes(IXML_Node *nodeptr)
|
BOOL ixmlNode_hasAttributes(IXML_Node *nodeptr)
|
||||||
{
|
{
|
||||||
if (nodeptr != NULL) {
|
if (nodeptr != NULL) {
|
||||||
if (nodeptr->nodeType == eELEMENT_NODE && nodeptr->firstAttr != NULL) {
|
switch (nodeptr->nodeType) {
|
||||||
|
case eELEMENT_NODE:
|
||||||
|
if (nodeptr->firstAttr != NULL)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1313,7 +1339,10 @@ int ixmlNode_setNodeProperties(
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
assert(destNode != NULL || src != NULL);
|
assert(destNode != NULL && src != NULL);
|
||||||
|
if(destNode == NULL || src == NULL) {
|
||||||
|
return IXML_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
rc = ixmlNode_setNodeValue(destNode, src->nodeValue);
|
rc = ixmlNode_setNodeValue(destNode, src->nodeValue);
|
||||||
if(rc != IXML_SUCCESS) {
|
if(rc != IXML_SUCCESS) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -62,12 +63,12 @@ IXML_Node *ixmlNodeList_item(
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* if index is more than list length */
|
/* if index is more than list length */
|
||||||
if (index > ixmlNodeList_length(nList) - 1) {
|
if (index > ixmlNodeList_length(nList) - 1lu) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
next = nList;
|
next = nList;
|
||||||
for (i = 0; i < index && next != NULL; ++i) {
|
for (i = 0u; i < index && next != NULL; ++i) {
|
||||||
next = next->next;
|
next = next->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +128,7 @@ int ixmlNodeList_addToNodeList(
|
|||||||
unsigned long ixmlNodeList_length(IXML_NodeList *nList)
|
unsigned long ixmlNodeList_length(IXML_NodeList *nList)
|
||||||
{
|
{
|
||||||
IXML_NodeList *list;
|
IXML_NodeList *list;
|
||||||
unsigned long length = 0;
|
unsigned long length = 0lu;
|
||||||
|
|
||||||
list = nList;
|
list = nList;
|
||||||
while (list != NULL) {
|
while (list != NULL) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Version: 1.6.14
|
Version: 1.6.20
|
||||||
Summary: Universal Plug and Play (UPnP) SDK
|
Summary: Universal Plug and Play (UPnP) SDK
|
||||||
Name: libupnp
|
Name: libupnp
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
# (C) Copyright 2005 Remi Turboult <r3mi@users.sourceforge.net>
|
# (C) Copyright 2005 Remi Turboult <r3mi@users.sourceforge.net>
|
||||||
#
|
#
|
||||||
|
|
||||||
AM_CPPFLAGS = -I$(srcdir)/inc -I$(srcdir)/src/inc
|
AM_CPPFLAGS = -I$(srcdir)/inc -I$(srcdir)/src/inc \
|
||||||
|
-I$(top_srcdir)/upnp/inc
|
||||||
|
|
||||||
if ENABLE_DEBUG
|
if ENABLE_DEBUG
|
||||||
AM_CPPFLAGS += -DDEBUG -DSTATS
|
AM_CPPFLAGS += -DDEBUG -DSTATS
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -98,7 +99,7 @@ typedef enum priority {
|
|||||||
#define DEFAULT_MAX_THREADS 10
|
#define DEFAULT_MAX_THREADS 10
|
||||||
|
|
||||||
/*! default stack size used by TPAttrInit */
|
/*! default stack size used by TPAttrInit */
|
||||||
#define DEFAULT_STACK_SIZE 0
|
#define DEFAULT_STACK_SIZE 0u
|
||||||
|
|
||||||
/*! default jobs per thread used by TPAttrInit */
|
/*! default jobs per thread used by TPAttrInit */
|
||||||
#define DEFAULT_JOBS_PER_THREAD 10
|
#define DEFAULT_JOBS_PER_THREAD 10
|
||||||
@@ -165,7 +166,7 @@ typedef struct THREADPOOLJOB
|
|||||||
void *arg;
|
void *arg;
|
||||||
free_routine free_func;
|
free_routine free_func;
|
||||||
struct timeval requestTime;
|
struct timeval requestTime;
|
||||||
int priority;
|
ThreadPriority priority;
|
||||||
int jobId;
|
int jobId;
|
||||||
} ThreadPoolJob;
|
} ThreadPoolJob;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -49,7 +50,7 @@ extern "C" {
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
#if defined(BSD)
|
#if defined(BSD) && !defined(__GNU__)
|
||||||
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
|
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -76,7 +77,8 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
#define ITHREAD_STACK_MIN PTHREAD_STACK_MIN
|
#define ITHREAD_STACK_MIN PTHREAD_STACK_MIN
|
||||||
|
#define ITHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
|
||||||
|
#define ITHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Name: ithread_t
|
* Name: ithread_t
|
||||||
@@ -198,10 +200,6 @@ typedef pthread_rwlockattr_t ithread_rwlockattr_t;
|
|||||||
static UPNP_INLINE int ithread_initialize_library(void) {
|
static UPNP_INLINE int ithread_initialize_library(void) {
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
#if defined(WIN32) && defined(PTW32_STATIC_LIB)
|
|
||||||
ret = !pthread_win32_process_attach_np();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,10 +218,6 @@ static UPNP_INLINE int ithread_initialize_library(void) {
|
|||||||
static UPNP_INLINE int ithread_cleanup_library(void) {
|
static UPNP_INLINE int ithread_cleanup_library(void) {
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
#if defined(WIN32) && defined(PTW32_STATIC_LIB)
|
|
||||||
ret = !pthread_win32_process_detach_np();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -778,6 +772,22 @@ static UPNP_INLINE int ithread_cleanup_thread(void) {
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#define ithread_attr_setstacksize pthread_attr_setstacksize
|
#define ithread_attr_setstacksize pthread_attr_setstacksize
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Function: ithread_attr_setdetachstate
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Sets detach state of a thread attribute object.
|
||||||
|
* Parameters:
|
||||||
|
* ithread_attr_t *attr (must be valid non NULL pointer to
|
||||||
|
* ithread_attr_t)
|
||||||
|
* int detachstate (value of detachstate must be ITHREAD_CREATE_DETACHED
|
||||||
|
* or ITHREAD_CREATE_JOINABLE)
|
||||||
|
* Returns:
|
||||||
|
* 0 on success. Nonzero on failure.
|
||||||
|
* See man page for pthread_attr_setdetachstate
|
||||||
|
***************************************************************************/
|
||||||
|
#define ithread_attr_setdetachstate pthread_attr_setdetachstate
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Function: ithread_create
|
* Function: ithread_create
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -102,7 +103,7 @@ int ListInit(LinkedList *list, cmp_routine cmp_func, free_function free_func)
|
|||||||
list->tail.prev = &list->head;
|
list->tail.prev = &list->head;
|
||||||
list->tail.next = NULL;
|
list->tail.next = NULL;
|
||||||
|
|
||||||
return 0;
|
return retCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
ListNode *ListAddHead(LinkedList *list, void *item)
|
ListNode *ListAddHead(LinkedList *list, void *item)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -59,15 +60,15 @@ static long DiffMillis(
|
|||||||
/*! . */
|
/*! . */
|
||||||
struct timeval *time2)
|
struct timeval *time2)
|
||||||
{
|
{
|
||||||
double temp = 0;
|
double temp = 0.0;
|
||||||
|
|
||||||
temp = (double)(time1->tv_sec - time2->tv_sec);
|
temp = (double)time1->tv_sec - (double)time2->tv_sec;
|
||||||
/* convert to milliseconds */
|
/* convert to milliseconds */
|
||||||
temp *= 1000;
|
temp *= 1000.0;
|
||||||
|
|
||||||
/* convert microseconds to milliseconds and add to temp */
|
/* convert microseconds to milliseconds and add to temp */
|
||||||
/* implicit flooring of unsigned long data type */
|
/* implicit flooring of unsigned long data type */
|
||||||
temp += (double)((time1->tv_usec - time2->tv_usec) / 1000);
|
temp += ((double)time1->tv_usec - (double)time2->tv_usec) / 1000.0;
|
||||||
|
|
||||||
return (long)temp;
|
return (long)temp;
|
||||||
}
|
}
|
||||||
@@ -82,18 +83,18 @@ static void StatsInit(
|
|||||||
/*! Must be valid non null stats structure. */
|
/*! Must be valid non null stats structure. */
|
||||||
ThreadPoolStats *stats)
|
ThreadPoolStats *stats)
|
||||||
{
|
{
|
||||||
stats->totalIdleTime = 0;
|
stats->totalIdleTime = 0.0;
|
||||||
stats->totalJobsHQ = 0;
|
stats->totalJobsHQ = 0;
|
||||||
stats->totalJobsLQ = 0;
|
stats->totalJobsLQ = 0;
|
||||||
stats->totalJobsMQ = 0;
|
stats->totalJobsMQ = 0;
|
||||||
stats->totalTimeHQ = 0;
|
stats->totalTimeHQ = 0.0;
|
||||||
stats->totalTimeMQ = 0;
|
stats->totalTimeMQ = 0.0;
|
||||||
stats->totalTimeLQ = 0;
|
stats->totalTimeLQ = 0.0;
|
||||||
stats->totalWorkTime = 0;
|
stats->totalWorkTime = 0.0;
|
||||||
stats->totalIdleTime = 0;
|
stats->totalIdleTime = 0.0;
|
||||||
stats->avgWaitHQ = 0;
|
stats->avgWaitHQ = 0.0;
|
||||||
stats->avgWaitMQ = 0;
|
stats->avgWaitMQ = 0.0;
|
||||||
stats->avgWaitLQ = 0;
|
stats->avgWaitLQ = 0.0;
|
||||||
stats->workerThreads = 0;
|
stats->workerThreads = 0;
|
||||||
stats->idleThreads = 0;
|
stats->idleThreads = 0;
|
||||||
stats->persistentThreads = 0;
|
stats->persistentThreads = 0;
|
||||||
@@ -476,7 +477,7 @@ static void *WorkerThread(
|
|||||||
}
|
}
|
||||||
retCode = 0;
|
retCode = 0;
|
||||||
tp->stats.idleThreads++;
|
tp->stats.idleThreads++;
|
||||||
tp->stats.totalWorkTime += (double)(StatsTime(NULL) - start);
|
tp->stats.totalWorkTime += (double)StatsTime(NULL) - (double)start;
|
||||||
StatsTime(&start);
|
StatsTime(&start);
|
||||||
if (persistent == 0) {
|
if (persistent == 0) {
|
||||||
tp->stats.workerThreads--;
|
tp->stats.workerThreads--;
|
||||||
@@ -509,7 +510,7 @@ static void *WorkerThread(
|
|||||||
}
|
}
|
||||||
tp->stats.idleThreads--;
|
tp->stats.idleThreads--;
|
||||||
/* idle time */
|
/* idle time */
|
||||||
tp->stats.totalIdleTime += (double)(StatsTime(NULL) - start);
|
tp->stats.totalIdleTime += (double)StatsTime(NULL) - (double)start;
|
||||||
/* work time */
|
/* work time */
|
||||||
StatsTime(&start);
|
StatsTime(&start);
|
||||||
/* bump priority of starved jobs */
|
/* bump priority of starved jobs */
|
||||||
@@ -531,16 +532,28 @@ static void *WorkerThread(
|
|||||||
/* Pick the highest priority job */
|
/* Pick the highest priority job */
|
||||||
if (tp->highJobQ.size > 0) {
|
if (tp->highJobQ.size > 0) {
|
||||||
head = ListHead(&tp->highJobQ);
|
head = ListHead(&tp->highJobQ);
|
||||||
|
if (head == NULL) {
|
||||||
|
tp->stats.workerThreads--;
|
||||||
|
goto exit_function;
|
||||||
|
}
|
||||||
job = (ThreadPoolJob *) head->item;
|
job = (ThreadPoolJob *) head->item;
|
||||||
CalcWaitTime(tp, HIGH_PRIORITY, job);
|
CalcWaitTime(tp, HIGH_PRIORITY, job);
|
||||||
ListDelNode(&tp->highJobQ, head, 0);
|
ListDelNode(&tp->highJobQ, head, 0);
|
||||||
} else if (tp->medJobQ.size > 0) {
|
} else if (tp->medJobQ.size > 0) {
|
||||||
head = ListHead(&tp->medJobQ);
|
head = ListHead(&tp->medJobQ);
|
||||||
|
if (head == NULL) {
|
||||||
|
tp->stats.workerThreads--;
|
||||||
|
goto exit_function;
|
||||||
|
}
|
||||||
job = (ThreadPoolJob *) head->item;
|
job = (ThreadPoolJob *) head->item;
|
||||||
CalcWaitTime(tp, MED_PRIORITY, job);
|
CalcWaitTime(tp, MED_PRIORITY, job);
|
||||||
ListDelNode(&tp->medJobQ, head, 0);
|
ListDelNode(&tp->medJobQ, head, 0);
|
||||||
} else if (tp->lowJobQ.size > 0) {
|
} else if (tp->lowJobQ.size > 0) {
|
||||||
head = ListHead(&tp->lowJobQ);
|
head = ListHead(&tp->lowJobQ);
|
||||||
|
if (head == NULL) {
|
||||||
|
tp->stats.workerThreads--;
|
||||||
|
goto exit_function;
|
||||||
|
}
|
||||||
job = (ThreadPoolJob *) head->item;
|
job = (ThreadPoolJob *) head->item;
|
||||||
CalcWaitTime(tp, LOW_PRIORITY, job);
|
CalcWaitTime(tp, LOW_PRIORITY, job);
|
||||||
ListDelNode(&tp->lowJobQ, head, 0);
|
ListDelNode(&tp->lowJobQ, head, 0);
|
||||||
@@ -634,10 +647,15 @@ static int CreateWorker(
|
|||||||
}
|
}
|
||||||
ithread_attr_init(&attr);
|
ithread_attr_init(&attr);
|
||||||
ithread_attr_setstacksize(&attr, tp->attr.stackSize);
|
ithread_attr_setstacksize(&attr, tp->attr.stackSize);
|
||||||
|
ithread_attr_setdetachstate(&attr, ITHREAD_CREATE_DETACHED);
|
||||||
rc = ithread_create(&temp, &attr, WorkerThread, tp);
|
rc = ithread_create(&temp, &attr, WorkerThread, tp);
|
||||||
ithread_attr_destroy(&attr);
|
ithread_attr_destroy(&attr);
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
rc = ithread_detach(temp);
|
rc = ithread_detach(temp);
|
||||||
|
/* ithread_detach will return EINVAL if thread has been
|
||||||
|
successfully detached by ithread_create */
|
||||||
|
if (rc == EINVAL)
|
||||||
|
rc = 0;
|
||||||
tp->pendingWorkerThreadStart = 1;
|
tp->pendingWorkerThreadStart = 1;
|
||||||
/* wait until the new worker thread starts */
|
/* wait until the new worker thread starts */
|
||||||
while (tp->pendingWorkerThreadStart) {
|
while (tp->pendingWorkerThreadStart) {
|
||||||
@@ -694,6 +712,10 @@ int ThreadPoolInit(ThreadPool *tp, ThreadPoolAttr *attr)
|
|||||||
retCode += ithread_cond_init(&tp->condition, NULL);
|
retCode += ithread_cond_init(&tp->condition, NULL);
|
||||||
retCode += ithread_cond_init(&tp->start_and_shutdown, NULL);
|
retCode += ithread_cond_init(&tp->start_and_shutdown, NULL);
|
||||||
if (retCode) {
|
if (retCode) {
|
||||||
|
ithread_mutex_unlock(&tp->mutex);
|
||||||
|
ithread_mutex_destroy(&tp->mutex);
|
||||||
|
ithread_cond_destroy(&tp->condition);
|
||||||
|
ithread_cond_destroy(&tp->start_and_shutdown);
|
||||||
return EAGAIN;
|
return EAGAIN;
|
||||||
}
|
}
|
||||||
if (attr) {
|
if (attr) {
|
||||||
@@ -814,13 +836,16 @@ int ThreadPoolAdd(ThreadPool *tp, ThreadPoolJob *job, int *jobId)
|
|||||||
temp = CreateThreadPoolJob(job, tp->lastJobId, tp);
|
temp = CreateThreadPoolJob(job, tp->lastJobId, tp);
|
||||||
if (!temp)
|
if (!temp)
|
||||||
goto exit_function;
|
goto exit_function;
|
||||||
if (job->priority == HIGH_PRIORITY) {
|
switch (job->priority) {
|
||||||
|
case HIGH_PRIORITY:
|
||||||
if (ListAddTail(&tp->highJobQ, temp))
|
if (ListAddTail(&tp->highJobQ, temp))
|
||||||
rc = 0;
|
rc = 0;
|
||||||
} else if (job->priority == MED_PRIORITY) {
|
break;
|
||||||
|
case MED_PRIORITY:
|
||||||
if (ListAddTail(&tp->medJobQ, temp))
|
if (ListAddTail(&tp->medJobQ, temp))
|
||||||
rc = 0;
|
rc = 0;
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
if (ListAddTail(&tp->lowJobQ, temp))
|
if (ListAddTail(&tp->lowJobQ, temp))
|
||||||
rc = 0;
|
rc = 0;
|
||||||
}
|
}
|
||||||
@@ -961,6 +986,10 @@ int ThreadPoolShutdown(ThreadPool *tp)
|
|||||||
/* clean up high priority jobs */
|
/* clean up high priority jobs */
|
||||||
while (tp->highJobQ.size) {
|
while (tp->highJobQ.size) {
|
||||||
head = ListHead(&tp->highJobQ);
|
head = ListHead(&tp->highJobQ);
|
||||||
|
if (head == NULL) {
|
||||||
|
ithread_mutex_unlock(&tp->mutex);
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
temp = (ThreadPoolJob *)head->item;
|
temp = (ThreadPoolJob *)head->item;
|
||||||
if (temp->free_func)
|
if (temp->free_func)
|
||||||
temp->free_func(temp->arg);
|
temp->free_func(temp->arg);
|
||||||
@@ -971,6 +1000,10 @@ int ThreadPoolShutdown(ThreadPool *tp)
|
|||||||
/* clean up med priority jobs */
|
/* clean up med priority jobs */
|
||||||
while (tp->medJobQ.size) {
|
while (tp->medJobQ.size) {
|
||||||
head = ListHead(&tp->medJobQ);
|
head = ListHead(&tp->medJobQ);
|
||||||
|
if (head == NULL) {
|
||||||
|
ithread_mutex_unlock(&tp->mutex);
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
temp = (ThreadPoolJob *)head->item;
|
temp = (ThreadPoolJob *)head->item;
|
||||||
if (temp->free_func)
|
if (temp->free_func)
|
||||||
temp->free_func(temp->arg);
|
temp->free_func(temp->arg);
|
||||||
@@ -981,6 +1014,10 @@ int ThreadPoolShutdown(ThreadPool *tp)
|
|||||||
/* clean up low priority jobs */
|
/* clean up low priority jobs */
|
||||||
while (tp->lowJobQ.size) {
|
while (tp->lowJobQ.size) {
|
||||||
head = ListHead(&tp->lowJobQ);
|
head = ListHead(&tp->lowJobQ);
|
||||||
|
if (head == NULL) {
|
||||||
|
ithread_mutex_unlock(&tp->mutex);
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
temp = (ThreadPoolJob *)head->item;
|
temp = (ThreadPoolJob *)head->item;
|
||||||
if (temp->free_func)
|
if (temp->free_func)
|
||||||
temp->free_func(temp->arg);
|
temp->free_func(temp->arg);
|
||||||
@@ -1047,12 +1084,13 @@ int TPJobSetPriority(ThreadPoolJob *job, ThreadPriority priority)
|
|||||||
{
|
{
|
||||||
if (!job)
|
if (!job)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
if (priority == LOW_PRIORITY ||
|
switch (priority) {
|
||||||
priority == MED_PRIORITY ||
|
case LOW_PRIORITY:
|
||||||
priority == HIGH_PRIORITY) {
|
case MED_PRIORITY:
|
||||||
|
case HIGH_PRIORITY:
|
||||||
job->priority = priority;
|
job->priority = priority;
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
default:
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1170,17 +1208,17 @@ int ThreadPoolGetStats(ThreadPool *tp, ThreadPoolStats *stats)
|
|||||||
|
|
||||||
*stats = tp->stats;
|
*stats = tp->stats;
|
||||||
if (stats->totalJobsHQ > 0)
|
if (stats->totalJobsHQ > 0)
|
||||||
stats->avgWaitHQ = stats->totalTimeHQ / stats->totalJobsHQ;
|
stats->avgWaitHQ = stats->totalTimeHQ / (double)stats->totalJobsHQ;
|
||||||
else
|
else
|
||||||
stats->avgWaitHQ = 0;
|
stats->avgWaitHQ = 0.0;
|
||||||
if (stats->totalJobsMQ > 0)
|
if (stats->totalJobsMQ > 0)
|
||||||
stats->avgWaitMQ = stats->totalTimeMQ / stats->totalJobsMQ;
|
stats->avgWaitMQ = stats->totalTimeMQ / (double)stats->totalJobsMQ;
|
||||||
else
|
else
|
||||||
stats->avgWaitMQ = 0;
|
stats->avgWaitMQ = 0.0;
|
||||||
if (stats->totalJobsLQ > 0)
|
if (stats->totalJobsLQ > 0)
|
||||||
stats->avgWaitLQ = stats->totalTimeLQ / stats->totalJobsLQ;
|
stats->avgWaitLQ = stats->totalTimeLQ / (double)stats->totalJobsLQ;
|
||||||
else
|
else
|
||||||
stats->avgWaitLQ = 0;
|
stats->avgWaitLQ = 0.0;
|
||||||
stats->totalThreads = tp->totalThreads;
|
stats->totalThreads = tp->totalThreads;
|
||||||
stats->persistentThreads = tp->persistentThreads;
|
stats->persistentThreads = tp->persistentThreads;
|
||||||
stats->currentJobsHQ = (int)ListSize(&tp->highJobQ);
|
stats->currentJobsHQ = (int)ListSize(&tp->highJobQ);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -84,6 +85,10 @@ static void *TimerThreadWorker(
|
|||||||
/* Get the next event if possible. */
|
/* Get the next event if possible. */
|
||||||
if (timer->eventQ.size > 0) {
|
if (timer->eventQ.size > 0) {
|
||||||
head = ListHead( &timer->eventQ );
|
head = ListHead( &timer->eventQ );
|
||||||
|
if (head == NULL) {
|
||||||
|
ithread_mutex_unlock( &timer->mutex );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
nextEvent = ( TimerEvent * ) head->item;
|
nextEvent = ( TimerEvent * ) head->item;
|
||||||
nextEventTime = nextEvent->eventTime;
|
nextEventTime = nextEvent->eventTime;
|
||||||
}
|
}
|
||||||
@@ -91,10 +96,17 @@ static void *TimerThreadWorker(
|
|||||||
/* If time has elapsed, schedule job. */
|
/* If time has elapsed, schedule job. */
|
||||||
if (nextEvent && currentTime >= nextEventTime) {
|
if (nextEvent && currentTime >= nextEventTime) {
|
||||||
if( nextEvent->persistent ) {
|
if( nextEvent->persistent ) {
|
||||||
ThreadPoolAddPersistent( timer->tp, &nextEvent->job,
|
if (ThreadPoolAddPersistent( timer->tp, &nextEvent->job, &tempId ) != 0) {
|
||||||
&tempId );
|
if (nextEvent->job.arg != NULL && nextEvent->job.free_func != NULL) {
|
||||||
|
nextEvent->job.free_func(nextEvent->job.arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ThreadPoolAdd( timer->tp, &nextEvent->job, &tempId );
|
if (ThreadPoolAdd( timer->tp, &nextEvent->job, &tempId ) != 0) {
|
||||||
|
if (nextEvent->job.arg != NULL && nextEvent->job.free_func != NULL) {
|
||||||
|
nextEvent->job.free_func(nextEvent->job.arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ListDelNode( &timer->eventQ, head, 0 );
|
ListDelNode( &timer->eventQ, head, 0 );
|
||||||
FreeTimerEvent( timer, nextEvent );
|
FreeTimerEvent( timer, nextEvent );
|
||||||
@@ -102,7 +114,7 @@ static void *TimerThreadWorker(
|
|||||||
}
|
}
|
||||||
if (nextEvent) {
|
if (nextEvent) {
|
||||||
timeToWait.tv_nsec = 0;
|
timeToWait.tv_nsec = 0;
|
||||||
timeToWait.tv_sec = nextEvent->eventTime;
|
timeToWait.tv_sec = (long)nextEvent->eventTime;
|
||||||
ithread_cond_timedwait( &timer->condition, &timer->mutex,
|
ithread_cond_timedwait( &timer->condition, &timer->mutex,
|
||||||
&timeToWait );
|
&timeToWait );
|
||||||
} else {
|
} else {
|
||||||
@@ -128,9 +140,10 @@ static int CalculateEventTime(
|
|||||||
|
|
||||||
assert( timeout != NULL );
|
assert( timeout != NULL );
|
||||||
|
|
||||||
if (type == ABS_SEC)
|
switch (type) {
|
||||||
|
case ABS_SEC:
|
||||||
return 0;
|
return 0;
|
||||||
else /*if (type == REL_SEC) */{
|
default: /* REL_SEC) */
|
||||||
time(&now);
|
time(&now);
|
||||||
( *timeout ) += now;
|
( *timeout ) += now;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -79,17 +79,21 @@ libupnp_la_SOURCES = \
|
|||||||
src/inc/webserver.h
|
src/inc/webserver.h
|
||||||
|
|
||||||
# ssdp
|
# ssdp
|
||||||
|
if ENABLE_SSDP
|
||||||
libupnp_la_SOURCES += \
|
libupnp_la_SOURCES += \
|
||||||
src/ssdp/ssdp_ResultData.h \
|
src/ssdp/ssdp_ResultData.h \
|
||||||
src/ssdp/ssdp_device.c \
|
src/ssdp/ssdp_device.c \
|
||||||
src/ssdp/ssdp_ctrlpt.c \
|
src/ssdp/ssdp_ctrlpt.c \
|
||||||
src/ssdp/ssdp_server.c
|
src/ssdp/ssdp_server.c
|
||||||
|
endif
|
||||||
|
|
||||||
# soap
|
# soap
|
||||||
|
if ENABLE_SOAP
|
||||||
libupnp_la_SOURCES += \
|
libupnp_la_SOURCES += \
|
||||||
src/soap/soap_device.c \
|
src/soap/soap_device.c \
|
||||||
src/soap/soap_ctrlpt.c \
|
src/soap/soap_ctrlpt.c \
|
||||||
src/soap/soap_common.c
|
src/soap/soap_common.c
|
||||||
|
endif
|
||||||
|
|
||||||
# genlib
|
# genlib
|
||||||
libupnp_la_SOURCES += \
|
libupnp_la_SOURCES += \
|
||||||
@@ -109,10 +113,12 @@ libupnp_la_SOURCES += \
|
|||||||
src/genlib/net/uri/uri.c
|
src/genlib/net/uri/uri.c
|
||||||
|
|
||||||
# gena
|
# gena
|
||||||
|
if ENABLE_GENA
|
||||||
libupnp_la_SOURCES += \
|
libupnp_la_SOURCES += \
|
||||||
src/gena/gena_device.c \
|
src/gena/gena_device.c \
|
||||||
src/gena/gena_ctrlpt.c \
|
src/gena/gena_ctrlpt.c \
|
||||||
src/gena/gena_callback2.c
|
src/gena/gena_callback2.c
|
||||||
|
endif
|
||||||
|
|
||||||
# api
|
# api
|
||||||
libupnp_la_SOURCES += \
|
libupnp_la_SOURCES += \
|
||||||
@@ -129,10 +135,12 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
# uuid
|
# uuid
|
||||||
|
if ENABLE_UUID
|
||||||
libupnp_la_SOURCES += \
|
libupnp_la_SOURCES += \
|
||||||
src/uuid/md5.c \
|
src/uuid/md5.c \
|
||||||
src/uuid/sysdep.c \
|
src/uuid/sysdep.c \
|
||||||
src/uuid/uuid.c
|
src/uuid/uuid.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# urlconfig
|
# urlconfig
|
||||||
@@ -146,9 +154,10 @@ libupnp_la_SOURCES += \
|
|||||||
|
|
||||||
|
|
||||||
# check / distcheck tests
|
# check / distcheck tests
|
||||||
check_PROGRAMS = test_init
|
check_PROGRAMS = test_init test_url
|
||||||
TESTS = test_init
|
TESTS = test_init test_url
|
||||||
test_init_SOURCES = test/test_init.c
|
test_init_SOURCES = test/test_init.c
|
||||||
|
test_url_SOURCES = test/test_url.c
|
||||||
|
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
|
|||||||
@@ -25,6 +25,13 @@
|
|||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
|
||||||
#define UpnpCloseSocket closesocket
|
#define UpnpCloseSocket closesocket
|
||||||
|
|
||||||
|
#if(_WIN32_WINNT < 0x0600)
|
||||||
|
typedef short sa_family_t;
|
||||||
|
#else
|
||||||
|
typedef ADDRESS_FAMILY sa_family_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#else /* WIN32 */
|
#else /* WIN32 */
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#if defined(__sun)
|
#if defined(__sun)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (C) 2011 France Telecom All rights reserved.
|
* Copyright (C) 2011-2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -61,8 +61,8 @@
|
|||||||
/* Other systems ??? */
|
/* Other systems ??? */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LINE_SIZE 180
|
#define LINE_SIZE (size_t)180
|
||||||
#define NAME_SIZE 256
|
#define NAME_SIZE (size_t)256
|
||||||
#define MNFT_NAME_SIZE 64
|
#define MNFT_NAME_SIZE 64
|
||||||
#define MODL_NAME_SIZE 32
|
#define MODL_NAME_SIZE 32
|
||||||
#define SERL_NUMR_SIZE 64
|
#define SERL_NUMR_SIZE 64
|
||||||
@@ -756,7 +756,7 @@ struct Upnp_Discovery
|
|||||||
char Ext[LINE_SIZE];
|
char Ext[LINE_SIZE];
|
||||||
|
|
||||||
/** The host address of the device responding to the search. */
|
/** The host address of the device responding to the search. */
|
||||||
struct sockaddr_in DestAddr;
|
struct sockaddr_storage DestAddr;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Returned along with a {\bf UPNP_EVENT_SUBSCRIBE_COMPLETE} or {\bf
|
/** Returned along with a {\bf UPNP_EVENT_SUBSCRIBE_COMPLETE} or {\bf
|
||||||
@@ -1213,7 +1213,7 @@ EXPORT_SPEC int UpnpRegisterRootDevice3(
|
|||||||
UpnpDevice_Handle *Hnd,
|
UpnpDevice_Handle *Hnd,
|
||||||
/*! [in] Address family of this device. Can be AF_INET for an IPv4 device, or
|
/*! [in] Address family of this device. Can be AF_INET for an IPv4 device, or
|
||||||
* AF_INET6 for an IPv6 device. Defaults to AF_INET. */
|
* AF_INET6 for an IPv6 device. Defaults to AF_INET. */
|
||||||
const int AddressFamily);
|
int AddressFamily);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Registers a device application for a specific address family with
|
* \brief Registers a device application for a specific address family with
|
||||||
@@ -1263,7 +1263,7 @@ EXPORT_SPEC int UpnpRegisterRootDevice4(
|
|||||||
UpnpDevice_Handle *Hnd,
|
UpnpDevice_Handle *Hnd,
|
||||||
/*! [in] Address family of this device. Can be AF_INET for an IPv4 device, or
|
/*! [in] Address family of this device. Can be AF_INET for an IPv4 device, or
|
||||||
* AF_INET6 for an IPv6 device. Defaults to AF_INET. */
|
* AF_INET6 for an IPv6 device. Defaults to AF_INET. */
|
||||||
const int AddressFamily,
|
int AddressFamily,
|
||||||
/*! [in] Pointer to a string containing the description URL to be returned for
|
/*! [in] Pointer to a string containing the description URL to be returned for
|
||||||
* legacy CPs for this root device instance. */
|
* legacy CPs for this root device instance. */
|
||||||
const char *LowerDescUrl);
|
const char *LowerDescUrl);
|
||||||
@@ -2790,6 +2790,21 @@ typedef int (*VDCallback_Close)(
|
|||||||
*/
|
*/
|
||||||
EXPORT_SPEC int UpnpVirtualDir_set_CloseCallback(VDCallback_Close callback);
|
EXPORT_SPEC int UpnpVirtualDir_set_CloseCallback(VDCallback_Close callback);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The {\bf UpnpVirtualDirCallbacks} structure contains the pointers to
|
||||||
|
* file-related callback functions a device application can register to
|
||||||
|
* virtualize URLs.
|
||||||
|
*/
|
||||||
|
struct UpnpVirtualDirCallbacks
|
||||||
|
{
|
||||||
|
VDCallback_GetInfo get_info;
|
||||||
|
VDCallback_Open open;
|
||||||
|
VDCallback_Read read;
|
||||||
|
VDCallback_Write write;
|
||||||
|
VDCallback_Seek seek;
|
||||||
|
VDCallback_Close close;
|
||||||
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Enables or disables the webserver.
|
* \brief Enables or disables the webserver.
|
||||||
*
|
*
|
||||||
@@ -2810,6 +2825,17 @@ EXPORT_SPEC int UpnpEnableWebserver(
|
|||||||
*/
|
*/
|
||||||
EXPORT_SPEC int UpnpIsWebserverEnabled(void);
|
EXPORT_SPEC int UpnpIsWebserverEnabled(void);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Sets the callback functions to be used to access a virtual directory.
|
||||||
|
*
|
||||||
|
* \return An integer representing one of the following:
|
||||||
|
* \li \c UPNP_E_SUCCESS: The operation completed successfully.
|
||||||
|
* \li \c UPNP_E_INVALID_PARAM: one of the callbacks is not valid.
|
||||||
|
*/
|
||||||
|
EXPORT_SPEC int UpnpSetVirtualDirCallbacks(
|
||||||
|
/*! [in] A structure that contains the callback functions. */
|
||||||
|
struct UpnpVirtualDirCallbacks *callbacks );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Adds a virtual directory mapping.
|
* \brief Adds a virtual directory mapping.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -99,6 +99,26 @@
|
|||||||
#undef UPNP_HAVE_WEBSERVER
|
#undef UPNP_HAVE_WEBSERVER
|
||||||
|
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with the SSDP part enabled
|
||||||
|
* (i.e. configure --enable-ssdp) */
|
||||||
|
#undef UPNP_HAVE_SSDP
|
||||||
|
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with optional SSDP headers
|
||||||
|
* support (i.e. configure --enable-optssdp) */
|
||||||
|
#undef UPNP_HAVE_OPTSSDP
|
||||||
|
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with the SOAP part enabled
|
||||||
|
* (i.e. configure --enable-soap) */
|
||||||
|
#undef UPNP_HAVE_SOAP
|
||||||
|
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with the GENA part enabled
|
||||||
|
* (i.e. configure --enable-gena) */
|
||||||
|
#undef UPNP_HAVE_GENA
|
||||||
|
|
||||||
|
|
||||||
/** Defined to 1 if the library has been compiled with helper API
|
/** Defined to 1 if the library has been compiled with helper API
|
||||||
* (i.e. configure --enable-tools) : <upnp/upnptools.h> file is available */
|
* (i.e. configure --enable-tools) : <upnp/upnptools.h> file is available */
|
||||||
#undef UPNP_HAVE_TOOLS
|
#undef UPNP_HAVE_TOOLS
|
||||||
@@ -107,5 +127,9 @@
|
|||||||
* (i.e. configure --enable-ipv6) */
|
* (i.e. configure --enable-ipv6) */
|
||||||
#undef UPNP_ENABLE_IPV6
|
#undef UPNP_ENABLE_IPV6
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with unspecified SERVER
|
||||||
|
* header (i.e. configure --enable-unspecified_server) */
|
||||||
|
#undef UPNP_ENABLE_UNSPECIFIED_SERVER
|
||||||
|
|
||||||
#endif /* UPNP_CONFIG_H */
|
#endif /* UPNP_CONFIG_H */
|
||||||
|
|
||||||
|
|||||||
@@ -65,9 +65,8 @@ tv_combo_SOURCES = \
|
|||||||
if WITH_DOCUMENTATION
|
if WITH_DOCUMENTATION
|
||||||
examplesdir = $(docdir)/examples
|
examplesdir = $(docdir)/examples
|
||||||
examples_DATA = \
|
examples_DATA = \
|
||||||
$(sort \
|
|
||||||
$(tv_ctrlpt_SOURCES) \
|
$(tv_ctrlpt_SOURCES) \
|
||||||
$(tv_device_SOURCES))
|
$(tv_device_SOURCES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
|
|||||||
@@ -741,6 +741,10 @@ void TvCtrlPointAddDevice(
|
|||||||
deviceNode->device.AdvrTimeOut = expires;
|
deviceNode->device.AdvrTimeOut = expires;
|
||||||
for (service = 0; service < TV_SERVICE_SERVCOUNT;
|
for (service = 0; service < TV_SERVICE_SERVCOUNT;
|
||||||
service++) {
|
service++) {
|
||||||
|
if (serviceId[service] == NULL) {
|
||||||
|
/* not found */
|
||||||
|
continue;
|
||||||
|
}
|
||||||
strcpy(deviceNode->device.TvService[service].
|
strcpy(deviceNode->device.TvService[service].
|
||||||
ServiceId, serviceId[service]);
|
ServiceId, serviceId[service]);
|
||||||
strcpy(deviceNode->device.TvService[service].
|
strcpy(deviceNode->device.TvService[service].
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
/* start a command loop thread */
|
/* start a command loop thread */
|
||||||
code = ithread_create(&cmdloop_thread, NULL, TvCtrlPointCommandLoop, NULL);
|
code = ithread_create(&cmdloop_thread, NULL, TvCtrlPointCommandLoop, NULL);
|
||||||
|
if (code != 0) {
|
||||||
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
|
}
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
ithread_join(cmdloop_thread, NULL);
|
ithread_join(cmdloop_thread, NULL);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
/* start a command loop thread */
|
/* start a command loop thread */
|
||||||
code = ithread_create(&cmdloop_thread, NULL, TvCtrlPointCommandLoop, NULL);
|
code = ithread_create(&cmdloop_thread, NULL, TvCtrlPointCommandLoop, NULL);
|
||||||
|
if (code != 0) {
|
||||||
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
|
}
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
ithread_join(cmdloop_thread, NULL);
|
ithread_join(cmdloop_thread, NULL);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -46,9 +46,16 @@ int main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
int code;
|
int code;
|
||||||
|
|
||||||
device_main(argc, argv);
|
rc = device_main(argc, argv);
|
||||||
|
if (rc != UPNP_E_SUCCESS) {
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* start a command loop thread */
|
/* start a command loop thread */
|
||||||
code = ithread_create(&cmdloop_thread, NULL, TvDeviceCommandLoop, NULL);
|
code = ithread_create(&cmdloop_thread, NULL, TvDeviceCommandLoop, NULL);
|
||||||
|
if (code != 0) {
|
||||||
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
|
}
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
ithread_join(cmdloop_thread, NULL);
|
ithread_join(cmdloop_thread, NULL);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -43,13 +43,13 @@
|
|||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
|
|
||||||
/* strndup() is a GNU extension. */
|
/* strndup() is a GNU extension. */
|
||||||
#if HAVE_STRNDUP && !defined(WIN32)
|
#if !HAVE_STRNDUP || defined(WIN32)
|
||||||
extern char *strndup(__const char *__string, size_t __n);
|
|
||||||
#else /* HAVE_STRNDUP && !defined(WIN32) */
|
|
||||||
static char *strndup(const char *__string, size_t __n)
|
static char *strndup(const char *__string, size_t __n)
|
||||||
{
|
{
|
||||||
size_t strsize = strnlen(__string, __n);
|
size_t strsize = strnlen(__string, __n);
|
||||||
char *newstr = (char *)malloc(strsize + 1);
|
char *newstr = (char *)malloc(strsize + 1);
|
||||||
|
if (newstr == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
strncpy(newstr, __string, strsize);
|
strncpy(newstr, __string, strsize);
|
||||||
newstr[strsize] = 0;
|
newstr[strsize] = 0;
|
||||||
@@ -75,7 +75,7 @@ struct SUpnpString
|
|||||||
UpnpString *UpnpString_new()
|
UpnpString *UpnpString_new()
|
||||||
{
|
{
|
||||||
/* All bytes are zero, and so is the length of the string. */
|
/* All bytes are zero, and so is the length of the string. */
|
||||||
struct SUpnpString *p = calloc(1, sizeof (struct SUpnpString));
|
struct SUpnpString *p = calloc((size_t)1, sizeof (struct SUpnpString));
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
goto error_handler1;
|
goto error_handler1;
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ UpnpString *UpnpString_new()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This byte is zero, calloc does initialize it. */
|
/* This byte is zero, calloc does initialize it. */
|
||||||
p->m_string = calloc(1, 1);
|
p->m_string = calloc((size_t)1, (size_t)1);
|
||||||
if (p->m_string == NULL) {
|
if (p->m_string == NULL) {
|
||||||
goto error_handler2;
|
goto error_handler2;
|
||||||
}
|
}
|
||||||
@@ -104,7 +104,7 @@ void UpnpString_delete(UpnpString *p)
|
|||||||
|
|
||||||
if (!q) return;
|
if (!q) return;
|
||||||
|
|
||||||
q->m_length = 0;
|
q->m_length = (size_t)0;
|
||||||
|
|
||||||
free(q->m_string);
|
free(q->m_string);
|
||||||
q->m_string = NULL;
|
q->m_string = NULL;
|
||||||
@@ -114,7 +114,7 @@ void UpnpString_delete(UpnpString *p)
|
|||||||
|
|
||||||
UpnpString *UpnpString_dup(const UpnpString *p)
|
UpnpString *UpnpString_dup(const UpnpString *p)
|
||||||
{
|
{
|
||||||
struct SUpnpString *q = calloc(1, sizeof (struct SUpnpString));
|
struct SUpnpString *q = calloc((size_t)1, sizeof (struct SUpnpString));
|
||||||
if (q == NULL) {
|
if (q == NULL) {
|
||||||
goto error_handler1;
|
goto error_handler1;
|
||||||
}
|
}
|
||||||
@@ -185,7 +185,7 @@ error_handler1:
|
|||||||
|
|
||||||
void UpnpString_clear(UpnpString *p)
|
void UpnpString_clear(UpnpString *p)
|
||||||
{
|
{
|
||||||
((struct SUpnpString *)p)->m_length = 0;
|
((struct SUpnpString *)p)->m_length = (size_t)0;
|
||||||
/* No need to realloc now, will do later when needed. */
|
/* No need to realloc now, will do later when needed. */
|
||||||
((struct SUpnpString *)p)->m_string[0] = 0;
|
((struct SUpnpString *)p)->m_string[0] = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -55,6 +56,9 @@
|
|||||||
/*! Maximum action header buffer length. */
|
/*! Maximum action header buffer length. */
|
||||||
#define HEADER_LENGTH 2000
|
#define HEADER_LENGTH 2000
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Structure to maintain a error code and string associated with the
|
* \brief Structure to maintain a error code and string associated with the
|
||||||
@@ -157,7 +161,7 @@ int UpnpResolveURL(
|
|||||||
ret = UPNP_E_INVALID_URL;
|
ret = UPNP_E_INVALID_URL;
|
||||||
|
|
||||||
ExitFunction:
|
ExitFunction:
|
||||||
return UPNP_E_SUCCESS;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -177,7 +181,7 @@ int UpnpResolveURL2(
|
|||||||
ret = UPNP_E_INVALID_URL;
|
ret = UPNP_E_INVALID_URL;
|
||||||
|
|
||||||
ExitFunction:
|
ExitFunction:
|
||||||
return UPNP_E_SUCCESS;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -220,14 +224,18 @@ static int addToAction(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (response) {
|
if (response) {
|
||||||
sprintf(ActBuff,
|
rc = snprintf(ActBuff, HEADER_LENGTH,
|
||||||
"<u:%sResponse xmlns:u=\"%s\">\r\n</u:%sResponse>",
|
"<u:%sResponse xmlns:u=\"%s\">\r\n</u:%sResponse>",
|
||||||
ActionName, ServType, ActionName);
|
ActionName, ServType, ActionName);
|
||||||
} else {
|
} else {
|
||||||
sprintf(ActBuff,
|
rc = snprintf(ActBuff, HEADER_LENGTH,
|
||||||
"<u:%s xmlns:u=\"%s\">\r\n</u:%s>",
|
"<u:%s xmlns:u=\"%s\">\r\n</u:%s>",
|
||||||
ActionName, ServType, ActionName);
|
ActionName, ServType, ActionName);
|
||||||
}
|
}
|
||||||
|
if (rc < 0 || (unsigned int) rc >= HEADER_LENGTH) {
|
||||||
|
free(ActBuff);
|
||||||
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
rc = ixmlParseBufferEx(ActBuff, ActionDoc);
|
rc = ixmlParseBufferEx(ActBuff, ActionDoc);
|
||||||
free(ActBuff);
|
free(ActBuff);
|
||||||
@@ -282,6 +290,7 @@ static IXML_Document *makeAction(
|
|||||||
IXML_Node *node;
|
IXML_Node *node;
|
||||||
IXML_Element *Ele;
|
IXML_Element *Ele;
|
||||||
IXML_Node *Txt = NULL;
|
IXML_Node *Txt = NULL;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
if (ActionName == NULL || ServType == NULL) {
|
if (ActionName == NULL || ServType == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -293,15 +302,16 @@ static IXML_Document *makeAction(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (response) {
|
if (response) {
|
||||||
sprintf(ActBuff,
|
rc = snprintf(ActBuff, HEADER_LENGTH,
|
||||||
"<u:%sResponse xmlns:u=\"%s\">\r\n</u:%sResponse>",
|
"<u:%sResponse xmlns:u=\"%s\">\r\n</u:%sResponse>",
|
||||||
ActionName, ServType, ActionName);
|
ActionName, ServType, ActionName);
|
||||||
} else {
|
} else {
|
||||||
sprintf(ActBuff,
|
rc = snprintf(ActBuff, HEADER_LENGTH,
|
||||||
"<u:%s xmlns:u=\"%s\">\r\n</u:%s>",
|
"<u:%s xmlns:u=\"%s\">\r\n</u:%s>",
|
||||||
ActionName, ServType, ActionName);
|
ActionName, ServType, ActionName);
|
||||||
}
|
}
|
||||||
if (ixmlParseBufferEx(ActBuff, &ActionDoc) != IXML_SUCCESS) {
|
if (rc < 0 || (unsigned int) rc >= HEADER_LENGTH ||
|
||||||
|
ixmlParseBufferEx(ActBuff, &ActionDoc) != IXML_SUCCESS) {
|
||||||
free(ActBuff);
|
free(ActBuff);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -51,6 +52,9 @@
|
|||||||
#include "uuid.h"
|
#include "uuid.h"
|
||||||
#include "upnpapi.h"
|
#include "upnpapi.h"
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
extern ithread_mutex_t GlobalClientSubscribeMutex;
|
extern ithread_mutex_t GlobalClientSubscribeMutex;
|
||||||
|
|
||||||
@@ -142,6 +146,8 @@ static int ScheduleGenaAutoRenew(
|
|||||||
const UpnpString *tmpSID = UpnpClientSubscription_get_SID(sub);
|
const UpnpString *tmpSID = UpnpClientSubscription_get_SID(sub);
|
||||||
const UpnpString *tmpEventURL = UpnpClientSubscription_get_EventURL(sub);
|
const UpnpString *tmpEventURL = UpnpClientSubscription_get_EventURL(sub);
|
||||||
|
|
||||||
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
if (TimeOut == UPNP_INFINITE) {
|
if (TimeOut == UPNP_INFINITE) {
|
||||||
return_code = GENA_SUCCESS;
|
return_code = GENA_SUCCESS;
|
||||||
goto end_function;
|
goto end_function;
|
||||||
@@ -152,6 +158,7 @@ static int ScheduleGenaAutoRenew(
|
|||||||
return_code = UPNP_E_OUTOF_MEMORY;
|
return_code = UPNP_E_OUTOF_MEMORY;
|
||||||
goto end_function;
|
goto end_function;
|
||||||
}
|
}
|
||||||
|
memset(RenewEventStruct, 0, sizeof(struct Upnp_Event_Subscribe));
|
||||||
|
|
||||||
RenewEvent = (upnp_timeout *) malloc(sizeof(upnp_timeout));
|
RenewEvent = (upnp_timeout *) malloc(sizeof(upnp_timeout));
|
||||||
if (RenewEvent == NULL) {
|
if (RenewEvent == NULL) {
|
||||||
@@ -159,11 +166,13 @@ static int ScheduleGenaAutoRenew(
|
|||||||
return_code = UPNP_E_OUTOF_MEMORY;
|
return_code = UPNP_E_OUTOF_MEMORY;
|
||||||
goto end_function;
|
goto end_function;
|
||||||
}
|
}
|
||||||
|
memset(RenewEvent, 0, sizeof(upnp_timeout));
|
||||||
|
|
||||||
/* schedule expire event */
|
/* schedule expire event */
|
||||||
RenewEventStruct->ErrCode = UPNP_E_SUCCESS;
|
RenewEventStruct->ErrCode = UPNP_E_SUCCESS;
|
||||||
RenewEventStruct->TimeOut = TimeOut;
|
RenewEventStruct->TimeOut = TimeOut;
|
||||||
strcpy(RenewEventStruct->Sid, UpnpString_get_String(tmpSID));
|
strncpy(RenewEventStruct->Sid, UpnpString_get_String(tmpSID),
|
||||||
|
sizeof(RenewEventStruct->Sid) - 1);
|
||||||
strncpy(RenewEventStruct->PublisherUrl,
|
strncpy(RenewEventStruct->PublisherUrl,
|
||||||
UpnpString_get_String(tmpEventURL), NAME_SIZE - 1);
|
UpnpString_get_String(tmpEventURL), NAME_SIZE - 1);
|
||||||
|
|
||||||
@@ -283,6 +292,7 @@ static int gena_subscribe(
|
|||||||
membuffer request;
|
membuffer request;
|
||||||
uri_type dest_url;
|
uri_type dest_url;
|
||||||
http_parser_t response;
|
http_parser_t response;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
UpnpString_clear(sid);
|
UpnpString_clear(sid);
|
||||||
|
|
||||||
@@ -291,12 +301,16 @@ static int gena_subscribe(
|
|||||||
timeout = &local_timeout;
|
timeout = &local_timeout;
|
||||||
}
|
}
|
||||||
if (*timeout < 0) {
|
if (*timeout < 0) {
|
||||||
strcpy(timeout_str, "infinite");
|
memset(timeout_str, 0, sizeof(timeout_str));
|
||||||
|
strncpy(timeout_str, "infinite", sizeof(timeout_str) - 1);
|
||||||
} else if(*timeout < CP_MINIMUM_SUBSCRIPTION_TIME) {
|
} else if(*timeout < CP_MINIMUM_SUBSCRIPTION_TIME) {
|
||||||
sprintf(timeout_str, "%d", CP_MINIMUM_SUBSCRIPTION_TIME);
|
rc = snprintf(timeout_str, sizeof(timeout_str),
|
||||||
|
"%d", CP_MINIMUM_SUBSCRIPTION_TIME);
|
||||||
} else {
|
} else {
|
||||||
sprintf(timeout_str, "%d", *timeout);
|
rc = snprintf(timeout_str, sizeof(timeout_str), "%d", *timeout);
|
||||||
}
|
}
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(timeout_str))
|
||||||
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
|
|
||||||
/* parse url */
|
/* parse url */
|
||||||
return_code = http_FixStrUrl(
|
return_code = http_FixStrUrl(
|
||||||
@@ -512,6 +526,10 @@ int genaSubscribe(
|
|||||||
UpnpString *ActualSID = UpnpString_new();
|
UpnpString *ActualSID = UpnpString_new();
|
||||||
UpnpString *EventURL = UpnpString_new();
|
UpnpString *EventURL = UpnpString_new();
|
||||||
struct Handle_Info *handle_info;
|
struct Handle_Info *handle_info;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
|
memset(temp_sid, 0, sizeof(temp_sid));
|
||||||
|
memset(temp_sid2, 0, sizeof(temp_sid2));
|
||||||
|
|
||||||
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, "GENA SUBSCRIBE BEGIN");
|
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, "GENA SUBSCRIBE BEGIN");
|
||||||
|
|
||||||
@@ -520,9 +538,9 @@ int genaSubscribe(
|
|||||||
HandleReadLock();
|
HandleReadLock();
|
||||||
/* validate handle */
|
/* validate handle */
|
||||||
if (GetHandleInfo(client_handle, &handle_info) != HND_CLIENT) {
|
if (GetHandleInfo(client_handle, &handle_info) != HND_CLIENT) {
|
||||||
HandleUnlock();
|
return_code = GENA_E_BAD_HANDLE;
|
||||||
|
SubscribeLock();
|
||||||
return GENA_E_BAD_HANDLE;
|
goto error_handler;
|
||||||
}
|
}
|
||||||
HandleUnlock();
|
HandleUnlock();
|
||||||
|
|
||||||
@@ -545,7 +563,11 @@ int genaSubscribe(
|
|||||||
/* generate client SID */
|
/* generate client SID */
|
||||||
uuid_create(&uid );
|
uuid_create(&uid );
|
||||||
uuid_unpack(&uid, temp_sid);
|
uuid_unpack(&uid, temp_sid);
|
||||||
sprintf(temp_sid2, "uuid:%s", temp_sid);
|
rc = snprintf(temp_sid2, sizeof(temp_sid2), "uuid:%s", temp_sid);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(temp_sid2)) {
|
||||||
|
return_code = UPNP_E_OUTOF_MEMORY;
|
||||||
|
goto error_handler;
|
||||||
|
}
|
||||||
UpnpString_set_String(out_sid, temp_sid2);
|
UpnpString_set_String(out_sid, temp_sid2);
|
||||||
|
|
||||||
/* create event url */
|
/* create event url */
|
||||||
@@ -567,11 +589,10 @@ int genaSubscribe(
|
|||||||
return_code = ScheduleGenaAutoRenew(client_handle, *TimeOut, newSubscription);
|
return_code = ScheduleGenaAutoRenew(client_handle, *TimeOut, newSubscription);
|
||||||
|
|
||||||
error_handler:
|
error_handler:
|
||||||
if (return_code != UPNP_E_SUCCESS) {
|
|
||||||
UpnpString_delete(ActualSID);
|
UpnpString_delete(ActualSID);
|
||||||
UpnpString_delete(EventURL);
|
UpnpString_delete(EventURL);
|
||||||
|
if (return_code != UPNP_E_SUCCESS)
|
||||||
UpnpClientSubscription_delete(newSubscription);
|
UpnpClientSubscription_delete(newSubscription);
|
||||||
}
|
|
||||||
HandleUnlock();
|
HandleUnlock();
|
||||||
SubscribeUnlock();
|
SubscribeUnlock();
|
||||||
|
|
||||||
@@ -789,7 +810,9 @@ void gena_process_notification_event(
|
|||||||
|
|
||||||
/* fill event struct */
|
/* fill event struct */
|
||||||
tmpSID = UpnpClientSubscription_get_SID(subscription);
|
tmpSID = UpnpClientSubscription_get_SID(subscription);
|
||||||
strcpy(event_struct.Sid, UpnpString_get_String(tmpSID));
|
memset(event_struct.Sid, 0, sizeof(event_struct.Sid));
|
||||||
|
strncpy(event_struct.Sid, UpnpString_get_String(tmpSID),
|
||||||
|
sizeof(event_struct.Sid) - 1);
|
||||||
event_struct.EventKey = eventKey;
|
event_struct.EventKey = eventKey;
|
||||||
event_struct.ChangedVariables = ChangedVars;
|
event_struct.ChangedVariables = ChangedVars;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -49,6 +50,10 @@
|
|||||||
#include "upnpapi.h"
|
#include "upnpapi.h"
|
||||||
#include "uuid.h"
|
#include "uuid.h"
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Unregisters a device.
|
* \brief Unregisters a device.
|
||||||
*
|
*
|
||||||
@@ -97,12 +102,11 @@ static int GeneratePropertySet(
|
|||||||
char *buffer;
|
char *buffer;
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
int temp_counter = 0;
|
|
||||||
|
|
||||||
/*size += strlen(XML_VERSION);*/
|
/*size += strlen(XML_VERSION);*/
|
||||||
size += strlen(XML_PROPERTYSET_HEADER);
|
size += strlen(XML_PROPERTYSET_HEADER);
|
||||||
size += strlen("</e:propertyset>\n\n");
|
size += strlen("</e:propertyset>\n\n");
|
||||||
for (temp_counter = 0, counter = 0; counter < count; counter++) {
|
for (counter = 0; counter < count; counter++) {
|
||||||
size += strlen( "<e:property>\n</e:property>\n" );
|
size += strlen( "<e:property>\n</e:property>\n" );
|
||||||
size += 2 * strlen(names[counter]) +
|
size += 2 * strlen(names[counter]) +
|
||||||
strlen(values[counter]) +
|
strlen(values[counter]) +
|
||||||
@@ -210,7 +214,7 @@ static UPNP_INLINE int notify_send_and_recv(
|
|||||||
"bbb",
|
"bbb",
|
||||||
start_msg.buf, start_msg.length,
|
start_msg.buf, start_msg.length,
|
||||||
propertySet, strlen(propertySet),
|
propertySet, strlen(propertySet),
|
||||||
CRLF, sizeof CRLF);
|
CRLF, strlen(CRLF));
|
||||||
if (ret_code) {
|
if (ret_code) {
|
||||||
membuffer_destroy(&start_msg);
|
membuffer_destroy(&start_msg);
|
||||||
sock_destroy(&info, SD_BOTH);
|
sock_destroy(&info, SD_BOTH);
|
||||||
@@ -253,14 +257,11 @@ static int genaNotify(
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
membuffer mid_msg;
|
membuffer mid_msg;
|
||||||
membuffer endmsg;
|
|
||||||
uri_type *url;
|
uri_type *url;
|
||||||
http_parser_t response;
|
http_parser_t response;
|
||||||
int return_code = -1;
|
int return_code = -1;
|
||||||
|
|
||||||
membuffer_init(&mid_msg);
|
membuffer_init(&mid_msg);
|
||||||
/* make 'end' msg (the part that won't vary with the destination) */
|
|
||||||
endmsg.size_inc = 30;
|
|
||||||
if (http_MakeMessage(&mid_msg, 1, 1,
|
if (http_MakeMessage(&mid_msg, 1, 1,
|
||||||
"s" "ssc" "sdcc",
|
"s" "ssc" "sdcc",
|
||||||
headers,
|
headers,
|
||||||
@@ -315,6 +316,8 @@ static void genaNotifyThread(
|
|||||||
struct Handle_Info *handle_info;
|
struct Handle_Info *handle_info;
|
||||||
ThreadPoolJob job;
|
ThreadPoolJob job;
|
||||||
|
|
||||||
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
/* This should be a HandleLock and not a HandleReadLock otherwise if there
|
/* This should be a HandleLock and not a HandleReadLock otherwise if there
|
||||||
* is a lot of notifications, then multiple threads will acquire a read
|
* is a lot of notifications, then multiple threads will acquire a read
|
||||||
* lock and the thread which sends the notification will be blocked forever
|
* lock and the thread which sends the notification will be blocked forever
|
||||||
@@ -410,6 +413,7 @@ static char *AllocGenaHeaders(
|
|||||||
char *headers = NULL;
|
char *headers = NULL;
|
||||||
size_t headers_size = 0;
|
size_t headers_size = 0;
|
||||||
int line = 0;
|
int line = 0;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
headers_size =
|
headers_size =
|
||||||
strlen(HEADER_LINE_1 ) +
|
strlen(HEADER_LINE_1 ) +
|
||||||
@@ -422,7 +426,7 @@ static char *AllocGenaHeaders(
|
|||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
sprintf(headers, "%s%s%"PRIzu"%s%s%s",
|
rc = snprintf(headers, headers_size, "%s%s%"PRIzu"%s%s%s",
|
||||||
HEADER_LINE_1,
|
HEADER_LINE_1,
|
||||||
HEADER_LINE_2A,
|
HEADER_LINE_2A,
|
||||||
strlen(propertySet) + 1,
|
strlen(propertySet) + 1,
|
||||||
@@ -431,7 +435,7 @@ static char *AllocGenaHeaders(
|
|||||||
HEADER_LINE_4);
|
HEADER_LINE_4);
|
||||||
|
|
||||||
ExitFunction:
|
ExitFunction:
|
||||||
if (headers == NULL) {
|
if (headers == NULL || rc < 0 || (unsigned int) rc >= headers_size) {
|
||||||
UpnpPrintf(UPNP_ALL, GENA, __FILE__, line,
|
UpnpPrintf(UPNP_ALL, GENA, __FILE__, line,
|
||||||
"AllocGenaHeaders(): Error UPNP_E_OUTOF_MEMORY\n");
|
"AllocGenaHeaders(): Error UPNP_E_OUTOF_MEMORY\n");
|
||||||
}
|
}
|
||||||
@@ -463,6 +467,8 @@ int genaInitNotify(
|
|||||||
struct Handle_Info *handle_info;
|
struct Handle_Info *handle_info;
|
||||||
ThreadPoolJob job;
|
ThreadPoolJob job;
|
||||||
|
|
||||||
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
|
||||||
"GENA BEGIN INITIAL NOTIFY");
|
"GENA BEGIN INITIAL NOTIFY");
|
||||||
|
|
||||||
@@ -474,23 +480,20 @@ int genaInitNotify(
|
|||||||
}
|
}
|
||||||
*reference_count = 0;
|
*reference_count = 0;
|
||||||
|
|
||||||
UDN_copy = (char *)malloc(strlen(UDN) + 1);
|
UDN_copy = strdup(UDN);
|
||||||
if (UDN_copy == NULL) {
|
if (UDN_copy == NULL) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = UPNP_E_OUTOF_MEMORY;
|
ret = UPNP_E_OUTOF_MEMORY;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
servId_copy = (char *)malloc(strlen(servId) + 1);
|
servId_copy = strdup(servId);
|
||||||
if (servId_copy == NULL) {
|
if (servId_copy == NULL) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = UPNP_E_OUTOF_MEMORY;
|
ret = UPNP_E_OUTOF_MEMORY;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(UDN_copy, UDN);
|
|
||||||
strcpy(servId_copy, servId);
|
|
||||||
|
|
||||||
HandleLock();
|
HandleLock();
|
||||||
|
|
||||||
if (GetHandleInfo(device_handle, &handle_info) != HND_DEVICE) {
|
if (GetHandleInfo(device_handle, &handle_info) != HND_DEVICE) {
|
||||||
@@ -553,7 +556,9 @@ int genaInitNotify(
|
|||||||
thread_struct->UDN = UDN_copy;
|
thread_struct->UDN = UDN_copy;
|
||||||
thread_struct->headers = headers;
|
thread_struct->headers = headers;
|
||||||
thread_struct->propertySet = propertySet;
|
thread_struct->propertySet = propertySet;
|
||||||
strcpy(thread_struct->sid, sid);
|
memset(thread_struct->sid, 0, sizeof(thread_struct->sid));
|
||||||
|
strncpy(thread_struct->sid, sid,
|
||||||
|
sizeof(thread_struct->sid) - 1);
|
||||||
thread_struct->eventKey = sub->eventKey++;
|
thread_struct->eventKey = sub->eventKey++;
|
||||||
thread_struct->reference_count = reference_count;
|
thread_struct->reference_count = reference_count;
|
||||||
thread_struct->device_handle = device_handle;
|
thread_struct->device_handle = device_handle;
|
||||||
@@ -616,6 +621,8 @@ int genaInitNotifyExt(
|
|||||||
struct Handle_Info *handle_info;
|
struct Handle_Info *handle_info;
|
||||||
ThreadPoolJob job;
|
ThreadPoolJob job;
|
||||||
|
|
||||||
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
|
||||||
"GENA BEGIN INITIAL NOTIFY EXT");
|
"GENA BEGIN INITIAL NOTIFY EXT");
|
||||||
|
|
||||||
@@ -627,23 +634,20 @@ int genaInitNotifyExt(
|
|||||||
}
|
}
|
||||||
*reference_count = 0;
|
*reference_count = 0;
|
||||||
|
|
||||||
UDN_copy = (char *)malloc(strlen(UDN) + 1);
|
UDN_copy = strdup(UDN);
|
||||||
if (UDN_copy == NULL) {
|
if (UDN_copy == NULL) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = UPNP_E_OUTOF_MEMORY;
|
ret = UPNP_E_OUTOF_MEMORY;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
servId_copy = (char *)malloc(strlen(servId) + 1);
|
servId_copy = strdup(servId);
|
||||||
if( servId_copy == NULL ) {
|
if( servId_copy == NULL ) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = UPNP_E_OUTOF_MEMORY;
|
ret = UPNP_E_OUTOF_MEMORY;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(UDN_copy, UDN);
|
|
||||||
strcpy(servId_copy, servId);
|
|
||||||
|
|
||||||
HandleLock();
|
HandleLock();
|
||||||
|
|
||||||
if (GetHandleInfo(device_handle, &handle_info) != HND_DEVICE) {
|
if (GetHandleInfo(device_handle, &handle_info) != HND_DEVICE) {
|
||||||
@@ -707,7 +711,9 @@ int genaInitNotifyExt(
|
|||||||
thread_struct->UDN = UDN_copy;
|
thread_struct->UDN = UDN_copy;
|
||||||
thread_struct->headers = headers;
|
thread_struct->headers = headers;
|
||||||
thread_struct->propertySet = propertySet;
|
thread_struct->propertySet = propertySet;
|
||||||
strcpy(thread_struct->sid, sid);
|
memset(thread_struct->sid, 0, sizeof(thread_struct->sid));
|
||||||
|
strncpy(thread_struct->sid, sid,
|
||||||
|
sizeof(thread_struct->sid) - 1);
|
||||||
thread_struct->eventKey = sub->eventKey++;
|
thread_struct->eventKey = sub->eventKey++;
|
||||||
thread_struct->reference_count = reference_count;
|
thread_struct->reference_count = reference_count;
|
||||||
thread_struct->device_handle = device_handle;
|
thread_struct->device_handle = device_handle;
|
||||||
@@ -769,6 +775,8 @@ int genaNotifyAllExt(
|
|||||||
struct Handle_Info *handle_info;
|
struct Handle_Info *handle_info;
|
||||||
ThreadPoolJob job;
|
ThreadPoolJob job;
|
||||||
|
|
||||||
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
|
||||||
"GENA BEGIN NOTIFY ALL EXT");
|
"GENA BEGIN NOTIFY ALL EXT");
|
||||||
|
|
||||||
@@ -780,23 +788,20 @@ int genaNotifyAllExt(
|
|||||||
}
|
}
|
||||||
*reference_count = 0;
|
*reference_count = 0;
|
||||||
|
|
||||||
UDN_copy = (char *)malloc(strlen(UDN) + 1);
|
UDN_copy = strdup(UDN);
|
||||||
if (UDN_copy == NULL) {
|
if (UDN_copy == NULL) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = UPNP_E_OUTOF_MEMORY;
|
ret = UPNP_E_OUTOF_MEMORY;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
servId_copy = (char *)malloc(strlen(servId) + 1);
|
servId_copy = strdup(servId);
|
||||||
if( servId_copy == NULL ) {
|
if( servId_copy == NULL ) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = UPNP_E_OUTOF_MEMORY;
|
ret = UPNP_E_OUTOF_MEMORY;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(UDN_copy, UDN);
|
|
||||||
strcpy(servId_copy, servId);
|
|
||||||
|
|
||||||
propertySet = ixmlPrintNode((IXML_Node *)PropSet);
|
propertySet = ixmlPrintNode((IXML_Node *)PropSet);
|
||||||
if (propertySet == NULL) {
|
if (propertySet == NULL) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
@@ -837,7 +842,10 @@ int genaNotifyAllExt(
|
|||||||
thread_struct->servId = servId_copy;
|
thread_struct->servId = servId_copy;
|
||||||
thread_struct->headers = headers;
|
thread_struct->headers = headers;
|
||||||
thread_struct->propertySet = propertySet;
|
thread_struct->propertySet = propertySet;
|
||||||
strcpy(thread_struct->sid, finger->sid);
|
memset(thread_struct->sid, 0,
|
||||||
|
sizeof(thread_struct->sid));
|
||||||
|
strncpy(thread_struct->sid, finger->sid,
|
||||||
|
sizeof(thread_struct->sid) - 1);
|
||||||
thread_struct->eventKey = finger->eventKey++;
|
thread_struct->eventKey = finger->eventKey++;
|
||||||
thread_struct->device_handle = device_handle;
|
thread_struct->device_handle = device_handle;
|
||||||
/* if overflow, wrap to 1 */
|
/* if overflow, wrap to 1 */
|
||||||
@@ -908,6 +916,8 @@ int genaNotifyAll(
|
|||||||
struct Handle_Info *handle_info;
|
struct Handle_Info *handle_info;
|
||||||
ThreadPoolJob job;
|
ThreadPoolJob job;
|
||||||
|
|
||||||
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
|
||||||
"GENA BEGIN NOTIFY ALL");
|
"GENA BEGIN NOTIFY ALL");
|
||||||
|
|
||||||
@@ -919,23 +929,20 @@ int genaNotifyAll(
|
|||||||
}
|
}
|
||||||
*reference_count = 0;
|
*reference_count = 0;
|
||||||
|
|
||||||
UDN_copy = (char *)malloc(strlen(UDN) + 1);
|
UDN_copy = strdup(UDN);
|
||||||
if (UDN_copy == NULL) {
|
if (UDN_copy == NULL) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = UPNP_E_OUTOF_MEMORY;
|
ret = UPNP_E_OUTOF_MEMORY;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
servId_copy = (char *)malloc(strlen(servId) + 1);
|
servId_copy = strdup(servId);
|
||||||
if( servId_copy == NULL ) {
|
if( servId_copy == NULL ) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = UPNP_E_OUTOF_MEMORY;
|
ret = UPNP_E_OUTOF_MEMORY;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(UDN_copy, UDN);
|
|
||||||
strcpy(servId_copy, servId);
|
|
||||||
|
|
||||||
ret = GeneratePropertySet(VarNames, VarValues, var_count, &propertySet);
|
ret = GeneratePropertySet(VarNames, VarValues, var_count, &propertySet);
|
||||||
if (ret != XML_SUCCESS) {
|
if (ret != XML_SUCCESS) {
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
@@ -975,7 +982,10 @@ int genaNotifyAll(
|
|||||||
thread_struct->servId = servId_copy;
|
thread_struct->servId = servId_copy;
|
||||||
thread_struct->headers = headers;
|
thread_struct->headers = headers;
|
||||||
thread_struct->propertySet = propertySet;
|
thread_struct->propertySet = propertySet;
|
||||||
strcpy(thread_struct->sid, finger->sid);
|
memset(thread_struct->sid, 0,
|
||||||
|
sizeof(thread_struct->sid));
|
||||||
|
strncpy(thread_struct->sid, finger->sid,
|
||||||
|
sizeof(thread_struct->sid) - 1);
|
||||||
thread_struct->eventKey = finger->eventKey++;
|
thread_struct->eventKey = finger->eventKey++;
|
||||||
thread_struct->device_handle = device_handle;
|
thread_struct->device_handle = device_handle;
|
||||||
/* if overflow, wrap to 1 */
|
/* if overflow, wrap to 1 */
|
||||||
@@ -1045,14 +1055,22 @@ static int respond_ok(
|
|||||||
int return_code;
|
int return_code;
|
||||||
char timeout_str[100];
|
char timeout_str[100];
|
||||||
int upnp_timeout = UPNP_TIMEOUT;
|
int upnp_timeout = UPNP_TIMEOUT;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
http_CalcResponseVersion( request->major_version,
|
http_CalcResponseVersion( request->major_version,
|
||||||
request->minor_version, &major, &minor );
|
request->minor_version, &major, &minor );
|
||||||
|
|
||||||
if( time_out >= 0 ) {
|
if( time_out >= 0 ) {
|
||||||
sprintf( timeout_str, "TIMEOUT: Second-%d", time_out );
|
rc = snprintf( timeout_str, sizeof ( timeout_str ),
|
||||||
|
"TIMEOUT: Second-%d", time_out );
|
||||||
} else {
|
} else {
|
||||||
strcpy( timeout_str, "TIMEOUT: Second-infinite" );
|
memset( timeout_str, 0, sizeof( timeout_str ) );
|
||||||
|
strncpy( timeout_str, "TIMEOUT: Second-infinite",
|
||||||
|
sizeof ( timeout_str ) - 1);
|
||||||
|
}
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof ( timeout_str ) ) {
|
||||||
|
error_respond( info, HTTP_INTERNAL_SERVER_ERROR, request );
|
||||||
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
membuffer_init( &response );
|
membuffer_init( &response );
|
||||||
@@ -1184,6 +1202,9 @@ void gena_process_subscription_request(
|
|||||||
char *event_url_path = NULL;
|
char *event_url_path = NULL;
|
||||||
memptr callback_hdr;
|
memptr callback_hdr;
|
||||||
memptr timeout_hdr;
|
memptr timeout_hdr;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
|
memset(&request_struct, 0, sizeof(request_struct));
|
||||||
|
|
||||||
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
|
||||||
"Subscription Request Received:\n");
|
"Subscription Request Received:\n");
|
||||||
@@ -1314,10 +1335,12 @@ void gena_process_subscription_request(
|
|||||||
/* generate SID */
|
/* generate SID */
|
||||||
uuid_create(&uid);
|
uuid_create(&uid);
|
||||||
uuid_unpack(&uid, temp_sid);
|
uuid_unpack(&uid, temp_sid);
|
||||||
sprintf(sub->sid, "uuid:%s", temp_sid);
|
rc = snprintf(sub->sid, sizeof(sub->sid), "uuid:%s", temp_sid);
|
||||||
|
|
||||||
/* respond OK */
|
/* respond OK */
|
||||||
if (respond_ok(info, time_out, sub, request) != UPNP_E_SUCCESS) {
|
if (rc < 0 || (unsigned int) rc >= sizeof(sub->sid) ||
|
||||||
|
(respond_ok(info, time_out,
|
||||||
|
sub, request) != UPNP_E_SUCCESS)) {
|
||||||
freeSubscriptionList(sub);
|
freeSubscriptionList(sub);
|
||||||
HandleUnlock();
|
HandleUnlock();
|
||||||
goto exit_function;
|
goto exit_function;
|
||||||
@@ -1330,7 +1353,8 @@ void gena_process_subscription_request(
|
|||||||
/* finally generate callback for init table dump */
|
/* finally generate callback for init table dump */
|
||||||
request_struct.ServiceId = service->serviceId;
|
request_struct.ServiceId = service->serviceId;
|
||||||
request_struct.UDN = service->UDN;
|
request_struct.UDN = service->UDN;
|
||||||
strcpy((char *)request_struct.Sid, sub->sid);
|
strncpy((char *)request_struct.Sid, sub->sid,
|
||||||
|
sizeof(request_struct.Sid) - 1);
|
||||||
|
|
||||||
/* copy callback */
|
/* copy callback */
|
||||||
callback_fun = handle_info->Callback;
|
callback_fun = handle_info->Callback;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
|
#if EXCLUDE_GENA == 0
|
||||||
|
|
||||||
#include <stdlib.h> /* for calloc(), free() */
|
#include <stdlib.h> /* for calloc(), free() */
|
||||||
|
|
||||||
@@ -324,6 +325,6 @@ ClientSubscription *GetClientSubActualSID(ClientSubscription *head, token *sid)
|
|||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* EXCLUDE_GENA */
|
||||||
#endif /* INCLUDE_CLIENT_APIS */
|
#endif /* INCLUDE_CLIENT_APIS */
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (C) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -31,6 +32,8 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#if EXCLUDE_MINISERVER == 0
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \file
|
* \file
|
||||||
*
|
*
|
||||||
@@ -88,10 +91,11 @@ uint16_t miniStopSockPort;
|
|||||||
/*!
|
/*!
|
||||||
* module vars
|
* module vars
|
||||||
*/
|
*/
|
||||||
|
static MiniServerState gMServState = MSERV_IDLE;
|
||||||
|
#ifdef INTERNAL_WEB_SERVER
|
||||||
static MiniServerCallback gGetCallback = NULL;
|
static MiniServerCallback gGetCallback = NULL;
|
||||||
static MiniServerCallback gSoapCallback = NULL;
|
static MiniServerCallback gSoapCallback = NULL;
|
||||||
static MiniServerCallback gGenaCallback = NULL;
|
static MiniServerCallback gGenaCallback = NULL;
|
||||||
static MiniServerState gMServState = MSERV_IDLE;
|
|
||||||
|
|
||||||
void SetHTTPGetCallback(MiniServerCallback callback)
|
void SetHTTPGetCallback(MiniServerCallback callback)
|
||||||
{
|
{
|
||||||
@@ -110,7 +114,6 @@ void SetGenaCallback(MiniServerCallback callback)
|
|||||||
gGenaCallback = callback;
|
gGenaCallback = callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef INTERNAL_WEB_SERVER
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Based on the type pf message, appropriate callback is issued.
|
* \brief Based on the type pf message, appropriate callback is issued.
|
||||||
*
|
*
|
||||||
@@ -259,6 +262,8 @@ static UPNP_INLINE void schedule_request_job(
|
|||||||
struct mserv_request_t *request;
|
struct mserv_request_t *request;
|
||||||
ThreadPoolJob job;
|
ThreadPoolJob job;
|
||||||
|
|
||||||
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
request = (struct mserv_request_t *)malloc(
|
request = (struct mserv_request_t *)malloc(
|
||||||
sizeof (struct mserv_request_t));
|
sizeof (struct mserv_request_t));
|
||||||
if (request == NULL) {
|
if (request == NULL) {
|
||||||
@@ -329,13 +334,13 @@ static int receive_from_stopSock(SOCKET ssock, fd_set *set)
|
|||||||
socklen_t clientLen;
|
socklen_t clientLen;
|
||||||
struct sockaddr_storage clientAddr;
|
struct sockaddr_storage clientAddr;
|
||||||
char requestBuf[256];
|
char requestBuf[256];
|
||||||
char buf_ntop[64];
|
char buf_ntop[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
if (FD_ISSET(ssock, set)) {
|
if (FD_ISSET(ssock, set)) {
|
||||||
clientLen = sizeof(clientAddr);
|
clientLen = sizeof(clientAddr);
|
||||||
memset((char *)&clientAddr, 0, sizeof(clientAddr));
|
memset((char *)&clientAddr, 0, sizeof(clientAddr));
|
||||||
byteReceived = recvfrom(ssock, requestBuf,
|
byteReceived = recvfrom(ssock, requestBuf,
|
||||||
25, 0, (struct sockaddr *)&clientAddr, &clientLen);
|
(size_t)25, 0, (struct sockaddr *)&clientAddr, &clientLen);
|
||||||
if (byteReceived > 0) {
|
if (byteReceived > 0) {
|
||||||
requestBuf[byteReceived] = '\0';
|
requestBuf[byteReceived] = '\0';
|
||||||
inet_ntop(AF_INET,
|
inet_ntop(AF_INET,
|
||||||
@@ -372,7 +377,7 @@ static void RunMiniServer(
|
|||||||
fd_set rdSet;
|
fd_set rdSet;
|
||||||
SOCKET maxMiniSock;
|
SOCKET maxMiniSock;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
SOCKET stopSock = 0;
|
int stopSock = 0;
|
||||||
|
|
||||||
maxMiniSock = 0;
|
maxMiniSock = 0;
|
||||||
maxMiniSock = max(maxMiniSock, miniSock->miniServerSock4);
|
maxMiniSock = max(maxMiniSock, miniSock->miniServerSock4);
|
||||||
@@ -471,7 +476,7 @@ static int get_port(
|
|||||||
*port = ntohs(((struct sockaddr_in6*)&sockinfo)->sin6_port);
|
*port = ntohs(((struct sockaddr_in6*)&sockinfo)->sin6_port);
|
||||||
}
|
}
|
||||||
UpnpPrintf(UPNP_INFO, MSERV, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, MSERV, __FILE__, __LINE__,
|
||||||
"sockfd = %d, .... port = %u\n", sockfd, *port);
|
"sockfd = %d, .... port = %d\n", sockfd, (int)*port);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -497,21 +502,26 @@ static int get_miniserver_sockets(
|
|||||||
MiniServerSockArray *out,
|
MiniServerSockArray *out,
|
||||||
/*! [in] port on which the server is listening for incoming IPv4
|
/*! [in] port on which the server is listening for incoming IPv4
|
||||||
* connections. */
|
* connections. */
|
||||||
uint16_t listen_port4,
|
uint16_t listen_port4
|
||||||
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
|
,
|
||||||
/*! [in] port on which the server is listening for incoming IPv6
|
/*! [in] port on which the server is listening for incoming IPv6
|
||||||
* connections. */
|
* connections. */
|
||||||
uint16_t listen_port6)
|
uint16_t listen_port6
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
char errorBuffer[ERROR_BUFFER_LEN];
|
char errorBuffer[ERROR_BUFFER_LEN];
|
||||||
struct sockaddr_storage __ss_v4;
|
struct sockaddr_storage __ss_v4;
|
||||||
struct sockaddr_in* serverAddr4 = (struct sockaddr_in*)&__ss_v4;
|
struct sockaddr_in* serverAddr4 = (struct sockaddr_in*)&__ss_v4;
|
||||||
SOCKET listenfd4;
|
SOCKET listenfd4;
|
||||||
uint16_t actual_port4;
|
uint16_t actual_port4 = 0u;
|
||||||
#ifdef UPNP_ENABLE_IPV6
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
struct sockaddr_storage __ss_v6;
|
struct sockaddr_storage __ss_v6;
|
||||||
struct sockaddr_in6* serverAddr6 = (struct sockaddr_in6*)&__ss_v6;
|
struct sockaddr_in6* serverAddr6 = (struct sockaddr_in6*)&__ss_v6;
|
||||||
SOCKET listenfd6;
|
SOCKET listenfd6;
|
||||||
uint16_t actual_port6;
|
uint16_t actual_port6 = 0u;
|
||||||
|
int onOff;
|
||||||
#endif
|
#endif
|
||||||
int ret_code;
|
int ret_code;
|
||||||
int reuseaddr_on = 0;
|
int reuseaddr_on = 0;
|
||||||
@@ -527,25 +537,34 @@ static int get_miniserver_sockets(
|
|||||||
#ifdef UPNP_ENABLE_IPV6
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
listenfd6 = socket(AF_INET6, SOCK_STREAM, 0);
|
listenfd6 = socket(AF_INET6, SOCK_STREAM, 0);
|
||||||
if (listenfd6 == INVALID_SOCKET) {
|
if (listenfd6 == INVALID_SOCKET) {
|
||||||
|
sock_close(listenfd4);
|
||||||
return UPNP_E_OUTOF_SOCKET;
|
return UPNP_E_OUTOF_SOCKET;
|
||||||
}
|
}
|
||||||
|
onOff = 1;
|
||||||
|
sockError = setsockopt(listenfd6, IPPROTO_IPV6, IPV6_V6ONLY,
|
||||||
|
(char *)&onOff, sizeof(onOff));
|
||||||
|
if (sockError == SOCKET_ERROR) {
|
||||||
|
sock_close(listenfd4);
|
||||||
|
sock_close(listenfd6);
|
||||||
|
return UPNP_E_SOCKET_BIND;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
/* As per the IANA specifications for the use of ports by applications
|
/* As per the IANA specifications for the use of ports by applications
|
||||||
* override the listen port passed in with the first available. */
|
* override the listen port passed in with the first available. */
|
||||||
if (listen_port4 < APPLICATION_LISTENING_PORT) {
|
if (listen_port4 < APPLICATION_LISTENING_PORT) {
|
||||||
listen_port4 = APPLICATION_LISTENING_PORT;
|
listen_port4 = (uint16_t)APPLICATION_LISTENING_PORT;
|
||||||
}
|
}
|
||||||
#ifdef UPNP_ENABLE_IPV6
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
if (listen_port6 < APPLICATION_LISTENING_PORT) {
|
if (listen_port6 < APPLICATION_LISTENING_PORT) {
|
||||||
listen_port6 = APPLICATION_LISTENING_PORT;
|
listen_port6 = (uint16_t)APPLICATION_LISTENING_PORT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
memset(&__ss_v4, 0, sizeof (__ss_v4));
|
memset(&__ss_v4, 0, sizeof (__ss_v4));
|
||||||
serverAddr4->sin_family = AF_INET;
|
serverAddr4->sin_family = (sa_family_t)AF_INET;
|
||||||
serverAddr4->sin_addr.s_addr = htonl(INADDR_ANY);
|
serverAddr4->sin_addr.s_addr = htonl(INADDR_ANY);
|
||||||
#ifdef UPNP_ENABLE_IPV6
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
memset(&__ss_v6, 0, sizeof (__ss_v6));
|
memset(&__ss_v6, 0, sizeof (__ss_v6));
|
||||||
serverAddr6->sin6_family = AF_INET6;
|
serverAddr6->sin6_family = (sa_family_t)AF_INET6;
|
||||||
serverAddr6->sin6_addr = in6addr_any;
|
serverAddr6->sin6_addr = in6addr_any;
|
||||||
#endif
|
#endif
|
||||||
/* Getting away with implementation of re-using address:port and
|
/* Getting away with implementation of re-using address:port and
|
||||||
@@ -745,10 +764,6 @@ static int get_miniserver_sockets(
|
|||||||
out->miniServerSock4 = listenfd4;
|
out->miniServerSock4 = listenfd4;
|
||||||
#ifdef UPNP_ENABLE_IPV6
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
out->miniServerSock6 = listenfd6;
|
out->miniServerSock6 = listenfd6;
|
||||||
#else
|
|
||||||
/* Silence compiler warning message:
|
|
||||||
* warning: unused parameter ‘listen_port6’ */
|
|
||||||
listen_port6 = 0;
|
|
||||||
#endif
|
#endif
|
||||||
return UPNP_E_SUCCESS;
|
return UPNP_E_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -782,7 +797,7 @@ static int get_miniserver_stopsock(
|
|||||||
}
|
}
|
||||||
/* Bind to local socket. */
|
/* Bind to local socket. */
|
||||||
memset(&stop_sockaddr, 0, sizeof (stop_sockaddr));
|
memset(&stop_sockaddr, 0, sizeof (stop_sockaddr));
|
||||||
stop_sockaddr.sin_family = AF_INET;
|
stop_sockaddr.sin_family = (sa_family_t)AF_INET;
|
||||||
stop_sockaddr.sin_addr.s_addr = inet_addr("127.0.0.1");
|
stop_sockaddr.sin_addr.s_addr = inet_addr("127.0.0.1");
|
||||||
ret = bind(miniServerStopSock, (struct sockaddr *)&stop_sockaddr,
|
ret = bind(miniServerStopSock, (struct sockaddr *)&stop_sockaddr,
|
||||||
sizeof(stop_sockaddr));
|
sizeof(stop_sockaddr));
|
||||||
@@ -812,9 +827,9 @@ static UPNP_INLINE void InitMiniServerSockArray(MiniServerSockArray *miniSocket)
|
|||||||
miniSocket->ssdpSock4 = INVALID_SOCKET;
|
miniSocket->ssdpSock4 = INVALID_SOCKET;
|
||||||
miniSocket->ssdpSock6 = INVALID_SOCKET;
|
miniSocket->ssdpSock6 = INVALID_SOCKET;
|
||||||
miniSocket->ssdpSock6UlaGua = INVALID_SOCKET;
|
miniSocket->ssdpSock6UlaGua = INVALID_SOCKET;
|
||||||
miniSocket->stopPort = 0;
|
miniSocket->stopPort = 0u;
|
||||||
miniSocket->miniServerPort4 = 0;
|
miniSocket->miniServerPort4 = 0u;
|
||||||
miniSocket->miniServerPort6 = 0;
|
miniSocket->miniServerPort6 = 0u;
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
miniSocket->ssdpReqSock4 = INVALID_SOCKET;
|
miniSocket->ssdpReqSock4 = INVALID_SOCKET;
|
||||||
miniSocket->ssdpReqSock6 = INVALID_SOCKET;
|
miniSocket->ssdpReqSock6 = INVALID_SOCKET;
|
||||||
@@ -835,7 +850,12 @@ int StartMiniServer(
|
|||||||
MiniServerSockArray *miniSocket;
|
MiniServerSockArray *miniSocket;
|
||||||
ThreadPoolJob job;
|
ThreadPoolJob job;
|
||||||
|
|
||||||
if (gMServState != MSERV_IDLE) {
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
|
switch (gMServState) {
|
||||||
|
case MSERV_IDLE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
/* miniserver running. */
|
/* miniserver running. */
|
||||||
return UPNP_E_INTERNAL_ERROR;
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
@@ -848,7 +868,11 @@ int StartMiniServer(
|
|||||||
#ifdef INTERNAL_WEB_SERVER
|
#ifdef INTERNAL_WEB_SERVER
|
||||||
/* V4 and V6 http listeners. */
|
/* V4 and V6 http listeners. */
|
||||||
ret_code = get_miniserver_sockets(
|
ret_code = get_miniserver_sockets(
|
||||||
miniSocket, *listen_port4, *listen_port6);
|
miniSocket, *listen_port4
|
||||||
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
|
, *listen_port6
|
||||||
|
#endif
|
||||||
|
);
|
||||||
if (ret_code != UPNP_E_SUCCESS) {
|
if (ret_code != UPNP_E_SUCCESS) {
|
||||||
free(miniSocket);
|
free(miniSocket);
|
||||||
return ret_code;
|
return ret_code;
|
||||||
@@ -886,13 +910,14 @@ int StartMiniServer(
|
|||||||
sock_close(miniSocket->ssdpReqSock4);
|
sock_close(miniSocket->ssdpReqSock4);
|
||||||
sock_close(miniSocket->ssdpReqSock6);
|
sock_close(miniSocket->ssdpReqSock6);
|
||||||
#endif /* INCLUDE_CLIENT_APIS */
|
#endif /* INCLUDE_CLIENT_APIS */
|
||||||
|
free(miniSocket);
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
}
|
}
|
||||||
/* Wait for miniserver to start. */
|
/* Wait for miniserver to start. */
|
||||||
count = 0;
|
count = 0;
|
||||||
while (gMServState != MSERV_RUNNING && count < max_count) {
|
while (gMServState != (MiniServerState)MSERV_RUNNING && count < max_count) {
|
||||||
/* 0.05s */
|
/* 0.05s */
|
||||||
usleep(50 * 1000);
|
usleep(50u * 1000u);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
if (count >= max_count) {
|
if (count >= max_count) {
|
||||||
@@ -926,9 +951,11 @@ int StopMiniServer()
|
|||||||
char buf[256] = "ShutDown";
|
char buf[256] = "ShutDown";
|
||||||
size_t bufLen = strlen(buf);
|
size_t bufLen = strlen(buf);
|
||||||
|
|
||||||
if(gMServState == MSERV_RUNNING) {
|
switch(gMServState) {
|
||||||
|
case MSERV_RUNNING:
|
||||||
gMServState = MSERV_STOPPING;
|
gMServState = MSERV_STOPPING;
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
sock = socket(AF_INET, SOCK_DGRAM, 0);
|
sock = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
@@ -939,19 +966,20 @@ int StopMiniServer()
|
|||||||
errorBuffer);
|
errorBuffer);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
while(gMServState != MSERV_IDLE) {
|
while(gMServState != (MiniServerState)MSERV_IDLE) {
|
||||||
ssdpAddr.sin_family = AF_INET;
|
ssdpAddr.sin_family = (sa_family_t)AF_INET;
|
||||||
ssdpAddr.sin_addr.s_addr = inet_addr("127.0.0.1");
|
ssdpAddr.sin_addr.s_addr = inet_addr("127.0.0.1");
|
||||||
ssdpAddr.sin_port = htons(miniStopSockPort);
|
ssdpAddr.sin_port = htons(miniStopSockPort);
|
||||||
sendto(sock, buf, bufLen, 0,
|
sendto(sock, buf, bufLen, 0,
|
||||||
(struct sockaddr *)&ssdpAddr, socklen);
|
(struct sockaddr *)&ssdpAddr, socklen);
|
||||||
usleep(1000);
|
usleep(1000u);
|
||||||
if (gMServState == MSERV_IDLE) {
|
if (gMServState == (MiniServerState)MSERV_IDLE) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
isleep(1);
|
isleep(1u);
|
||||||
}
|
}
|
||||||
sock_close(sock);
|
sock_close(sock);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif /* EXCLUDE_MINISERVER */
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -126,7 +127,7 @@ str_int_entry Http_Header_Names[NUM_HTTP_HEADER_NAMES] = {
|
|||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE void scanner_init(OUT scanner_t *scanner, IN membuffer *bufptr)
|
static UPNP_INLINE void scanner_init(OUT scanner_t *scanner, IN membuffer *bufptr)
|
||||||
{
|
{
|
||||||
scanner->cursor = 0;
|
scanner->cursor = (size_t)0;
|
||||||
scanner->msg = bufptr;
|
scanner->msg = bufptr;
|
||||||
scanner->entire_msg_loaded = FALSE;
|
scanner->entire_msg_loaded = FALSE;
|
||||||
}
|
}
|
||||||
@@ -137,12 +138,12 @@ static UPNP_INLINE void scanner_init(OUT scanner_t *scanner, IN membuffer *bufpt
|
|||||||
* Parameters :
|
* Parameters :
|
||||||
* IN char c ; character to be tested against used separator values
|
* IN char c ; character to be tested against used separator values
|
||||||
*
|
*
|
||||||
* Description : Finds the separator character.
|
* Description : Determines if the passed value is a separator
|
||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE int is_separator_char(IN char c)
|
static UPNP_INLINE int is_separator_char(IN int c)
|
||||||
{
|
{
|
||||||
return strchr(" \t()<>@,;:\\\"/[]?={}", c) != NULL;
|
return strchr(" \t()<>@,;:\\\"/[]?={}", c) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
@@ -151,10 +152,10 @@ static UPNP_INLINE int is_separator_char(IN char c)
|
|||||||
* Parameters :
|
* Parameters :
|
||||||
* IN char c ; character to be tested for separator values
|
* IN char c ; character to be tested for separator values
|
||||||
*
|
*
|
||||||
* Description : Calls the function to indentify separator character
|
* Description : Determines if the passed value is permissible in token
|
||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE int is_identifier_char(IN char c)
|
static UPNP_INLINE int is_identifier_char(IN int c)
|
||||||
{
|
{
|
||||||
return c >= 32 && c <= 126 && !is_separator_char(c);
|
return c >= 32 && c <= 126 && !is_separator_char(c);
|
||||||
}
|
}
|
||||||
@@ -168,7 +169,7 @@ static UPNP_INLINE int is_identifier_char(IN char c)
|
|||||||
* Description : Determines if the passed value is a control character
|
* Description : Determines if the passed value is a control character
|
||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE int is_control_char(IN char c)
|
static UPNP_INLINE int is_control_char(IN int c)
|
||||||
{
|
{
|
||||||
return (c >= 0 && c <= 31) || c == 127;
|
return (c >= 0 && c <= 31) || c == 127;
|
||||||
}
|
}
|
||||||
@@ -179,23 +180,20 @@ static UPNP_INLINE int is_control_char(IN char c)
|
|||||||
* Parameters :
|
* Parameters :
|
||||||
* IN char cc ; character to be tested for CR/LF
|
* IN char cc ; character to be tested for CR/LF
|
||||||
*
|
*
|
||||||
* Description : Checks to see if the passed in value is CR/LF
|
* Description : Determines if the passed value is permissible in qdtext
|
||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE int is_qdtext_char(IN char cc)
|
static UPNP_INLINE int is_qdtext_char(IN int c)
|
||||||
{
|
{
|
||||||
unsigned char c = ( unsigned char )cc;
|
|
||||||
|
|
||||||
/* we don't check for this; it's checked in get_token() */
|
/* we don't check for this; it's checked in get_token() */
|
||||||
assert( c != '"' );
|
assert( c != '"' );
|
||||||
|
|
||||||
if( ( c >= 32 && c != 127 ) ||
|
return
|
||||||
( c == TOKCHAR_CR || c == TOKCHAR_LF || c == '\t' )
|
(c >= 32 && c != 127) ||
|
||||||
) {
|
c < 0 ||
|
||||||
return TRUE;
|
c == TOKCHAR_CR ||
|
||||||
} else {
|
c == TOKCHAR_LF ||
|
||||||
return FALSE;
|
c == '\t';
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
@@ -223,7 +221,7 @@ static parse_status_t scanner_get_token(
|
|||||||
{
|
{
|
||||||
char *cursor;
|
char *cursor;
|
||||||
char *null_terminator; /* point to null-terminator in buffer */
|
char *null_terminator; /* point to null-terminator in buffer */
|
||||||
char c;
|
int c;
|
||||||
token_type_t token_type;
|
token_type_t token_type;
|
||||||
int got_end_quote;
|
int got_end_quote;
|
||||||
|
|
||||||
@@ -242,22 +240,22 @@ static parse_status_t scanner_get_token(
|
|||||||
/* scan identifier */
|
/* scan identifier */
|
||||||
token->buf = cursor++;
|
token->buf = cursor++;
|
||||||
token_type = TT_IDENTIFIER;
|
token_type = TT_IDENTIFIER;
|
||||||
while (is_identifier_char(*cursor))
|
while (cursor < null_terminator && is_identifier_char(*cursor))
|
||||||
cursor++;
|
cursor++;
|
||||||
if (!scanner->entire_msg_loaded && cursor == null_terminator)
|
if (!scanner->entire_msg_loaded && cursor == null_terminator)
|
||||||
/* possibly more valid chars */
|
/* possibly more valid chars */
|
||||||
return PARSE_INCOMPLETE;
|
return PARSE_INCOMPLETE;
|
||||||
/* calc token length */
|
/* calc token length */
|
||||||
token->length = (size_t)(cursor - token->buf);
|
token->length = (size_t)cursor - (size_t)token->buf;
|
||||||
} else if (c == ' ' || c == '\t') {
|
} else if (c == ' ' || c == '\t') {
|
||||||
token->buf = cursor++;
|
token->buf = cursor++;
|
||||||
token_type = TT_WHITESPACE;
|
token_type = TT_WHITESPACE;
|
||||||
while (*cursor == ' ' || *cursor == '\t')
|
while (cursor < null_terminator && (*cursor == ' ' || *cursor == '\t'))
|
||||||
cursor++;
|
cursor++;
|
||||||
if (!scanner->entire_msg_loaded && cursor == null_terminator)
|
if (!scanner->entire_msg_loaded && cursor == null_terminator)
|
||||||
/* possibly more chars */
|
/* possibly more chars */
|
||||||
return PARSE_INCOMPLETE;
|
return PARSE_INCOMPLETE;
|
||||||
token->length = (size_t)(cursor - token->buf);
|
token->length = (size_t)cursor - (size_t)token->buf;
|
||||||
} else if (c == TOKCHAR_CR) {
|
} else if (c == TOKCHAR_CR) {
|
||||||
/* scan CRLF */
|
/* scan CRLF */
|
||||||
token->buf = cursor++;
|
token->buf = cursor++;
|
||||||
@@ -267,16 +265,16 @@ static parse_status_t scanner_get_token(
|
|||||||
if (*cursor != TOKCHAR_LF) {
|
if (*cursor != TOKCHAR_LF) {
|
||||||
/* couldn't match CRLF; match as CR */
|
/* couldn't match CRLF; match as CR */
|
||||||
token_type = TT_CTRL; /* ctrl char */
|
token_type = TT_CTRL; /* ctrl char */
|
||||||
token->length = 1;
|
token->length = (size_t)1;
|
||||||
} else {
|
} else {
|
||||||
/* got CRLF */
|
/* got CRLF */
|
||||||
token->length = 2;
|
token->length = (size_t)2;
|
||||||
token_type = TT_CRLF;
|
token_type = TT_CRLF;
|
||||||
cursor++;
|
cursor++;
|
||||||
}
|
}
|
||||||
} else if (c == TOKCHAR_LF) { /* accept \n as CRLF */
|
} else if (c == TOKCHAR_LF) { /* accept \n as CRLF */
|
||||||
token->buf = cursor++;
|
token->buf = cursor++;
|
||||||
token->length = 1;
|
token->length = (size_t)1;
|
||||||
token_type = TT_CRLF;
|
token_type = TT_CRLF;
|
||||||
} else if (c == '"') {
|
} else if (c == '"') {
|
||||||
/* quoted text */
|
/* quoted text */
|
||||||
@@ -291,9 +289,7 @@ static parse_status_t scanner_get_token(
|
|||||||
} else if (c == '\\') {
|
} else if (c == '\\') {
|
||||||
if (cursor < null_terminator) {
|
if (cursor < null_terminator) {
|
||||||
c = *cursor++;
|
c = *cursor++;
|
||||||
/*if ( !(c > 0 && c <= 127) ) */
|
/* the char after '\\' could be ANY octet */
|
||||||
if (c == 0)
|
|
||||||
return PARSE_FAILURE;
|
|
||||||
}
|
}
|
||||||
/* else, while loop handles incomplete buf */
|
/* else, while loop handles incomplete buf */
|
||||||
} else if (is_qdtext_char(c)) {
|
} else if (is_qdtext_char(c)) {
|
||||||
@@ -303,7 +299,7 @@ static parse_status_t scanner_get_token(
|
|||||||
return PARSE_FAILURE;
|
return PARSE_FAILURE;
|
||||||
}
|
}
|
||||||
if (got_end_quote)
|
if (got_end_quote)
|
||||||
token->length = (size_t)(cursor - token->buf);
|
token->length = (size_t)cursor - (size_t)token->buf;
|
||||||
else { /* incomplete */
|
else { /* incomplete */
|
||||||
|
|
||||||
assert(cursor == null_terminator);
|
assert(cursor == null_terminator);
|
||||||
@@ -313,12 +309,12 @@ static parse_status_t scanner_get_token(
|
|||||||
/* scan separator */
|
/* scan separator */
|
||||||
token->buf = cursor++;
|
token->buf = cursor++;
|
||||||
token_type = TT_SEPARATOR;
|
token_type = TT_SEPARATOR;
|
||||||
token->length = 1;
|
token->length = (size_t)1;
|
||||||
} else if (is_control_char(c)) {
|
} else if (is_control_char(c)) {
|
||||||
/* scan ctrl char */
|
/* scan ctrl char */
|
||||||
token->buf = cursor++;
|
token->buf = cursor++;
|
||||||
token_type = TT_CTRL;
|
token_type = TT_CTRL;
|
||||||
token->length = 1;
|
token->length = (size_t)1;
|
||||||
} else
|
} else
|
||||||
return PARSE_FAILURE;
|
return PARSE_FAILURE;
|
||||||
|
|
||||||
@@ -405,7 +401,7 @@ void httpmsg_init(INOUT http_message_t *msg)
|
|||||||
{
|
{
|
||||||
msg->initialized = 1;
|
msg->initialized = 1;
|
||||||
msg->entity.buf = NULL;
|
msg->entity.buf = NULL;
|
||||||
msg->entity.length = 0;
|
msg->entity.length = ( size_t ) 0;
|
||||||
ListInit( &msg->headers, httpmsg_compare, httpheader_free );
|
ListInit( &msg->headers, httpmsg_compare, httpheader_free );
|
||||||
membuffer_init( &msg->msg );
|
membuffer_init( &msg->msg );
|
||||||
membuffer_init( &msg->status_msg );
|
membuffer_init( &msg->status_msg );
|
||||||
@@ -519,11 +515,12 @@ http_header_t *httpmsg_find_hdr(
|
|||||||
*
|
*
|
||||||
* Description : skips blank lines at the start of a msg.
|
* Description : skips blank lines at the start of a msg.
|
||||||
*
|
*
|
||||||
* Return : int ;
|
* Return : parse_status_t ;
|
||||||
*
|
* PARSE_OK
|
||||||
* Note :
|
* PARSE_INCOMPLETE -- not enuf chars to get a token
|
||||||
|
* PARSE_FAILURE -- bad msg format
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE int skip_blank_lines(INOUT scanner_t *scanner)
|
static UPNP_INLINE parse_status_t skip_blank_lines(INOUT scanner_t *scanner)
|
||||||
{
|
{
|
||||||
memptr token;
|
memptr token;
|
||||||
token_type_t tok_type;
|
token_type_t tok_type;
|
||||||
@@ -532,9 +529,10 @@ static UPNP_INLINE int skip_blank_lines(INOUT scanner_t *scanner)
|
|||||||
/* skip ws, crlf */
|
/* skip ws, crlf */
|
||||||
do {
|
do {
|
||||||
status = scanner_get_token(scanner, &token, &tok_type);
|
status = scanner_get_token(scanner, &token, &tok_type);
|
||||||
} while (status == PARSE_OK &&
|
} while (status == (parse_status_t)PARSE_OK &&
|
||||||
(tok_type == TT_WHITESPACE || tok_type == TT_CRLF));
|
(tok_type == (token_type_t)TT_WHITESPACE ||
|
||||||
if (status == PARSE_OK) {
|
tok_type == (token_type_t)TT_CRLF));
|
||||||
|
if (status == (parse_status_t)PARSE_OK) {
|
||||||
/* pushback a non-whitespace token */
|
/* pushback a non-whitespace token */
|
||||||
scanner->cursor -= token.length;
|
scanner->cursor -= token.length;
|
||||||
}
|
}
|
||||||
@@ -557,7 +555,7 @@ static UPNP_INLINE int skip_blank_lines(INOUT scanner_t *scanner)
|
|||||||
*
|
*
|
||||||
* Note :
|
* Note :
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE int skip_lws(INOUT scanner_t *scanner)
|
static UPNP_INLINE parse_status_t skip_lws(INOUT scanner_t *scanner)
|
||||||
{
|
{
|
||||||
memptr token;
|
memptr token;
|
||||||
token_type_t tok_type;
|
token_type_t tok_type;
|
||||||
@@ -571,13 +569,14 @@ static UPNP_INLINE int skip_lws(INOUT scanner_t *scanner)
|
|||||||
|
|
||||||
/* get CRLF or WS */
|
/* get CRLF or WS */
|
||||||
status = scanner_get_token( scanner, &token, &tok_type );
|
status = scanner_get_token( scanner, &token, &tok_type );
|
||||||
if( status == PARSE_OK ) {
|
if( status == ( parse_status_t ) PARSE_OK ) {
|
||||||
if( tok_type == TT_CRLF ) {
|
if( tok_type == ( token_type_t ) TT_CRLF ) {
|
||||||
/* get WS */
|
/* get WS */
|
||||||
status = scanner_get_token( scanner, &token, &tok_type );
|
status = scanner_get_token( scanner, &token, &tok_type );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( status == PARSE_OK && tok_type == TT_WHITESPACE ) {
|
if( status == ( parse_status_t ) PARSE_OK &&
|
||||||
|
tok_type == ( token_type_t ) TT_WHITESPACE ) {
|
||||||
matched = TRUE;
|
matched = TRUE;
|
||||||
} else {
|
} else {
|
||||||
/* did not match LWS; pushback token(s) */
|
/* did not match LWS; pushback token(s) */
|
||||||
@@ -587,7 +586,8 @@ static UPNP_INLINE int skip_lws(INOUT scanner_t *scanner)
|
|||||||
} while( matched );
|
} while( matched );
|
||||||
|
|
||||||
/* if entire msg is loaded, ignore an 'incomplete' warning */
|
/* if entire msg is loaded, ignore an 'incomplete' warning */
|
||||||
if( status == PARSE_INCOMPLETE && scanner->entire_msg_loaded ) {
|
if( status == ( parse_status_t ) PARSE_INCOMPLETE &&
|
||||||
|
scanner->entire_msg_loaded ) {
|
||||||
status = PARSE_OK;
|
status = PARSE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -623,13 +623,14 @@ static UPNP_INLINE parse_status_t match_non_ws_string(
|
|||||||
|
|
||||||
save_cursor = scanner->cursor;
|
save_cursor = scanner->cursor;
|
||||||
|
|
||||||
str->length = 0;
|
str->length = ( size_t ) 0;
|
||||||
str->buf = scanner_get_str( scanner ); /* point to next char in input */
|
str->buf = scanner_get_str( scanner ); /* point to next char in input */
|
||||||
|
|
||||||
while( !done ) {
|
while( !done ) {
|
||||||
status = scanner_get_token( scanner, &token, &tok_type );
|
status = scanner_get_token( scanner, &token, &tok_type );
|
||||||
if( status == PARSE_OK &&
|
if( status == ( parse_status_t ) PARSE_OK &&
|
||||||
tok_type != TT_WHITESPACE && tok_type != TT_CRLF ) {
|
tok_type != ( token_type_t ) TT_WHITESPACE &&
|
||||||
|
tok_type != ( token_type_t ) TT_CRLF ) {
|
||||||
/* append non-ws token */
|
/* append non-ws token */
|
||||||
str->length += token.length;
|
str->length += token.length;
|
||||||
} else {
|
} else {
|
||||||
@@ -637,15 +638,16 @@ static UPNP_INLINE parse_status_t match_non_ws_string(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( status == PARSE_OK ) {
|
if( status == ( parse_status_t ) PARSE_OK ) {
|
||||||
/* last token was WS; push it back in */
|
/* last token was WS; push it back in */
|
||||||
scanner->cursor -= token.length;
|
scanner->cursor -= token.length;
|
||||||
}
|
}
|
||||||
/* tolerate 'incomplete' msg */
|
/* tolerate 'incomplete' msg */
|
||||||
if( status == PARSE_OK ||
|
if( status == ( parse_status_t ) PARSE_OK ||
|
||||||
( status == PARSE_INCOMPLETE && scanner->entire_msg_loaded )
|
( status == ( parse_status_t ) PARSE_INCOMPLETE &&
|
||||||
|
scanner->entire_msg_loaded )
|
||||||
) {
|
) {
|
||||||
if( str->length == 0 ) {
|
if( str->length == ( size_t ) 0 ) {
|
||||||
/* no strings found */
|
/* no strings found */
|
||||||
return PARSE_NO_MATCH;
|
return PARSE_NO_MATCH;
|
||||||
} else {
|
} else {
|
||||||
@@ -686,7 +688,7 @@ static UPNP_INLINE parse_status_t match_raw_value(
|
|||||||
parse_status_t status;
|
parse_status_t status;
|
||||||
int done = FALSE;
|
int done = FALSE;
|
||||||
int saw_crlf = FALSE;
|
int saw_crlf = FALSE;
|
||||||
size_t pos_at_crlf = 0;
|
size_t pos_at_crlf = ( size_t ) 0;
|
||||||
size_t save_pos;
|
size_t save_pos;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
@@ -694,13 +696,13 @@ static UPNP_INLINE parse_status_t match_raw_value(
|
|||||||
|
|
||||||
/* value points to start of input */
|
/* value points to start of input */
|
||||||
raw_value->buf = scanner_get_str( scanner );
|
raw_value->buf = scanner_get_str( scanner );
|
||||||
raw_value->length = 0;
|
raw_value->length = ( size_t ) 0;
|
||||||
|
|
||||||
while( !done ) {
|
while( !done ) {
|
||||||
status = scanner_get_token( scanner, &token, &tok_type );
|
status = scanner_get_token( scanner, &token, &tok_type );
|
||||||
if( status == PARSE_OK ) {
|
if( status == ( parse_status_t ) PARSE_OK ) {
|
||||||
if( !saw_crlf ) {
|
if( !saw_crlf ) {
|
||||||
if( tok_type == TT_CRLF ) {
|
if( tok_type == ( token_type_t ) TT_CRLF ) {
|
||||||
/* CRLF could end value */
|
/* CRLF could end value */
|
||||||
saw_crlf = TRUE;
|
saw_crlf = TRUE;
|
||||||
|
|
||||||
@@ -711,7 +713,7 @@ static UPNP_INLINE parse_status_t match_raw_value(
|
|||||||
raw_value->length += token.length;
|
raw_value->length += token.length;
|
||||||
} else /* already seen CRLF */
|
} else /* already seen CRLF */
|
||||||
{
|
{
|
||||||
if( tok_type == TT_WHITESPACE ) {
|
if( tok_type == ( token_type_t ) TT_WHITESPACE ) {
|
||||||
/* start again; forget CRLF */
|
/* start again; forget CRLF */
|
||||||
saw_crlf = FALSE;
|
saw_crlf = FALSE;
|
||||||
raw_value->length += token.length;
|
raw_value->length += token.length;
|
||||||
@@ -730,11 +732,11 @@ static UPNP_INLINE parse_status_t match_raw_value(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( status == PARSE_OK ) {
|
if( status == ( parse_status_t ) PARSE_OK ) {
|
||||||
/* trim whitespace on right side of value */
|
/* trim whitespace on right side of value */
|
||||||
while( raw_value->length > 0 ) {
|
while( raw_value->length > ( size_t ) 0 ) {
|
||||||
/* get last char */
|
/* get last char */
|
||||||
c = raw_value->buf[raw_value->length - 1];
|
c = raw_value->buf[raw_value->length - ( size_t ) 1];
|
||||||
|
|
||||||
if( c != ' ' && c != '\t' &&
|
if( c != ' ' && c != '\t' &&
|
||||||
c != TOKCHAR_CR && c != TOKCHAR_LF ) {
|
c != TOKCHAR_CR && c != TOKCHAR_LF ) {
|
||||||
@@ -768,7 +770,7 @@ static UPNP_INLINE parse_status_t match_raw_value(
|
|||||||
* PARSE_FAILURE -- bad input
|
* PARSE_FAILURE -- bad input
|
||||||
* PARSE_INCOMPLETE
|
* PARSE_INCOMPLETE
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE int match_int(
|
static UPNP_INLINE parse_status_t match_int(
|
||||||
INOUT scanner_t *scanner,
|
INOUT scanner_t *scanner,
|
||||||
IN int base,
|
IN int base,
|
||||||
OUT int *value)
|
OUT int *value)
|
||||||
@@ -782,8 +784,8 @@ static UPNP_INLINE int match_int(
|
|||||||
|
|
||||||
save_pos = scanner->cursor;
|
save_pos = scanner->cursor;
|
||||||
status = scanner_get_token(scanner, &token, &tok_type);
|
status = scanner_get_token(scanner, &token, &tok_type);
|
||||||
if (status == PARSE_OK) {
|
if (status == (parse_status_t)PARSE_OK) {
|
||||||
if (tok_type == TT_IDENTIFIER) {
|
if (tok_type == (token_type_t)TT_IDENTIFIER) {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
num = strtol(token.buf, &end_ptr, base);
|
num = strtol(token.buf, &end_ptr, base);
|
||||||
/* all and only those chars in token should be used for num */
|
/* all and only those chars in token should be used for num */
|
||||||
@@ -798,7 +800,7 @@ static UPNP_INLINE int match_int(
|
|||||||
status = PARSE_NO_MATCH;
|
status = PARSE_NO_MATCH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (status != PARSE_OK) {
|
if (status != (parse_status_t)PARSE_OK) {
|
||||||
/* restore scanner position for bad values */
|
/* restore scanner position for bad values */
|
||||||
scanner->cursor = save_pos;
|
scanner->cursor = save_pos;
|
||||||
}
|
}
|
||||||
@@ -822,7 +824,7 @@ static UPNP_INLINE int match_int(
|
|||||||
* PARSE_FAILURE
|
* PARSE_FAILURE
|
||||||
* PARSE_INCOMPLETE
|
* PARSE_INCOMPLETE
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE int
|
static UPNP_INLINE parse_status_t
|
||||||
read_until_crlf( INOUT scanner_t * scanner,
|
read_until_crlf( INOUT scanner_t * scanner,
|
||||||
OUT memptr * str )
|
OUT memptr * str )
|
||||||
{
|
{
|
||||||
@@ -837,9 +839,10 @@ read_until_crlf( INOUT scanner_t * scanner,
|
|||||||
/* read until we hit a crlf */
|
/* read until we hit a crlf */
|
||||||
do {
|
do {
|
||||||
status = scanner_get_token( scanner, &token, &tok_type );
|
status = scanner_get_token( scanner, &token, &tok_type );
|
||||||
} while( status == PARSE_OK && tok_type != TT_CRLF );
|
} while( status == ( parse_status_t ) PARSE_OK &&
|
||||||
|
tok_type != ( token_type_t ) TT_CRLF );
|
||||||
|
|
||||||
if( status == PARSE_OK ) {
|
if( status == ( parse_status_t ) PARSE_OK ) {
|
||||||
/* pushback crlf in stream */
|
/* pushback crlf in stream */
|
||||||
scanner->cursor -= token.length;
|
scanner->cursor -= token.length;
|
||||||
|
|
||||||
@@ -944,7 +947,7 @@ match_char( INOUT scanner_t * scanner,
|
|||||||
*
|
*
|
||||||
* Note :
|
* Note :
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static int vfmatch(
|
static parse_status_t vfmatch(
|
||||||
INOUT scanner_t *scanner,
|
INOUT scanner_t *scanner,
|
||||||
IN const char *fmt,
|
IN const char *fmt,
|
||||||
va_list argp)
|
va_list argp)
|
||||||
@@ -970,8 +973,8 @@ static int vfmatch(
|
|||||||
save_pos = scanner->cursor;
|
save_pos = scanner->cursor;
|
||||||
|
|
||||||
status = PARSE_OK;
|
status = PARSE_OK;
|
||||||
while( ( ( c = *fmt_ptr++ ) != 0 ) && ( status == PARSE_OK )
|
while( ( c = *fmt_ptr++ ) &&
|
||||||
) {
|
( status == ( parse_status_t ) PARSE_OK ) ) {
|
||||||
if( c == '%' ) {
|
if( c == '%' ) {
|
||||||
c = *fmt_ptr++;
|
c = *fmt_ptr++;
|
||||||
switch ( c ) {
|
switch ( c ) {
|
||||||
@@ -985,7 +988,8 @@ static int vfmatch(
|
|||||||
assert( str_ptr != NULL );
|
assert( str_ptr != NULL );
|
||||||
status = scanner_get_token( scanner, str_ptr,
|
status = scanner_get_token( scanner, str_ptr,
|
||||||
&tok_type );
|
&tok_type );
|
||||||
if( status == PARSE_OK && tok_type != TT_IDENTIFIER ) {
|
if( status == ( parse_status_t ) PARSE_OK &&
|
||||||
|
tok_type != ( token_type_t ) TT_IDENTIFIER ) {
|
||||||
/* not an identifier */
|
/* not an identifier */
|
||||||
status = PARSE_NO_MATCH;
|
status = PARSE_NO_MATCH;
|
||||||
}
|
}
|
||||||
@@ -993,7 +997,8 @@ static int vfmatch(
|
|||||||
case 'c': /* crlf */
|
case 'c': /* crlf */
|
||||||
status = scanner_get_token( scanner,
|
status = scanner_get_token( scanner,
|
||||||
&token, &tok_type );
|
&token, &tok_type );
|
||||||
if( status == PARSE_OK && tok_type != TT_CRLF ) {
|
if( status == ( parse_status_t ) PARSE_OK &&
|
||||||
|
tok_type != ( token_type_t ) TT_CRLF ) {
|
||||||
/* not CRLF token */
|
/* not CRLF token */
|
||||||
status = PARSE_NO_MATCH;
|
status = PARSE_NO_MATCH;
|
||||||
}
|
}
|
||||||
@@ -1014,7 +1019,7 @@ static int vfmatch(
|
|||||||
}
|
}
|
||||||
assert( str_ptr != NULL );
|
assert( str_ptr != NULL );
|
||||||
status = match_non_ws_string( scanner, str_ptr );
|
status = match_non_ws_string( scanner, str_ptr );
|
||||||
if( c == 'U' && status == PARSE_OK ) {
|
if( c == 'U' && status == ( parse_status_t ) PARSE_OK ) {
|
||||||
uri_ptr = va_arg( argp, uri_type * );
|
uri_ptr = va_arg( argp, uri_type * );
|
||||||
assert( uri_ptr != NULL );
|
assert( uri_ptr != NULL );
|
||||||
stat = parse_uri( str_ptr->buf, str_ptr->length,
|
stat = parse_uri( str_ptr->buf, str_ptr->length,
|
||||||
@@ -1043,7 +1048,8 @@ static int vfmatch(
|
|||||||
str_ptr = ( memptr * ) va_arg( argp, memptr * );
|
str_ptr = ( memptr * ) va_arg( argp, memptr * );
|
||||||
status =
|
status =
|
||||||
scanner_get_token( scanner, str_ptr, &tok_type );
|
scanner_get_token( scanner, str_ptr, &tok_type );
|
||||||
if( status == PARSE_OK && tok_type != TT_QUOTEDSTRING ) {
|
if( status == ( parse_status_t ) PARSE_OK &&
|
||||||
|
tok_type != ( token_type_t ) TT_QUOTEDSTRING ) {
|
||||||
status = PARSE_NO_MATCH; /* not a quoted string */
|
status = PARSE_NO_MATCH; /* not a quoted string */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1051,7 +1057,8 @@ static int vfmatch(
|
|||||||
/* optional whitespace */
|
/* optional whitespace */
|
||||||
status = scanner_get_token( scanner,
|
status = scanner_get_token( scanner,
|
||||||
&token, &tok_type );
|
&token, &tok_type );
|
||||||
if( status == PARSE_OK && tok_type != TT_WHITESPACE ) {
|
if( status == ( parse_status_t ) PARSE_OK &&
|
||||||
|
tok_type != ( token_type_t ) TT_WHITESPACE ) {
|
||||||
/* restore non-whitespace token */
|
/* restore non-whitespace token */
|
||||||
scanner->cursor -= token.length;
|
scanner->cursor -= token.length;
|
||||||
}
|
}
|
||||||
@@ -1085,7 +1092,8 @@ static int vfmatch(
|
|||||||
case '\t': /* Whitespace */
|
case '\t': /* Whitespace */
|
||||||
status = scanner_get_token( scanner,
|
status = scanner_get_token( scanner,
|
||||||
&token, &tok_type );
|
&token, &tok_type );
|
||||||
if( status == PARSE_OK && tok_type != TT_WHITESPACE ) {
|
if( status == ( parse_status_t ) PARSE_OK &&
|
||||||
|
tok_type != (token_type_t) TT_WHITESPACE ) {
|
||||||
/* not whitespace token */
|
/* not whitespace token */
|
||||||
status = PARSE_NO_MATCH;
|
status = PARSE_NO_MATCH;
|
||||||
}
|
}
|
||||||
@@ -1097,7 +1105,7 @@ static int vfmatch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( status != PARSE_OK ) {
|
if( status != ( parse_status_t ) PARSE_OK ) {
|
||||||
/* on error, restore original scanner pos */
|
/* on error, restore original scanner pos */
|
||||||
scanner->cursor = save_pos;
|
scanner->cursor = save_pos;
|
||||||
}
|
}
|
||||||
@@ -1120,13 +1128,14 @@ static int vfmatch(
|
|||||||
* PARSE_OK
|
* PARSE_OK
|
||||||
* PARSE_NO_MATCH
|
* PARSE_NO_MATCH
|
||||||
* PARSE_INCOMPLETE
|
* PARSE_INCOMPLETE
|
||||||
|
* PARSE_FAILURE - bad input
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static int match(
|
static parse_status_t match(
|
||||||
INOUT scanner_t *scanner,
|
INOUT scanner_t *scanner,
|
||||||
IN const char *fmt,
|
IN const char *fmt,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
int ret_code;
|
parse_status_t ret_code;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@@ -1152,14 +1161,15 @@ static int match(
|
|||||||
* PARSE_OK
|
* PARSE_OK
|
||||||
* PARSE_NO_MATCH -- failure to match pattern 'fmt'
|
* PARSE_NO_MATCH -- failure to match pattern 'fmt'
|
||||||
* PARSE_FAILURE -- 'str' is bad input
|
* PARSE_FAILURE -- 'str' is bad input
|
||||||
|
* PARSE_INCOMPLETE
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
int
|
parse_status_t
|
||||||
matchstr( IN char *str,
|
matchstr( IN char *str,
|
||||||
IN size_t slen,
|
IN size_t slen,
|
||||||
IN const char *fmt,
|
IN const char *fmt,
|
||||||
... )
|
... )
|
||||||
{
|
{
|
||||||
int ret_code;
|
parse_status_t ret_code;
|
||||||
char save_char;
|
char save_char;
|
||||||
scanner_t scanner;
|
scanner_t scanner;
|
||||||
membuffer buf;
|
membuffer buf;
|
||||||
@@ -1226,6 +1236,8 @@ parser_init( OUT http_parser_t * parser )
|
|||||||
* PARSE_OK
|
* PARSE_OK
|
||||||
* PARSE_SUCCESS
|
* PARSE_SUCCESS
|
||||||
* PARSE_FAILURE
|
* PARSE_FAILURE
|
||||||
|
* PARSE_INCOMPLETE
|
||||||
|
* PARSE_NO_MATCH
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static parse_status_t
|
static parse_status_t
|
||||||
parser_parse_requestline( INOUT http_parser_t * parser )
|
parser_parse_requestline( INOUT http_parser_t * parser )
|
||||||
@@ -1242,7 +1254,7 @@ parser_parse_requestline( INOUT http_parser_t * parser )
|
|||||||
assert( parser->position == POS_REQUEST_LINE );
|
assert( parser->position == POS_REQUEST_LINE );
|
||||||
|
|
||||||
status = skip_blank_lines( &parser->scanner );
|
status = skip_blank_lines( &parser->scanner );
|
||||||
if( status != PARSE_OK ) {
|
if( status != ( parse_status_t ) PARSE_OK ) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/*simple get http 0.9 as described in http 1.0 spec */
|
/*simple get http 0.9 as described in http 1.0 spec */
|
||||||
@@ -1250,7 +1262,7 @@ parser_parse_requestline( INOUT http_parser_t * parser )
|
|||||||
status =
|
status =
|
||||||
match( &parser->scanner, "%s\t%S%w%c", &method_str, &url_str );
|
match( &parser->scanner, "%s\t%S%w%c", &method_str, &url_str );
|
||||||
|
|
||||||
if( status == PARSE_OK ) {
|
if( status == ( parse_status_t ) PARSE_OK ) {
|
||||||
|
|
||||||
index =
|
index =
|
||||||
map_str_to_int( method_str.buf, method_str.length,
|
map_str_to_int( method_str.buf, method_str.length,
|
||||||
@@ -1289,7 +1301,7 @@ parser_parse_requestline( INOUT http_parser_t * parser )
|
|||||||
status = match( &parser->scanner,
|
status = match( &parser->scanner,
|
||||||
"%s\t%S\t%ihttp%w/%w%L%c", &method_str, &url_str,
|
"%s\t%S\t%ihttp%w/%w%L%c", &method_str, &url_str,
|
||||||
&version_str );
|
&version_str );
|
||||||
if( status != PARSE_OK ) {
|
if( status != ( parse_status_t ) PARSE_OK ) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/* store url */
|
/* store url */
|
||||||
@@ -1303,22 +1315,6 @@ parser_parse_requestline( INOUT http_parser_t * parser )
|
|||||||
HTTP_SUCCESS ) {
|
HTTP_SUCCESS ) {
|
||||||
return PARSE_FAILURE;
|
return PARSE_FAILURE;
|
||||||
}
|
}
|
||||||
/* scan version */
|
|
||||||
save_char = version_str.buf[version_str.length];
|
|
||||||
version_str.buf[version_str.length] = '\0'; /* null-terminate */
|
|
||||||
num_scanned = sscanf( version_str.buf, "%d . %d",
|
|
||||||
&hmsg->major_version, &hmsg->minor_version );
|
|
||||||
version_str.buf[version_str.length] = save_char; /* restore */
|
|
||||||
if( num_scanned != 2 ||
|
|
||||||
/* HTTP version equals to 1.0 should fail for MSEARCH as required by the
|
|
||||||
* UPnP certification tool */
|
|
||||||
hmsg->major_version < 0 || ( ( hmsg->major_version == 1 )
|
|
||||||
&& ( hmsg->minor_version < 1 )
|
|
||||||
&& ( Http_Method_Table[index].id == HTTPMETHOD_MSEARCH ) ) ) {
|
|
||||||
parser->http_error_code = HTTP_HTTP_VERSION_NOT_SUPPORTED;
|
|
||||||
/* error; bad http version */
|
|
||||||
return PARSE_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
index =
|
index =
|
||||||
map_str_to_int( method_str.buf, method_str.length,
|
map_str_to_int( method_str.buf, method_str.length,
|
||||||
@@ -1329,7 +1325,24 @@ parser_parse_requestline( INOUT http_parser_t * parser )
|
|||||||
return PARSE_FAILURE;
|
return PARSE_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
hmsg->method = Http_Method_Table[index].id;
|
/* scan version */
|
||||||
|
save_char = version_str.buf[version_str.length];
|
||||||
|
version_str.buf[version_str.length] = '\0'; /* null-terminate */
|
||||||
|
num_scanned = sscanf( version_str.buf, "%d . %d",
|
||||||
|
&hmsg->major_version, &hmsg->minor_version );
|
||||||
|
version_str.buf[version_str.length] = save_char; /* restore */
|
||||||
|
if (num_scanned != 2 ||
|
||||||
|
/* HTTP version equals to 1.0 should fail for MSEARCH as required by the
|
||||||
|
* UPnP certification tool */
|
||||||
|
hmsg->major_version < 0 ||
|
||||||
|
( hmsg->major_version == 1 && hmsg->minor_version < 1 &&
|
||||||
|
Http_Method_Table[index].id == HTTPMETHOD_MSEARCH )) {
|
||||||
|
parser->http_error_code = HTTP_HTTP_VERSION_NOT_SUPPORTED;
|
||||||
|
/* error; bad http version */
|
||||||
|
return PARSE_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
hmsg->method = ( http_method_t ) Http_Method_Table[index].id;
|
||||||
parser->position = POS_HEADERS; /* move to headers */
|
parser->position = POS_HEADERS; /* move to headers */
|
||||||
|
|
||||||
return PARSE_OK;
|
return PARSE_OK;
|
||||||
@@ -1341,12 +1354,13 @@ parser_parse_requestline( INOUT http_parser_t * parser )
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* INOUT http_parser_t* parser ; HTTP Parser object
|
* INOUT http_parser_t* parser ; HTTP Parser object
|
||||||
*
|
*
|
||||||
* Description: Get HTTP Method, URL location and version information.
|
* Description: Get HTTP version information, status code and status msg.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* PARSE_OK
|
* PARSE_OK
|
||||||
* PARSE_SUCCESS
|
|
||||||
* PARSE_FAILURE
|
* PARSE_FAILURE
|
||||||
|
* PARSE_INCOMPLETE
|
||||||
|
* PARSE_NO_MATCH
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
|
parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
|
||||||
{
|
{
|
||||||
@@ -1362,14 +1376,14 @@ parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
|
|||||||
assert(parser->position == POS_RESPONSE_LINE);
|
assert(parser->position == POS_RESPONSE_LINE);
|
||||||
|
|
||||||
status = skip_blank_lines(&parser->scanner);
|
status = skip_blank_lines(&parser->scanner);
|
||||||
if (status != PARSE_OK)
|
if (status != ( parse_status_t) PARSE_OK)
|
||||||
return status;
|
return status;
|
||||||
/* response line */
|
/* response line */
|
||||||
/*status = match( &parser->scanner, "%ihttp%w/%w%d\t.\t%d\t%d\t%L%c", */
|
/*status = match( &parser->scanner, "%ihttp%w/%w%d\t.\t%d\t%d\t%L%c", */
|
||||||
/* &hmsg->major_version, &hmsg->minor_version, */
|
/* &hmsg->major_version, &hmsg->minor_version, */
|
||||||
/* &hmsg->status_code, &hmsg->status_msg ); */
|
/* &hmsg->status_code, &hmsg->status_msg ); */
|
||||||
status = match(&parser->scanner, "%ihttp%w/%w%L%c", &line);
|
status = match(&parser->scanner, "%ihttp%w/%w%L%c", &line);
|
||||||
if (status != PARSE_OK)
|
if (status != ( parse_status_t ) PARSE_OK)
|
||||||
return status;
|
return status;
|
||||||
save_char = line.buf[line.length];
|
save_char = line.buf[line.length];
|
||||||
line.buf[line.length] = '\0'; /* null-terminate */
|
line.buf[line.length] = '\0'; /* null-terminate */
|
||||||
@@ -1378,10 +1392,9 @@ parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
|
|||||||
&hmsg->major_version, &hmsg->minor_version,
|
&hmsg->major_version, &hmsg->minor_version,
|
||||||
&hmsg->status_code);
|
&hmsg->status_code);
|
||||||
line.buf[line.length] = save_char; /* restore */
|
line.buf[line.length] = save_char; /* restore */
|
||||||
if (num_scanned != 3 || hmsg->major_version < 0 ||
|
if (num_scanned != 3 ||
|
||||||
/* HTTP version equals to 1.0 should fail as required by the
|
hmsg->major_version < 0 || hmsg->minor_version < 0 ||
|
||||||
* UPnP certification tool */
|
hmsg->status_code < 0)
|
||||||
hmsg->minor_version < 1 || hmsg->status_code < 0)
|
|
||||||
/* bad response line */
|
/* bad response line */
|
||||||
return PARSE_FAILURE;
|
return PARSE_FAILURE;
|
||||||
/* point to status msg */
|
/* point to status msg */
|
||||||
@@ -1402,7 +1415,7 @@ parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
|
|||||||
while (*p == ' ' || *p == '\t')
|
while (*p == ' ' || *p == '\t')
|
||||||
p++;
|
p++;
|
||||||
/* now, p is at start of status msg */
|
/* now, p is at start of status msg */
|
||||||
n = line.length - (size_t)(p - line.buf);
|
n = line.length - ((size_t)p - (size_t)line.buf);
|
||||||
if (membuffer_assign(&hmsg->status_msg, p, n) != 0) {
|
if (membuffer_assign(&hmsg->status_msg, p, n) != 0) {
|
||||||
/* out of mem */
|
/* out of mem */
|
||||||
parser->http_error_code = HTTP_INTERNAL_SERVER_ERROR;
|
parser->http_error_code = HTTP_INTERNAL_SERVER_ERROR;
|
||||||
@@ -1419,12 +1432,14 @@ parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* INOUT http_parser_t* parser ; HTTP Parser object
|
* INOUT http_parser_t* parser ; HTTP Parser object
|
||||||
*
|
*
|
||||||
* Description: Get HTTP Method, URL location and version information.
|
* Description: Read HTTP header fields.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* PARSE_OK
|
* PARSE_OK
|
||||||
* PARSE_SUCCESS
|
* PARSE_SUCCESS
|
||||||
* PARSE_FAILURE
|
* PARSE_FAILURE
|
||||||
|
* PARSE_INCOMPLETE
|
||||||
|
* PARSE_NO_MATCH
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
parse_status_t parser_parse_headers(INOUT http_parser_t *parser)
|
parse_status_t parser_parse_headers(INOUT http_parser_t *parser)
|
||||||
{
|
{
|
||||||
@@ -1442,33 +1457,37 @@ parse_status_t parser_parse_headers(INOUT http_parser_t *parser)
|
|||||||
char save_char;
|
char save_char;
|
||||||
int ret2;
|
int ret2;
|
||||||
|
|
||||||
assert(parser->position == POS_HEADERS ||
|
assert(parser->position == (parser_pos_t)POS_HEADERS ||
|
||||||
parser->ent_position == ENTREAD_CHUNKY_HEADERS);
|
parser->ent_position == ENTREAD_CHUNKY_HEADERS);
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
save_pos = scanner->cursor;
|
save_pos = scanner->cursor;
|
||||||
/* check end of headers */
|
/* check end of headers */
|
||||||
status = scanner_get_token(scanner, &token, &tok_type);
|
status = scanner_get_token(scanner, &token, &tok_type);
|
||||||
if (status != PARSE_OK) {
|
if (status != (parse_status_t)PARSE_OK) {
|
||||||
|
/* pushback tokens; useful only on INCOMPLETE error */
|
||||||
|
scanner->cursor = save_pos;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
if (tok_type == TT_CRLF) {
|
switch (tok_type) {
|
||||||
|
case TT_CRLF:
|
||||||
/* end of headers */
|
/* end of headers */
|
||||||
if ((parser->msg.is_request)
|
if ((parser->msg.is_request)
|
||||||
&& (parser->msg.method == HTTPMETHOD_POST)) {
|
&& (parser->msg.method == (http_method_t)HTTPMETHOD_POST)) {
|
||||||
parser->position = POS_COMPLETE; /*post entity parsing */
|
parser->position = POS_COMPLETE; /*post entity parsing */
|
||||||
/*is handled separately */
|
/*is handled separately */
|
||||||
return PARSE_SUCCESS;
|
return PARSE_SUCCESS;
|
||||||
}
|
}
|
||||||
parser->position = POS_ENTITY; /* read entity next */
|
parser->position = POS_ENTITY; /* read entity next */
|
||||||
return PARSE_OK;
|
return PARSE_OK;
|
||||||
}
|
case TT_IDENTIFIER:
|
||||||
/* not end; read header */
|
/* not end; read header */
|
||||||
if (tok_type != TT_IDENTIFIER) {
|
break;
|
||||||
|
default:
|
||||||
return PARSE_FAILURE; /* didn't see header name */
|
return PARSE_FAILURE; /* didn't see header name */
|
||||||
}
|
}
|
||||||
status = match(scanner, " : %R%c", &hdr_value);
|
status = match(scanner, " : %R%c", &hdr_value);
|
||||||
if (status != PARSE_OK) {
|
if (status != (parse_status_t)PARSE_OK) {
|
||||||
/* pushback tokens; useful only on INCOMPLETE error */
|
/* pushback tokens; useful only on INCOMPLETE error */
|
||||||
scanner->cursor = save_pos;
|
scanner->cursor = save_pos;
|
||||||
return status;
|
return status;
|
||||||
@@ -1506,15 +1525,17 @@ parse_status_t parser_parse_headers(INOUT http_parser_t *parser)
|
|||||||
membuffer_init(&header->name_buf);
|
membuffer_init(&header->name_buf);
|
||||||
membuffer_init(&header->value);
|
membuffer_init(&header->value);
|
||||||
/* value can be 0 length */
|
/* value can be 0 length */
|
||||||
if (hdr_value.length == 0) {
|
if (hdr_value.length == (size_t)0) {
|
||||||
/* FIXME: Is this a bug? buf is not const. */
|
/* FIXME: Is this a bug? buf is not const. */
|
||||||
hdr_value.buf = "\0";
|
hdr_value.buf = "\0";
|
||||||
hdr_value.length = 1;
|
hdr_value.length = (size_t)1;
|
||||||
}
|
}
|
||||||
/* save in header in buffers */
|
/* save in header in buffers */
|
||||||
if (membuffer_assign(&header->name_buf, token.buf, token.length) ||
|
if (membuffer_assign(&header->name_buf, token.buf, token.length) ||
|
||||||
membuffer_assign(&header->value, hdr_value.buf, hdr_value.length)) {
|
membuffer_assign(&header->value, hdr_value.buf, hdr_value.length)) {
|
||||||
/* not enough mem */
|
/* not enough mem */
|
||||||
|
membuffer_destroy(&header->value);
|
||||||
|
membuffer_destroy(&header->name_buf);
|
||||||
free(header);
|
free(header);
|
||||||
parser->http_error_code = HTTP_INTERNAL_SERVER_ERROR;
|
parser->http_error_code = HTTP_INTERNAL_SERVER_ERROR;
|
||||||
return PARSE_FAILURE;
|
return PARSE_FAILURE;
|
||||||
@@ -1522,16 +1543,14 @@ parse_status_t parser_parse_headers(INOUT http_parser_t *parser)
|
|||||||
header->name.buf = header->name_buf.buf;
|
header->name.buf = header->name_buf.buf;
|
||||||
header->name.length = header->name_buf.length;
|
header->name.length = header->name_buf.length;
|
||||||
header->name_id = header_id;
|
header->name_id = header_id;
|
||||||
ListAddTail(&parser->msg.headers, header);
|
if (!ListAddTail(&parser->msg.headers, header)) {
|
||||||
/*NNS: ret = dlist_append( &parser->msg.headers, header ); */
|
membuffer_destroy(&header->value);
|
||||||
/** TODO: remove that? */
|
membuffer_destroy(&header->name_buf);
|
||||||
if (ret == UPNP_E_OUTOF_MEMORY) {
|
free(header);
|
||||||
parser->http_error_code =
|
parser->http_error_code = HTTP_INTERNAL_SERVER_ERROR;
|
||||||
HTTP_INTERNAL_SERVER_ERROR;
|
|
||||||
return PARSE_FAILURE;
|
return PARSE_FAILURE;
|
||||||
}
|
}
|
||||||
/** end of remove that? */
|
} else if (hdr_value.length > (size_t)0) {
|
||||||
} else if (hdr_value.length > 0) {
|
|
||||||
/* append value to existing header */
|
/* append value to existing header */
|
||||||
/* append space */
|
/* append space */
|
||||||
ret = membuffer_append_str(&orig_header->value, ", ");
|
ret = membuffer_append_str(&orig_header->value, ", ");
|
||||||
@@ -1561,7 +1580,6 @@ parse_status_t parser_parse_headers(INOUT http_parser_t *parser)
|
|||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* PARSE_INCOMPLETE
|
* PARSE_INCOMPLETE
|
||||||
* PARSE_FAILURE -- entity length > content-length value
|
|
||||||
* PARSE_SUCCESS
|
* PARSE_SUCCESS
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE parse_status_t
|
static UPNP_INLINE parse_status_t
|
||||||
@@ -1608,9 +1626,10 @@ parser_parse_entity_using_clen( INOUT http_parser_t * parser )
|
|||||||
* Description: Read data in the chunks
|
* Description: Read data in the chunks
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
|
* PARSE_CONTINUE_1
|
||||||
* PARSE_INCOMPLETE
|
* PARSE_INCOMPLETE
|
||||||
* PARSE_FAILURE -- entity length > content-length value
|
* PARSE_FAILURE
|
||||||
* PARSE_SUCCESS
|
* PARSE_NO_MATCH
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE parse_status_t parser_parse_chunky_body(
|
static UPNP_INLINE parse_status_t parser_parse_chunky_body(
|
||||||
INOUT http_parser_t *parser)
|
INOUT http_parser_t *parser)
|
||||||
@@ -1619,13 +1638,13 @@ static UPNP_INLINE parse_status_t parser_parse_chunky_body(
|
|||||||
size_t save_pos;
|
size_t save_pos;
|
||||||
|
|
||||||
/* if 'chunk_size' of bytes have been read; read next chunk */
|
/* if 'chunk_size' of bytes have been read; read next chunk */
|
||||||
if ((int)(parser->msg.msg.length - parser->scanner.cursor) >= parser->chunk_size) {
|
if ((parser->msg.msg.length - parser->scanner.cursor) >= parser->chunk_size) {
|
||||||
/* move to next chunk */
|
/* move to next chunk */
|
||||||
parser->scanner.cursor += parser->chunk_size;
|
parser->scanner.cursor += parser->chunk_size;
|
||||||
save_pos = parser->scanner.cursor;
|
save_pos = parser->scanner.cursor;
|
||||||
/* discard CRLF */
|
/* discard CRLF */
|
||||||
status = match(&parser->scanner, "%c");
|
status = match(&parser->scanner, "%c");
|
||||||
if (status != PARSE_OK) {
|
if (status != (parse_status_t)PARSE_OK) {
|
||||||
/*move back */
|
/*move back */
|
||||||
parser->scanner.cursor -= parser->chunk_size;
|
parser->scanner.cursor -= parser->chunk_size;
|
||||||
/*parser->scanner.cursor = save_pos; */
|
/*parser->scanner.cursor = save_pos; */
|
||||||
@@ -1652,8 +1671,9 @@ static UPNP_INLINE parse_status_t parser_parse_chunky_body(
|
|||||||
* Description: Read headers at the end of the chunked entity
|
* Description: Read headers at the end of the chunked entity
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
|
* PARSE_NO_MATCH
|
||||||
* PARSE_INCOMPLETE
|
* PARSE_INCOMPLETE
|
||||||
* PARSE_FAILURE -- entity length > content-length value
|
* PARSE_FAILURE
|
||||||
* PARSE_SUCCESS
|
* PARSE_SUCCESS
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE parse_status_t
|
static UPNP_INLINE parse_status_t
|
||||||
@@ -1664,18 +1684,18 @@ parser_parse_chunky_headers( INOUT http_parser_t * parser )
|
|||||||
|
|
||||||
save_pos = parser->scanner.cursor;
|
save_pos = parser->scanner.cursor;
|
||||||
status = parser_parse_headers( parser );
|
status = parser_parse_headers( parser );
|
||||||
if( status == PARSE_OK ) {
|
if( status == ( parse_status_t ) PARSE_OK ) {
|
||||||
/* finally, done with the whole msg */
|
/* finally, done with the whole msg */
|
||||||
parser->position = POS_COMPLETE;
|
parser->position = POS_COMPLETE;
|
||||||
|
|
||||||
/* save entity start ptr as the very last thing to do */
|
|
||||||
parser->msg.entity.buf = parser->msg.msg.buf +
|
|
||||||
parser->entity_start_position;
|
|
||||||
|
|
||||||
membuffer_delete( &parser->msg.msg, save_pos,
|
membuffer_delete( &parser->msg.msg, save_pos,
|
||||||
( parser->scanner.cursor - save_pos ) );
|
( parser->scanner.cursor - save_pos ) );
|
||||||
parser->scanner.cursor = save_pos;
|
parser->scanner.cursor = save_pos;
|
||||||
|
|
||||||
|
/* save entity start ptr as the very last thing to do */
|
||||||
|
parser->msg.entity.buf = parser->msg.msg.buf +
|
||||||
|
parser->entity_start_position;
|
||||||
|
|
||||||
return PARSE_SUCCESS;
|
return PARSE_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
return status;
|
return status;
|
||||||
@@ -1688,12 +1708,12 @@ parser_parse_chunky_headers( INOUT http_parser_t * parser )
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* INOUT http_parser_t* parser - HTTP Parser Object
|
* INOUT http_parser_t* parser - HTTP Parser Object
|
||||||
*
|
*
|
||||||
* Description: Read headers at the end of the chunked entity
|
* Description: Read entity using chunked transfer encoding
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* PARSE_INCOMPLETE
|
* PARSE_INCOMPLETE
|
||||||
* PARSE_FAILURE -- entity length > content-length value
|
* PARSE_FAILURE
|
||||||
* PARSE_SUCCESS
|
* PARSE_NO_MATCH
|
||||||
* PARSE_CONTINUE_1
|
* PARSE_CONTINUE_1
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE parse_status_t
|
static UPNP_INLINE parse_status_t
|
||||||
@@ -1710,7 +1730,7 @@ parser_parse_chunky_entity( INOUT http_parser_t * parser )
|
|||||||
|
|
||||||
/* get size of chunk, discard extension, discard CRLF */
|
/* get size of chunk, discard extension, discard CRLF */
|
||||||
status = match( scanner, "%x%L%c", &parser->chunk_size, &dummy );
|
status = match( scanner, "%x%L%c", &parser->chunk_size, &dummy );
|
||||||
if( status != PARSE_OK ) {
|
if( status != ( parse_status_t ) PARSE_OK ) {
|
||||||
scanner->cursor = save_pos;
|
scanner->cursor = save_pos;
|
||||||
UpnpPrintf( UPNP_INFO, HTTP, __FILE__, __LINE__,
|
UpnpPrintf( UPNP_INFO, HTTP, __FILE__, __LINE__,
|
||||||
"CHUNK COULD NOT BE PARSED\n" );
|
"CHUNK COULD NOT BE PARSED\n" );
|
||||||
@@ -1721,7 +1741,7 @@ parser_parse_chunky_entity( INOUT http_parser_t * parser )
|
|||||||
( scanner->cursor - save_pos ) );
|
( scanner->cursor - save_pos ) );
|
||||||
scanner->cursor = save_pos; /* adjust scanner too */
|
scanner->cursor = save_pos; /* adjust scanner too */
|
||||||
|
|
||||||
if( parser->chunk_size == 0 ) {
|
if( parser->chunk_size == (size_t)0 ) {
|
||||||
/* done reading entity; determine length of entity */
|
/* done reading entity; determine length of entity */
|
||||||
parser->msg.entity.length = parser->scanner.cursor -
|
parser->msg.entity.length = parser->scanner.cursor -
|
||||||
parser->entity_start_position + parser->msg.amount_discarded;
|
parser->entity_start_position + parser->msg.amount_discarded;
|
||||||
@@ -1742,7 +1762,7 @@ parser_parse_chunky_entity( INOUT http_parser_t * parser )
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* INOUT http_parser_t* parser ; HTTP Parser object
|
* INOUT http_parser_t* parser ; HTTP Parser object
|
||||||
*
|
*
|
||||||
* Description: Read headers at the end of the chunked entity
|
* Description: Keep reading entity until the connection is closed.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* PARSE_INCOMPLETE_ENTITY
|
* PARSE_INCOMPLETE_ENTITY
|
||||||
@@ -1779,9 +1799,9 @@ parser_parse_entity_until_close( INOUT http_parser_t * parser )
|
|||||||
* Description: Determines method to read entity
|
* Description: Determines method to read entity
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* PARSE_OK
|
* PARSE_CONTINUE_1
|
||||||
* PARSE_FAILURE
|
* PARSE_FAILURE
|
||||||
* PARSE_COMPLETE -- no more reading to do
|
* PARSE_SUCCESS -- no more reading to do
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
UPNP_INLINE parse_status_t
|
UPNP_INLINE parse_status_t
|
||||||
parser_get_entity_read_method( INOUT http_parser_t * parser )
|
parser_get_entity_read_method( INOUT http_parser_t * parser )
|
||||||
@@ -1794,7 +1814,7 @@ parser_get_entity_read_method( INOUT http_parser_t * parser )
|
|||||||
|
|
||||||
/* entity points to start of msg body */
|
/* entity points to start of msg body */
|
||||||
parser->msg.entity.buf = scanner_get_str( &parser->scanner );
|
parser->msg.entity.buf = scanner_get_str( &parser->scanner );
|
||||||
parser->msg.entity.length = 0;
|
parser->msg.entity.length = ( size_t ) 0;
|
||||||
|
|
||||||
/* remember start of body */
|
/* remember start of body */
|
||||||
parser->entity_start_position = parser->scanner.cursor;
|
parser->entity_start_position = parser->scanner.cursor;
|
||||||
@@ -1826,11 +1846,11 @@ parser_get_entity_read_method( INOUT http_parser_t * parser )
|
|||||||
if( response_code == 204 ||
|
if( response_code == 204 ||
|
||||||
response_code == 304 ||
|
response_code == 304 ||
|
||||||
( response_code >= 100 && response_code <= 199 ) ||
|
( response_code >= 100 && response_code <= 199 ) ||
|
||||||
hmsg->request_method == HTTPMETHOD_HEAD ||
|
hmsg->request_method == ( http_method_t ) HTTPMETHOD_HEAD ||
|
||||||
hmsg->request_method == HTTPMETHOD_MSEARCH ||
|
hmsg->request_method == ( http_method_t ) HTTPMETHOD_MSEARCH ||
|
||||||
hmsg->request_method == HTTPMETHOD_SUBSCRIBE ||
|
hmsg->request_method == ( http_method_t ) HTTPMETHOD_SUBSCRIBE ||
|
||||||
hmsg->request_method == HTTPMETHOD_UNSUBSCRIBE ||
|
hmsg->request_method == ( http_method_t ) HTTPMETHOD_UNSUBSCRIBE ||
|
||||||
hmsg->request_method == HTTPMETHOD_NOTIFY ) {
|
hmsg->request_method == ( http_method_t ) HTTPMETHOD_NOTIFY ) {
|
||||||
parser->position = POS_COMPLETE;
|
parser->position = POS_COMPLETE;
|
||||||
return PARSE_SUCCESS;
|
return PARSE_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -1859,7 +1879,7 @@ parser_get_entity_read_method( INOUT http_parser_t * parser )
|
|||||||
if( hmsg->is_request ) {
|
if( hmsg->is_request ) {
|
||||||
/* set hack flag for NOTIFY methods; if set to true this is */
|
/* set hack flag for NOTIFY methods; if set to true this is */
|
||||||
/* a valid SSDP notify msg */
|
/* a valid SSDP notify msg */
|
||||||
if( hmsg->method == HTTPMETHOD_NOTIFY ) {
|
if( hmsg->method == ( http_method_t ) HTTPMETHOD_NOTIFY ) {
|
||||||
parser->valid_ssdp_notify_hack = TRUE;
|
parser->valid_ssdp_notify_hack = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1877,17 +1897,19 @@ parser_get_entity_read_method( INOUT http_parser_t * parser )
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* INOUT http_parser_t* parser ; HTTP Parser object
|
* INOUT http_parser_t* parser ; HTTP Parser object
|
||||||
*
|
*
|
||||||
* Description: Determines method to read entity
|
* Description: Read HTTP entity body
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* PARSE_OK
|
|
||||||
* PARSE_FAILURE
|
* PARSE_FAILURE
|
||||||
* PARSE_COMPLETE -- no more reading to do
|
* PARSE_NO_MATCH
|
||||||
|
* PARSE_INCOMPLETE
|
||||||
|
* PARSE_INCOMPLETE_ENTITY
|
||||||
|
* PARSE_SUCCESS -- no more reading to do
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
UPNP_INLINE parse_status_t
|
UPNP_INLINE parse_status_t
|
||||||
parser_parse_entity( INOUT http_parser_t * parser )
|
parser_parse_entity( INOUT http_parser_t * parser )
|
||||||
{
|
{
|
||||||
parse_status_t status = PARSE_OK;
|
parse_status_t status;
|
||||||
|
|
||||||
assert( parser->position == POS_ENTITY );
|
assert( parser->position == POS_ENTITY );
|
||||||
|
|
||||||
@@ -1918,10 +1940,11 @@ parser_parse_entity( INOUT http_parser_t * parser )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
status = PARSE_FAILURE;
|
||||||
assert( 0 );
|
assert( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
} while( status == PARSE_CONTINUE_1 );
|
} while( status == ( parse_status_t ) PARSE_CONTINUE_1 );
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -1964,7 +1987,7 @@ parser_response_init( OUT http_parser_t * parser,
|
|||||||
parser_init( parser );
|
parser_init( parser );
|
||||||
parser->msg.is_request = FALSE;
|
parser->msg.is_request = FALSE;
|
||||||
parser->msg.request_method = request_method;
|
parser->msg.request_method = request_method;
|
||||||
parser->msg.amount_discarded = 0;
|
parser->msg.amount_discarded = (size_t)0;
|
||||||
parser->position = POS_RESPONSE_LINE;
|
parser->position = POS_RESPONSE_LINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1978,7 +2001,11 @@ parser_response_init( OUT http_parser_t * parser,
|
|||||||
* parser object the actual parsing function is invoked
|
* parser object the actual parsing function is invoked
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* void
|
* PARSE_SUCCESS
|
||||||
|
* PARSE_FAILURE
|
||||||
|
* PARSE_INCOMPLETE
|
||||||
|
* PARSE_INCOMPLETE_ENTITY
|
||||||
|
* PARSE_NO_MATCH
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
parse_status_t
|
parse_status_t
|
||||||
parser_parse( INOUT http_parser_t * parser )
|
parser_parse( INOUT http_parser_t * parser )
|
||||||
@@ -2018,7 +2045,7 @@ parser_parse( INOUT http_parser_t * parser )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} while( status == PARSE_OK );
|
} while( status == ( parse_status_t ) PARSE_OK );
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
@@ -2033,11 +2060,14 @@ parser_parse( INOUT http_parser_t * parser )
|
|||||||
* buffer
|
* buffer
|
||||||
* IN size_t buf_length ; Size of the buffer
|
* IN size_t buf_length ; Size of the buffer
|
||||||
*
|
*
|
||||||
* Description: The parser function. Depending on the position of the
|
* Description: Append date to HTTP parser, and do the parsing.
|
||||||
* parser object the actual parsing function is invoked
|
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* void
|
* PARSE_SUCCESS
|
||||||
|
* PARSE_FAILURE
|
||||||
|
* PARSE_INCOMPLETE
|
||||||
|
* PARSE_INCOMPLETE_ENTITY
|
||||||
|
* PARSE_NO_MATCH
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
parse_status_t
|
parse_status_t
|
||||||
parser_append( INOUT http_parser_t * parser,
|
parser_append( INOUT http_parser_t * parser,
|
||||||
@@ -2077,7 +2107,7 @@ int raw_to_int(IN memptr *raw_value, IN int base)
|
|||||||
long num;
|
long num;
|
||||||
char *end_ptr;
|
char *end_ptr;
|
||||||
|
|
||||||
if (raw_value->length == 0)
|
if (raw_value->length == (size_t)0)
|
||||||
return -1;
|
return -1;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
num = strtol(raw_value->buf, &end_ptr, base);
|
num = strtol(raw_value->buf, &end_ptr, base);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#define fseeko fseek
|
#define fseeko fseek
|
||||||
|
#define snprintf _snprintf
|
||||||
#else
|
#else
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -74,8 +76,8 @@
|
|||||||
const int CHUNK_HEADER_SIZE = 10;
|
const int CHUNK_HEADER_SIZE = 10;
|
||||||
const int CHUNK_TAIL_SIZE = 10;
|
const int CHUNK_TAIL_SIZE = 10;
|
||||||
*/
|
*/
|
||||||
#define CHUNK_HEADER_SIZE 10
|
#define CHUNK_HEADER_SIZE (size_t)10
|
||||||
#define CHUNK_TAIL_SIZE 10
|
#define CHUNK_TAIL_SIZE (size_t)10
|
||||||
|
|
||||||
#ifndef UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS
|
#ifndef UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS
|
||||||
|
|
||||||
@@ -124,7 +126,7 @@ static int Check_Connect_And_Wait_Connection(
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
} else {
|
} else {
|
||||||
int valopt = 0;
|
int valopt = 0;
|
||||||
socklen_t len = 0;
|
socklen_t len = sizeof(valopt);
|
||||||
if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (void *) &valopt, &len) < 0) {
|
if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (void *) &valopt, &len) < 0) {
|
||||||
/* failed to read delayed error */
|
/* failed to read delayed error */
|
||||||
return -1;
|
return -1;
|
||||||
@@ -162,6 +164,18 @@ static int private_connect(
|
|||||||
#endif /* UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS */
|
#endif /* UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
struct tm *http_gmtime_r(const time_t *clock, struct tm *result)
|
||||||
|
{
|
||||||
|
if (clock == NULL || *clock < 0 || result == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
/* gmtime in VC runtime is thread safe. */
|
||||||
|
*result = *gmtime(clock);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int http_FixUrl(IN uri_type *url, OUT uri_type *fixed_url)
|
int http_FixUrl(IN uri_type *url, OUT uri_type *fixed_url)
|
||||||
{
|
{
|
||||||
const char *temp_path = "/";
|
const char *temp_path = "/";
|
||||||
@@ -170,13 +184,13 @@ int http_FixUrl(IN uri_type *url, OUT uri_type *fixed_url)
|
|||||||
if (token_string_casecmp(&fixed_url->scheme, "http") != 0) {
|
if (token_string_casecmp(&fixed_url->scheme, "http") != 0) {
|
||||||
return UPNP_E_INVALID_URL;
|
return UPNP_E_INVALID_URL;
|
||||||
}
|
}
|
||||||
if( fixed_url->hostport.text.size == 0 ) {
|
if( fixed_url->hostport.text.size == ( size_t ) 0 ) {
|
||||||
return UPNP_E_INVALID_URL;
|
return UPNP_E_INVALID_URL;
|
||||||
}
|
}
|
||||||
/* set pathquery to "/" if it is empty */
|
/* set pathquery to "/" if it is empty */
|
||||||
if (fixed_url->pathquery.size == 0) {
|
if (fixed_url->pathquery.size == (size_t)0) {
|
||||||
fixed_url->pathquery.buff = temp_path;
|
fixed_url->pathquery.buff = temp_path;
|
||||||
fixed_url->pathquery.size = 1;
|
fixed_url->pathquery.size = (size_t)1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return UPNP_E_SUCCESS;
|
return UPNP_E_SUCCESS;
|
||||||
@@ -218,10 +232,12 @@ SOCKET http_Connect(
|
|||||||
SOCKET connfd;
|
SOCKET connfd;
|
||||||
socklen_t sockaddr_len;
|
socklen_t sockaddr_len;
|
||||||
int ret_connect;
|
int ret_connect;
|
||||||
|
char errorBuffer[ERROR_BUFFER_LEN];
|
||||||
|
|
||||||
http_FixUrl(destination_url, url);
|
http_FixUrl(destination_url, url);
|
||||||
|
|
||||||
connfd = socket(url->hostport.IPaddress.ss_family, SOCK_STREAM, 0);
|
connfd = socket((int)url->hostport.IPaddress.ss_family,
|
||||||
|
SOCK_STREAM, 0);
|
||||||
if (connfd == INVALID_SOCKET) {
|
if (connfd == INVALID_SOCKET) {
|
||||||
return (SOCKET)(UPNP_E_OUTOF_SOCKET);
|
return (SOCKET)(UPNP_E_OUTOF_SOCKET);
|
||||||
}
|
}
|
||||||
@@ -234,7 +250,11 @@ SOCKET http_Connect(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, HTTP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, HTTP, __FILE__, __LINE__,
|
||||||
"connect error: %d\n", WSAGetLastError());
|
"connect error: %d\n", WSAGetLastError());
|
||||||
#endif
|
#endif
|
||||||
shutdown(connfd, SD_BOTH);
|
if (shutdown(connfd, SD_BOTH) == -1) {
|
||||||
|
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
||||||
|
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
||||||
|
"Error in shutdown: %s\n", errorBuffer);
|
||||||
|
}
|
||||||
UpnpCloseSocket(connfd);
|
UpnpCloseSocket(connfd);
|
||||||
return (SOCKET)(UPNP_E_SOCKET_CONNECT);
|
return (SOCKET)(UPNP_E_SOCKET_CONNECT);
|
||||||
}
|
}
|
||||||
@@ -275,7 +295,7 @@ int http_RecvMessage(
|
|||||||
int ok_on_close = FALSE;
|
int ok_on_close = FALSE;
|
||||||
char buf[2 * 1024];
|
char buf[2 * 1024];
|
||||||
|
|
||||||
if (request_method == HTTPMETHOD_UNKNOWN) {
|
if (request_method == (http_method_t)HTTPMETHOD_UNKNOWN) {
|
||||||
parser_request_init(parser);
|
parser_request_init(parser);
|
||||||
} else {
|
} else {
|
||||||
parser_response_init(parser, request_method);
|
parser_response_init(parser, request_method);
|
||||||
@@ -286,12 +306,13 @@ int http_RecvMessage(
|
|||||||
if (num_read > 0) {
|
if (num_read > 0) {
|
||||||
/* got data */
|
/* got data */
|
||||||
status = parser_append(parser, buf, (size_t)num_read);
|
status = parser_append(parser, buf, (size_t)num_read);
|
||||||
if (status == PARSE_SUCCESS) {
|
switch (status) {
|
||||||
|
case PARSE_SUCCESS:
|
||||||
UpnpPrintf( UPNP_INFO, HTTP, __FILE__, __LINE__,
|
UpnpPrintf( UPNP_INFO, HTTP, __FILE__, __LINE__,
|
||||||
"<<< (RECVD) <<<\n%s\n-----------------\n",
|
"<<< (RECVD) <<<\n%s\n-----------------\n",
|
||||||
parser->msg.msg.buf );
|
parser->msg.msg.buf );
|
||||||
print_http_headers( &parser->msg );
|
print_http_headers( &parser->msg );
|
||||||
if (g_maxContentLength > 0 && parser->content_length > (unsigned int)g_maxContentLength) {
|
if (g_maxContentLength > (size_t)0 && parser->content_length > (unsigned int)g_maxContentLength) {
|
||||||
*http_error_code = HTTP_REQ_ENTITY_TOO_LARGE;
|
*http_error_code = HTTP_REQ_ENTITY_TOO_LARGE;
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = UPNP_E_OUTOF_BOUNDS;
|
ret = UPNP_E_OUTOF_BOUNDS;
|
||||||
@@ -300,19 +321,23 @@ int http_RecvMessage(
|
|||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else if (status == PARSE_FAILURE) {
|
case PARSE_FAILURE:
|
||||||
|
case PARSE_NO_MATCH:
|
||||||
*http_error_code = parser->http_error_code;
|
*http_error_code = parser->http_error_code;
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = UPNP_E_BAD_HTTPMSG;
|
ret = UPNP_E_BAD_HTTPMSG;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else if (status == PARSE_INCOMPLETE_ENTITY) {
|
case PARSE_INCOMPLETE_ENTITY:
|
||||||
/* read until close */
|
/* read until close */
|
||||||
ok_on_close = TRUE;
|
ok_on_close = TRUE;
|
||||||
} else if (status == PARSE_CONTINUE_1) {
|
break;
|
||||||
|
case PARSE_CONTINUE_1:
|
||||||
/* Web post request. */
|
/* Web post request. */
|
||||||
line = __LINE__;
|
line = __LINE__;
|
||||||
ret = PARSE_SUCCESS;
|
ret = PARSE_SUCCESS;
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else if (num_read == 0) {
|
} else if (num_read == 0) {
|
||||||
if (ok_on_close) {
|
if (ok_on_close) {
|
||||||
@@ -351,26 +376,32 @@ ExitFunction:
|
|||||||
|
|
||||||
int http_SendMessage(SOCKINFO *info, int *TimeOut, const char *fmt, ...)
|
int http_SendMessage(SOCKINFO *info, int *TimeOut, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
#if EXCLUDE_WEB_SERVER == 0
|
||||||
FILE *Fp;
|
FILE *Fp;
|
||||||
va_list argp;
|
|
||||||
struct SendInstruction *Instr = NULL;
|
struct SendInstruction *Instr = NULL;
|
||||||
char *buf = NULL;
|
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
char *file_buf = NULL;
|
char *file_buf = NULL;
|
||||||
char *ChunkBuf = NULL;
|
char *ChunkBuf = NULL;
|
||||||
|
/* 10 byte allocated for chunk header. */
|
||||||
char Chunk_Header[CHUNK_HEADER_SIZE];
|
char Chunk_Header[CHUNK_HEADER_SIZE];
|
||||||
|
size_t num_read;
|
||||||
|
size_t amount_to_be_read = (size_t)0;
|
||||||
|
size_t Data_Buf_Size = WEB_SERVER_BUF_SIZE;
|
||||||
|
#endif /* EXCLUDE_WEB_SERVER */
|
||||||
|
va_list argp;
|
||||||
|
char *buf = NULL;
|
||||||
char c;
|
char c;
|
||||||
int nw;
|
int nw;
|
||||||
int RetVal = 0;
|
int RetVal = 0;
|
||||||
size_t buf_length;
|
size_t buf_length;
|
||||||
size_t num_read;
|
|
||||||
size_t num_written;
|
size_t num_written;
|
||||||
size_t amount_to_be_read = 0;
|
|
||||||
/* 10 byte allocated for chunk header. */
|
|
||||||
size_t Data_Buf_Size = WEB_SERVER_BUF_SIZE;
|
|
||||||
|
|
||||||
|
#if EXCLUDE_WEB_SERVER == 0
|
||||||
|
memset(Chunk_Header, 0, sizeof(Chunk_Header));
|
||||||
|
#endif /* EXCLUDE_WEB_SERVER */
|
||||||
va_start(argp, fmt);
|
va_start(argp, fmt);
|
||||||
while ((c = *fmt++) != 0) {
|
while ((c = *fmt++)) {
|
||||||
|
#if EXCLUDE_WEB_SERVER == 0
|
||||||
if (c == 'I') {
|
if (c == 'I') {
|
||||||
Instr = va_arg(argp, struct SendInstruction *);
|
Instr = va_arg(argp, struct SendInstruction *);
|
||||||
if (Instr->ReadSendSize >= 0)
|
if (Instr->ReadSendSize >= 0)
|
||||||
@@ -402,12 +433,12 @@ int http_SendMessage(SOCKINFO *info, int *TimeOut, const char *fmt, ...)
|
|||||||
if (virtualDirCallback.seek(Fp, Instr->RangeOffset,
|
if (virtualDirCallback.seek(Fp, Instr->RangeOffset,
|
||||||
SEEK_CUR) != 0) {
|
SEEK_CUR) != 0) {
|
||||||
RetVal = UPNP_E_FILE_READ_ERROR;
|
RetVal = UPNP_E_FILE_READ_ERROR;
|
||||||
goto ExitFunction;
|
goto Cleanup_File;
|
||||||
}
|
}
|
||||||
} else if (Instr && Instr->IsRangeActive) {
|
} else if (Instr && Instr->IsRangeActive) {
|
||||||
if (fseeko(Fp, Instr->RangeOffset, SEEK_CUR) != 0) {
|
if (fseeko(Fp, Instr->RangeOffset, SEEK_CUR) != 0) {
|
||||||
RetVal = UPNP_E_FILE_READ_ERROR;
|
RetVal = UPNP_E_FILE_READ_ERROR;
|
||||||
goto ExitFunction;
|
goto Cleanup_File;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (amount_to_be_read) {
|
while (amount_to_be_read) {
|
||||||
@@ -419,7 +450,7 @@ int http_SendMessage(SOCKINFO *info, int *TimeOut, const char *fmt, ...)
|
|||||||
nr = virtualDirCallback.read(Fp, file_buf, n);
|
nr = virtualDirCallback.read(Fp, file_buf, n);
|
||||||
num_read = (size_t)nr;
|
num_read = (size_t)nr;
|
||||||
} else {
|
} else {
|
||||||
num_read = fread(file_buf, 1, n, Fp);
|
num_read = fread(file_buf, (size_t)1, n, Fp);
|
||||||
}
|
}
|
||||||
amount_to_be_read -= num_read;
|
amount_to_be_read -= num_read;
|
||||||
if (Instr->ReadSendSize < 0) {
|
if (Instr->ReadSendSize < 0) {
|
||||||
@@ -427,9 +458,9 @@ int http_SendMessage(SOCKINFO *info, int *TimeOut, const char *fmt, ...)
|
|||||||
amount_to_be_read = Data_Buf_Size;
|
amount_to_be_read = Data_Buf_Size;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
num_read = fread(file_buf, 1, Data_Buf_Size, Fp);
|
num_read = fread(file_buf, (size_t)1, Data_Buf_Size, Fp);
|
||||||
}
|
}
|
||||||
if (num_read == 0) {
|
if (num_read == (size_t)0) {
|
||||||
/* EOF so no more to send. */
|
/* EOF so no more to send. */
|
||||||
if (Instr && Instr->IsChunkActive) {
|
if (Instr && Instr->IsChunkActive) {
|
||||||
const char *str = "0\r\n\r\n";
|
const char *str = "0\r\n\r\n";
|
||||||
@@ -443,12 +474,19 @@ int http_SendMessage(SOCKINFO *info, int *TimeOut, const char *fmt, ...)
|
|||||||
}
|
}
|
||||||
/* Create chunk for the current buffer. */
|
/* Create chunk for the current buffer. */
|
||||||
if (Instr && Instr->IsChunkActive) {
|
if (Instr && Instr->IsChunkActive) {
|
||||||
|
int rc;
|
||||||
/* Copy CRLF at the end of the chunk */
|
/* Copy CRLF at the end of the chunk */
|
||||||
memcpy(file_buf + num_read, "\r\n", 2);
|
memcpy(file_buf + num_read, "\r\n", (size_t)2);
|
||||||
/* Hex length for the chunk size. */
|
/* Hex length for the chunk size. */
|
||||||
sprintf(Chunk_Header, "%" PRIzx, num_read);
|
memset(Chunk_Header, 0,
|
||||||
/*itoa(num_read,Chunk_Header,16); */
|
sizeof(Chunk_Header));
|
||||||
strcat(Chunk_Header, "\r\n");
|
rc = snprintf(Chunk_Header,
|
||||||
|
sizeof(Chunk_Header),
|
||||||
|
"%" PRIzx "\r\n", num_read);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Chunk_Header)) {
|
||||||
|
RetVal = UPNP_E_INTERNAL_ERROR;
|
||||||
|
goto Cleanup_File;
|
||||||
|
}
|
||||||
/* Copy the chunk size header */
|
/* Copy the chunk size header */
|
||||||
memcpy(file_buf - strlen(Chunk_Header),
|
memcpy(file_buf - strlen(Chunk_Header),
|
||||||
Chunk_Header,
|
Chunk_Header,
|
||||||
@@ -458,10 +496,10 @@ int http_SendMessage(SOCKINFO *info, int *TimeOut, const char *fmt, ...)
|
|||||||
/*printf("Sending %s\n",file_buf-strlen(Chunk_Header)); */
|
/*printf("Sending %s\n",file_buf-strlen(Chunk_Header)); */
|
||||||
nw = sock_write(info,
|
nw = sock_write(info,
|
||||||
file_buf - strlen(Chunk_Header),
|
file_buf - strlen(Chunk_Header),
|
||||||
num_read + strlen(Chunk_Header) + 2,
|
num_read + strlen(Chunk_Header) + (size_t)2,
|
||||||
TimeOut);
|
TimeOut);
|
||||||
num_written = (size_t)nw;
|
num_written = (size_t)nw;
|
||||||
if (nw <= 0 || num_written != num_read + strlen(Chunk_Header) + 2)
|
if (nw <= 0 || num_written != num_read + strlen(Chunk_Header) + (size_t)2)
|
||||||
/* Send error nothing we can do. */
|
/* Send error nothing we can do. */
|
||||||
goto Cleanup_File;
|
goto Cleanup_File;
|
||||||
} else {
|
} else {
|
||||||
@@ -484,11 +522,13 @@ Cleanup_File:
|
|||||||
fclose(Fp);
|
fclose(Fp);
|
||||||
}
|
}
|
||||||
goto ExitFunction;
|
goto ExitFunction;
|
||||||
} else if (c == 'b') {
|
} else
|
||||||
|
#endif /* EXCLUDE_WEB_SERVER */
|
||||||
|
if (c == 'b') {
|
||||||
/* memory buffer */
|
/* memory buffer */
|
||||||
buf = va_arg(argp, char *);
|
buf = va_arg(argp, char *);
|
||||||
buf_length = va_arg(argp, size_t);
|
buf_length = va_arg(argp, size_t);
|
||||||
if (buf_length > 0) {
|
if (buf_length > (size_t)0) {
|
||||||
nw = sock_write(info, buf, buf_length, TimeOut);
|
nw = sock_write(info, buf, buf_length, TimeOut);
|
||||||
num_written = (size_t)nw;
|
num_written = (size_t)nw;
|
||||||
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
||||||
@@ -506,7 +546,9 @@ Cleanup_File:
|
|||||||
|
|
||||||
ExitFunction:
|
ExitFunction:
|
||||||
va_end(argp);
|
va_end(argp);
|
||||||
|
#if EXCLUDE_WEB_SERVER == 0
|
||||||
free(ChunkBuf);
|
free(ChunkBuf);
|
||||||
|
#endif /* EXCLUDE_WEB_SERVER */
|
||||||
return RetVal;
|
return RetVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -548,7 +590,7 @@ int http_RequestAndResponse(
|
|||||||
SOCKINFO info;
|
SOCKINFO info;
|
||||||
|
|
||||||
tcp_connection = socket(
|
tcp_connection = socket(
|
||||||
destination->hostport.IPaddress.ss_family, SOCK_STREAM, 0);
|
(int)destination->hostport.IPaddress.ss_family, SOCK_STREAM, 0);
|
||||||
if (tcp_connection == INVALID_SOCKET) {
|
if (tcp_connection == INVALID_SOCKET) {
|
||||||
parser_response_init(response, req_method);
|
parser_response_init(response, req_method);
|
||||||
return UPNP_E_SOCKET_ERROR;
|
return UPNP_E_SOCKET_ERROR;
|
||||||
@@ -625,7 +667,7 @@ int http_Download( IN const char *url_str,
|
|||||||
memptr ctype;
|
memptr ctype;
|
||||||
size_t copy_len;
|
size_t copy_len;
|
||||||
membuffer request;
|
membuffer request;
|
||||||
char *urlPath = alloca(strlen(url_str) + 1);
|
char *urlPath = alloca(strlen(url_str) + (size_t)1);
|
||||||
|
|
||||||
/*ret_code = parse_uri( (char*)url_str, strlen(url_str), &url ); */
|
/*ret_code = parse_uri( (char*)url_str, strlen(url_str), &url ); */
|
||||||
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
||||||
@@ -635,17 +677,20 @@ int http_Download( IN const char *url_str,
|
|||||||
return ret_code;
|
return ret_code;
|
||||||
/* make msg */
|
/* make msg */
|
||||||
membuffer_init(&request);
|
membuffer_init(&request);
|
||||||
strcpy(urlPath, url_str);
|
memset(urlPath, 0, strlen(url_str) + (size_t)1);
|
||||||
|
strncpy(urlPath, url_str, strlen(url_str));
|
||||||
hoststr = strstr(urlPath, "//");
|
hoststr = strstr(urlPath, "//");
|
||||||
if (hoststr == NULL)
|
if (hoststr == NULL)
|
||||||
return UPNP_E_INVALID_URL;
|
return UPNP_E_INVALID_URL;
|
||||||
hoststr += 2;
|
hoststr += 2;
|
||||||
temp = strchr(hoststr, '/');
|
temp = strchr(hoststr, '/');
|
||||||
if (temp == NULL)
|
if (temp) {
|
||||||
return UPNP_E_INVALID_URL;
|
|
||||||
*temp = '\0';
|
*temp = '\0';
|
||||||
hostlen = strlen(hoststr);
|
hostlen = strlen(hoststr);
|
||||||
*temp = '/';
|
*temp = '/';
|
||||||
|
} else {
|
||||||
|
hostlen = strlen(hoststr);
|
||||||
|
}
|
||||||
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
||||||
"HOSTNAME : %s Length : %" PRIzu "\n", hoststr, hostlen);
|
"HOSTNAME : %s Length : %" PRIzu "\n", hoststr, hostlen);
|
||||||
ret_code = http_MakeMessage(&request, 1, 1,
|
ret_code = http_MakeMessage(&request, 1, 1,
|
||||||
@@ -680,15 +725,15 @@ int http_Download( IN const char *url_str,
|
|||||||
*content_type = '\0'; /* no content-type */
|
*content_type = '\0'; /* no content-type */
|
||||||
} else {
|
} else {
|
||||||
/* safety */
|
/* safety */
|
||||||
copy_len = ctype.length < LINE_SIZE - 1 ?
|
copy_len = ctype.length < LINE_SIZE - (size_t)1 ?
|
||||||
ctype.length : LINE_SIZE - 1;
|
ctype.length : LINE_SIZE - (size_t)1;
|
||||||
|
|
||||||
memcpy(content_type, ctype.buf, copy_len);
|
memcpy(content_type, ctype.buf, copy_len);
|
||||||
content_type[copy_len] = '\0';
|
content_type[copy_len] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* extract doc from msg */
|
/* extract doc from msg */
|
||||||
if ((*doc_length = response.msg.entity.length) == 0) {
|
if ((*doc_length = response.msg.entity.length) == (size_t)0) {
|
||||||
/* 0-length msg */
|
/* 0-length msg */
|
||||||
*document = NULL;
|
*document = NULL;
|
||||||
} else if (response.msg.status_code == HTTP_OK) {
|
} else if (response.msg.status_code == HTTP_OK) {
|
||||||
@@ -698,13 +743,18 @@ int http_Download( IN const char *url_str,
|
|||||||
msg_length = response.msg.msg.length; /* save for posterity */
|
msg_length = response.msg.msg.length; /* save for posterity */
|
||||||
msg_start = membuffer_detach(&response.msg.msg); /* whole msg */
|
msg_start = membuffer_detach(&response.msg.msg); /* whole msg */
|
||||||
/* move entity to the start; copy null-terminator too */
|
/* move entity to the start; copy null-terminator too */
|
||||||
memmove(msg_start, entity_start, *doc_length + 1);
|
memmove(msg_start, entity_start, *doc_length + (size_t)1);
|
||||||
/* save mem for body only */
|
/* save mem for body only */
|
||||||
*document = realloc(msg_start, *doc_length + 1); /*LEAK_FIX_MK */
|
*document = realloc(msg_start, *doc_length + (size_t)1); /*LEAK_FIX_MK */
|
||||||
/* *document = Realloc( msg_start,msg_length, *doc_length + 1 ); LEAK_FIX_MK */
|
/* *document = Realloc( msg_start,msg_length, *doc_length + 1 ); LEAK_FIX_MK */
|
||||||
/* shrink can't fail */
|
/* shrink can't fail */
|
||||||
assert(msg_length > *doc_length);
|
assert(msg_length > *doc_length);
|
||||||
assert(*document != NULL);
|
assert(*document != NULL);
|
||||||
|
if (msg_length <= *doc_length || *document == NULL)
|
||||||
|
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
||||||
|
"msg_length(%" PRIzu ") <= *doc_length(%"
|
||||||
|
PRIzu ") or document is NULL",
|
||||||
|
msg_length, *doc_length);
|
||||||
}
|
}
|
||||||
if (response.msg.status_code == HTTP_OK) {
|
if (response.msg.status_code == HTTP_OK) {
|
||||||
ret_code = 0; /* success */
|
ret_code = 0; /* success */
|
||||||
@@ -746,8 +796,8 @@ int MakePostMessage(const char *url_str, membuffer *request,
|
|||||||
uri_type *url, int contentLength, const char *contentType)
|
uri_type *url, int contentLength, const char *contentType)
|
||||||
{
|
{
|
||||||
int ret_code = 0;
|
int ret_code = 0;
|
||||||
char *urlPath = alloca(strlen(url_str) + 1);
|
char *urlPath = alloca(strlen(url_str) + (size_t)1);
|
||||||
size_t hostlen = 0;
|
size_t hostlen = (size_t)0;
|
||||||
char *hoststr;
|
char *hoststr;
|
||||||
char *temp;
|
char *temp;
|
||||||
|
|
||||||
@@ -758,7 +808,8 @@ int MakePostMessage(const char *url_str, membuffer *request,
|
|||||||
return ret_code;
|
return ret_code;
|
||||||
/* make msg */
|
/* make msg */
|
||||||
membuffer_init(request);
|
membuffer_init(request);
|
||||||
strcpy(urlPath, url_str);
|
memset(urlPath, 0, strlen(url_str) + (size_t)1);
|
||||||
|
strncpy(urlPath, url_str, strlen(url_str));
|
||||||
hoststr = strstr(urlPath, "//");
|
hoststr = strstr(urlPath, "//");
|
||||||
if (hoststr == NULL)
|
if (hoststr == NULL)
|
||||||
return UPNP_E_INVALID_URL;
|
return UPNP_E_INVALID_URL;
|
||||||
@@ -834,29 +885,29 @@ int http_WriteHttpPost( IN void *Handle,
|
|||||||
{
|
{
|
||||||
http_post_handle_t *handle = (http_post_handle_t *)Handle;
|
http_post_handle_t *handle = (http_post_handle_t *)Handle;
|
||||||
char *tempbuf = NULL;
|
char *tempbuf = NULL;
|
||||||
size_t tempbufSize = 0;
|
size_t tempbufSize = (size_t)0;
|
||||||
int freeTempbuf = 0;
|
int freeTempbuf = 0;
|
||||||
int numWritten = 0;
|
int numWritten = 0;
|
||||||
|
|
||||||
if (!handle || !size || !buf) {
|
if (!handle || !size || !buf) {
|
||||||
if (size)
|
if (size)
|
||||||
*size = 0;
|
*size = (size_t)0;
|
||||||
return UPNP_E_INVALID_PARAM;
|
return UPNP_E_INVALID_PARAM;
|
||||||
}
|
}
|
||||||
if (handle->contentLength == UPNP_USING_CHUNKED) {
|
if (handle->contentLength == UPNP_USING_CHUNKED) {
|
||||||
if (*size) {
|
if (*size) {
|
||||||
size_t tempSize = 0;
|
size_t tempSize = *size +
|
||||||
tempbuf = malloc(*size +
|
CHUNK_HEADER_SIZE + CHUNK_TAIL_SIZE;
|
||||||
CHUNK_HEADER_SIZE + CHUNK_TAIL_SIZE);
|
tempbuf = malloc(tempSize);
|
||||||
if (!tempbuf)
|
if (!tempbuf)
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
/* begin chunk */
|
/* begin chunk */
|
||||||
sprintf(tempbuf, "%" PRIzx "\r\n", *size);
|
snprintf(tempbuf, tempSize, "%" PRIzx "\r\n", *size);
|
||||||
tempSize = strlen(tempbuf);
|
tempSize = strlen(tempbuf);
|
||||||
memcpy(tempbuf + tempSize, buf, *size);
|
memcpy(tempbuf + tempSize, buf, *size);
|
||||||
memcpy(tempbuf + tempSize + *size, "\r\n", 2);
|
memcpy(tempbuf + tempSize + *size, "\r\n", (size_t)2);
|
||||||
/* end of chunk */
|
/* end of chunk */
|
||||||
tempbufSize = tempSize + *size + 2;
|
tempbufSize = tempSize + *size + (size_t)2;
|
||||||
freeTempbuf = 1;
|
freeTempbuf = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -868,7 +919,7 @@ int http_WriteHttpPost( IN void *Handle,
|
|||||||
if (freeTempbuf)
|
if (freeTempbuf)
|
||||||
free(tempbuf);
|
free(tempbuf);
|
||||||
if (numWritten < 0) {
|
if (numWritten < 0) {
|
||||||
*size = 0;
|
*size = (size_t)0;
|
||||||
return numWritten;
|
return numWritten;
|
||||||
} else {
|
} else {
|
||||||
*size = (size_t)numWritten;
|
*size = (size_t)numWritten;
|
||||||
@@ -968,7 +1019,7 @@ int http_OpenHttpPost(
|
|||||||
if (!handle)
|
if (!handle)
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
handle->contentLength = contentLength;
|
handle->contentLength = contentLength;
|
||||||
tcp_connection = socket(url.hostport.IPaddress.ss_family,
|
tcp_connection = socket((int)url.hostport.IPaddress.ss_family,
|
||||||
SOCK_STREAM, 0);
|
SOCK_STREAM, 0);
|
||||||
if (tcp_connection == INVALID_SOCKET) {
|
if (tcp_connection == INVALID_SOCKET) {
|
||||||
ret_code = UPNP_E_SOCKET_ERROR;
|
ret_code = UPNP_E_SOCKET_ERROR;
|
||||||
@@ -1031,10 +1082,10 @@ int MakeGetMessage(const char *url_str, const char *proxy_str,
|
|||||||
membuffer *request, uri_type *url)
|
membuffer *request, uri_type *url)
|
||||||
{
|
{
|
||||||
int ret_code;
|
int ret_code;
|
||||||
char *urlPath = alloca(strlen(url_str) + 1);
|
char *urlPath = alloca(strlen(url_str) + (size_t)1);
|
||||||
size_t querylen = 0;
|
size_t querylen = (size_t)0;
|
||||||
const char *querystr;
|
const char *querystr;
|
||||||
size_t hostlen = 0;
|
size_t hostlen = (size_t)0;
|
||||||
char *hoststr, *temp;
|
char *hoststr, *temp;
|
||||||
|
|
||||||
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
||||||
@@ -1044,7 +1095,8 @@ int MakeGetMessage(const char *url_str, const char *proxy_str,
|
|||||||
return ret_code;
|
return ret_code;
|
||||||
/* make msg */
|
/* make msg */
|
||||||
membuffer_init(request);
|
membuffer_init(request);
|
||||||
strcpy(urlPath, url_str);
|
memset(urlPath, 0, strlen(url_str) + (size_t)1);
|
||||||
|
strncpy(urlPath, url_str, strlen(url_str));
|
||||||
hoststr = strstr(urlPath, "//");
|
hoststr = strstr(urlPath, "//");
|
||||||
if (hoststr == NULL)
|
if (hoststr == NULL)
|
||||||
return UPNP_E_INVALID_URL;
|
return UPNP_E_INVALID_URL;
|
||||||
@@ -1110,13 +1162,17 @@ static int ReadResponseLineAndHeaders(
|
|||||||
|
|
||||||
/*read response line */
|
/*read response line */
|
||||||
status = parser_parse_responseline(parser);
|
status = parser_parse_responseline(parser);
|
||||||
if (status == PARSE_OK)
|
switch (status) {
|
||||||
|
case PARSE_OK:
|
||||||
done = 1;
|
done = 1;
|
||||||
else if (status == PARSE_INCOMPLETE)
|
break;
|
||||||
|
case PARSE_INCOMPLETE:
|
||||||
done = 0;
|
done = 0;
|
||||||
else
|
break;
|
||||||
|
default:
|
||||||
/*error */
|
/*error */
|
||||||
return status;
|
return status;
|
||||||
|
}
|
||||||
while (!done) {
|
while (!done) {
|
||||||
num_read = sock_read(info, buf, sizeof(buf), timeout_secs);
|
num_read = sock_read(info, buf, sizeof(buf), timeout_secs);
|
||||||
if (num_read > 0) {
|
if (num_read > 0) {
|
||||||
@@ -1130,11 +1186,14 @@ static int ReadResponseLineAndHeaders(
|
|||||||
return PARSE_FAILURE;
|
return PARSE_FAILURE;
|
||||||
}
|
}
|
||||||
status = parser_parse_responseline(parser);
|
status = parser_parse_responseline(parser);
|
||||||
if (status == PARSE_OK) {
|
switch (status) {
|
||||||
|
case PARSE_OK:
|
||||||
done = 1;
|
done = 1;
|
||||||
} else if (status == PARSE_INCOMPLETE) {
|
break;
|
||||||
|
case PARSE_INCOMPLETE:
|
||||||
done = 0;
|
done = 0;
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
/*error */
|
/*error */
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -1147,11 +1206,11 @@ static int ReadResponseLineAndHeaders(
|
|||||||
return num_read;
|
return num_read;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
done = 0;
|
|
||||||
status = parser_parse_headers(parser);
|
status = parser_parse_headers(parser);
|
||||||
if ((status == PARSE_OK) && (parser->position == POS_ENTITY))
|
if ((status == (parse_status_t)PARSE_OK) &&
|
||||||
|
(parser->position == (parser_pos_t)POS_ENTITY))
|
||||||
done = 1;
|
done = 1;
|
||||||
else if (status == PARSE_INCOMPLETE)
|
else if (status == (parse_status_t)PARSE_INCOMPLETE)
|
||||||
done = 0;
|
done = 0;
|
||||||
else
|
else
|
||||||
/*error */
|
/*error */
|
||||||
@@ -1169,9 +1228,10 @@ static int ReadResponseLineAndHeaders(
|
|||||||
return PARSE_FAILURE;
|
return PARSE_FAILURE;
|
||||||
}
|
}
|
||||||
status = parser_parse_headers(parser);
|
status = parser_parse_headers(parser);
|
||||||
if (status == PARSE_OK && parser->position == POS_ENTITY)
|
if (status == (parse_status_t)PARSE_OK &&
|
||||||
|
parser->position == (parser_pos_t)POS_ENTITY)
|
||||||
done = 1;
|
done = 1;
|
||||||
else if (status == PARSE_INCOMPLETE)
|
else if (status == (parse_status_t)PARSE_INCOMPLETE)
|
||||||
done = 0;
|
done = 0;
|
||||||
else
|
else
|
||||||
/*error */
|
/*error */
|
||||||
@@ -1222,31 +1282,35 @@ int http_ReadHttpGet(
|
|||||||
char tempbuf[2 * 1024];
|
char tempbuf[2 * 1024];
|
||||||
int ret_code = 0;
|
int ret_code = 0;
|
||||||
|
|
||||||
if (!handle || !size || (*size > 0 && !buf)) {
|
if (!handle || !size || (*size > (size_t)0 && !buf)) {
|
||||||
if (size)
|
if (size)
|
||||||
*size = 0;
|
*size = (size_t)0;
|
||||||
return UPNP_E_INVALID_PARAM;
|
return UPNP_E_INVALID_PARAM;
|
||||||
}
|
}
|
||||||
/* first parse what has already been gotten */
|
/* first parse what has already been gotten */
|
||||||
if (handle->response.position != POS_COMPLETE)
|
if (handle->response.position != (parser_pos_t)POS_COMPLETE)
|
||||||
status = parser_parse_entity(&handle->response);
|
status = parser_parse_entity(&handle->response);
|
||||||
else
|
else
|
||||||
status = PARSE_SUCCESS;
|
status = PARSE_SUCCESS;
|
||||||
if (status == PARSE_INCOMPLETE_ENTITY)
|
switch (status) {
|
||||||
|
case PARSE_INCOMPLETE_ENTITY:
|
||||||
/* read until close */
|
/* read until close */
|
||||||
ok_on_close = TRUE;
|
ok_on_close = TRUE;
|
||||||
else if ((status != PARSE_SUCCESS)
|
break;
|
||||||
&& (status != PARSE_CONTINUE_1)
|
case PARSE_SUCCESS:
|
||||||
&& (status != PARSE_INCOMPLETE)) {
|
case PARSE_CONTINUE_1:
|
||||||
|
case PARSE_INCOMPLETE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
/*error */
|
/*error */
|
||||||
*size = 0;
|
*size = (size_t)0;
|
||||||
return UPNP_E_BAD_RESPONSE;
|
return UPNP_E_BAD_RESPONSE;
|
||||||
}
|
}
|
||||||
/* read more if necessary entity */
|
/* read more if necessary entity */
|
||||||
while (handle->response.msg.amount_discarded + *size >
|
while (handle->response.msg.amount_discarded + *size >
|
||||||
handle->response.msg.entity.length &&
|
handle->response.msg.entity.length &&
|
||||||
!handle->cancel &&
|
!handle->cancel &&
|
||||||
handle->response.position != POS_COMPLETE) {
|
handle->response.position != (parser_pos_t)POS_COMPLETE) {
|
||||||
num_read = sock_read(&handle->sock_info, tempbuf,
|
num_read = sock_read(&handle->sock_info, tempbuf,
|
||||||
sizeof(tempbuf), &timeout);
|
sizeof(tempbuf), &timeout);
|
||||||
if (num_read > 0) {
|
if (num_read > 0) {
|
||||||
@@ -1257,18 +1321,22 @@ int http_ReadHttpGet(
|
|||||||
/* set failure status */
|
/* set failure status */
|
||||||
handle->response.http_error_code =
|
handle->response.http_error_code =
|
||||||
HTTP_INTERNAL_SERVER_ERROR;
|
HTTP_INTERNAL_SERVER_ERROR;
|
||||||
*size = 0;
|
*size = (size_t)0;
|
||||||
return PARSE_FAILURE;
|
return PARSE_FAILURE;
|
||||||
}
|
}
|
||||||
status = parser_parse_entity(&handle->response);
|
status = parser_parse_entity(&handle->response);
|
||||||
if (status == PARSE_INCOMPLETE_ENTITY) {
|
switch (status) {
|
||||||
|
case PARSE_INCOMPLETE_ENTITY:
|
||||||
/* read until close */
|
/* read until close */
|
||||||
ok_on_close = TRUE;
|
ok_on_close = TRUE;
|
||||||
} else if ((status != PARSE_SUCCESS)
|
break;
|
||||||
&& (status != PARSE_CONTINUE_1)
|
case PARSE_SUCCESS:
|
||||||
&& (status != PARSE_INCOMPLETE)) {
|
case PARSE_CONTINUE_1:
|
||||||
|
case PARSE_INCOMPLETE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
/*error */
|
/*error */
|
||||||
*size = 0;
|
*size = (size_t)0;
|
||||||
return UPNP_E_BAD_RESPONSE;
|
return UPNP_E_BAD_RESPONSE;
|
||||||
}
|
}
|
||||||
} else if (num_read == 0) {
|
} else if (num_read == 0) {
|
||||||
@@ -1279,12 +1347,12 @@ int http_ReadHttpGet(
|
|||||||
handle->response.position = POS_COMPLETE;
|
handle->response.position = POS_COMPLETE;
|
||||||
} else {
|
} else {
|
||||||
/* partial msg */
|
/* partial msg */
|
||||||
*size = 0;
|
*size = (size_t)0;
|
||||||
handle->response.http_error_code = HTTP_BAD_REQUEST; /* or response */
|
handle->response.http_error_code = HTTP_BAD_REQUEST; /* or response */
|
||||||
return UPNP_E_BAD_HTTPMSG;
|
return UPNP_E_BAD_HTTPMSG;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
*size = 0;
|
*size = (size_t)0;
|
||||||
return num_read;
|
return num_read;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1297,7 +1365,7 @@ int http_ReadHttpGet(
|
|||||||
*size = handle->response.msg.entity.length -
|
*size = handle->response.msg.entity.length -
|
||||||
handle->response.msg.amount_discarded;
|
handle->response.msg.amount_discarded;
|
||||||
/* copy data to user buffer. delete copied data */
|
/* copy data to user buffer. delete copied data */
|
||||||
if (*size > 0) {
|
if (*size > (size_t)0) {
|
||||||
memcpy(buf, &handle->response.msg.msg.buf[handle->response.entity_start_position],
|
memcpy(buf, &handle->response.msg.msg.buf[handle->response.entity_start_position],
|
||||||
*size);
|
*size);
|
||||||
membuffer_delete(&handle->response.msg.msg,
|
membuffer_delete(&handle->response.msg.msg,
|
||||||
@@ -1446,7 +1514,7 @@ int http_OpenHttpGetProxy(const char *url_str, const char *proxy_str,
|
|||||||
handle->cancel = 0;
|
handle->cancel = 0;
|
||||||
parser_response_init(&handle->response, HTTPMETHOD_GET);
|
parser_response_init(&handle->response, HTTPMETHOD_GET);
|
||||||
tcp_connection =
|
tcp_connection =
|
||||||
socket(peer->hostport.IPaddress.ss_family, SOCK_STREAM, 0);
|
socket((int)peer->hostport.IPaddress.ss_family, SOCK_STREAM, 0);
|
||||||
if (tcp_connection == INVALID_SOCKET) {
|
if (tcp_connection == INVALID_SOCKET) {
|
||||||
ret_code = UPNP_E_SOCKET_ERROR;
|
ret_code = UPNP_E_SOCKET_ERROR;
|
||||||
goto errorHandler;
|
goto errorHandler;
|
||||||
@@ -1473,15 +1541,18 @@ int http_OpenHttpGetProxy(const char *url_str, const char *proxy_str,
|
|||||||
sock_destroy(&handle->sock_info, SD_BOTH);
|
sock_destroy(&handle->sock_info, SD_BOTH);
|
||||||
goto errorHandler;
|
goto errorHandler;
|
||||||
}
|
}
|
||||||
status = ReadResponseLineAndHeaders(&handle->sock_info,
|
if (ReadResponseLineAndHeaders(&handle->sock_info,
|
||||||
&handle->response, &timeout,
|
&handle->response, &timeout,
|
||||||
&http_error_code);
|
&http_error_code) != (int)PARSE_OK) {
|
||||||
if (status != PARSE_OK) {
|
|
||||||
ret_code = UPNP_E_BAD_RESPONSE;
|
ret_code = UPNP_E_BAD_RESPONSE;
|
||||||
goto errorHandler;
|
goto errorHandler;
|
||||||
}
|
}
|
||||||
status = parser_get_entity_read_method(&handle->response);
|
status = parser_get_entity_read_method(&handle->response);
|
||||||
if (status != PARSE_CONTINUE_1 && status != PARSE_SUCCESS) {
|
switch (status) {
|
||||||
|
case PARSE_CONTINUE_1:
|
||||||
|
case PARSE_SUCCESS:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
ret_code = UPNP_E_BAD_RESPONSE;
|
ret_code = UPNP_E_BAD_RESPONSE;
|
||||||
goto errorHandler;
|
goto errorHandler;
|
||||||
}
|
}
|
||||||
@@ -1492,7 +1563,7 @@ int http_OpenHttpGetProxy(const char *url_str, const char *proxy_str,
|
|||||||
*contentType = NULL;
|
*contentType = NULL;
|
||||||
else
|
else
|
||||||
*contentType = ctype.buf;
|
*contentType = ctype.buf;
|
||||||
if (handle->response.position == POS_COMPLETE)
|
if (handle->response.position == (parser_pos_t)POS_COMPLETE)
|
||||||
*contentLength = 0;
|
*contentLength = 0;
|
||||||
else if (handle->response.ent_position == ENTREAD_USING_CHUNKED)
|
else if (handle->response.ent_position == ENTREAD_USING_CHUNKED)
|
||||||
*contentLength = UPNP_USING_CHUNKED;
|
*contentLength = UPNP_USING_CHUNKED;
|
||||||
@@ -1540,7 +1611,7 @@ int http_SendStatusResponse(IN SOCKINFO *info, IN int http_status_code,
|
|||||||
http_CalcResponseVersion(request_major_version, request_minor_version,
|
http_CalcResponseVersion(request_major_version, request_minor_version,
|
||||||
&response_major, &response_minor);
|
&response_major, &response_minor);
|
||||||
membuffer_init(&membuf);
|
membuffer_init(&membuf);
|
||||||
membuf.size_inc = 70;
|
membuf.size_inc = (size_t)70;
|
||||||
/* response start line */
|
/* response start line */
|
||||||
ret = http_MakeMessage(&membuf, response_major, response_minor, "RSCB",
|
ret = http_MakeMessage(&membuf, response_major, response_minor, "RSCB",
|
||||||
http_status_code, http_status_code);
|
http_status_code, http_status_code);
|
||||||
@@ -1564,6 +1635,7 @@ int http_MakeMessage(membuffer *buf, int http_major_version,
|
|||||||
size_t length;
|
size_t length;
|
||||||
time_t *loc_time;
|
time_t *loc_time;
|
||||||
time_t curr_time;
|
time_t curr_time;
|
||||||
|
struct tm date_storage;
|
||||||
struct tm *date;
|
struct tm *date;
|
||||||
const char *start_str;
|
const char *start_str;
|
||||||
const char *end_str;
|
const char *end_str;
|
||||||
@@ -1581,9 +1653,11 @@ int http_MakeMessage(membuffer *buf, int http_major_version,
|
|||||||
const char *weekday_str = "Sun\0Mon\0Tue\0Wed\0Thu\0Fri\0Sat";
|
const char *weekday_str = "Sun\0Mon\0Tue\0Wed\0Thu\0Fri\0Sat";
|
||||||
const char *month_str = "Jan\0Feb\0Mar\0Apr\0May\0Jun\0"
|
const char *month_str = "Jan\0Feb\0Mar\0Apr\0May\0Jun\0"
|
||||||
"Jul\0Aug\0Sep\0Oct\0Nov\0Dec";
|
"Jul\0Aug\0Sep\0Oct\0Nov\0Dec";
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
|
memset(tempbuf, 0, sizeof(tempbuf));
|
||||||
va_start(argp, fmt);
|
va_start(argp, fmt);
|
||||||
while ((c = *fmt++) != 0) {
|
while ((c = *fmt++)) {
|
||||||
if (c == 's') {
|
if (c == 's') {
|
||||||
/* C string */
|
/* C string */
|
||||||
s = (char *)va_arg(argp, char *);
|
s = (char *)va_arg(argp, char *);
|
||||||
@@ -1611,26 +1685,29 @@ int http_MakeMessage(membuffer *buf, int http_major_version,
|
|||||||
/* mem buffer */
|
/* mem buffer */
|
||||||
s = (char *)va_arg(argp, char *);
|
s = (char *)va_arg(argp, char *);
|
||||||
UpnpPrintf(UPNP_ALL, HTTP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_ALL, HTTP, __FILE__, __LINE__,
|
||||||
"Adding a char Buffer starting with: %c\n", s[0]);
|
"Adding a char Buffer starting with: %c\n", (int)s[0]);
|
||||||
assert(s);
|
assert(s);
|
||||||
length = (size_t) va_arg(argp, size_t);
|
length = (size_t) va_arg(argp, size_t);
|
||||||
if (membuffer_append(buf, s, length))
|
if (membuffer_append(buf, s, length))
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
} else if (c == 'c') {
|
} else if (c == 'c') {
|
||||||
/* crlf */
|
/* crlf */
|
||||||
if (membuffer_append(buf, "\r\n", 2))
|
if (membuffer_append(buf, "\r\n", (size_t)2))
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
} else if (c == 'd') {
|
} else if (c == 'd') {
|
||||||
/* integer */
|
/* integer */
|
||||||
num = (size_t)va_arg(argp, int);
|
num = (size_t)va_arg(argp, int);
|
||||||
sprintf(tempbuf, "%" PRIzu, num);
|
rc = snprintf(tempbuf, sizeof(tempbuf), "%" PRIzu, num);
|
||||||
if (membuffer_append(buf, tempbuf, strlen(tempbuf)))
|
if (rc < 0 || (unsigned int) rc >= sizeof(tempbuf) ||
|
||||||
|
membuffer_append(buf, tempbuf, strlen(tempbuf)))
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
} else if (c == 'h') {
|
} else if (c == 'h') {
|
||||||
/* off_t */
|
/* off_t */
|
||||||
bignum = (off_t) va_arg(argp, off_t);
|
bignum = (off_t) va_arg(argp, off_t);
|
||||||
sprintf(tempbuf, "%" PRId64, (int64_t) bignum);
|
rc = snprintf(tempbuf, sizeof(tempbuf), "%" PRId64,
|
||||||
if (membuffer_append(buf, tempbuf, strlen(tempbuf)))
|
(int64_t) bignum);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(tempbuf) ||
|
||||||
|
membuffer_append(buf, tempbuf, strlen(tempbuf)))
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
} else if (c == 't' || c == 'D') {
|
} else if (c == 't' || c == 'D') {
|
||||||
/* date */
|
/* date */
|
||||||
@@ -1646,14 +1723,17 @@ int http_MakeMessage(membuffer *buf, int http_major_version,
|
|||||||
loc_time = (time_t *)va_arg(argp, time_t *);
|
loc_time = (time_t *)va_arg(argp, time_t *);
|
||||||
}
|
}
|
||||||
assert(loc_time);
|
assert(loc_time);
|
||||||
date = gmtime(loc_time);
|
date = http_gmtime_r(loc_time, &date_storage);
|
||||||
sprintf(tempbuf,
|
if (date == NULL)
|
||||||
|
goto error_handler;
|
||||||
|
rc = snprintf(tempbuf, sizeof(tempbuf),
|
||||||
"%s%s, %02d %s %d %02d:%02d:%02d GMT%s",
|
"%s%s, %02d %s %d %02d:%02d:%02d GMT%s",
|
||||||
start_str, &weekday_str[date->tm_wday * 4],
|
start_str, &weekday_str[date->tm_wday * 4],
|
||||||
date->tm_mday, &month_str[date->tm_mon * 4],
|
date->tm_mday, &month_str[date->tm_mon * 4],
|
||||||
date->tm_year + 1900, date->tm_hour,
|
date->tm_year + 1900, date->tm_hour,
|
||||||
date->tm_min, date->tm_sec, end_str);
|
date->tm_min, date->tm_sec, end_str);
|
||||||
if (membuffer_append(buf, tempbuf, strlen(tempbuf)))
|
if (rc < 0 || (unsigned int) rc >= sizeof(tempbuf) ||
|
||||||
|
membuffer_append(buf, tempbuf, strlen(tempbuf)))
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
} else if (c == 'L') {
|
} else if (c == 'L') {
|
||||||
/* Add CONTENT-LANGUAGE header only if WEB_SERVER_CONTENT_LANGUAGE */
|
/* Add CONTENT-LANGUAGE header only if WEB_SERVER_CONTENT_LANGUAGE */
|
||||||
@@ -1687,7 +1767,7 @@ int http_MakeMessage(membuffer *buf, int http_major_version,
|
|||||||
} else if (c == 'S' || c == 'U') {
|
} else if (c == 'S' || c == 'U') {
|
||||||
/* SERVER or USER-AGENT header */
|
/* SERVER or USER-AGENT header */
|
||||||
temp_str = (c == 'S') ? "SERVER: " : "USER-AGENT: ";
|
temp_str = (c == 'S') ? "SERVER: " : "USER-AGENT: ";
|
||||||
get_sdk_info(tempbuf);
|
get_sdk_info(tempbuf, sizeof(tempbuf));
|
||||||
if (http_MakeMessage(buf, http_major_version, http_minor_version,
|
if (http_MakeMessage(buf, http_major_version, http_minor_version,
|
||||||
"ss", temp_str, tempbuf) != 0)
|
"ss", temp_str, tempbuf) != 0)
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
@@ -1704,21 +1784,24 @@ int http_MakeMessage(membuffer *buf, int http_major_version,
|
|||||||
/* e.g.: 'HTTP/1.1 200 OK' code */
|
/* e.g.: 'HTTP/1.1 200 OK' code */
|
||||||
status_code = (int)va_arg(argp, int);
|
status_code = (int)va_arg(argp, int);
|
||||||
assert(status_code > 0);
|
assert(status_code > 0);
|
||||||
sprintf(tempbuf, "HTTP/%d.%d %d ",
|
rc = snprintf(tempbuf, sizeof(tempbuf), "HTTP/%d.%d %d ",
|
||||||
http_major_version, http_minor_version,
|
http_major_version, http_minor_version,
|
||||||
status_code);
|
status_code);
|
||||||
/* str */
|
/* str */
|
||||||
status_msg = http_get_code_text(status_code);
|
status_msg = http_get_code_text(status_code);
|
||||||
if (http_MakeMessage(buf, http_major_version, http_minor_version,
|
if (rc < 0 || (unsigned int) rc >= sizeof(tempbuf) ||
|
||||||
|
http_MakeMessage(buf, http_major_version, http_minor_version,
|
||||||
"ssc", tempbuf, status_msg) != 0)
|
"ssc", tempbuf, status_msg) != 0)
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
} else if (c == 'B') {
|
} else if (c == 'B') {
|
||||||
/* body of a simple reply */
|
/* body of a simple reply */
|
||||||
status_code = (int)va_arg(argp, int);
|
status_code = (int)va_arg(argp, int);
|
||||||
sprintf(tempbuf, "%s%d %s%s",
|
rc = snprintf(tempbuf, sizeof(tempbuf), "%s%d %s%s",
|
||||||
"<html><body><h1>",
|
"<html><body><h1>",
|
||||||
status_code, http_get_code_text(status_code),
|
status_code, http_get_code_text(status_code),
|
||||||
"</h1></body></html>");
|
"</h1></body></html>");
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(tempbuf))
|
||||||
|
goto error_handler;
|
||||||
bignum = (off_t)strlen(tempbuf);
|
bignum = (off_t)strlen(tempbuf);
|
||||||
if (http_MakeMessage(buf, http_major_version, http_minor_version,
|
if (http_MakeMessage(buf, http_major_version, http_minor_version,
|
||||||
"NTcs", bignum, /* content-length */
|
"NTcs", bignum, /* content-length */
|
||||||
@@ -1831,7 +1914,7 @@ int MakeGetMessageEx( const char *url_str,
|
|||||||
{
|
{
|
||||||
int errCode = UPNP_E_SUCCESS;
|
int errCode = UPNP_E_SUCCESS;
|
||||||
char *urlPath = NULL;
|
char *urlPath = NULL;
|
||||||
size_t hostlen = 0;
|
size_t hostlen = (size_t)0;
|
||||||
char *hoststr, *temp;
|
char *hoststr, *temp;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -1844,13 +1927,13 @@ int MakeGetMessageEx( const char *url_str,
|
|||||||
}
|
}
|
||||||
/* make msg */
|
/* make msg */
|
||||||
membuffer_init(request);
|
membuffer_init(request);
|
||||||
urlPath = alloca(strlen(url_str) + 1);
|
urlPath = alloca(strlen(url_str) + (size_t)1);
|
||||||
if (!urlPath) {
|
if (!urlPath) {
|
||||||
errCode = UPNP_E_OUTOF_MEMORY;
|
errCode = UPNP_E_OUTOF_MEMORY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
memset(urlPath, 0, strlen(url_str) + 1);
|
memset(urlPath, 0, strlen(url_str) + (size_t)1);
|
||||||
strcpy(urlPath, url_str);
|
strncpy(urlPath, url_str, strlen(url_str));
|
||||||
hoststr = strstr(urlPath, "//");
|
hoststr = strstr(urlPath, "//");
|
||||||
if (hoststr == NULL) {
|
if (hoststr == NULL) {
|
||||||
errCode = UPNP_E_INVALID_URL;
|
errCode = UPNP_E_INVALID_URL;
|
||||||
@@ -1935,6 +2018,9 @@ int http_OpenHttpGetEx(
|
|||||||
int errCode = UPNP_E_SUCCESS;
|
int errCode = UPNP_E_SUCCESS;
|
||||||
/* char rangeBuf[SIZE_RANGE_BUFFER]; */
|
/* char rangeBuf[SIZE_RANGE_BUFFER]; */
|
||||||
struct SendInstruction rangeBuf;
|
struct SendInstruction rangeBuf;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
|
membuffer_init(&request);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
/* Checking Input parameters */
|
/* Checking Input parameters */
|
||||||
@@ -1952,8 +2038,10 @@ int http_OpenHttpGetEx(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
memset(&rangeBuf, 0, sizeof(rangeBuf));
|
memset(&rangeBuf, 0, sizeof(rangeBuf));
|
||||||
sprintf(rangeBuf.RangeHeader,
|
rc = snprintf(rangeBuf.RangeHeader, sizeof(rangeBuf.RangeHeader),
|
||||||
"Range: bytes=%d-%d\r\n", lowRange, highRange);
|
"Range: bytes=%d-%d\r\n", lowRange, highRange);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(rangeBuf.RangeHeader))
|
||||||
|
break;
|
||||||
membuffer_init(&request);
|
membuffer_init(&request);
|
||||||
errCode = MakeGetMessageEx(url_str, &request, &url, &rangeBuf);
|
errCode = MakeGetMessageEx(url_str, &request, &url, &rangeBuf);
|
||||||
if (errCode != UPNP_E_SUCCESS)
|
if (errCode != UPNP_E_SUCCESS)
|
||||||
@@ -1965,7 +2053,8 @@ int http_OpenHttpGetEx(
|
|||||||
}
|
}
|
||||||
memset(handle, 0, sizeof(*handle));
|
memset(handle, 0, sizeof(*handle));
|
||||||
parser_response_init(&handle->response, HTTPMETHOD_GET);
|
parser_response_init(&handle->response, HTTPMETHOD_GET);
|
||||||
tcp_connection = socket(url.hostport.IPaddress.ss_family, SOCK_STREAM, 0);
|
tcp_connection = socket((int)url.hostport.IPaddress.ss_family,
|
||||||
|
SOCK_STREAM, 0);
|
||||||
if (tcp_connection == INVALID_SOCKET) {
|
if (tcp_connection == INVALID_SOCKET) {
|
||||||
errCode = UPNP_E_SOCKET_ERROR;
|
errCode = UPNP_E_SOCKET_ERROR;
|
||||||
free(handle);
|
free(handle);
|
||||||
@@ -1996,15 +2085,15 @@ int http_OpenHttpGetEx(
|
|||||||
free(handle);
|
free(handle);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
status = ReadResponseLineAndHeaders(&handle->sock_info,
|
if (ReadResponseLineAndHeaders(&handle->sock_info,
|
||||||
&handle->response, &timeout, &http_error_code);
|
&handle->response, &timeout, &http_error_code) != (int)PARSE_OK) {
|
||||||
if (status != PARSE_OK) {
|
|
||||||
errCode = UPNP_E_BAD_RESPONSE;
|
errCode = UPNP_E_BAD_RESPONSE;
|
||||||
free(handle);
|
free(handle);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
status = parser_get_entity_read_method(&handle->response);
|
status = parser_get_entity_read_method(&handle->response);
|
||||||
if (status != PARSE_CONTINUE_1 && status != PARSE_SUCCESS) {
|
if (status != (parse_status_t)PARSE_CONTINUE_1 &&
|
||||||
|
status != (parse_status_t)PARSE_SUCCESS) {
|
||||||
errCode = UPNP_E_BAD_RESPONSE;
|
errCode = UPNP_E_BAD_RESPONSE;
|
||||||
free(handle);
|
free(handle);
|
||||||
break;
|
break;
|
||||||
@@ -2017,7 +2106,7 @@ int http_OpenHttpGetEx(
|
|||||||
*contentType = NULL;
|
*contentType = NULL;
|
||||||
else
|
else
|
||||||
*contentType = ctype.buf;
|
*contentType = ctype.buf;
|
||||||
if (handle->response.position == POS_COMPLETE)
|
if (handle->response.position == (parser_pos_t)POS_COMPLETE)
|
||||||
*contentLength = 0;
|
*contentLength = 0;
|
||||||
else if(handle->response.ent_position == ENTREAD_USING_CHUNKED)
|
else if(handle->response.ent_position == ENTREAD_USING_CHUNKED)
|
||||||
*contentLength = UPNP_USING_CHUNKED;
|
*contentLength = UPNP_USING_CHUNKED;
|
||||||
@@ -2039,6 +2128,7 @@ int http_OpenHttpGetEx(
|
|||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* OUT char *info; buffer to store the operating system information
|
* OUT char *info; buffer to store the operating system information
|
||||||
|
* IN size_t infoSize; size of buffer
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Returns the server information for the operating system
|
* Returns the server information for the operating system
|
||||||
@@ -2047,14 +2137,17 @@ int http_OpenHttpGetEx(
|
|||||||
* UPNP_INLINE void
|
* UPNP_INLINE void
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
/* 'info' should have a size of at least 100 bytes */
|
/* 'info' should have a size of at least 100 bytes */
|
||||||
void get_sdk_info(OUT char *info)
|
void get_sdk_info(OUT char *info, IN size_t infoSize)
|
||||||
{
|
{
|
||||||
|
#ifdef UPNP_ENABLE_UNSPECIFIED_SERVER
|
||||||
|
snprintf(info, infoSize, "Unspecified, UPnP/1.0, Unspecified\r\n");
|
||||||
|
#else /* UPNP_ENABLE_UNSPECIFIED_SERVER */
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
OSVERSIONINFO versioninfo;
|
OSVERSIONINFO versioninfo;
|
||||||
versioninfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
versioninfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||||
|
|
||||||
if (GetVersionEx(&versioninfo) != 0)
|
if (GetVersionEx(&versioninfo) != 0)
|
||||||
sprintf(info,
|
snprintf(info, infoSize,
|
||||||
"%d.%d.%d %d/%s, UPnP/1.0, Portable SDK for UPnP devices/"
|
"%d.%d.%d %d/%s, UPnP/1.0, Portable SDK for UPnP devices/"
|
||||||
PACKAGE_VERSION "\r\n", versioninfo.dwMajorVersion,
|
PACKAGE_VERSION "\r\n", versioninfo.dwMajorVersion,
|
||||||
versioninfo.dwMinorVersion, versioninfo.dwBuildNumber,
|
versioninfo.dwMinorVersion, versioninfo.dwBuildNumber,
|
||||||
@@ -2068,9 +2161,10 @@ void get_sdk_info(OUT char *info)
|
|||||||
ret_code = uname(&sys_info);
|
ret_code = uname(&sys_info);
|
||||||
if (ret_code == -1)
|
if (ret_code == -1)
|
||||||
*info = '\0';
|
*info = '\0';
|
||||||
sprintf(info,
|
snprintf(info, infoSize,
|
||||||
"%s/%s, UPnP/1.0, Portable SDK for UPnP devices/"
|
"%s/%s, UPnP/1.0, Portable SDK for UPnP devices/"
|
||||||
PACKAGE_VERSION "\r\n", sys_info.sysname, sys_info.release);
|
PACKAGE_VERSION "\r\n", sys_info.sysname, sys_info.release);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* UPNP_ENABLE_UNSPECIFIED_SERVER */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -51,9 +52,13 @@ int has_xml_content_type(http_message_t *hmsg)
|
|||||||
assert(hmsg);
|
assert(hmsg);
|
||||||
|
|
||||||
/* find 'content-type' header which must have text/xml */
|
/* find 'content-type' header which must have text/xml */
|
||||||
if (httpmsg_find_hdr(hmsg, HDR_CONTENT_TYPE, &hdr_value) &&
|
if (httpmsg_find_hdr(hmsg, HDR_CONTENT_TYPE, &hdr_value)) {
|
||||||
matchstr(hdr_value.buf, hdr_value.length, "%itext%w/%wxml" ) == PARSE_OK) {
|
switch (matchstr(hdr_value.buf, hdr_value.length, "%itext%w/%wxml" )) {
|
||||||
|
case PARSE_OK:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -87,14 +88,19 @@ static const char *Http4xxStr =
|
|||||||
"Unsupported Media Type\0"
|
"Unsupported Media Type\0"
|
||||||
"Requested Range Not Satisfiable\0" "Expectation Failed\0";
|
"Requested Range Not Satisfiable\0" "Expectation Failed\0";
|
||||||
|
|
||||||
#define NUM_5XX_CODES 6
|
#define NUM_5XX_CODES 11
|
||||||
static const char *Http5xxCodes[NUM_5XX_CODES];
|
static const char *Http5xxCodes[NUM_5XX_CODES];
|
||||||
static const char *Http5xxStr =
|
static const char *Http5xxStr =
|
||||||
"Internal Server Error\0"
|
"Internal Server Error\0"
|
||||||
"Not Implemented\0"
|
"Not Implemented\0"
|
||||||
"Bad Gateway\0"
|
"Bad Gateway\0"
|
||||||
"Service Unavailable\0"
|
"Service Unavailable\0"
|
||||||
"Gateway Timeout\0" "HTTP Version Not Supported\0";
|
"Gateway Timeout\0"
|
||||||
|
"HTTP Version Not Supported\0"
|
||||||
|
"Variant Also Negotiates\0"
|
||||||
|
"Insufficient Storage\0"
|
||||||
|
"Loop Detected\0"
|
||||||
|
"\0" "Not Extended\0";
|
||||||
|
|
||||||
static int gInitialized = FALSE;
|
static int gInitialized = FALSE;
|
||||||
|
|
||||||
@@ -128,7 +134,7 @@ init_table( IN const char *encoded_str,
|
|||||||
|
|
||||||
for( i = 0; i < tbl_size; i++ ) {
|
for( i = 0; i < tbl_size; i++ ) {
|
||||||
table[i] = s;
|
table[i] = s;
|
||||||
s += strlen( s ) + 1; /* next entry */
|
s += strlen( s ) + (size_t)1; /* next entry */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,7 +185,7 @@ http_get_code_text( int statusCode )
|
|||||||
init_tables();
|
init_tables();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( statusCode < 100 && statusCode >= 600 ) {
|
if( statusCode < 100 || statusCode >= 600 ) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -38,6 +39,8 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#if EXCLUDE_WEB_SERVER == 0
|
||||||
|
|
||||||
#include "webserver.h"
|
#include "webserver.h"
|
||||||
|
|
||||||
#include "httpparser.h"
|
#include "httpparser.h"
|
||||||
@@ -59,6 +62,10 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Response Types.
|
* Response Types.
|
||||||
*/
|
*/
|
||||||
@@ -122,9 +129,23 @@ static const char *gMediaTypes[] = {
|
|||||||
#define TEXT_INDEX 5
|
#define TEXT_INDEX 5
|
||||||
|
|
||||||
/* general */
|
/* general */
|
||||||
#define NUM_MEDIA_TYPES 69
|
#define NUM_MEDIA_TYPES 70
|
||||||
#define NUM_HTTP_HEADER_NAMES 33
|
#define NUM_HTTP_HEADER_NAMES 33
|
||||||
|
|
||||||
|
#define ASCTIME_R_BUFFER_SIZE 26
|
||||||
|
#ifdef WIN32
|
||||||
|
static char *web_server_asctime_r(const struct tm *tm, char *buf)
|
||||||
|
{
|
||||||
|
if (tm == NULL || buf == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
asctime_s(buf, ASCTIME_R_BUFFER_SIZE, tm);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define web_server_asctime_r asctime_r
|
||||||
|
#endif
|
||||||
|
|
||||||
/* sorted by file extension; must have 'NUM_MEDIA_TYPES' extensions */
|
/* sorted by file extension; must have 'NUM_MEDIA_TYPES' extensions */
|
||||||
static const char *gEncodedMediaTypes =
|
static const char *gEncodedMediaTypes =
|
||||||
"aif\0" AUDIO_STR "aiff\0"
|
"aif\0" AUDIO_STR "aiff\0"
|
||||||
@@ -135,6 +156,7 @@ static const char *gEncodedMediaTypes =
|
|||||||
"au\0" AUDIO_STR "basic\0"
|
"au\0" AUDIO_STR "basic\0"
|
||||||
"avi\0" VIDEO_STR "msvideo\0"
|
"avi\0" VIDEO_STR "msvideo\0"
|
||||||
"bmp\0" IMAGE_STR "bmp\0"
|
"bmp\0" IMAGE_STR "bmp\0"
|
||||||
|
"css\0" TEXT_STR "css\0"
|
||||||
"dcr\0" APPLICATION_STR "x-director\0"
|
"dcr\0" APPLICATION_STR "x-director\0"
|
||||||
"dib\0" IMAGE_STR "bmp\0"
|
"dib\0" IMAGE_STR "bmp\0"
|
||||||
"dir\0" APPLICATION_STR "x-director\0"
|
"dir\0" APPLICATION_STR "x-director\0"
|
||||||
@@ -299,6 +321,7 @@ static UPNP_INLINE int get_content_type(
|
|||||||
int ctype_found = FALSE;
|
int ctype_found = FALSE;
|
||||||
char *temp = NULL;
|
char *temp = NULL;
|
||||||
size_t length = 0;
|
size_t length = 0;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
(*content_type) = NULL;
|
(*content_type) = NULL;
|
||||||
/* get ext */
|
/* get ext */
|
||||||
@@ -315,10 +338,14 @@ static UPNP_INLINE int get_content_type(
|
|||||||
temp = malloc(length);
|
temp = malloc(length);
|
||||||
if (!temp)
|
if (!temp)
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
sprintf(temp, "%s/%s", type, subtype);
|
rc = snprintf(temp, length, "%s/%s", type, subtype);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= length) {
|
||||||
|
free(temp);
|
||||||
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
|
}
|
||||||
(*content_type) = ixmlCloneDOMString(temp);
|
(*content_type) = ixmlCloneDOMString(temp);
|
||||||
free(temp);
|
free(temp);
|
||||||
if (!content_type)
|
if (!(*content_type))
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -465,8 +492,6 @@ int web_server_init()
|
|||||||
|
|
||||||
void web_server_destroy(void)
|
void web_server_destroy(void)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (bWebServerState == WEB_SERVER_ENABLED) {
|
if (bWebServerState == WEB_SERVER_ENABLED) {
|
||||||
membuffer_destroy(&gDocumentRootDir);
|
membuffer_destroy(&gDocumentRootDir);
|
||||||
alias_release(&gAliasDoc);
|
alias_release(&gAliasDoc);
|
||||||
@@ -475,8 +500,7 @@ void web_server_destroy(void)
|
|||||||
memset(&gAliasDoc, 0, sizeof(struct xml_alias_t));
|
memset(&gAliasDoc, 0, sizeof(struct xml_alias_t));
|
||||||
ithread_mutex_unlock(&gWebMutex);
|
ithread_mutex_unlock(&gWebMutex);
|
||||||
|
|
||||||
ret = ithread_mutex_destroy(&gWebMutex);
|
ithread_mutex_destroy(&gWebMutex);
|
||||||
assert(ret == 0);
|
|
||||||
bWebServerState = WEB_SERVER_DISABLED;
|
bWebServerState = WEB_SERVER_DISABLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -500,7 +524,10 @@ static int get_file_info(
|
|||||||
struct stat s;
|
struct stat s;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
struct tm date;
|
||||||
|
char buffer[ASCTIME_R_BUFFER_SIZE];
|
||||||
|
|
||||||
|
ixmlFreeDOMString(info->content_type);
|
||||||
info->content_type = NULL;
|
info->content_type = NULL;
|
||||||
code = stat(filename, &s);
|
code = stat(filename, &s);
|
||||||
if (code == -1)
|
if (code == -1)
|
||||||
@@ -522,7 +549,8 @@ static int get_file_info(
|
|||||||
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
||||||
"file info: %s, length: %lld, last_mod=%s readable=%d\n",
|
"file info: %s, length: %lld, last_mod=%s readable=%d\n",
|
||||||
filename, (long long)info->file_length,
|
filename, (long long)info->file_length,
|
||||||
asctime(gmtime(&info->last_modified)), info->is_readable);
|
web_server_asctime_r(http_gmtime_r(&info->last_modified, &date), buffer),
|
||||||
|
info->is_readable);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -744,7 +772,7 @@ static int GetNextRange(
|
|||||||
*
|
*
|
||||||
* \return
|
* \return
|
||||||
* \li \c HTTP_BAD_REQUEST
|
* \li \c HTTP_BAD_REQUEST
|
||||||
* \li \c UPNP_E_OUTOF_MEMORY
|
* \li \c HTTP_INTERNAL_SERVER_ERROR
|
||||||
* \li \c HTTP_REQUEST_RANGE_NOT_SATISFIABLE
|
* \li \c HTTP_REQUEST_RANGE_NOT_SATISFIABLE
|
||||||
* \li \c HTTP_OK
|
* \li \c HTTP_OK
|
||||||
*/
|
*/
|
||||||
@@ -759,15 +787,15 @@ static int CreateHTTPRangeResponseHeader(
|
|||||||
off_t FirstByte, LastByte;
|
off_t FirstByte, LastByte;
|
||||||
char *RangeInput;
|
char *RangeInput;
|
||||||
char *Ptr;
|
char *Ptr;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
Instr->IsRangeActive = 1;
|
Instr->IsRangeActive = 1;
|
||||||
Instr->ReadSendSize = FileLength;
|
Instr->ReadSendSize = FileLength;
|
||||||
if (!ByteRangeSpecifier)
|
if (!ByteRangeSpecifier)
|
||||||
return HTTP_BAD_REQUEST;
|
return HTTP_BAD_REQUEST;
|
||||||
RangeInput = malloc(strlen(ByteRangeSpecifier) + 1);
|
RangeInput = strdup(ByteRangeSpecifier);
|
||||||
if (!RangeInput)
|
if (!RangeInput)
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
return HTTP_INTERNAL_SERVER_ERROR;
|
||||||
strcpy(RangeInput, ByteRangeSpecifier);
|
|
||||||
/* CONTENT-RANGE: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
|
/* CONTENT-RANGE: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
|
||||||
if (StrStr(RangeInput, "bytes") == NULL ||
|
if (StrStr(RangeInput, "bytes") == NULL ||
|
||||||
(Ptr = StrStr(RangeInput, "=")) == NULL) {
|
(Ptr = StrStr(RangeInput, "=")) == NULL) {
|
||||||
@@ -792,27 +820,38 @@ static int CreateHTTPRangeResponseHeader(
|
|||||||
Instr->RangeOffset = FirstByte;
|
Instr->RangeOffset = FirstByte;
|
||||||
Instr->ReadSendSize = LastByte - FirstByte + 1;
|
Instr->ReadSendSize = LastByte - FirstByte + 1;
|
||||||
/* Data between two range. */
|
/* Data between two range. */
|
||||||
sprintf(Instr->RangeHeader,
|
rc = snprintf(Instr->RangeHeader,
|
||||||
|
sizeof(Instr->RangeHeader),
|
||||||
"CONTENT-RANGE: bytes %" PRId64
|
"CONTENT-RANGE: bytes %" PRId64
|
||||||
"-%" PRId64 "/%" PRId64 "\r\n",
|
"-%" PRId64 "/%" PRId64 "\r\n",
|
||||||
(int64_t)FirstByte,
|
(int64_t)FirstByte,
|
||||||
(int64_t)LastByte,
|
(int64_t)LastByte,
|
||||||
(int64_t)FileLength);
|
(int64_t)FileLength);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Instr->RangeHeader)) {
|
||||||
|
free(RangeInput);
|
||||||
|
return HTTP_INTERNAL_SERVER_ERROR;
|
||||||
|
}
|
||||||
} else if (FirstByte >= 0 && LastByte == -1
|
} else if (FirstByte >= 0 && LastByte == -1
|
||||||
&& FirstByte < FileLength) {
|
&& FirstByte < FileLength) {
|
||||||
Instr->RangeOffset = FirstByte;
|
Instr->RangeOffset = FirstByte;
|
||||||
Instr->ReadSendSize = FileLength - FirstByte;
|
Instr->ReadSendSize = FileLength - FirstByte;
|
||||||
sprintf(Instr->RangeHeader,
|
rc = snprintf(Instr->RangeHeader,
|
||||||
|
sizeof(Instr->RangeHeader),
|
||||||
"CONTENT-RANGE: bytes %" PRId64
|
"CONTENT-RANGE: bytes %" PRId64
|
||||||
"-%" PRId64 "/%" PRId64 "\r\n",
|
"-%" PRId64 "/%" PRId64 "\r\n",
|
||||||
(int64_t)FirstByte,
|
(int64_t)FirstByte,
|
||||||
(int64_t)(FileLength - 1),
|
(int64_t)(FileLength - 1),
|
||||||
(int64_t)FileLength);
|
(int64_t)FileLength);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Instr->RangeHeader)) {
|
||||||
|
free(RangeInput);
|
||||||
|
return HTTP_INTERNAL_SERVER_ERROR;
|
||||||
|
}
|
||||||
} else if (FirstByte == -1 && LastByte > 0) {
|
} else if (FirstByte == -1 && LastByte > 0) {
|
||||||
if (LastByte >= FileLength) {
|
if (LastByte >= FileLength) {
|
||||||
Instr->RangeOffset = 0;
|
Instr->RangeOffset = 0;
|
||||||
Instr->ReadSendSize = FileLength;
|
Instr->ReadSendSize = FileLength;
|
||||||
sprintf(Instr->RangeHeader,
|
rc = snprintf(Instr->RangeHeader,
|
||||||
|
sizeof(Instr->RangeHeader),
|
||||||
"CONTENT-RANGE: bytes 0-%" PRId64
|
"CONTENT-RANGE: bytes 0-%" PRId64
|
||||||
"/%" PRId64 "\r\n",
|
"/%" PRId64 "\r\n",
|
||||||
(int64_t)(FileLength - 1),
|
(int64_t)(FileLength - 1),
|
||||||
@@ -820,13 +859,18 @@ static int CreateHTTPRangeResponseHeader(
|
|||||||
} else {
|
} else {
|
||||||
Instr->RangeOffset = FileLength - LastByte;
|
Instr->RangeOffset = FileLength - LastByte;
|
||||||
Instr->ReadSendSize = LastByte;
|
Instr->ReadSendSize = LastByte;
|
||||||
sprintf(Instr->RangeHeader,
|
rc = snprintf(Instr->RangeHeader,
|
||||||
|
sizeof(Instr->RangeHeader),
|
||||||
"CONTENT-RANGE: bytes %" PRId64
|
"CONTENT-RANGE: bytes %" PRId64
|
||||||
"-%" PRId64 "/%" PRId64 "\r\n",
|
"-%" PRId64 "/%" PRId64 "\r\n",
|
||||||
(int64_t)(FileLength - LastByte + 1),
|
(int64_t)(FileLength - LastByte),
|
||||||
(int64_t)FileLength,
|
(int64_t)FileLength - 1,
|
||||||
(int64_t)FileLength);
|
(int64_t)FileLength);
|
||||||
}
|
}
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Instr->RangeHeader)) {
|
||||||
|
free(RangeInput);
|
||||||
|
return HTTP_INTERNAL_SERVER_ERROR;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
free(RangeInput);
|
free(RangeInput);
|
||||||
return HTTP_REQUEST_RANGE_NOT_SATISFIABLE;
|
return HTTP_REQUEST_RANGE_NOT_SATISFIABLE;
|
||||||
@@ -846,7 +890,7 @@ static int CreateHTTPRangeResponseHeader(
|
|||||||
*
|
*
|
||||||
* \return
|
* \return
|
||||||
* \li \c HTTP_BAD_REQUEST
|
* \li \c HTTP_BAD_REQUEST
|
||||||
* \li \c UPNP_E_OUTOF_MEMORY
|
* \li \c HTTP_INTERNAL_SERVER_ERROR
|
||||||
* \li \c HTTP_REQUEST_RANGE_NOT_SATISFIABLE
|
* \li \c HTTP_REQUEST_RANGE_NOT_SATISFIABLE
|
||||||
* \li \c HTTP_OK
|
* \li \c HTTP_OK
|
||||||
*/
|
*/
|
||||||
@@ -863,10 +907,11 @@ static int CheckOtherHTTPHeaders(
|
|||||||
/*NNS: dlist_node* node; */
|
/*NNS: dlist_node* node; */
|
||||||
int index, RetCode = HTTP_OK;
|
int index, RetCode = HTTP_OK;
|
||||||
char *TmpBuf;
|
char *TmpBuf;
|
||||||
|
size_t TmpBufSize = LINE_SIZE;
|
||||||
|
|
||||||
TmpBuf = (char *)malloc(LINE_SIZE);
|
TmpBuf = (char *)malloc(TmpBufSize);
|
||||||
if (!TmpBuf)
|
if (!TmpBuf)
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
return HTTP_INTERNAL_SERVER_ERROR;
|
||||||
node = ListHead(&Req->headers);
|
node = ListHead(&Req->headers);
|
||||||
while (node != NULL) {
|
while (node != NULL) {
|
||||||
header = (http_header_t *) node->item;
|
header = (http_header_t *) node->item;
|
||||||
@@ -874,11 +919,12 @@ static int CheckOtherHTTPHeaders(
|
|||||||
index = map_str_to_int((const char *)header->name.buf,
|
index = map_str_to_int((const char *)header->name.buf,
|
||||||
header->name.length, Http_Header_Names,
|
header->name.length, Http_Header_Names,
|
||||||
NUM_HTTP_HEADER_NAMES, FALSE);
|
NUM_HTTP_HEADER_NAMES, FALSE);
|
||||||
if (header->value.length >= LINE_SIZE) {
|
if (header->value.length >= TmpBufSize) {
|
||||||
free(TmpBuf);
|
free(TmpBuf);
|
||||||
TmpBuf = (char *)malloc(header->value.length + 1);
|
TmpBufSize = header->value.length + 1;
|
||||||
|
TmpBuf = (char *)malloc(TmpBufSize);
|
||||||
if (!TmpBuf)
|
if (!TmpBuf)
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
return HTTP_INTERNAL_SERVER_ERROR;
|
||||||
}
|
}
|
||||||
memcpy(TmpBuf, header->value.buf, header->value.length);
|
memcpy(TmpBuf, header->value.buf, header->value.length);
|
||||||
TmpBuf[header->value.length] = '\0';
|
TmpBuf[header->value.length] = '\0';
|
||||||
@@ -908,8 +954,14 @@ static int CheckOtherHTTPHeaders(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HDR_ACCEPT_LANGUAGE:
|
case HDR_ACCEPT_LANGUAGE:
|
||||||
|
if (header->value.length + 1 > sizeof(RespInstr->AcceptLanguageHeader)) {
|
||||||
|
size_t length = sizeof(RespInstr->AcceptLanguageHeader) - 1;
|
||||||
|
memcpy(RespInstr->AcceptLanguageHeader, TmpBuf, length);
|
||||||
|
RespInstr->AcceptLanguageHeader[length] = '\0';
|
||||||
|
} else {
|
||||||
memcpy(RespInstr->AcceptLanguageHeader, TmpBuf,
|
memcpy(RespInstr->AcceptLanguageHeader, TmpBuf,
|
||||||
sizeof(RespInstr->AcceptLanguageHeader) - 1);
|
header->value.length + 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/*
|
/*
|
||||||
@@ -961,8 +1013,11 @@ static int CheckOtherHTTPHeaders(
|
|||||||
*
|
*
|
||||||
* \return
|
* \return
|
||||||
* \li \c HTTP_BAD_REQUEST
|
* \li \c HTTP_BAD_REQUEST
|
||||||
* \li \c UPNP_E_OUTOF_MEMORY
|
* \li \c HTTP_INTERNAL_SERVER_ERROR
|
||||||
* \li \c HTTP_REQUEST_RANGE_NOT_SATISFIABLE
|
* \li \c HTTP_REQUEST_RANGE_NOT_SATISFIABLE
|
||||||
|
* \li \c HTTP_FORBIDDEN
|
||||||
|
* \li \c HTTP_NOT_FOUND
|
||||||
|
* \li \c HTTP_NOT_ACCEPTABLE
|
||||||
* \li \c HTTP_OK
|
* \li \c HTTP_OK
|
||||||
*/
|
*/
|
||||||
static int process_request(
|
static int process_request(
|
||||||
@@ -1001,6 +1056,7 @@ static int process_request(
|
|||||||
req->method == HTTPMETHOD_POST ||
|
req->method == HTTPMETHOD_POST ||
|
||||||
req->method == HTTPMETHOD_SIMPLEGET);
|
req->method == HTTPMETHOD_SIMPLEGET);
|
||||||
/* init */
|
/* init */
|
||||||
|
memset(&finfo, 0, sizeof(finfo));
|
||||||
request_doc = NULL;
|
request_doc = NULL;
|
||||||
finfo.content_type = NULL;
|
finfo.content_type = NULL;
|
||||||
alias_grabbed = FALSE;
|
alias_grabbed = FALSE;
|
||||||
@@ -1148,14 +1204,15 @@ static int process_request(
|
|||||||
}
|
}
|
||||||
RespInstr->ReadSendSize = finfo.file_length;
|
RespInstr->ReadSendSize = finfo.file_length;
|
||||||
/* Check other header field. */
|
/* Check other header field. */
|
||||||
if ((err_code =
|
if ((code =
|
||||||
CheckOtherHTTPHeaders(req, RespInstr,
|
CheckOtherHTTPHeaders(req, RespInstr,
|
||||||
finfo.file_length)) != HTTP_OK) {
|
finfo.file_length)) != HTTP_OK) {
|
||||||
|
err_code = code;
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
}
|
}
|
||||||
if (req->method == HTTPMETHOD_POST) {
|
if (req->method == HTTPMETHOD_POST) {
|
||||||
*rtype = RESP_POST;
|
*rtype = RESP_POST;
|
||||||
err_code = UPNP_E_SUCCESS;
|
err_code = HTTP_OK;
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
}
|
}
|
||||||
/*extra_headers = UpnpFileInfo_get_ExtraHeaders(finfo); */
|
/*extra_headers = UpnpFileInfo_get_ExtraHeaders(finfo); */
|
||||||
@@ -1193,7 +1250,6 @@ static int process_request(
|
|||||||
}
|
}
|
||||||
} else if (RespInstr->IsRangeActive && !RespInstr->IsChunkActive) {
|
} else if (RespInstr->IsRangeActive && !RespInstr->IsChunkActive) {
|
||||||
/* Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
|
/* Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
|
||||||
/* Transfer-Encoding: chunked */
|
|
||||||
if (http_MakeMessage(headers, resp_major, resp_minor,
|
if (http_MakeMessage(headers, resp_major, resp_minor,
|
||||||
"R" "N" "T" "GLD" "s" "tcS" "Xc" "sCc",
|
"R" "N" "T" "GLD" "s" "tcS" "Xc" "sCc",
|
||||||
HTTP_PARTIAL_CONTENT, /* status code */
|
HTTP_PARTIAL_CONTENT, /* status code */
|
||||||
@@ -1207,7 +1263,6 @@ static int process_request(
|
|||||||
goto error_handler;
|
goto error_handler;
|
||||||
}
|
}
|
||||||
} else if (!RespInstr->IsRangeActive && RespInstr->IsChunkActive) {
|
} else if (!RespInstr->IsRangeActive && RespInstr->IsChunkActive) {
|
||||||
/* Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
|
|
||||||
/* Transfer-Encoding: chunked */
|
/* Transfer-Encoding: chunked */
|
||||||
if (http_MakeMessage(headers, resp_major, resp_minor,
|
if (http_MakeMessage(headers, resp_major, resp_minor,
|
||||||
"RK" "TLD" "s" "tcS" "Xc" "sCc",
|
"RK" "TLD" "s" "tcS" "Xc" "sCc",
|
||||||
@@ -1222,8 +1277,6 @@ static int process_request(
|
|||||||
} else {
|
} else {
|
||||||
/* !RespInstr->IsRangeActive && !RespInstr->IsChunkActive */
|
/* !RespInstr->IsRangeActive && !RespInstr->IsChunkActive */
|
||||||
if (RespInstr->ReadSendSize >= 0) {
|
if (RespInstr->ReadSendSize >= 0) {
|
||||||
/* Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
|
|
||||||
/* Transfer-Encoding: chunked */
|
|
||||||
if (http_MakeMessage(headers, resp_major, resp_minor,
|
if (http_MakeMessage(headers, resp_major, resp_minor,
|
||||||
"R" "N" "TLD" "s" "tcS" "Xc" "sCc",
|
"R" "N" "TLD" "s" "tcS" "Xc" "sCc",
|
||||||
HTTP_OK, /* status code */
|
HTTP_OK, /* status code */
|
||||||
@@ -1237,8 +1290,6 @@ static int process_request(
|
|||||||
goto error_handler;
|
goto error_handler;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
|
|
||||||
/* Transfer-Encoding: chunked */
|
|
||||||
if (http_MakeMessage(headers, resp_major, resp_minor,
|
if (http_MakeMessage(headers, resp_major, resp_minor,
|
||||||
"R" "TLD" "s" "tcS" "Xc" "sCc",
|
"R" "TLD" "s" "tcS" "Xc" "sCc",
|
||||||
HTTP_OK, /* status code */
|
HTTP_OK, /* status code */
|
||||||
@@ -1268,12 +1319,12 @@ static int process_request(
|
|||||||
if (req->method == HTTPMETHOD_SIMPLEGET) {
|
if (req->method == HTTPMETHOD_SIMPLEGET) {
|
||||||
membuffer_destroy(headers);
|
membuffer_destroy(headers);
|
||||||
}
|
}
|
||||||
err_code = UPNP_E_SUCCESS;
|
err_code = HTTP_OK;
|
||||||
|
|
||||||
error_handler:
|
error_handler:
|
||||||
free(request_doc);
|
free(request_doc);
|
||||||
ixmlFreeDOMString(finfo.content_type);
|
ixmlFreeDOMString(finfo.content_type);
|
||||||
if (err_code != UPNP_E_SUCCESS && alias_grabbed) {
|
if (err_code != HTTP_OK && alias_grabbed) {
|
||||||
alias_release(alias);
|
alias_release(alias);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1286,7 +1337,8 @@ static int process_request(
|
|||||||
* \return
|
* \return
|
||||||
* \li \c HTTP_INTERNAL_SERVER_ERROR
|
* \li \c HTTP_INTERNAL_SERVER_ERROR
|
||||||
* \li \c HTTP_UNAUTHORIZED
|
* \li \c HTTP_UNAUTHORIZED
|
||||||
* \li \c HTTP_REQUEST_RANGE_NOT_SATISFIABLE
|
* \li \c HTTP_BAD_REQUEST
|
||||||
|
* \li \c HTTP_SERVICE_UNAVAILABLE
|
||||||
* \li \c HTTP_OK
|
* \li \c HTTP_OK
|
||||||
*/
|
*/
|
||||||
static int http_RecvPostMessage(
|
static int http_RecvPostMessage(
|
||||||
@@ -1308,7 +1360,7 @@ static int http_RecvPostMessage(
|
|||||||
int ok_on_close = FALSE;
|
int ok_on_close = FALSE;
|
||||||
size_t entity_offset = 0;
|
size_t entity_offset = 0;
|
||||||
int num_read = 0;
|
int num_read = 0;
|
||||||
int ret_code = 0;
|
int ret_code = HTTP_OK;
|
||||||
|
|
||||||
if (Instr && Instr->IsVirtualFile) {
|
if (Instr && Instr->IsVirtualFile) {
|
||||||
Fp = (virtualDirCallback.open) (filename, UPNP_WRITE);
|
Fp = (virtualDirCallback.open) (filename, UPNP_WRITE);
|
||||||
@@ -1331,8 +1383,8 @@ static int http_RecvPostMessage(
|
|||||||
&& (status != PARSE_CONTINUE_1)
|
&& (status != PARSE_CONTINUE_1)
|
||||||
&& (status != PARSE_INCOMPLETE)) {
|
&& (status != PARSE_INCOMPLETE)) {
|
||||||
/* error */
|
/* error */
|
||||||
fclose(Fp);
|
ret_code = HTTP_BAD_REQUEST;
|
||||||
return HTTP_BAD_REQUEST;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
/* read more if necessary entity */
|
/* read more if necessary entity */
|
||||||
while (entity_offset + Data_Buf_Size > parser->msg.entity.length &&
|
while (entity_offset + Data_Buf_Size > parser->msg.entity.length &&
|
||||||
@@ -1340,13 +1392,13 @@ static int http_RecvPostMessage(
|
|||||||
num_read = sock_read(info, Buf, sizeof(Buf), &Timeout);
|
num_read = sock_read(info, Buf, sizeof(Buf), &Timeout);
|
||||||
if (num_read > 0) {
|
if (num_read > 0) {
|
||||||
/* append data to buffer */
|
/* append data to buffer */
|
||||||
ret_code = membuffer_append(&parser->msg.msg,
|
if (membuffer_append(&parser->msg.msg,
|
||||||
Buf, (size_t)num_read);
|
Buf, (size_t)num_read) != 0) {
|
||||||
if (ret_code != 0) {
|
|
||||||
/* set failure status */
|
/* set failure status */
|
||||||
parser->http_error_code =
|
parser->http_error_code =
|
||||||
HTTP_INTERNAL_SERVER_ERROR;
|
HTTP_INTERNAL_SERVER_ERROR;
|
||||||
return HTTP_INTERNAL_SERVER_ERROR;
|
ret_code = HTTP_INTERNAL_SERVER_ERROR;
|
||||||
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
status = parser_parse_entity(parser);
|
status = parser_parse_entity(parser);
|
||||||
if (status == PARSE_INCOMPLETE_ENTITY) {
|
if (status == PARSE_INCOMPLETE_ENTITY) {
|
||||||
@@ -1355,7 +1407,8 @@ static int http_RecvPostMessage(
|
|||||||
} else if ((status != PARSE_SUCCESS)
|
} else if ((status != PARSE_SUCCESS)
|
||||||
&& (status != PARSE_CONTINUE_1)
|
&& (status != PARSE_CONTINUE_1)
|
||||||
&& (status != PARSE_INCOMPLETE)) {
|
&& (status != PARSE_INCOMPLETE)) {
|
||||||
return HTTP_BAD_REQUEST;
|
ret_code = HTTP_BAD_REQUEST;
|
||||||
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
} else if (num_read == 0) {
|
} else if (num_read == 0) {
|
||||||
if (ok_on_close) {
|
if (ok_on_close) {
|
||||||
@@ -1367,10 +1420,12 @@ static int http_RecvPostMessage(
|
|||||||
} else {
|
} else {
|
||||||
/* partial msg or response */
|
/* partial msg or response */
|
||||||
parser->http_error_code = HTTP_BAD_REQUEST;
|
parser->http_error_code = HTTP_BAD_REQUEST;
|
||||||
return HTTP_BAD_REQUEST;
|
ret_code = HTTP_BAD_REQUEST;
|
||||||
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return num_read;
|
ret_code = HTTP_SERVICE_UNAVAILABLE;
|
||||||
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((entity_offset + Data_Buf_Size) > parser->msg.entity.length) {
|
if ((entity_offset + Data_Buf_Size) > parser->msg.entity.length) {
|
||||||
@@ -1381,28 +1436,29 @@ static int http_RecvPostMessage(
|
|||||||
&parser->msg.msg.buf[parser->entity_start_position + entity_offset],
|
&parser->msg.msg.buf[parser->entity_start_position + entity_offset],
|
||||||
Data_Buf_Size);
|
Data_Buf_Size);
|
||||||
entity_offset += Data_Buf_Size;
|
entity_offset += Data_Buf_Size;
|
||||||
if (Instr->IsVirtualFile) {
|
if (Instr && Instr->IsVirtualFile) {
|
||||||
int n = virtualDirCallback.write(Fp, Buf, Data_Buf_Size);
|
int n = virtualDirCallback.write(Fp, Buf, Data_Buf_Size);
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
virtualDirCallback.close(Fp);
|
ret_code = HTTP_INTERNAL_SERVER_ERROR;
|
||||||
return HTTP_INTERNAL_SERVER_ERROR;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
size_t n = fwrite(Buf, 1, Data_Buf_Size, Fp);
|
size_t n = fwrite(Buf, 1, Data_Buf_Size, Fp);
|
||||||
if (n != Data_Buf_Size) {
|
if (n != Data_Buf_Size) {
|
||||||
fclose(Fp);
|
ret_code = HTTP_INTERNAL_SERVER_ERROR;
|
||||||
return HTTP_INTERNAL_SERVER_ERROR;
|
goto ExitFunction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (parser->position != POS_COMPLETE ||
|
} while (parser->position != POS_COMPLETE ||
|
||||||
entity_offset != parser->msg.entity.length);
|
entity_offset != parser->msg.entity.length);
|
||||||
if (Instr->IsVirtualFile) {
|
ExitFunction:
|
||||||
|
if (Instr && Instr->IsVirtualFile) {
|
||||||
virtualDirCallback.close(Fp);
|
virtualDirCallback.close(Fp);
|
||||||
} else {
|
} else {
|
||||||
fclose(Fp);
|
fclose(Fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
return HTTP_OK;
|
return ret_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
|
void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
|
||||||
@@ -1431,7 +1487,7 @@ void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
|
|||||||
/*the type of request. */
|
/*the type of request. */
|
||||||
ret = process_request(req, &rtype, &headers, &filename, &xmldoc,
|
ret = process_request(req, &rtype, &headers, &filename, &xmldoc,
|
||||||
&RespInstr);
|
&RespInstr);
|
||||||
if (ret != UPNP_E_SUCCESS) {
|
if (ret != HTTP_OK) {
|
||||||
/* send error code */
|
/* send error code */
|
||||||
http_SendStatusResponse(info, ret, req->major_version,
|
http_SendStatusResponse(info, ret, req->major_version,
|
||||||
req->minor_version);
|
req->minor_version);
|
||||||
@@ -1473,7 +1529,7 @@ void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
|
|||||||
/* Send response. */
|
/* Send response. */
|
||||||
http_MakeMessage(&headers, 1, 1,
|
http_MakeMessage(&headers, 1, 1,
|
||||||
"RTLSXcCc",
|
"RTLSXcCc",
|
||||||
ret, "text/html", X_USER_AGENT);
|
ret, "text/html", &RespInstr, X_USER_AGENT);
|
||||||
http_SendMessage(info, &timeout, "b",
|
http_SendMessage(info, &timeout, "b",
|
||||||
headers.buf, headers.length);
|
headers.buf, headers.length);
|
||||||
break;
|
break;
|
||||||
@@ -1488,4 +1544,5 @@ void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
|
|||||||
membuffer_destroy(&headers);
|
membuffer_destroy(&headers);
|
||||||
membuffer_destroy(&filename);
|
membuffer_destroy(&filename);
|
||||||
}
|
}
|
||||||
|
#endif /* EXCLUDE_WEB_SERVER */
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -45,6 +46,10 @@
|
|||||||
|
|
||||||
#include "unixutil.h" /* for socklen_t, EAFNOSUPPORT */
|
#include "unixutil.h" /* for socklen_t, EAFNOSUPPORT */
|
||||||
#include "upnp.h"
|
#include "upnp.h"
|
||||||
|
#include "UpnpStdInt.h" /* for ssize_t */
|
||||||
|
|
||||||
|
#include "upnpdebug.h"
|
||||||
|
#include "upnputil.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -85,9 +90,14 @@ int sock_init_with_ip(SOCKINFO *info, SOCKET sockfd,
|
|||||||
int sock_destroy(SOCKINFO *info, int ShutdownMethod)
|
int sock_destroy(SOCKINFO *info, int ShutdownMethod)
|
||||||
{
|
{
|
||||||
int ret = UPNP_E_SUCCESS;
|
int ret = UPNP_E_SUCCESS;
|
||||||
|
char errorBuffer[ERROR_BUFFER_LEN];
|
||||||
|
|
||||||
if (info->socket != INVALID_SOCKET) {
|
if (info->socket != INVALID_SOCKET) {
|
||||||
shutdown(info->socket, ShutdownMethod);
|
if (shutdown(info->socket, ShutdownMethod) == -1) {
|
||||||
|
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
||||||
|
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
|
||||||
|
"Error in shutdown: %s\n", errorBuffer);
|
||||||
|
}
|
||||||
if (sock_close(info->socket) == -1) {
|
if (sock_close(info->socket) == -1) {
|
||||||
ret = UPNP_E_SOCKET_ERROR;
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
}
|
}
|
||||||
@@ -112,7 +122,7 @@ static int sock_read_write(
|
|||||||
/*! [out] Buffer to get data to or send data from. */
|
/*! [out] Buffer to get data to or send data from. */
|
||||||
char *buffer,
|
char *buffer,
|
||||||
/*! [in] Size of the buffer. */
|
/*! [in] Size of the buffer. */
|
||||||
int bufsize,
|
size_t bufsize,
|
||||||
/*! [in] timeout value. */
|
/*! [in] timeout value. */
|
||||||
int *timeoutSecs,
|
int *timeoutSecs,
|
||||||
/*! [in] Boolean value specifying read or write option. */
|
/*! [in] Boolean value specifying read or write option. */
|
||||||
@@ -126,8 +136,8 @@ static int sock_read_write(
|
|||||||
time_t start_time = time(NULL);
|
time_t start_time = time(NULL);
|
||||||
SOCKET sockfd = info->socket;
|
SOCKET sockfd = info->socket;
|
||||||
long bytes_sent = 0;
|
long bytes_sent = 0;
|
||||||
long byte_left = 0;
|
size_t byte_left = (size_t)0;
|
||||||
long num_written;
|
ssize_t num_written;
|
||||||
|
|
||||||
if (*timeoutSecs < 0)
|
if (*timeoutSecs < 0)
|
||||||
return UPNP_E_TIMEDOUT;
|
return UPNP_E_TIMEDOUT;
|
||||||
@@ -166,14 +176,14 @@ static int sock_read_write(
|
|||||||
#endif
|
#endif
|
||||||
if (bRead) {
|
if (bRead) {
|
||||||
/* read data. */
|
/* read data. */
|
||||||
numBytes = (long)recv(sockfd, buffer, (size_t)bufsize, MSG_NOSIGNAL);
|
numBytes = (long)recv(sockfd, buffer, bufsize, MSG_NOSIGNAL);
|
||||||
} else {
|
} else {
|
||||||
byte_left = bufsize;
|
byte_left = bufsize;
|
||||||
bytes_sent = 0;
|
bytes_sent = 0;
|
||||||
while (byte_left > 0) {
|
while (byte_left != (size_t)0) {
|
||||||
/* write data. */
|
/* write data. */
|
||||||
num_written = send(sockfd,
|
num_written = send(sockfd,
|
||||||
buffer + bytes_sent, (size_t)byte_left,
|
buffer + bytes_sent, byte_left,
|
||||||
MSG_DONTROUTE | MSG_NOSIGNAL);
|
MSG_DONTROUTE | MSG_NOSIGNAL);
|
||||||
if (num_written == -1) {
|
if (num_written == -1) {
|
||||||
#ifdef SO_NOSIGPIPE
|
#ifdef SO_NOSIGPIPE
|
||||||
@@ -182,7 +192,7 @@ static int sock_read_write(
|
|||||||
#endif
|
#endif
|
||||||
return (int)num_written;
|
return (int)num_written;
|
||||||
}
|
}
|
||||||
byte_left = byte_left - num_written;
|
byte_left -= (size_t)num_written;
|
||||||
bytes_sent += num_written;
|
bytes_sent += num_written;
|
||||||
}
|
}
|
||||||
numBytes = bytes_sent;
|
numBytes = bytes_sent;
|
||||||
@@ -200,12 +210,12 @@ static int sock_read_write(
|
|||||||
return (int)numBytes;
|
return (int)numBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sock_read(SOCKINFO *info, char *buffer, int bufsize, int *timeoutSecs)
|
int sock_read(SOCKINFO *info, char *buffer, size_t bufsize, int *timeoutSecs)
|
||||||
{
|
{
|
||||||
return sock_read_write(info, buffer, bufsize, timeoutSecs, TRUE);
|
return sock_read_write(info, buffer, bufsize, timeoutSecs, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sock_write(SOCKINFO *info, const char *buffer, int bufsize, int *timeoutSecs)
|
int sock_write(SOCKINFO *info, const char *buffer, size_t bufsize, int *timeoutSecs)
|
||||||
{
|
{
|
||||||
/* Consciently removing constness. */
|
/* Consciently removing constness. */
|
||||||
return sock_read_write(info, (char *)buffer, bufsize, timeoutSecs, FALSE);
|
return sock_read_write(info, (char *)buffer, bufsize, timeoutSecs, FALSE);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -43,6 +44,9 @@
|
|||||||
#include <lwres/netdb.h>
|
#include <lwres/netdb.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WIN32
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -65,7 +69,7 @@ static int is_reserved(
|
|||||||
/*! [in] Char to be matched for RESERVED characters. */
|
/*! [in] Char to be matched for RESERVED characters. */
|
||||||
char in)
|
char in)
|
||||||
{
|
{
|
||||||
if (strchr(RESERVED, in)) {
|
if (strchr(RESERVED, (int)in)) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -83,7 +87,7 @@ int is_mark(
|
|||||||
/*! [in] Char to be matched for MARKED characters. */
|
/*! [in] Char to be matched for MARKED characters. */
|
||||||
char in)
|
char in)
|
||||||
{
|
{
|
||||||
if (strchr(MARK, in)) {
|
if (strchr(MARK, (int)in)) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -132,17 +136,17 @@ int replace_escaped(char *in, size_t index, size_t *max)
|
|||||||
{
|
{
|
||||||
int tempInt = 0;
|
int tempInt = 0;
|
||||||
char tempChar = 0;
|
char tempChar = 0;
|
||||||
size_t i = 0;
|
size_t i = (size_t)0;
|
||||||
size_t j = 0;
|
size_t j = (size_t)0;
|
||||||
|
|
||||||
if (in[index] == '%' && isxdigit(in[index + 1]) && isxdigit(in[index + 2])) {
|
if (in[index] == '%' && isxdigit(in[index + (size_t)1]) && isxdigit(in[index + (size_t)2])) {
|
||||||
/* Note the "%2x", makes sure that we convert a maximum of two
|
/* Note the "%2x", makes sure that we convert a maximum of two
|
||||||
* characters. */
|
* characters. */
|
||||||
if (sscanf(&in[index + 1], "%2x", &tempInt) != 1) {
|
if (sscanf(&in[index + (size_t)1], "%2x", &tempInt) != 1) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
tempChar = (char)tempInt;
|
tempChar = (char)tempInt;
|
||||||
for (i = index + 3, j = index; j < *max; i++, j++) {
|
for (i = index + (size_t)3, j = index; j < *max; i++, j++) {
|
||||||
in[j] = tempChar;
|
in[j] = tempChar;
|
||||||
if (i < *max) {
|
if (i < *max) {
|
||||||
tempChar = in[i];
|
tempChar = in[i];
|
||||||
@@ -150,7 +154,7 @@ int replace_escaped(char *in, size_t index, size_t *max)
|
|||||||
tempChar = 0;
|
tempChar = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*max -= 2;
|
*max -= (size_t)2;
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -172,12 +176,12 @@ static size_t parse_uric(
|
|||||||
/*! [out] Token object where the string of characters is copied. */
|
/*! [out] Token object where the string of characters is copied. */
|
||||||
token *out)
|
token *out)
|
||||||
{
|
{
|
||||||
size_t i = 0;
|
size_t i = (size_t)0;
|
||||||
|
|
||||||
while (i < max &&
|
while (i < max &&
|
||||||
(is_unreserved(in[i]) ||
|
(is_unreserved(in[i]) ||
|
||||||
is_reserved(in[i]) ||
|
is_reserved(in[i]) ||
|
||||||
((i + 2 < max) && is_escaped(&in[i])))) {
|
((i + (size_t)2 < max) && is_escaped(&in[i])))) {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,12 +213,12 @@ static void copy_token(
|
|||||||
|
|
||||||
int copy_URL_list(URL_list *in, URL_list *out)
|
int copy_URL_list(URL_list *in, URL_list *out)
|
||||||
{
|
{
|
||||||
size_t len = strlen(in->URLs) + 1;
|
size_t len = strlen(in->URLs) + (size_t)1;
|
||||||
size_t i = 0;
|
size_t i = (size_t)0;
|
||||||
|
|
||||||
out->URLs = NULL;
|
out->URLs = NULL;
|
||||||
out->parsedURLs = NULL;
|
out->parsedURLs = NULL;
|
||||||
out->size = 0;
|
out->size = (size_t)0;
|
||||||
|
|
||||||
out->URLs = malloc(len);
|
out->URLs = malloc(len);
|
||||||
out->parsedURLs = malloc(sizeof(uri_type) * in->size);
|
out->parsedURLs = malloc(sizeof(uri_type) * in->size);
|
||||||
@@ -222,7 +226,7 @@ int copy_URL_list(URL_list *in, URL_list *out)
|
|||||||
if ( !out->URLs || !out->parsedURLs)
|
if ( !out->URLs || !out->parsedURLs)
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
memcpy(out->URLs, in->URLs, len);
|
memcpy(out->URLs, in->URLs, len);
|
||||||
for( i = 0; i < in->size; i++ ) {
|
for( i = (size_t)0; i < in->size; i++ ) {
|
||||||
/*copy the parsed uri */
|
/*copy the parsed uri */
|
||||||
out->parsedURLs[i].type = in->parsedURLs[i].type;
|
out->parsedURLs[i].type = in->parsedURLs[i].type;
|
||||||
copy_token( &in->parsedURLs[i].scheme, in->URLs,
|
copy_token( &in->parsedURLs[i].scheme, in->URLs,
|
||||||
@@ -253,7 +257,7 @@ void free_URL_list(URL_list *list)
|
|||||||
if (list->parsedURLs) {
|
if (list->parsedURLs) {
|
||||||
free(list->parsedURLs);
|
free(list->parsedURLs);
|
||||||
}
|
}
|
||||||
list->size = 0;
|
list->size = (size_t)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -309,9 +313,18 @@ int token_cmp(token *in1, token *in2)
|
|||||||
return memcmp(in1->buff, in2->buff, in1->size);
|
return memcmp(in1->buff, in2->buff, in1->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
int parse_hostport(
|
/*!
|
||||||
|
* \brief Parses a string representing a host and port (e.g. "127.127.0.1:80"
|
||||||
|
* or "localhost") and fills out a hostport_type struct with internet address
|
||||||
|
* and a token representing the full host and port.
|
||||||
|
*
|
||||||
|
* Uses gethostbyname.
|
||||||
|
*/
|
||||||
|
static int parse_hostport(
|
||||||
|
/*! [in] String of characters representing host and port. */
|
||||||
const char *in,
|
const char *in,
|
||||||
size_t max,
|
/*! [out] Output parameter where the host and port are represented as
|
||||||
|
* an internet address. */
|
||||||
hostport_type *out)
|
hostport_type *out)
|
||||||
{
|
{
|
||||||
char workbuf[256];
|
char workbuf[256];
|
||||||
@@ -328,8 +341,9 @@ int parse_hostport(
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
memset(out, 0, sizeof(hostport_type));
|
memset(out, 0, sizeof(hostport_type));
|
||||||
|
memset(workbuf, 0, sizeof(workbuf));
|
||||||
/* Work on a copy of the input string. */
|
/* Work on a copy of the input string. */
|
||||||
strncpy(workbuf, in, sizeof(workbuf));
|
strncpy(workbuf, in, sizeof(workbuf) - 1);
|
||||||
c = workbuf;
|
c = workbuf;
|
||||||
if (*c == '[') {
|
if (*c == '[') {
|
||||||
/* IPv6 addresses are enclosed in square brackets. */
|
/* IPv6 addresses are enclosed in square brackets. */
|
||||||
@@ -374,15 +388,17 @@ int parse_hostport(
|
|||||||
ret = getaddrinfo(srvname, NULL, &hints, &res0);
|
ret = getaddrinfo(srvname, NULL, &hints, &res0);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
for (res = res0; res; res = res->ai_next) {
|
for (res = res0; res; res = res->ai_next) {
|
||||||
if (res->ai_family == AF_INET ||
|
switch (res->ai_family) {
|
||||||
res->ai_family == AF_INET6) {
|
case AF_INET:
|
||||||
|
case AF_INET6:
|
||||||
/* Found a valid IPv4 or IPv6 address. */
|
/* Found a valid IPv4 or IPv6 address. */
|
||||||
memcpy(&out->IPaddress,
|
memcpy(&out->IPaddress,
|
||||||
res->ai_addr,
|
res->ai_addr,
|
||||||
res->ai_addrlen);
|
res->ai_addrlen);
|
||||||
break;
|
goto found;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
found:
|
||||||
freeaddrinfo(res0);
|
freeaddrinfo(res0);
|
||||||
if (res == NULL)
|
if (res == NULL)
|
||||||
/* Didn't find an AF_INET or AF_INET6 address. */
|
/* Didn't find an AF_INET or AF_INET6 address. */
|
||||||
@@ -404,24 +420,27 @@ int parse_hostport(
|
|||||||
return UPNP_E_INVALID_URL;
|
return UPNP_E_INVALID_URL;
|
||||||
} else
|
} else
|
||||||
/* Port was not specified, use default port. */
|
/* Port was not specified, use default port. */
|
||||||
port = 80;
|
port = 80u;
|
||||||
/* The length of the host and port string can be calculated by */
|
/* The length of the host and port string can be calculated by */
|
||||||
/* subtracting pointers. */
|
/* subtracting pointers. */
|
||||||
hostport_size = (size_t)(c - workbuf);
|
hostport_size = (size_t)c - (size_t)workbuf;
|
||||||
/* Fill in the 'out' information. */
|
/* Fill in the 'out' information. */
|
||||||
if (af == AF_INET) {
|
switch (af) {
|
||||||
sai4->sin_family = AF_INET;
|
case AF_INET:
|
||||||
|
sai4->sin_family = (sa_family_t)af;
|
||||||
sai4->sin_port = htons(port);
|
sai4->sin_port = htons(port);
|
||||||
ret = inet_pton(AF_INET, srvname, &sai4->sin_addr);
|
ret = inet_pton(AF_INET, srvname, &sai4->sin_addr);
|
||||||
} else if (af == AF_INET6) {
|
break;
|
||||||
sai6->sin6_family = AF_INET6;
|
case AF_INET6:
|
||||||
|
sai6->sin6_family = (sa_family_t)af;
|
||||||
sai6->sin6_port = htons(port);
|
sai6->sin6_port = htons(port);
|
||||||
sai6->sin6_scope_id = gIF_INDEX;
|
sai6->sin6_scope_id = gIF_INDEX;
|
||||||
ret = inet_pton(AF_INET6, srvname, &sai6->sin6_addr);
|
ret = inet_pton(AF_INET6, srvname, &sai6->sin6_addr);
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
/* IP address was set by the hostname (getaddrinfo). */
|
/* IP address was set by the hostname (getaddrinfo). */
|
||||||
/* Override port: */
|
/* Override port: */
|
||||||
if (out->IPaddress.ss_family == AF_INET)
|
if (out->IPaddress.ss_family == (sa_family_t)AF_INET)
|
||||||
sai4->sin_port = htons(port);
|
sai4->sin_port = htons(port);
|
||||||
else
|
else
|
||||||
sai6->sin6_port = htons(port);
|
sai6->sin6_port = htons(port);
|
||||||
@@ -434,7 +453,6 @@ int parse_hostport(
|
|||||||
out->text.buff = in;
|
out->text.buff = in;
|
||||||
|
|
||||||
return (int)hostport_size;
|
return (int)hostport_size;
|
||||||
max = max;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -455,19 +473,19 @@ static size_t parse_scheme(
|
|||||||
/*! [out] Output parameter whose buffer is filled in with the scheme. */
|
/*! [out] Output parameter whose buffer is filled in with the scheme. */
|
||||||
token *out)
|
token *out)
|
||||||
{
|
{
|
||||||
size_t i = 0;
|
size_t i = (size_t)0;
|
||||||
|
|
||||||
out->size = 0;
|
out->size = (size_t)0;
|
||||||
out->buff = NULL;
|
out->buff = NULL;
|
||||||
|
|
||||||
if( ( max == 0 ) || ( !isalpha( in[0] ) ) )
|
if( ( max == (size_t)0 ) || ( !isalpha( in[0] ) ) )
|
||||||
return 0;
|
return (size_t)0;
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
while( ( i < max ) && ( in[i] != ':' ) ) {
|
while( ( i < max ) && ( in[i] != ':' ) ) {
|
||||||
if( !( isalnum( in[i] ) || ( in[i] == '+' ) || ( in[i] == '-' )
|
if( !( isalnum( in[i] ) || ( in[i] == '+' ) || ( in[i] == '-' )
|
||||||
|| ( in[i] == '.' ) ) )
|
|| ( in[i] == '.' ) ) )
|
||||||
return 0;
|
return (size_t)0;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
if( i < max ) {
|
if( i < max ) {
|
||||||
@@ -476,15 +494,15 @@ static size_t parse_scheme(
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return (size_t)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int remove_escaped_chars(INOUT char *in, INOUT size_t *size)
|
int remove_escaped_chars(INOUT char *in, INOUT size_t *size)
|
||||||
{
|
{
|
||||||
size_t i = 0;
|
size_t i = (size_t)0;
|
||||||
|
|
||||||
for (i = 0; i < *size; i++) {
|
for (i = (size_t)0; i < *size; i++) {
|
||||||
replace_escaped(in, i, size);
|
replace_escaped(in, i, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,68 +510,81 @@ int remove_escaped_chars(INOUT char *in, INOUT size_t *size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int remove_dots(char *in, size_t size)
|
static UPNP_INLINE int is_end_path(char c) {
|
||||||
|
switch (c) {
|
||||||
|
case '?':
|
||||||
|
case '#':
|
||||||
|
case '\0':
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* This function directly implements the "Remove Dot Segments"
|
||||||
|
* algorithm described in RFC 3986 section 5.2.4. */
|
||||||
|
int remove_dots(char *buf, size_t size)
|
||||||
{
|
{
|
||||||
char *copyTo = in;
|
char *in = buf;
|
||||||
char *copyFrom = in;
|
char *out = buf;
|
||||||
char *max = in + size;
|
char *max = buf + size;
|
||||||
char **Segments = NULL;
|
|
||||||
int lastSegment = -1;
|
|
||||||
|
|
||||||
Segments = malloc( sizeof( char * ) * size );
|
while (!is_end_path(in[0])) {
|
||||||
|
assert (buf <= out);
|
||||||
|
assert (out <= in);
|
||||||
|
assert (in < max);
|
||||||
|
|
||||||
if( Segments == NULL )
|
/* case 2.A: */
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
if (strncmp(in, "./", 2) == 0) {
|
||||||
|
in += 2;
|
||||||
Segments[0] = NULL;
|
} else if (strncmp(in, "../", 3) == 0) {
|
||||||
UpnpPrintf( UPNP_ALL, API, __FILE__, __LINE__,
|
in += 3;
|
||||||
"REMOVE_DOTS: before: %s\n", in );
|
/* case 2.B: */
|
||||||
while( ( copyFrom < max ) && ( *copyFrom != '?' )
|
} else if (strncmp(in, "/./", 3) == 0) {
|
||||||
&& ( *copyFrom != '#' ) ) {
|
in += 2;
|
||||||
|
} else if (strncmp(in, "/.", 2) == 0 && is_end_path(in[2])) {
|
||||||
if( ( ( *copyFrom ) == '.' )
|
in += 1;
|
||||||
&& ( ( copyFrom == in ) || ( *( copyFrom - 1 ) == '/' ) ) ) {
|
in[0] = '/';
|
||||||
if( ( copyFrom + 1 == max )
|
/* case 2.C: */
|
||||||
|| ( *( copyFrom + 1 ) == '/' ) ) {
|
} else if (strncmp(in, "/../", 4) == 0 || (strncmp(in, "/..", 3) == 0 && is_end_path(in[3]))) {
|
||||||
|
/* Make the next character in the input buffer a '/': */
|
||||||
copyFrom += 2;
|
if (is_end_path(in[3])) { /* terminating "/.." case */
|
||||||
continue;
|
in += 2;
|
||||||
} else if( ( *( copyFrom + 1 ) == '.' )
|
in[0] = '/';
|
||||||
&& ( ( copyFrom + 2 == max )
|
} else { /* "/../" prefix case */
|
||||||
|| ( *( copyFrom + 2 ) == '/' ) ) ) {
|
in += 3;
|
||||||
copyFrom += 3;
|
}
|
||||||
|
/* Trim the last component from the output buffer, or empty it. */
|
||||||
if( lastSegment > 0 ) {
|
while (buf < out)
|
||||||
copyTo = Segments[--lastSegment];
|
if (*--out == '/')
|
||||||
|
break;
|
||||||
|
#ifdef DEBUG
|
||||||
|
if (out < in)
|
||||||
|
out[0] = '\0';
|
||||||
|
#endif
|
||||||
|
/* case 2.D: */
|
||||||
|
} else if (strncmp(in, ".", 1) == 0 && is_end_path(in[1])) {
|
||||||
|
in += 1;
|
||||||
|
} else if (strncmp(in, "..", 2) == 0 && is_end_path(in[2])) {
|
||||||
|
in += 2;
|
||||||
|
/* case 2.E */
|
||||||
} else {
|
} else {
|
||||||
free( Segments );
|
/* move initial '/' character (if any) */
|
||||||
/*TRACE("ERROR RESOLVING URL, ../ at ROOT"); */
|
if (in[0] == '/')
|
||||||
return UPNP_E_INVALID_URL;
|
*out++ = *in++;
|
||||||
}
|
/* move first segment up to, but not including, the next '/' character */
|
||||||
continue;
|
while (in < max && in[0] != '/' && !is_end_path(in[0]))
|
||||||
|
*out++ = *in++;
|
||||||
|
#ifdef DEBUG
|
||||||
|
if (out < in)
|
||||||
|
out[0] = '\0';
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
while (in < max)
|
||||||
if( ( *copyFrom ) == '/' ) {
|
*out++ = *in++;
|
||||||
|
if (out < max)
|
||||||
lastSegment++;
|
out[0] = '\0';
|
||||||
Segments[lastSegment] = copyTo + 1;
|
|
||||||
}
|
|
||||||
( *copyTo ) = ( *copyFrom );
|
|
||||||
copyTo++;
|
|
||||||
copyFrom++;
|
|
||||||
}
|
|
||||||
if( copyFrom < max ) {
|
|
||||||
while( copyFrom < max ) {
|
|
||||||
( *copyTo ) = ( *copyFrom );
|
|
||||||
copyTo++;
|
|
||||||
copyFrom++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
( *copyTo ) = 0;
|
|
||||||
free( Segments );
|
|
||||||
UpnpPrintf( UPNP_ALL, API, __FILE__, __LINE__,
|
|
||||||
"REMOVE_DOTS: after: %s\n", in );
|
|
||||||
return UPNP_E_SUCCESS;
|
return UPNP_E_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -562,117 +593,121 @@ char *resolve_rel_url(char *base_url, char *rel_url)
|
|||||||
{
|
{
|
||||||
uri_type base;
|
uri_type base;
|
||||||
uri_type rel;
|
uri_type rel;
|
||||||
char temp_path = '/';
|
int rv;
|
||||||
|
|
||||||
size_t i = 0;
|
if (!base_url) {
|
||||||
char *finger = NULL;
|
if (!rel_url)
|
||||||
|
|
||||||
char *last_slash = NULL;
|
|
||||||
|
|
||||||
char *out = NULL;
|
|
||||||
char *out_finger = NULL;
|
|
||||||
|
|
||||||
if( base_url && rel_url ) {
|
|
||||||
out =
|
|
||||||
( char * )malloc( strlen( base_url ) + strlen( rel_url ) + 2 );
|
|
||||||
out_finger = out;
|
|
||||||
} else {
|
|
||||||
if( rel_url )
|
|
||||||
return strdup( rel_url );
|
|
||||||
else
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
return strdup(rel_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( out == NULL ) {
|
size_t len_rel = strlen(rel_url);
|
||||||
|
if (parse_uri(rel_url, len_rel, &rel) != HTTP_SUCCESS)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
if (rel.type == (enum uriType)ABSOLUTE)
|
||||||
|
return strdup(rel_url);
|
||||||
|
|
||||||
if( ( parse_uri( rel_url, strlen( rel_url ), &rel ) ) == HTTP_SUCCESS ) {
|
size_t len_base = strlen(base_url);
|
||||||
|
if ((parse_uri(base_url, len_base, &base) != HTTP_SUCCESS)
|
||||||
if( rel.type == ABSOLUTE ) {
|
|| (base.type != (enum uriType)ABSOLUTE))
|
||||||
|
|
||||||
strcpy( out, rel_url );
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if( ( parse_uri( base_url, strlen( base_url ), &base ) ==
|
|
||||||
HTTP_SUCCESS )
|
|
||||||
&& ( base.type == ABSOLUTE ) ) {
|
|
||||||
|
|
||||||
if( strlen( rel_url ) == 0 ) {
|
|
||||||
strcpy( out, base_url );
|
|
||||||
} else {
|
|
||||||
memcpy( out, base.scheme.buff, base.scheme.size );
|
|
||||||
out_finger += base.scheme.size;
|
|
||||||
( *out_finger ) = ':';
|
|
||||||
out_finger++;
|
|
||||||
|
|
||||||
if( rel.hostport.text.size > 0 ) {
|
|
||||||
sprintf( out_finger, "%s", rel_url );
|
|
||||||
} else {
|
|
||||||
if( base.hostport.text.size > 0 ) {
|
|
||||||
memcpy( out_finger, "//", 2 );
|
|
||||||
out_finger += 2;
|
|
||||||
memcpy( out_finger, base.hostport.text.buff,
|
|
||||||
base.hostport.text.size );
|
|
||||||
out_finger += base.hostport.text.size;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( rel.path_type == ABS_PATH ) {
|
|
||||||
strcpy( out_finger, rel_url );
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if( base.pathquery.size == 0 ) {
|
|
||||||
base.pathquery.size = 1;
|
|
||||||
base.pathquery.buff = &temp_path;
|
|
||||||
}
|
|
||||||
|
|
||||||
finger = out_finger;
|
|
||||||
last_slash = finger;
|
|
||||||
i = 0;
|
|
||||||
while( ( i < base.pathquery.size ) &&
|
|
||||||
( base.pathquery.buff[i] != '?' ) ) {
|
|
||||||
( *finger ) = base.pathquery.buff[i];
|
|
||||||
if( base.pathquery.buff[i] == '/' )
|
|
||||||
last_slash = finger + 1;
|
|
||||||
i++;
|
|
||||||
finger++;
|
|
||||||
|
|
||||||
}
|
|
||||||
strcpy( last_slash, rel_url );
|
|
||||||
if( remove_dots( out_finger,
|
|
||||||
strlen( out_finger ) ) !=
|
|
||||||
UPNP_E_SUCCESS ) {
|
|
||||||
free(out);
|
|
||||||
/* free(rel_url); */
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
if (len_rel == (size_t)0)
|
||||||
}
|
return strdup(base_url);
|
||||||
|
|
||||||
}
|
size_t len = len_base + len_rel + (size_t)2;
|
||||||
}
|
char *out = (char *)malloc(len);
|
||||||
} else {
|
if (out == NULL)
|
||||||
free(out);
|
|
||||||
/* free(rel_url); */
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
memset(out, 0, len);
|
||||||
}
|
char *out_finger = out;
|
||||||
} else {
|
|
||||||
free(out);
|
|
||||||
/* free(rel_url); */
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* free(rel_url); */
|
/* scheme */
|
||||||
|
rv = snprintf(out_finger, len, "%.*s:", (int)base.scheme.size, base.scheme.buff);
|
||||||
|
if (rv < 0 || rv >= len)
|
||||||
|
goto error;
|
||||||
|
out_finger += rv;
|
||||||
|
len -= rv;
|
||||||
|
|
||||||
|
/* authority */
|
||||||
|
if (rel.hostport.text.size > (size_t)0) {
|
||||||
|
rv = snprintf(out_finger, len, "%s", rel_url);
|
||||||
|
if (rv < 0 || rv >= len)
|
||||||
|
goto error;
|
||||||
return out;
|
return out;
|
||||||
|
}
|
||||||
|
if (base.hostport.text.size > (size_t)0) {
|
||||||
|
rv = snprintf(out_finger, len, "//%.*s", (int)base.hostport.text.size, base.hostport.text.buff);
|
||||||
|
if (rv < 0 || rv >= len)
|
||||||
|
goto error;
|
||||||
|
out_finger += rv;
|
||||||
|
len -= rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* path */
|
||||||
|
char *path = out_finger;
|
||||||
|
if (rel.path_type == (enum pathType)ABS_PATH) {
|
||||||
|
rv = snprintf(out_finger, len, "%s", rel_url);
|
||||||
|
} else if (base.pathquery.size == (size_t)0) {
|
||||||
|
rv = snprintf(out_finger, len, "/%s", rel_url);
|
||||||
|
} else {
|
||||||
|
if (rel.pathquery.size == (size_t)0) {
|
||||||
|
rv = snprintf(out_finger, len, "%.*s", (int)base.pathquery.size, base.pathquery.buff);
|
||||||
|
} else {
|
||||||
|
if (len < base.pathquery.size)
|
||||||
|
goto error;
|
||||||
|
size_t i = (size_t)0, prefix = (size_t)1;
|
||||||
|
while (i < base.pathquery.size) {
|
||||||
|
out_finger[i] = base.pathquery.buff[i];
|
||||||
|
switch (base.pathquery.buff[i++]) {
|
||||||
|
case '/':
|
||||||
|
prefix = i;
|
||||||
|
/* fall-through */
|
||||||
|
default:
|
||||||
|
continue;
|
||||||
|
case '?': /* query */
|
||||||
|
if (rel.pathquery.buff[0] == '?')
|
||||||
|
prefix = --i;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
out_finger += prefix;
|
||||||
|
len -= prefix;
|
||||||
|
rv = snprintf(out_finger, len, "%.*s", (int)rel.pathquery.size, rel.pathquery.buff);
|
||||||
|
}
|
||||||
|
if (rv < 0 || rv >= len)
|
||||||
|
goto error;
|
||||||
|
out_finger += rv;
|
||||||
|
len -= rv;
|
||||||
|
|
||||||
|
/* fragment */
|
||||||
|
if (rel.fragment.size > (size_t)0)
|
||||||
|
rv = snprintf(out_finger, len, "#%.*s", (int)rel.fragment.size, rel.fragment.buff);
|
||||||
|
else if (base.fragment.size > (size_t)0)
|
||||||
|
rv = snprintf(out_finger, len, "#%.*s", (int)base.fragment.size, base.fragment.buff);
|
||||||
|
else
|
||||||
|
rv = 0;
|
||||||
|
}
|
||||||
|
if (rv < 0 || rv >= len)
|
||||||
|
goto error;
|
||||||
|
out_finger += rv;
|
||||||
|
len -= rv;
|
||||||
|
|
||||||
|
if (remove_dots(path, out_finger - path) != UPNP_E_SUCCESS)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
return out;
|
||||||
|
|
||||||
|
error:
|
||||||
|
free(out);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int parse_uri(const char *in, size_t max, uri_type *out)
|
int parse_uri(const char *in, size_t max, uri_type *out)
|
||||||
{
|
{
|
||||||
int begin_path = 0;
|
int begin_path = 0;
|
||||||
size_t begin_hostport = 0;
|
size_t begin_hostport = (size_t)0;
|
||||||
size_t begin_fragment = 0;
|
size_t begin_fragment = (size_t)0;
|
||||||
|
|
||||||
begin_hostport = parse_scheme(in, max, &out->scheme);
|
begin_hostport = parse_scheme(in, max, &out->scheme);
|
||||||
if (begin_hostport) {
|
if (begin_hostport) {
|
||||||
@@ -683,12 +718,11 @@ int parse_uri(const char *in, size_t max, uri_type *out)
|
|||||||
out->type = RELATIVE;
|
out->type = RELATIVE;
|
||||||
out->path_type = REL_PATH;
|
out->path_type = REL_PATH;
|
||||||
}
|
}
|
||||||
if (begin_hostport + 1 < max &&
|
if (begin_hostport + (size_t)1 < max &&
|
||||||
in[begin_hostport] == '/' &&
|
in[begin_hostport] == '/' &&
|
||||||
in[begin_hostport + 1] == '/') {
|
in[begin_hostport + (size_t)1] == '/') {
|
||||||
begin_hostport += 2;
|
begin_hostport += (size_t)2;
|
||||||
begin_path = parse_hostport(&in[begin_hostport],
|
begin_path = parse_hostport(&in[begin_hostport],
|
||||||
max - begin_hostport,
|
|
||||||
&out->hostport);
|
&out->hostport);
|
||||||
if (begin_path >= 0) {
|
if (begin_path >= 0) {
|
||||||
begin_path += (int)begin_hostport;
|
begin_path += (int)begin_hostport;
|
||||||
@@ -710,7 +744,7 @@ int parse_uri(const char *in, size_t max, uri_type *out)
|
|||||||
&out->fragment);
|
&out->fragment);
|
||||||
} else {
|
} else {
|
||||||
out->fragment.buff = NULL;
|
out->fragment.buff = NULL;
|
||||||
out->fragment.size = 0;
|
out->fragment.size = (size_t)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return HTTP_SUCCESS;
|
return HTTP_SUCCESS;
|
||||||
@@ -724,10 +758,10 @@ int parse_uri_and_unescape(char *in, size_t max, uri_type *out)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (out->pathquery.size > 0) {
|
if (out->pathquery.size > (size_t)0) {
|
||||||
remove_escaped_chars((char *)out->pathquery.buff, &out->pathquery.size);
|
remove_escaped_chars((char *)out->pathquery.buff, &out->pathquery.size);
|
||||||
}
|
}
|
||||||
if (out->fragment.size > 0) {
|
if (out->fragment.size > (size_t)0) {
|
||||||
remove_escaped_chars((char *)out->fragment.buff, &out->fragment.size);
|
remove_escaped_chars((char *)out->fragment.buff, &out->fragment.size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -42,6 +43,7 @@
|
|||||||
|
|
||||||
#ifdef INCLUDE_DEVICE_APIS
|
#ifdef INCLUDE_DEVICE_APIS
|
||||||
|
|
||||||
|
#if EXCLUDE_GENA == 0
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Function : copy_subscription
|
* Function : copy_subscription
|
||||||
*
|
*
|
||||||
@@ -299,15 +301,16 @@ FindServiceEventURLPath( service_table * table,
|
|||||||
|
|
||||||
if( ( table )
|
if( ( table )
|
||||||
&&
|
&&
|
||||||
( parse_uri
|
( parse_uri( eventURLPath,
|
||||||
( eventURLPath, strlen( eventURLPath ), &parsed_url_in ) ) ) {
|
strlen( eventURLPath ),
|
||||||
|
&parsed_url_in ) == HTTP_SUCCESS ) ) {
|
||||||
|
|
||||||
finger = table->serviceList;
|
finger = table->serviceList;
|
||||||
while( finger ) {
|
while( finger ) {
|
||||||
if( finger->eventURL )
|
if( finger->eventURL )
|
||||||
if( ( parse_uri
|
if( ( parse_uri
|
||||||
( finger->eventURL, strlen( finger->eventURL ),
|
( finger->eventURL, strlen( finger->eventURL ),
|
||||||
&parsed_url ) ) ) {
|
&parsed_url ) == HTTP_SUCCESS ) ) {
|
||||||
|
|
||||||
if( !token_cmp
|
if( !token_cmp
|
||||||
( &parsed_url.pathquery,
|
( &parsed_url.pathquery,
|
||||||
@@ -321,6 +324,7 @@ FindServiceEventURLPath( service_table * table,
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif /* EXCLUDE_GENA */
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Function : FindServiceControlURLPath
|
* Function : FindServiceControlURLPath
|
||||||
@@ -338,6 +342,7 @@ FindServiceEventURLPath( service_table * table,
|
|||||||
*
|
*
|
||||||
* Note :
|
* Note :
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
#if EXCLUDE_SOAP == 0
|
||||||
service_info *
|
service_info *
|
||||||
FindServiceControlURLPath( service_table * table,
|
FindServiceControlURLPath( service_table * table,
|
||||||
const char *controlURLPath )
|
const char *controlURLPath )
|
||||||
@@ -350,13 +355,13 @@ FindServiceControlURLPath( service_table * table,
|
|||||||
&&
|
&&
|
||||||
( parse_uri
|
( parse_uri
|
||||||
( controlURLPath, strlen( controlURLPath ),
|
( controlURLPath, strlen( controlURLPath ),
|
||||||
&parsed_url_in ) ) ) {
|
&parsed_url_in ) == HTTP_SUCCESS ) ) {
|
||||||
finger = table->serviceList;
|
finger = table->serviceList;
|
||||||
while( finger ) {
|
while( finger ) {
|
||||||
if( finger->controlURL )
|
if( finger->controlURL )
|
||||||
if( ( parse_uri
|
if( ( parse_uri
|
||||||
( finger->controlURL, strlen( finger->controlURL ),
|
( finger->controlURL, strlen( finger->controlURL ),
|
||||||
&parsed_url ) ) ) {
|
&parsed_url ) == HTTP_SUCCESS) ) {
|
||||||
if( !token_cmp
|
if( !token_cmp
|
||||||
( &parsed_url.pathquery,
|
( &parsed_url.pathquery,
|
||||||
&parsed_url_in.pathquery ) )
|
&parsed_url_in.pathquery ) )
|
||||||
@@ -369,6 +374,7 @@ FindServiceControlURLPath( service_table * table,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif /* EXCLUDE_SOAP */
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Function : printService
|
* Function : printService
|
||||||
@@ -514,6 +520,7 @@ void printServiceTable(
|
|||||||
printServiceList( table->serviceList, level, module );}
|
printServiceList( table->serviceList, level, module );}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if EXCLUDE_GENA == 0
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Function : freeService
|
* Function : freeService
|
||||||
*
|
*
|
||||||
@@ -737,8 +744,8 @@ service_info *getServiceList(
|
|||||||
service_info *current = NULL;
|
service_info *current = NULL;
|
||||||
service_info *previous = NULL;
|
service_info *previous = NULL;
|
||||||
IXML_NodeList *serviceNodeList = NULL;
|
IXML_NodeList *serviceNodeList = NULL;
|
||||||
long unsigned int NumOfServices = 0;
|
long unsigned int NumOfServices = 0lu;
|
||||||
long unsigned int i = 0;
|
long unsigned int i = 0lu;
|
||||||
int fail = 0;
|
int fail = 0;
|
||||||
|
|
||||||
if (getSubElement("UDN", node, &UDN) &&
|
if (getSubElement("UDN", node, &UDN) &&
|
||||||
@@ -747,7 +754,7 @@ service_info *getServiceList(
|
|||||||
(IXML_Element *)serviceList, "service");
|
(IXML_Element *)serviceList, "service");
|
||||||
if (serviceNodeList != NULL) {
|
if (serviceNodeList != NULL) {
|
||||||
NumOfServices = ixmlNodeList_length(serviceNodeList);
|
NumOfServices = ixmlNodeList_length(serviceNodeList);
|
||||||
for (i = 0; i < NumOfServices; i++) {
|
for (i = 0lu; i < NumOfServices; i++) {
|
||||||
current_service =
|
current_service =
|
||||||
ixmlNodeList_item(serviceNodeList, i);
|
ixmlNodeList_item(serviceNodeList, i);
|
||||||
fail = 0;
|
fail = 0;
|
||||||
@@ -761,6 +768,7 @@ service_info *getServiceList(
|
|||||||
}
|
}
|
||||||
if (!current) {
|
if (!current) {
|
||||||
freeServiceList(head);
|
freeServiceList(head);
|
||||||
|
ixmlNodeList_free(serviceNodeList);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
current->next = NULL;
|
current->next = NULL;
|
||||||
@@ -860,8 +868,8 @@ getAllServiceList( IXML_Node * node,
|
|||||||
IXML_NodeList *deviceList = NULL;
|
IXML_NodeList *deviceList = NULL;
|
||||||
IXML_Node *currentDevice = NULL;
|
IXML_Node *currentDevice = NULL;
|
||||||
|
|
||||||
long unsigned int NumOfDevices = 0;
|
long unsigned int NumOfDevices = 0lu;
|
||||||
long unsigned int i = 0;
|
long unsigned int i = 0lu;
|
||||||
|
|
||||||
(*out_end) = NULL;
|
(*out_end) = NULL;
|
||||||
|
|
||||||
@@ -869,7 +877,7 @@ getAllServiceList( IXML_Node * node,
|
|||||||
(IXML_Element *)node, "device");
|
(IXML_Element *)node, "device");
|
||||||
if (deviceList) {
|
if (deviceList) {
|
||||||
NumOfDevices = ixmlNodeList_length(deviceList);
|
NumOfDevices = ixmlNodeList_length(deviceList);
|
||||||
for (i = 0; i < NumOfDevices; i++) {
|
for (i = 0lu; i < NumOfDevices; i++) {
|
||||||
currentDevice = ixmlNodeList_item(deviceList, i);
|
currentDevice = ixmlNodeList_item(deviceList, i);
|
||||||
if (head) {
|
if (head) {
|
||||||
end->next = getServiceList(currentDevice,
|
end->next = getServiceList(currentDevice,
|
||||||
@@ -912,23 +920,20 @@ removeServiceTable( IXML_Node * node,
|
|||||||
IXML_Node *currentUDN = NULL;
|
IXML_Node *currentUDN = NULL;
|
||||||
DOMString UDN = NULL;
|
DOMString UDN = NULL;
|
||||||
IXML_NodeList *deviceList = NULL;
|
IXML_NodeList *deviceList = NULL;
|
||||||
IXML_Node *currentDevice = NULL;
|
|
||||||
service_info *current_service = NULL;
|
service_info *current_service = NULL;
|
||||||
service_info *start_search = NULL;
|
service_info *start_search = NULL;
|
||||||
service_info *prev_service = NULL;
|
service_info *prev_service = NULL;
|
||||||
long unsigned int NumOfDevices = 0;
|
long unsigned int NumOfDevices = 0lu;
|
||||||
long unsigned int i = 0;
|
long unsigned int i = 0lu;
|
||||||
|
|
||||||
if( getSubElement( "root", node, &root ) ) {
|
if( getSubElement( "root", node, &root ) ) {
|
||||||
current_service = in->serviceList;
|
|
||||||
start_search = in->serviceList;
|
start_search = in->serviceList;
|
||||||
deviceList =
|
deviceList =
|
||||||
ixmlElement_getElementsByTagName( ( IXML_Element * ) root,
|
ixmlElement_getElementsByTagName( ( IXML_Element * ) root,
|
||||||
"device" );
|
"device" );
|
||||||
if( deviceList != NULL ) {
|
if( deviceList != NULL ) {
|
||||||
NumOfDevices = ixmlNodeList_length( deviceList );
|
NumOfDevices = ixmlNodeList_length( deviceList );
|
||||||
for( i = 0; i < NumOfDevices; i++ ) {
|
for( i = 0lu; i < NumOfDevices; i++ ) {
|
||||||
currentDevice = ixmlNodeList_item( deviceList, i );
|
|
||||||
if( ( start_search )
|
if( ( start_search )
|
||||||
&& ( ( getSubElement( "UDN", node, ¤tUDN ) )
|
&& ( ( getSubElement( "UDN", node, ¤tUDN ) )
|
||||||
&& ( UDN = getElementValue( currentUDN ) ) ) ) {
|
&& ( UDN = getElementValue( currentUDN ) ) ) ) {
|
||||||
@@ -939,6 +944,7 @@ removeServiceTable( IXML_Node * node,
|
|||||||
while( ( current_service )
|
while( ( current_service )
|
||||||
&& ( strcmp( current_service->UDN, UDN ) ) ) {
|
&& ( strcmp( current_service->UDN, UDN ) ) ) {
|
||||||
current_service = current_service->next;
|
current_service = current_service->next;
|
||||||
|
if( current_service != NULL)
|
||||||
prev_service = current_service->next;
|
prev_service = current_service->next;
|
||||||
}
|
}
|
||||||
while( ( current_service )
|
while( ( current_service )
|
||||||
@@ -954,6 +960,8 @@ removeServiceTable( IXML_Node * node,
|
|||||||
freeService( current_service );
|
freeService( current_service );
|
||||||
current_service = start_search;
|
current_service = start_search;
|
||||||
}
|
}
|
||||||
|
ixmlFreeDOMString( UDN );
|
||||||
|
UDN = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1060,6 +1068,7 @@ getServiceTable( IXML_Node * node,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif /* EXCLUDE_GENA */
|
||||||
|
|
||||||
#endif /* INCLUDE_DEVICE_APIS */
|
#endif /* INCLUDE_DEVICE_APIS */
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -48,7 +49,7 @@ char *str_alloc(const char *str, size_t str_len)
|
|||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
s = (char *)malloc(str_len + 1);
|
s = (char *)malloc(str_len + (size_t)1);
|
||||||
if (s == NULL) {
|
if (s == NULL) {
|
||||||
return NULL; /* no mem */
|
return NULL; /* no mem */
|
||||||
}
|
}
|
||||||
@@ -96,8 +97,8 @@ static UPNP_INLINE void membuffer_initialize(
|
|||||||
membuffer *m)
|
membuffer *m)
|
||||||
{
|
{
|
||||||
m->buf = NULL;
|
m->buf = NULL;
|
||||||
m->length = 0;
|
m->length = (size_t)0;
|
||||||
m->capacity = 0;
|
m->capacity = (size_t)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int membuffer_set_size(membuffer *m, size_t new_length)
|
int membuffer_set_size(membuffer *m, size_t new_length)
|
||||||
@@ -128,14 +129,14 @@ int membuffer_set_size(membuffer *m, size_t new_length)
|
|||||||
|
|
||||||
assert(alloc_len >= new_length);
|
assert(alloc_len >= new_length);
|
||||||
|
|
||||||
temp_buf = realloc(m->buf, alloc_len + 1); /*LEAK_FIX_MK */
|
temp_buf = realloc(m->buf, alloc_len + (size_t)1); /*LEAK_FIX_MK */
|
||||||
|
|
||||||
/*temp_buf = Realloc( m->buf,m->length, alloc_len + 1 );LEAK_FIX_MK */
|
/*temp_buf = Realloc( m->buf,m->length, alloc_len + 1 );LEAK_FIX_MK */
|
||||||
|
|
||||||
if (temp_buf == NULL) {
|
if (temp_buf == NULL) {
|
||||||
/* try smaller size */
|
/* try smaller size */
|
||||||
alloc_len = new_length;
|
alloc_len = new_length;
|
||||||
temp_buf = realloc(m->buf, alloc_len + 1); /*LEAK_FIX_MK */
|
temp_buf = realloc(m->buf, alloc_len + (size_t)1); /*LEAK_FIX_MK */
|
||||||
/*temp_buf = Realloc( m->buf,m->length, alloc_len + 1 );LEAK_FIX_MK */
|
/*temp_buf = Realloc( m->buf,m->length, alloc_len + 1 );LEAK_FIX_MK */
|
||||||
|
|
||||||
if (temp_buf == NULL) {
|
if (temp_buf == NULL) {
|
||||||
@@ -250,7 +251,7 @@ void membuffer_delete(membuffer * m, size_t index, size_t num_bytes)
|
|||||||
if (index + num_bytes > m->length) {
|
if (index + num_bytes > m->length) {
|
||||||
num_bytes = m->length - index;
|
num_bytes = m->length - index;
|
||||||
/* every thing at and after index purged */
|
/* every thing at and after index purged */
|
||||||
copy_len = 0;
|
copy_len = (size_t)0;
|
||||||
} else {
|
} else {
|
||||||
/* calc num bytes after deleted string */
|
/* calc num bytes after deleted string */
|
||||||
copy_len = m->length - (index + num_bytes);
|
copy_len = m->length - (index + num_bytes);
|
||||||
@@ -261,6 +262,8 @@ void membuffer_delete(membuffer * m, size_t index, size_t num_bytes)
|
|||||||
return_value = membuffer_set_size(m, new_length);
|
return_value = membuffer_set_size(m, new_length);
|
||||||
/* shrinking should always work */
|
/* shrinking should always work */
|
||||||
assert(return_value == 0);
|
assert(return_value == 0);
|
||||||
|
if (return_value != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
/* don't modify until buffer is set */
|
/* don't modify until buffer is set */
|
||||||
m->length = new_length;
|
m->length = new_length;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -44,14 +45,14 @@
|
|||||||
|
|
||||||
void linecopy(char dest[LINE_SIZE], const char *src)
|
void linecopy(char dest[LINE_SIZE], const char *src)
|
||||||
{
|
{
|
||||||
strncpy(dest, src, LINE_SIZE - 1);
|
strncpy(dest, src, LINE_SIZE - (size_t)1);
|
||||||
/* null-terminate if len(src) >= LINE_SIZE. */
|
/* null-terminate if len(src) >= LINE_SIZE. */
|
||||||
dest[LINE_SIZE - 1] = '\0';
|
dest[LINE_SIZE - 1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
void namecopy(char dest[NAME_SIZE], const char *src)
|
void namecopy(char dest[NAME_SIZE], const char *src)
|
||||||
{
|
{
|
||||||
strncpy(dest, src, NAME_SIZE - 1);
|
strncpy(dest, src, NAME_SIZE - (size_t)1);
|
||||||
/* null-terminate if len(src) >= NAME_SIZE. */
|
/* null-terminate if len(src) >= NAME_SIZE. */
|
||||||
dest[NAME_SIZE - 1] = '\0';
|
dest[NAME_SIZE - 1] = '\0';
|
||||||
}
|
}
|
||||||
@@ -60,7 +61,7 @@ void linecopylen(char dest[LINE_SIZE], const char *src, size_t srclen)
|
|||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
len = srclen < (LINE_SIZE - 1) ? srclen : (LINE_SIZE - 1);
|
len = srclen < (LINE_SIZE - (size_t)1) ? srclen : (LINE_SIZE - (size_t)1);
|
||||||
strncpy(dest, src, len);
|
strncpy(dest, src, len);
|
||||||
dest[len] = '\0';
|
dest[len] = '\0';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -125,7 +126,7 @@
|
|||||||
*
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define THREAD_STACK_SIZE 0
|
#define THREAD_STACK_SIZE (size_t)0
|
||||||
/* @} */
|
/* @} */
|
||||||
|
|
||||||
|
|
||||||
@@ -178,7 +179,7 @@
|
|||||||
*
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define SSDP_PAUSE 100
|
#define SSDP_PAUSE 100u
|
||||||
/* @} */
|
/* @} */
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -189,7 +190,7 @@
|
|||||||
*
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define WEB_SERVER_BUF_SIZE (1024*1024)
|
#define WEB_SERVER_BUF_SIZE (size_t)(1024*1024)
|
||||||
/* @} */
|
/* @} */
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -435,11 +436,34 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* configure --enable-webserver --enable-device */
|
/* configure --enable-webserver */
|
||||||
#if UPNP_HAVE_WEBSERVER
|
#if UPNP_HAVE_WEBSERVER
|
||||||
# define INTERNAL_WEB_SERVER 1
|
# define INTERNAL_WEB_SERVER 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* configure --enable-ssdp */
|
||||||
|
#undef EXCLUDE_SSDP
|
||||||
|
#if UPNP_HAVE_SSDP
|
||||||
|
# define EXCLUDE_SSDP 0
|
||||||
|
#else
|
||||||
|
# define EXCLUDE_SSDP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* configure --enable-soap */
|
||||||
|
#undef EXCLUDE_SOAP
|
||||||
|
#if UPNP_HAVE_SOAP
|
||||||
|
# define EXCLUDE_SOAP 0
|
||||||
|
#else
|
||||||
|
# define EXCLUDE_SOAP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* configure --enable-gena */
|
||||||
|
#undef EXCLUDE_GENA
|
||||||
|
#if UPNP_HAVE_GENA
|
||||||
|
# define EXCLUDE_GENA 0
|
||||||
|
#else
|
||||||
|
# define EXCLUDE_GENA 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef EXCLUDE_WEB_SERVER
|
#undef EXCLUDE_WEB_SERVER
|
||||||
#undef EXCLUDE_MINISERVER
|
#undef EXCLUDE_MINISERVER
|
||||||
@@ -452,7 +476,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && EXCLUDE_WEB_SERVER == 1
|
#if EXCLUDE_SSDP == 1 && EXCLUDE_GENA == 1 && EXCLUDE_SOAP == 1 && EXCLUDE_WEB_SERVER == 1
|
||||||
# undef EXCLUDE_MINISERVER
|
# undef EXCLUDE_MINISERVER
|
||||||
# define EXCLUDE_MINISERVER 1
|
# define EXCLUDE_MINISERVER 1
|
||||||
# if INTERNAL_WEB_SERVER
|
# if INTERNAL_WEB_SERVER
|
||||||
@@ -461,7 +485,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || EXCLUDE_WEB_SERVER == 0
|
#if EXCLUDE_SSDP == 0 || EXCLUDE_GENA == 0 || EXCLUDE_SOAP == 0 || EXCLUDE_WEB_SERVER == 0
|
||||||
# undef EXCLUDE_MINISERVER
|
# undef EXCLUDE_MINISERVER
|
||||||
# define EXCLUDE_MINISERVER 0
|
# define EXCLUDE_MINISERVER 0
|
||||||
# if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
|
# if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -217,7 +218,7 @@ typedef struct {
|
|||||||
parser_pos_t position;
|
parser_pos_t position;
|
||||||
int ent_position;
|
int ent_position;
|
||||||
unsigned int content_length;
|
unsigned int content_length;
|
||||||
int chunk_size;
|
size_t chunk_size;
|
||||||
/*! offset in the the raw message buffer, which contains the message body.
|
/*! offset in the the raw message buffer, which contains the message body.
|
||||||
* preceding this are the headers of the messsage. */
|
* preceding this are the headers of the messsage. */
|
||||||
size_t entity_start_position;
|
size_t entity_start_position;
|
||||||
@@ -429,7 +430,7 @@ parse_status_t parser_append( INOUT http_parser_t* parser,
|
|||||||
* PARSE_NO_MATCH -- failure to match pattern 'fmt'
|
* PARSE_NO_MATCH -- failure to match pattern 'fmt'
|
||||||
* PARSE_FAILURE -- 'str' is bad input
|
* PARSE_FAILURE -- 'str' is bad input
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
int matchstr( IN char *str, IN size_t slen, IN const char* fmt, ... );
|
parse_status_t matchstr( IN char *str, IN size_t slen, IN const char* fmt, ... );
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Function: raw_to_int
|
* Function: raw_to_int
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -48,6 +49,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
struct tm *http_gmtime_r(const time_t *clock, struct tm *result);
|
||||||
|
#else
|
||||||
|
#define http_gmtime_r gmtime_r
|
||||||
|
#endif
|
||||||
|
|
||||||
int http_CancelHttpGet(IN void *Handle);
|
int http_CancelHttpGet(IN void *Handle);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -558,6 +565,7 @@ int http_OpenHttpGetEx(IN const char *url_str,
|
|||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* OUT char *info; buffer to store the operating system information
|
* OUT char *info; buffer to store the operating system information
|
||||||
|
* IN size_t infoSize; size of buffer
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Returns the server information for the operating system
|
* Returns the server information for the operating system
|
||||||
@@ -565,7 +573,7 @@ int http_OpenHttpGetEx(IN const char *url_str,
|
|||||||
* Return:
|
* Return:
|
||||||
* UPNP_INLINE void
|
* UPNP_INLINE void
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
void get_sdk_info( OUT char *info );
|
void get_sdk_info( OUT char *info, IN size_t infoSize );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* #extern "C" */
|
} /* #extern "C" */
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -62,7 +63,7 @@ typedef struct {
|
|||||||
/*! used to increase size; MUST be > 0; (read/write). */
|
/*! used to increase size; MUST be > 0; (read/write). */
|
||||||
size_t size_inc;
|
size_t size_inc;
|
||||||
/*! default value of size_inc. */
|
/*! default value of size_inc. */
|
||||||
#define MEMBUF_DEF_SIZE_INC 5
|
#define MEMBUF_DEF_SIZE_INC (size_t)5
|
||||||
} membuffer;
|
} membuffer;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -49,7 +50,7 @@ extern "C" {
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#define SID_SIZE 41
|
#define SID_SIZE (size_t)41
|
||||||
|
|
||||||
#ifdef INCLUDE_DEVICE_APIS
|
#ifdef INCLUDE_DEVICE_APIS
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -143,7 +144,7 @@ int sock_read(
|
|||||||
/*! [out] Buffer to get data to. */
|
/*! [out] Buffer to get data to. */
|
||||||
char* buffer,
|
char* buffer,
|
||||||
/*! [in] Size of the buffer. */
|
/*! [in] Size of the buffer. */
|
||||||
int bufsize,
|
size_t bufsize,
|
||||||
/*! [in,out] timeout value. */
|
/*! [in,out] timeout value. */
|
||||||
int *timeoutSecs);
|
int *timeoutSecs);
|
||||||
|
|
||||||
@@ -161,7 +162,7 @@ int sock_write(
|
|||||||
/*! [in] Buffer to send data from. */
|
/*! [in] Buffer to send data from. */
|
||||||
const char *buffer,
|
const char *buffer,
|
||||||
/*! [in] Size of the buffer. */
|
/*! [in] Size of the buffer. */
|
||||||
int bufsize,
|
size_t bufsize,
|
||||||
/*! [in,out] timeout value. */
|
/*! [in,out] timeout value. */
|
||||||
int *timeoutSecs);
|
int *timeoutSecs);
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (C) 2011 France Telecom All rights reserved.
|
* Copyright (C) 2011-2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -73,7 +73,7 @@ typedef enum SsdpSearchType {
|
|||||||
SSDP_SERVICE
|
SSDP_SERVICE
|
||||||
} SType;
|
} SType;
|
||||||
|
|
||||||
#define BUFSIZE 2500
|
#define BUFSIZE (size_t)2500
|
||||||
#define SSDP_IP "239.255.255.250"
|
#define SSDP_IP "239.255.255.250"
|
||||||
#define SSDP_IPV6_LINKLOCAL "FF02::C"
|
#define SSDP_IPV6_LINKLOCAL "FF02::C"
|
||||||
#define SSDP_IPV6_SITELOCAL "FF05::C"
|
#define SSDP_IPV6_SITELOCAL "FF05::C"
|
||||||
@@ -501,8 +501,6 @@ int DeviceShutdown(
|
|||||||
int RootDev,
|
int RootDev,
|
||||||
/* [in] Device UDN. */
|
/* [in] Device UDN. */
|
||||||
char *Udn,
|
char *Udn,
|
||||||
/* [in] . */
|
|
||||||
char *_Server,
|
|
||||||
/* [in] Location URL. */
|
/* [in] Location URL. */
|
||||||
char *Location,
|
char *Location,
|
||||||
/* [in] Device duration in sec. */
|
/* [in] Device duration in sec. */
|
||||||
|
|||||||
@@ -79,6 +79,10 @@
|
|||||||
#define HTTP_SERVICE_UNAVAILABLE 503
|
#define HTTP_SERVICE_UNAVAILABLE 503
|
||||||
#define HTTP_GATEWAY_TIMEOUT 504
|
#define HTTP_GATEWAY_TIMEOUT 504
|
||||||
#define HTTP_HTTP_VERSION_NOT_SUPPORTED 505
|
#define HTTP_HTTP_VERSION_NOT_SUPPORTED 505
|
||||||
|
#define HTTP_VARIANT_ALSO_NEGOTIATES 506
|
||||||
|
#define HTTP_INSUFFICIENT_STORAGE 507
|
||||||
|
#define HTTP_LOOP_DETECTED 508
|
||||||
|
#define HTTP_NOT_EXTENDED 510
|
||||||
|
|
||||||
/* HTTP lib error codes */
|
/* HTTP lib error codes */
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,12 @@
|
|||||||
#include "UpnpInet.h"
|
#include "UpnpInet.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
|
#ifndef EAFNOSUPPORT /* VS2010 has this defined */
|
||||||
#define EAFNOSUPPORT 97
|
#define EAFNOSUPPORT 97
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (C) 2011 France Telecom All rights reserved.
|
* Copyright (C) 2011-2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
#define DEFAULT_MAXAGE 1800
|
#define DEFAULT_MAXAGE 1800
|
||||||
|
|
||||||
#define DEFAULT_SOAP_CONTENT_LENGTH 16000
|
#define DEFAULT_SOAP_CONTENT_LENGTH 16000
|
||||||
#define MAX_SOAP_CONTENT_LENGTH 32000
|
#define MAX_SOAP_CONTENT_LENGTH (size_t)32000
|
||||||
|
|
||||||
extern size_t g_maxContentLength;
|
extern size_t g_maxContentLength;
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ Upnp_Handle_Type GetClientHandleInfo(
|
|||||||
*/
|
*/
|
||||||
Upnp_Handle_Type GetDeviceHandleInfo(
|
Upnp_Handle_Type GetDeviceHandleInfo(
|
||||||
/*! [in] Address family. */
|
/*! [in] Address family. */
|
||||||
const int AddressFamily,
|
int AddressFamily,
|
||||||
/*! [out] Device handle pointer. */
|
/*! [out] Device handle pointer. */
|
||||||
int *device_handle_out,
|
int *device_handle_out,
|
||||||
/*! [out] Device handle structure passed by this function. */
|
/*! [out] Device handle structure passed by this function. */
|
||||||
@@ -182,10 +182,8 @@ Upnp_Handle_Type GetDeviceHandleInfo(
|
|||||||
|
|
||||||
|
|
||||||
extern char gIF_NAME[LINE_SIZE];
|
extern char gIF_NAME[LINE_SIZE];
|
||||||
/*! INET_ADDRSTRLEN. */
|
extern char gIF_IPV4[INET_ADDRSTRLEN];
|
||||||
extern char gIF_IPV4[22];
|
extern char gIF_IPV6[INET6_ADDRSTRLEN];
|
||||||
/*! INET6_ADDRSTRLEN. */
|
|
||||||
extern char gIF_IPV6[65];
|
|
||||||
|
|
||||||
extern char gIF_IPV6_ULA_GUA[INET6_ADDRSTRLEN];
|
extern char gIF_IPV6_ULA_GUA[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -37,6 +38,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "upnp.h"
|
#include "upnp.h"
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
/* usually used to specify direction of parameters in functions */
|
/* usually used to specify direction of parameters in functions */
|
||||||
#ifndef IN
|
#ifndef IN
|
||||||
@@ -109,7 +111,7 @@ void linecopylen(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Size of the errorBuffer variable, passed to the strerror_r() function */
|
/* Size of the errorBuffer variable, passed to the strerror_r() function */
|
||||||
#define ERROR_BUFFER_LEN 256
|
#define ERROR_BUFFER_LEN (size_t)256
|
||||||
|
|
||||||
/* C specific */
|
/* C specific */
|
||||||
/* VC needs these in C++ mode too (do other compilers?) */
|
/* VC needs these in C++ mode too (do other compilers?) */
|
||||||
@@ -121,7 +123,9 @@ void linecopylen(
|
|||||||
#ifndef S_ISDIR
|
#ifndef S_ISDIR
|
||||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef EADDRINUSE /* VS2010 has this defined */
|
||||||
#define EADDRINUSE WSAEADDRINUSE
|
#define EADDRINUSE WSAEADDRINUSE
|
||||||
|
#endif
|
||||||
#define strcasecmp stricmp
|
#define strcasecmp stricmp
|
||||||
#define strncasecmp strnicmp
|
#define strncasecmp strnicmp
|
||||||
#define sleep(a) Sleep((a)*1000)
|
#define sleep(a) Sleep((a)*1000)
|
||||||
|
|||||||
@@ -276,22 +276,6 @@ int token_cmp(
|
|||||||
/*! [in] Second token object used for the comparison. */
|
/*! [in] Second token object used for the comparison. */
|
||||||
token *in2);
|
token *in2);
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Parses a string representing a host and port (e.g. "127.127.0.1:80"
|
|
||||||
* or "localhost") and fills out a hostport_type struct with internet address
|
|
||||||
* and a token representing the full host and port.
|
|
||||||
*
|
|
||||||
* Uses gethostbyname.
|
|
||||||
*/
|
|
||||||
int parse_hostport(
|
|
||||||
/*! [in] String of characters representing host and port. */
|
|
||||||
const char *in,
|
|
||||||
/*! [in] Sets a maximum limit. */
|
|
||||||
size_t max,
|
|
||||||
/*! [out] Output parameter where the host and port are represented as
|
|
||||||
* an internet address. */
|
|
||||||
hostport_type *out);
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Removes http escaped characters such as: "%20" and replaces them with
|
* \brief Removes http escaped characters such as: "%20" and replaces them with
|
||||||
* their character representation. i.e. "hello%20foo" -> "hello foo".
|
* their character representation. i.e. "hello%20foo" -> "hello foo".
|
||||||
|
|||||||
@@ -6,5 +6,8 @@
|
|||||||
#include "sock.h"
|
#include "sock.h"
|
||||||
#include "soaplib.h"
|
#include "soaplib.h"
|
||||||
|
|
||||||
|
const char *ContentTypeHeader =
|
||||||
|
"CONTENT-TYPE: text/xml; charset=\"utf-8\"\r\n";
|
||||||
|
|
||||||
#endif /* EXCLUDE_SOAP */
|
#endif /* EXCLUDE_SOAP */
|
||||||
|
|
||||||
|
|||||||
@@ -455,7 +455,7 @@ get_response_value( IN http_message_t * hmsg,
|
|||||||
if (!temp_str)
|
if (!temp_str)
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
*upnp_error_code = atoi(temp_str);
|
*upnp_error_code = atoi(temp_str);
|
||||||
if (*upnp_error_code < 400) {
|
if (*upnp_error_code > 400) {
|
||||||
err_code = *upnp_error_code;
|
err_code = *upnp_error_code;
|
||||||
goto error_handler; /* bad SOAP error code */
|
goto error_handler; /* bad SOAP error code */
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (C) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#define snprintf _snprintf
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -98,6 +100,8 @@ void ssdp_handle_ctrlpt_msg(http_message_t *hmsg, struct sockaddr_storage *dest_
|
|||||||
ResultData *threadData = NULL;
|
ResultData *threadData = NULL;
|
||||||
ThreadPoolJob job;
|
ThreadPoolJob job;
|
||||||
|
|
||||||
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
/* we are assuming that there can be only one client supported at a time */
|
/* we are assuming that there can be only one client supported at a time */
|
||||||
HandleReadLock();
|
HandleReadLock();
|
||||||
|
|
||||||
@@ -128,7 +132,7 @@ void ssdp_handle_ctrlpt_msg(http_message_t *hmsg, struct sockaddr_storage *dest_
|
|||||||
linecopylen(param.Date, hdr_value.buf, hdr_value.length);
|
linecopylen(param.Date, hdr_value.buf, hdr_value.length);
|
||||||
}
|
}
|
||||||
/* dest addr */
|
/* dest addr */
|
||||||
memcpy(¶m.DestAddr, dest_addr, sizeof(struct sockaddr_in));
|
memcpy(¶m.DestAddr, dest_addr, sizeof(struct sockaddr_storage));
|
||||||
/* EXT */
|
/* EXT */
|
||||||
param.Ext[0] = '\0';
|
param.Ext[0] = '\0';
|
||||||
if (httpmsg_find_hdr(hmsg, HDR_EXT, &hdr_value) != NULL) {
|
if (httpmsg_find_hdr(hmsg, HDR_EXT, &hdr_value) != NULL) {
|
||||||
@@ -146,9 +150,9 @@ void ssdp_handle_ctrlpt_msg(http_message_t *hmsg, struct sockaddr_storage *dest_
|
|||||||
linecopylen(param.Os, hdr_value.buf, hdr_value.length);
|
linecopylen(param.Os, hdr_value.buf, hdr_value.length);
|
||||||
}
|
}
|
||||||
/* clear everything */
|
/* clear everything */
|
||||||
param.DeviceId[0] = '\0';
|
memset(param.DeviceId, 0, sizeof(param.DeviceId));
|
||||||
param.DeviceType[0] = '\0';
|
memset(param.DeviceType, 0, sizeof(param.DeviceType));
|
||||||
param.ServiceType[0] = '\0';
|
memset(param.ServiceType, 0, sizeof(param.ServiceType));
|
||||||
/* not used; version is in ServiceType */
|
/* not used; version is in ServiceType */
|
||||||
param.ServiceVer[0] = '\0';
|
param.ServiceVer[0] = '\0';
|
||||||
event.UDN[0] = '\0';
|
event.UDN[0] = '\0';
|
||||||
@@ -169,9 +173,11 @@ void ssdp_handle_ctrlpt_msg(http_message_t *hmsg, struct sockaddr_storage *dest_
|
|||||||
hdr_value.buf[hdr_value.length] = save_char;
|
hdr_value.buf[hdr_value.length] = save_char;
|
||||||
}
|
}
|
||||||
if (nt_found || usn_found) {
|
if (nt_found || usn_found) {
|
||||||
strcpy(param.DeviceId, event.UDN);
|
strncpy(param.DeviceId, event.UDN, sizeof(param.DeviceId) - 1);
|
||||||
strcpy(param.DeviceType, event.DeviceType);
|
strncpy(param.DeviceType, event.DeviceType,
|
||||||
strcpy(param.ServiceType, event.ServiceType);
|
sizeof(param.DeviceType) - 1);
|
||||||
|
strncpy(param.ServiceType, event.ServiceType,
|
||||||
|
sizeof(param.ServiceType) - 1);
|
||||||
}
|
}
|
||||||
/* ADVERT. OR BYEBYE */
|
/* ADVERT. OR BYEBYE */
|
||||||
if (hmsg->is_request) {
|
if (hmsg->is_request) {
|
||||||
@@ -233,7 +239,6 @@ void ssdp_handle_ctrlpt_msg(http_message_t *hmsg, struct sockaddr_storage *dest_
|
|||||||
/*hdr_value.buf[ hdr_value.length ] = '\0'; */
|
/*hdr_value.buf[ hdr_value.length ] = '\0'; */
|
||||||
while (node != NULL) {
|
while (node != NULL) {
|
||||||
searchArg = node->item;
|
searchArg = node->item;
|
||||||
matched = 0;
|
|
||||||
/* check for match of ST header and search target */
|
/* check for match of ST header and search target */
|
||||||
switch (searchArg->requestType) {
|
switch (searchArg->requestType) {
|
||||||
case SSDP_ALL:
|
case SSDP_ALL:
|
||||||
@@ -286,8 +291,9 @@ void ssdp_handle_ctrlpt_msg(http_message_t *hmsg, struct sockaddr_storage *dest_
|
|||||||
TPJobSetFreeFunction(&job,
|
TPJobSetFreeFunction(&job,
|
||||||
(free_routine)
|
(free_routine)
|
||||||
free);
|
free);
|
||||||
ThreadPoolAdd(&gRecvThreadPool, &job,
|
if (ThreadPoolAdd(&gRecvThreadPool, &job, NULL) != 0) {
|
||||||
NULL);
|
free(threadData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
node = ListNext(&ctrlpt_info->SsdpSearchList, node);
|
node = ListNext(&ctrlpt_info->SsdpSearchList, node);
|
||||||
@@ -302,9 +308,11 @@ void ssdp_handle_ctrlpt_msg(http_message_t *hmsg, struct sockaddr_storage *dest_
|
|||||||
* \brief Creates a HTTP search request packet depending on the input
|
* \brief Creates a HTTP search request packet depending on the input
|
||||||
* parameter.
|
* parameter.
|
||||||
*/
|
*/
|
||||||
static void CreateClientRequestPacket(
|
static int CreateClientRequestPacket(
|
||||||
/*! [in] Output string in HTTP format. */
|
/*! [in,out] Output string in HTTP format. */
|
||||||
IN char *RqstBuf,
|
INOUT char *RqstBuf,
|
||||||
|
/*! [in] RqstBuf size. */
|
||||||
|
IN size_t RqstBufSize,
|
||||||
/*! [in] Search Target. */
|
/*! [in] Search Target. */
|
||||||
IN int Mx,
|
IN int Mx,
|
||||||
/*! [in] Number of seconds to wait to collect all the responses. */
|
/*! [in] Number of seconds to wait to collect all the responses. */
|
||||||
@@ -312,65 +320,134 @@ static void CreateClientRequestPacket(
|
|||||||
/*! [in] search address family. */
|
/*! [in] search address family. */
|
||||||
IN int AddressFamily)
|
IN int AddressFamily)
|
||||||
{
|
{
|
||||||
|
int rc;
|
||||||
char TempBuf[COMMAND_LEN];
|
char TempBuf[COMMAND_LEN];
|
||||||
|
const char *command = "M-SEARCH * HTTP/1.1\r\n";
|
||||||
|
const char *man = "MAN: \"ssdp:discover\"\r\n";
|
||||||
|
|
||||||
strcpy(RqstBuf, "M-SEARCH * HTTP/1.1\r\n");
|
memset(TempBuf, 0, sizeof(TempBuf));
|
||||||
|
if (RqstBufSize <= strlen(command))
|
||||||
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
|
strcpy(RqstBuf, command);
|
||||||
|
|
||||||
if (AddressFamily == AF_INET) {
|
switch (AddressFamily) {
|
||||||
sprintf(TempBuf, "HOST: %s:%d\r\n", SSDP_IP, SSDP_PORT);
|
case AF_INET:
|
||||||
} else if (AddressFamily == AF_INET6) {
|
rc = snprintf(TempBuf, sizeof(TempBuf), "HOST: %s:%d\r\n", SSDP_IP,
|
||||||
sprintf(TempBuf, "HOST: [%s]:%d\r\n", SSDP_IPV6_LINKLOCAL,
|
|
||||||
SSDP_PORT);
|
SSDP_PORT);
|
||||||
|
break;
|
||||||
|
case AF_INET6:
|
||||||
|
rc = snprintf(TempBuf, sizeof(TempBuf), "HOST: [%s]:%d\r\n",
|
||||||
|
SSDP_IPV6_LINKLOCAL, SSDP_PORT);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return UPNP_E_INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(TempBuf))
|
||||||
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
if (RqstBufSize <= strlen(RqstBuf) + strlen(TempBuf))
|
||||||
|
return UPNP_E_BUFFER_TOO_SMALL;
|
||||||
strcat(RqstBuf, TempBuf);
|
strcat(RqstBuf, TempBuf);
|
||||||
strcat(RqstBuf, "MAN: \"ssdp:discover\"\r\n");
|
|
||||||
|
if (RqstBufSize <= strlen(RqstBuf) + strlen(man))
|
||||||
|
return UPNP_E_BUFFER_TOO_SMALL;
|
||||||
|
strcat(RqstBuf, man);
|
||||||
|
|
||||||
if (Mx > 0) {
|
if (Mx > 0) {
|
||||||
sprintf(TempBuf, "MX: %d\r\n", Mx);
|
rc = snprintf(TempBuf, sizeof(TempBuf), "MX: %d\r\n", Mx);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(TempBuf))
|
||||||
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
|
if (RqstBufSize <= strlen(RqstBuf) + strlen(TempBuf))
|
||||||
|
return UPNP_E_BUFFER_TOO_SMALL;
|
||||||
strcat(RqstBuf, TempBuf);
|
strcat(RqstBuf, TempBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SearchTarget != NULL) {
|
if (SearchTarget != NULL) {
|
||||||
sprintf(TempBuf, "ST: %s\r\n", SearchTarget);
|
rc = snprintf(TempBuf, sizeof(TempBuf), "ST: %s\r\n", SearchTarget);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(TempBuf))
|
||||||
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
|
if (RqstBufSize <= strlen(RqstBuf) + strlen(TempBuf))
|
||||||
|
return UPNP_E_BUFFER_TOO_SMALL;
|
||||||
strcat(RqstBuf, TempBuf);
|
strcat(RqstBuf, TempBuf);
|
||||||
}
|
}
|
||||||
|
if (RqstBufSize <= strlen(RqstBuf) + strlen("\r\n"))
|
||||||
|
return UPNP_E_BUFFER_TOO_SMALL;
|
||||||
strcat(RqstBuf, "\r\n");
|
strcat(RqstBuf, "\r\n");
|
||||||
|
|
||||||
|
return UPNP_E_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief
|
* \brief
|
||||||
*/
|
*/
|
||||||
static void CreateClientRequestPacketUlaGua(
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
/*! [in] . */
|
static int CreateClientRequestPacketUlaGua(
|
||||||
|
/*! [in,out] . */
|
||||||
char *RqstBuf,
|
char *RqstBuf,
|
||||||
/*! [in] . */
|
/*! [in] . */
|
||||||
|
size_t RqstBufSize,
|
||||||
|
/*! [in] . */
|
||||||
int Mx,
|
int Mx,
|
||||||
/*! [in] . */
|
/*! [in] . */
|
||||||
char *SearchTarget,
|
char *SearchTarget,
|
||||||
/*! [in] . */
|
/*! [in] . */
|
||||||
int AddressFamily)
|
int AddressFamily)
|
||||||
{
|
{
|
||||||
|
int rc;
|
||||||
char TempBuf[COMMAND_LEN];
|
char TempBuf[COMMAND_LEN];
|
||||||
|
const char *command = "M-SEARCH * HTTP/1.1\r\n";
|
||||||
|
const char *man = "MAN: \"ssdp:discover\"\r\n";
|
||||||
|
|
||||||
strcpy(RqstBuf, "M-SEARCH * HTTP/1.1\r\n");
|
memset(TempBuf, 0, sizeof(TempBuf));
|
||||||
if (AddressFamily == AF_INET) {
|
if (RqstBufSize <= strlen(command))
|
||||||
sprintf(TempBuf, "HOST: %s:%d\r\n", SSDP_IP, SSDP_PORT);
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
} else if (AddressFamily == AF_INET6) {
|
strcpy(RqstBuf, command);
|
||||||
sprintf(TempBuf, "HOST: [%s]:%d\r\n", SSDP_IPV6_SITELOCAL,
|
switch (AddressFamily) {
|
||||||
|
case AF_INET:
|
||||||
|
rc = snprintf(TempBuf, sizeof(TempBuf), "HOST: %s:%d\r\n", SSDP_IP,
|
||||||
SSDP_PORT);
|
SSDP_PORT);
|
||||||
|
break;
|
||||||
|
case AF_INET6:
|
||||||
|
rc = snprintf(TempBuf, sizeof(TempBuf), "HOST: [%s]:%d\r\n",
|
||||||
|
SSDP_IPV6_SITELOCAL, SSDP_PORT);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return UPNP_E_INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(TempBuf))
|
||||||
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
if (RqstBufSize <= strlen(RqstBuf) + strlen(TempBuf))
|
||||||
|
return UPNP_E_BUFFER_TOO_SMALL;
|
||||||
strcat(RqstBuf, TempBuf);
|
strcat(RqstBuf, TempBuf);
|
||||||
strcat(RqstBuf, "MAN: \"ssdp:discover\"\r\n");
|
|
||||||
|
if (RqstBufSize <= strlen(RqstBuf) + strlen(man))
|
||||||
|
return UPNP_E_BUFFER_TOO_SMALL;
|
||||||
|
strcat(RqstBuf, man);
|
||||||
|
|
||||||
if (Mx > 0) {
|
if (Mx > 0) {
|
||||||
sprintf(TempBuf, "MX: %d\r\n", Mx);
|
rc = snprintf(TempBuf, sizeof(TempBuf), "MX: %d\r\n", Mx);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(TempBuf))
|
||||||
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
|
if (RqstBufSize <= strlen(RqstBuf) + strlen(TempBuf))
|
||||||
|
return UPNP_E_BUFFER_TOO_SMALL;
|
||||||
strcat(RqstBuf, TempBuf);
|
strcat(RqstBuf, TempBuf);
|
||||||
}
|
}
|
||||||
if (SearchTarget) {
|
if (SearchTarget) {
|
||||||
sprintf(TempBuf, "ST: %s\r\n", SearchTarget);
|
rc = snprintf(TempBuf, sizeof(TempBuf), "ST: %s\r\n", SearchTarget);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(TempBuf))
|
||||||
|
return UPNP_E_INTERNAL_ERROR;
|
||||||
|
if (RqstBufSize <= strlen(RqstBuf) + strlen(TempBuf))
|
||||||
|
return UPNP_E_BUFFER_TOO_SMALL;
|
||||||
strcat(RqstBuf, TempBuf);
|
strcat(RqstBuf, TempBuf);
|
||||||
}
|
}
|
||||||
|
if (RqstBufSize <= strlen(RqstBuf) + strlen("\r\n"))
|
||||||
|
return UPNP_E_BUFFER_TOO_SMALL;
|
||||||
strcat(RqstBuf, "\r\n");
|
strcat(RqstBuf, "\r\n");
|
||||||
|
|
||||||
|
return UPNP_E_SUCCESS;
|
||||||
}
|
}
|
||||||
|
#endif /* UPNP_ENABLE_IPV6 */
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief
|
* \brief
|
||||||
@@ -428,12 +505,18 @@ int SearchByTarget(int Mx, char *St, void *Cookie)
|
|||||||
int *id = NULL;
|
int *id = NULL;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
char ReqBufv4[BUFSIZE];
|
char ReqBufv4[BUFSIZE];
|
||||||
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
char ReqBufv6[BUFSIZE];
|
char ReqBufv6[BUFSIZE];
|
||||||
char ReqBufv6UlaGua[BUFSIZE];
|
char ReqBufv6UlaGua[BUFSIZE];
|
||||||
|
#endif
|
||||||
struct sockaddr_storage __ss_v4;
|
struct sockaddr_storage __ss_v4;
|
||||||
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
struct sockaddr_storage __ss_v6;
|
struct sockaddr_storage __ss_v6;
|
||||||
|
#endif
|
||||||
struct sockaddr_in *destAddr4 = (struct sockaddr_in *)&__ss_v4;
|
struct sockaddr_in *destAddr4 = (struct sockaddr_in *)&__ss_v4;
|
||||||
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
struct sockaddr_in6 *destAddr6 = (struct sockaddr_in6 *)&__ss_v6;
|
struct sockaddr_in6 *destAddr6 = (struct sockaddr_in6 *)&__ss_v6;
|
||||||
|
#endif
|
||||||
fd_set wrSet;
|
fd_set wrSet;
|
||||||
SsdpSearchArg *newArg = NULL;
|
SsdpSearchArg *newArg = NULL;
|
||||||
int timeTillRead = 0;
|
int timeTillRead = 0;
|
||||||
@@ -442,10 +525,13 @@ int SearchByTarget(int Mx, char *St, void *Cookie)
|
|||||||
enum SsdpSearchType requestType;
|
enum SsdpSearchType requestType;
|
||||||
unsigned long addrv4 = inet_addr(gIF_IPV4);
|
unsigned long addrv4 = inet_addr(gIF_IPV4);
|
||||||
SOCKET max_fd = 0;
|
SOCKET max_fd = 0;
|
||||||
|
int retVal;
|
||||||
|
|
||||||
/*ThreadData *ThData; */
|
/*ThreadData *ThData; */
|
||||||
ThreadPoolJob job;
|
ThreadPoolJob job;
|
||||||
|
|
||||||
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
requestType = ssdp_request_type1(St);
|
requestType = ssdp_request_type1(St);
|
||||||
if (requestType == SSDP_SERROR)
|
if (requestType == SSDP_SERROR)
|
||||||
return UPNP_E_INVALID_PARAM;
|
return UPNP_E_INVALID_PARAM;
|
||||||
@@ -456,20 +542,30 @@ int SearchByTarget(int Mx, char *St, void *Cookie)
|
|||||||
timeTillRead = MIN_SEARCH_TIME;
|
timeTillRead = MIN_SEARCH_TIME;
|
||||||
else if (timeTillRead > MAX_SEARCH_TIME)
|
else if (timeTillRead > MAX_SEARCH_TIME)
|
||||||
timeTillRead = MAX_SEARCH_TIME;
|
timeTillRead = MAX_SEARCH_TIME;
|
||||||
CreateClientRequestPacket(ReqBufv4, timeTillRead, St, AF_INET);
|
retVal = CreateClientRequestPacket(ReqBufv4, sizeof(ReqBufv4), timeTillRead, St, AF_INET);
|
||||||
CreateClientRequestPacket(ReqBufv6, timeTillRead, St, AF_INET6);
|
if (retVal != UPNP_E_SUCCESS)
|
||||||
CreateClientRequestPacketUlaGua(ReqBufv6UlaGua, timeTillRead, St, AF_INET6);
|
return retVal;
|
||||||
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
|
retVal = CreateClientRequestPacket(ReqBufv6, sizeof(ReqBufv6), timeTillRead, St, AF_INET6);
|
||||||
|
if (retVal != UPNP_E_SUCCESS)
|
||||||
|
return retVal;
|
||||||
|
retVal = CreateClientRequestPacketUlaGua(ReqBufv6UlaGua, sizeof(ReqBufv6UlaGua), timeTillRead, St, AF_INET6);
|
||||||
|
if (retVal != UPNP_E_SUCCESS)
|
||||||
|
return retVal;
|
||||||
|
#endif
|
||||||
|
|
||||||
memset(&__ss_v4, 0, sizeof(__ss_v4));
|
memset(&__ss_v4, 0, sizeof(__ss_v4));
|
||||||
destAddr4->sin_family = AF_INET;
|
destAddr4->sin_family = (sa_family_t)AF_INET;
|
||||||
inet_pton(AF_INET, SSDP_IP, &destAddr4->sin_addr);
|
inet_pton(AF_INET, SSDP_IP, &destAddr4->sin_addr);
|
||||||
destAddr4->sin_port = htons(SSDP_PORT);
|
destAddr4->sin_port = htons(SSDP_PORT);
|
||||||
|
|
||||||
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
memset(&__ss_v6, 0, sizeof(__ss_v6));
|
memset(&__ss_v6, 0, sizeof(__ss_v6));
|
||||||
destAddr6->sin6_family = AF_INET6;
|
destAddr6->sin6_family = (sa_family_t)AF_INET6;
|
||||||
inet_pton(AF_INET6, SSDP_IPV6_SITELOCAL, &destAddr6->sin6_addr);
|
inet_pton(AF_INET6, SSDP_IPV6_SITELOCAL, &destAddr6->sin6_addr);
|
||||||
destAddr6->sin6_port = htons(SSDP_PORT);
|
destAddr6->sin6_port = htons(SSDP_PORT);
|
||||||
destAddr6->sin6_scope_id = gIF_INDEX;
|
destAddr6->sin6_scope_id = gIF_INDEX;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* add search criteria to list */
|
/* add search criteria to list */
|
||||||
HandleLock();
|
HandleLock();
|
||||||
@@ -527,10 +623,13 @@ int SearchByTarget(int Mx, char *St, void *Cookie)
|
|||||||
int NumCopy = 0;
|
int NumCopy = 0;
|
||||||
|
|
||||||
while (NumCopy < NUM_SSDP_COPY) {
|
while (NumCopy < NUM_SSDP_COPY) {
|
||||||
|
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
||||||
|
">>> SSDP SEND M-SEARCH >>>\n%s\n",
|
||||||
|
ReqBufv6UlaGua);
|
||||||
sendto(gSsdpReqSocket6,
|
sendto(gSsdpReqSocket6,
|
||||||
ReqBufv6UlaGua, strlen(ReqBufv6UlaGua), 0,
|
ReqBufv6UlaGua, strlen(ReqBufv6UlaGua), 0,
|
||||||
(struct sockaddr *)&__ss_v6,
|
(struct sockaddr *)&__ss_v6,
|
||||||
sizeof(struct sockaddr_in));
|
sizeof(struct sockaddr_in6));
|
||||||
NumCopy++;
|
NumCopy++;
|
||||||
imillisleep(SSDP_PAUSE);
|
imillisleep(SSDP_PAUSE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (C) 2011 France Telecom All rights reserved.
|
* Copyright (C) 2011-2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -56,6 +56,10 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MSGTYPE_SHUTDOWN 0
|
#define MSGTYPE_SHUTDOWN 0
|
||||||
#define MSGTYPE_ADVERTISEMENT 1
|
#define MSGTYPE_ADVERTISEMENT 1
|
||||||
#define MSGTYPE_REPLY 2
|
#define MSGTYPE_REPLY 2
|
||||||
@@ -90,6 +94,8 @@ void ssdp_handle_device_request(http_message_t *hmsg, struct sockaddr_storage *d
|
|||||||
int replyTime;
|
int replyTime;
|
||||||
int maxAge;
|
int maxAge;
|
||||||
|
|
||||||
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
/* check man hdr. */
|
/* check man hdr. */
|
||||||
if (httpmsg_find_hdr(hmsg, HDR_MAN, &hdr_value) == NULL ||
|
if (httpmsg_find_hdr(hmsg, HDR_MAN, &hdr_value) == NULL ||
|
||||||
memptr_cmp(&hdr_value, "\"ssdp:discover\"") != 0)
|
memptr_cmp(&hdr_value, "\"ssdp:discover\"") != 0)
|
||||||
@@ -113,8 +119,11 @@ void ssdp_handle_device_request(http_message_t *hmsg, struct sockaddr_storage *d
|
|||||||
|
|
||||||
HandleLock();
|
HandleLock();
|
||||||
/* device info. */
|
/* device info. */
|
||||||
if (GetDeviceHandleInfo(dest_addr->ss_family,
|
switch (GetDeviceHandleInfo((int)dest_addr->ss_family,
|
||||||
&handle, &dev_info) != HND_DEVICE) {
|
&handle, &dev_info)) {
|
||||||
|
case HND_DEVICE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
HandleUnlock();
|
HandleUnlock();
|
||||||
/* no info found. */
|
/* no info found. */
|
||||||
return;
|
return;
|
||||||
@@ -160,7 +169,7 @@ void ssdp_handle_device_request(http_message_t *hmsg, struct sockaddr_storage *d
|
|||||||
* \brief Works as a request handler which passes the HTTP request string
|
* \brief Works as a request handler which passes the HTTP request string
|
||||||
* to multicast channel.
|
* to multicast channel.
|
||||||
*
|
*
|
||||||
* \return 1 if successful else appropriate error.
|
* \return UPNP_E_SUCCESS if successful else appropriate error.
|
||||||
*/
|
*/
|
||||||
static int NewRequestHandler(
|
static int NewRequestHandler(
|
||||||
/*! [in] Ip address, to send the reply. */
|
/*! [in] Ip address, to send the reply. */
|
||||||
@@ -177,11 +186,13 @@ static int NewRequestHandler(
|
|||||||
unsigned long replyAddr = inet_addr(gIF_IPV4);
|
unsigned long replyAddr = inet_addr(gIF_IPV4);
|
||||||
/* a/c to UPNP Spec */
|
/* a/c to UPNP Spec */
|
||||||
int ttl = 4;
|
int ttl = 4;
|
||||||
|
#ifdef INET_IPV6
|
||||||
int hops = 1;
|
int hops = 1;
|
||||||
char buf_ntop[64];
|
#endif
|
||||||
|
char buf_ntop[INET6_ADDRSTRLEN];
|
||||||
int ret = UPNP_E_SUCCESS;
|
int ret = UPNP_E_SUCCESS;
|
||||||
|
|
||||||
ReplySock = socket(DestAddr->sa_family, SOCK_DGRAM, 0);
|
ReplySock = socket((int)DestAddr->sa_family, SOCK_DGRAM, 0);
|
||||||
if (ReplySock == INVALID_SOCKET) {
|
if (ReplySock == INVALID_SOCKET) {
|
||||||
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
||||||
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
||||||
@@ -191,7 +202,8 @@ static int NewRequestHandler(
|
|||||||
return UPNP_E_OUTOF_SOCKET;
|
return UPNP_E_OUTOF_SOCKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DestAddr->sa_family == AF_INET) {
|
switch (DestAddr->sa_family) {
|
||||||
|
case AF_INET:
|
||||||
inet_ntop(AF_INET, &((struct sockaddr_in *)DestAddr)->sin_addr,
|
inet_ntop(AF_INET, &((struct sockaddr_in *)DestAddr)->sin_addr,
|
||||||
buf_ntop, sizeof(buf_ntop));
|
buf_ntop, sizeof(buf_ntop));
|
||||||
setsockopt(ReplySock, IPPROTO_IP, IP_MULTICAST_IF,
|
setsockopt(ReplySock, IPPROTO_IP, IP_MULTICAST_IF,
|
||||||
@@ -199,7 +211,9 @@ static int NewRequestHandler(
|
|||||||
setsockopt(ReplySock, IPPROTO_IP, IP_MULTICAST_TTL,
|
setsockopt(ReplySock, IPPROTO_IP, IP_MULTICAST_TTL,
|
||||||
(char *)&ttl, sizeof(int));
|
(char *)&ttl, sizeof(int));
|
||||||
socklen = sizeof(struct sockaddr_in);
|
socklen = sizeof(struct sockaddr_in);
|
||||||
} else if (DestAddr->sa_family == AF_INET6) {
|
break;
|
||||||
|
#ifdef INET_IPV6
|
||||||
|
case AF_INET6:
|
||||||
inet_ntop(AF_INET6,
|
inet_ntop(AF_INET6,
|
||||||
&((struct sockaddr_in6 *)DestAddr)->sin6_addr,
|
&((struct sockaddr_in6 *)DestAddr)->sin6_addr,
|
||||||
buf_ntop, sizeof(buf_ntop));
|
buf_ntop, sizeof(buf_ntop));
|
||||||
@@ -207,7 +221,9 @@ static int NewRequestHandler(
|
|||||||
(char *)&gIF_INDEX, sizeof(gIF_INDEX));
|
(char *)&gIF_INDEX, sizeof(gIF_INDEX));
|
||||||
setsockopt(ReplySock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
|
setsockopt(ReplySock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
|
||||||
(char *)&hops, sizeof(hops));
|
(char *)&hops, sizeof(hops));
|
||||||
} else {
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Invalid destination address specified.");
|
"Invalid destination address specified.");
|
||||||
ret = UPNP_E_NETWORK_ERROR;
|
ret = UPNP_E_NETWORK_ERROR;
|
||||||
@@ -232,7 +248,11 @@ static int NewRequestHandler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
end_NewRequestHandler:
|
end_NewRequestHandler:
|
||||||
shutdown(ReplySock, SD_BOTH);
|
if (shutdown(ReplySock, SD_BOTH) == -1) {
|
||||||
|
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
||||||
|
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
||||||
|
"Error in shutdown: %s\n", errorBuffer);
|
||||||
|
}
|
||||||
UpnpCloseSocket(ReplySock);
|
UpnpCloseSocket(ReplySock);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -330,10 +350,11 @@ static void CreateServicePacket(
|
|||||||
* Notf == 1 means service advertisement,
|
* Notf == 1 means service advertisement,
|
||||||
* Notf == 2 means reply */
|
* Notf == 2 means reply */
|
||||||
membuffer_init(&buf);
|
membuffer_init(&buf);
|
||||||
buf.size_inc = 30;
|
buf.size_inc = (size_t)30;
|
||||||
*packet = NULL;
|
*packet = NULL;
|
||||||
if (msg_type == MSGTYPE_REPLY) {
|
if (msg_type == MSGTYPE_REPLY) {
|
||||||
if (PowerState > 0) {
|
if (PowerState > 0) {
|
||||||
|
#ifdef UPNP_HAVE_OPTSSDP
|
||||||
ret_code = http_MakeMessage(&buf, 1, 1,
|
ret_code = http_MakeMessage(&buf, 1, 1,
|
||||||
"R" "sdc" "D" "sc" "ssc" "ssc" "ssc"
|
"R" "sdc" "D" "sc" "ssc" "ssc" "ssc"
|
||||||
"S" "Xc" "ssc" "ssc"
|
"S" "Xc" "ssc" "ssc"
|
||||||
@@ -348,7 +369,21 @@ static void CreateServicePacket(
|
|||||||
"SleepPeriod: ", SleepPeriod,
|
"SleepPeriod: ", SleepPeriod,
|
||||||
"RegistrationState: ",
|
"RegistrationState: ",
|
||||||
RegistrationState);
|
RegistrationState);
|
||||||
|
#else
|
||||||
|
ret_code = http_MakeMessage(&buf, 1, 1,
|
||||||
|
"R" "sdc" "D" "sc" "ssc"
|
||||||
|
"S" "ssc" "ssc"
|
||||||
|
"sdc" "sdc" "sdcc", HTTP_OK,
|
||||||
|
"CACHE-CONTROL: max-age=", duration,
|
||||||
|
"EXT:", "LOCATION: ", location,
|
||||||
|
"ST: ", nt, "USN: ",
|
||||||
|
usn, "Powerstate: ", PowerState,
|
||||||
|
"SleepPeriod: ", SleepPeriod,
|
||||||
|
"RegistrationState: ",
|
||||||
|
RegistrationState);
|
||||||
|
#endif /* UPNP_HAVE_OPTSSDP */
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef UPNP_HAVE_OPTSSDP
|
||||||
ret_code = http_MakeMessage(&buf, 1, 1,
|
ret_code = http_MakeMessage(&buf, 1, 1,
|
||||||
"R" "sdc" "D" "sc" "ssc" "ssc" "ssc"
|
"R" "sdc" "D" "sc" "ssc" "ssc" "ssc"
|
||||||
"S" "Xc" "ssc" "sscc", HTTP_OK,
|
"S" "Xc" "ssc" "sscc", HTTP_OK,
|
||||||
@@ -359,6 +394,14 @@ static void CreateServicePacket(
|
|||||||
"01-NLS: ", gUpnpSdkNLSuuid,
|
"01-NLS: ", gUpnpSdkNLSuuid,
|
||||||
X_USER_AGENT, "ST: ", nt, "USN: ",
|
X_USER_AGENT, "ST: ", nt, "USN: ",
|
||||||
usn);
|
usn);
|
||||||
|
#else
|
||||||
|
ret_code = http_MakeMessage(&buf, 1, 1,
|
||||||
|
"R" "sdc" "D" "sc" "ssc"
|
||||||
|
"S" "ssc" "sscc", HTTP_OK,
|
||||||
|
"CACHE-CONTROL: max-age=", duration,
|
||||||
|
"EXT:", "LOCATION: ", location,
|
||||||
|
"ST: ", nt, "USN: ", usn);
|
||||||
|
#endif /* UPNP_HAVE_OPTSSDP */
|
||||||
}
|
}
|
||||||
if (ret_code != 0) {
|
if (ret_code != 0) {
|
||||||
return;
|
return;
|
||||||
@@ -374,15 +417,18 @@ static void CreateServicePacket(
|
|||||||
nts = "ssdp:byebye";
|
nts = "ssdp:byebye";
|
||||||
/* NOTE: The CACHE-CONTROL and LOCATION headers are not present in
|
/* NOTE: The CACHE-CONTROL and LOCATION headers are not present in
|
||||||
* a shutdown msg, but are present here for MS WinMe interop. */
|
* a shutdown msg, but are present here for MS WinMe interop. */
|
||||||
if (AddressFamily == AF_INET)
|
switch (AddressFamily) {
|
||||||
|
case AF_INET:
|
||||||
host = SSDP_IP;
|
host = SSDP_IP;
|
||||||
else {
|
break;
|
||||||
|
default:
|
||||||
if (isUrlV6UlaGua(location))
|
if (isUrlV6UlaGua(location))
|
||||||
host = "[" SSDP_IPV6_SITELOCAL "]";
|
host = "[" SSDP_IPV6_SITELOCAL "]";
|
||||||
else
|
else
|
||||||
host = "[" SSDP_IPV6_LINKLOCAL "]";
|
host = "[" SSDP_IPV6_LINKLOCAL "]";
|
||||||
}
|
}
|
||||||
if (PowerState > 0) {
|
if (PowerState > 0) {
|
||||||
|
#ifdef UPNP_HAVE_OPTSSDP
|
||||||
ret_code = http_MakeMessage(&buf, 1, 1,
|
ret_code = http_MakeMessage(&buf, 1, 1,
|
||||||
"Q" "sssdc" "sdc" "ssc" "ssc" "ssc"
|
"Q" "sssdc" "sdc" "ssc" "ssc" "ssc"
|
||||||
"ssc" "ssc" "S" "Xc" "ssc"
|
"ssc" "ssc" "S" "Xc" "ssc"
|
||||||
@@ -398,7 +444,23 @@ static void CreateServicePacket(
|
|||||||
PowerState, "SleepPeriod: ",
|
PowerState, "SleepPeriod: ",
|
||||||
SleepPeriod, "RegistrationState: ",
|
SleepPeriod, "RegistrationState: ",
|
||||||
RegistrationState);
|
RegistrationState);
|
||||||
|
#else
|
||||||
|
ret_code = http_MakeMessage(&buf, 1, 1,
|
||||||
|
"Q" "sssdc" "sdc" "ssc"
|
||||||
|
"ssc" "ssc" "S" "ssc"
|
||||||
|
"sdc" "sdc" "sdcc",
|
||||||
|
HTTPMETHOD_NOTIFY, "*", (size_t) 1,
|
||||||
|
"HOST: ", host, ":", SSDP_PORT,
|
||||||
|
"CACHE-CONTROL: max-age=", duration,
|
||||||
|
"LOCATION: ", location, "NT: ", nt,
|
||||||
|
"NTS: ", nts,
|
||||||
|
"USN: ", usn, "Powerstate: ",
|
||||||
|
PowerState, "SleepPeriod: ",
|
||||||
|
SleepPeriod, "RegistrationState: ",
|
||||||
|
RegistrationState);
|
||||||
|
#endif /* UPNP_HAVE_OPTSSDP */
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef UPNP_HAVE_OPTSSDP
|
||||||
ret_code = http_MakeMessage(&buf, 1, 1,
|
ret_code = http_MakeMessage(&buf, 1, 1,
|
||||||
"Q" "sssdc" "sdc" "ssc" "ssc" "ssc"
|
"Q" "sssdc" "sdc" "ssc" "ssc" "ssc"
|
||||||
"ssc" "ssc" "S" "Xc" "sscc",
|
"ssc" "ssc" "S" "Xc" "sscc",
|
||||||
@@ -410,6 +472,16 @@ static void CreateServicePacket(
|
|||||||
"01-NLS: ", gUpnpSdkNLSuuid, "NT: ",
|
"01-NLS: ", gUpnpSdkNLSuuid, "NT: ",
|
||||||
nt, "NTS: ", nts, X_USER_AGENT,
|
nt, "NTS: ", nts, X_USER_AGENT,
|
||||||
"USN: ", usn);
|
"USN: ", usn);
|
||||||
|
#else
|
||||||
|
ret_code = http_MakeMessage(&buf, 1, 1,
|
||||||
|
"Q" "sssdc" "sdc" "ssc"
|
||||||
|
"ssc" "ssc" "S" "sscc",
|
||||||
|
HTTPMETHOD_NOTIFY, "*", (size_t) 1,
|
||||||
|
"HOST: ", host, ":", SSDP_PORT,
|
||||||
|
"CACHE-CONTROL: max-age=", duration,
|
||||||
|
"LOCATION: ", location, "NT: ", nt,
|
||||||
|
"NTS: ", nts, "USN: ", usn);
|
||||||
|
#endif /* UPNP_HAVE_OPTSSDP */
|
||||||
}
|
}
|
||||||
if (ret_code)
|
if (ret_code)
|
||||||
return;
|
return;
|
||||||
@@ -433,23 +505,27 @@ int DeviceAdvertisement(char *DevType, int RootDev, char *Udn, char *Location,
|
|||||||
/* char Mil_Nt[LINE_SIZE] */
|
/* char Mil_Nt[LINE_SIZE] */
|
||||||
char Mil_Usn[LINE_SIZE];
|
char Mil_Usn[LINE_SIZE];
|
||||||
char *msgs[3];
|
char *msgs[3];
|
||||||
int ret_code = UPNP_E_SUCCESS;
|
int ret_code = UPNP_E_OUTOF_MEMORY;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
||||||
"In function DeviceAdvertisement\n");
|
"In function DeviceAdvertisement\n");
|
||||||
memset(&__ss, 0, sizeof(__ss));
|
memset(&__ss, 0, sizeof(__ss));
|
||||||
if (AddressFamily == AF_INET) {
|
switch (AddressFamily) {
|
||||||
DestAddr4->sin_family = AF_INET;
|
case AF_INET:
|
||||||
|
DestAddr4->sin_family = (sa_family_t)AF_INET;
|
||||||
inet_pton(AF_INET, SSDP_IP, &DestAddr4->sin_addr);
|
inet_pton(AF_INET, SSDP_IP, &DestAddr4->sin_addr);
|
||||||
DestAddr4->sin_port = htons(SSDP_PORT);
|
DestAddr4->sin_port = htons(SSDP_PORT);
|
||||||
} else if (AddressFamily == AF_INET6) {
|
break;
|
||||||
DestAddr6->sin6_family = AF_INET6;
|
case AF_INET6:
|
||||||
|
DestAddr6->sin6_family = (sa_family_t)AF_INET6;
|
||||||
inet_pton(AF_INET6,
|
inet_pton(AF_INET6,
|
||||||
(isUrlV6UlaGua(Location)) ? SSDP_IPV6_SITELOCAL :
|
(isUrlV6UlaGua(Location)) ? SSDP_IPV6_SITELOCAL :
|
||||||
SSDP_IPV6_LINKLOCAL, &DestAddr6->sin6_addr);
|
SSDP_IPV6_LINKLOCAL, &DestAddr6->sin6_addr);
|
||||||
DestAddr6->sin6_port = htons(SSDP_PORT);
|
DestAddr6->sin6_port = htons(SSDP_PORT);
|
||||||
DestAddr6->sin6_scope_id = gIF_INDEX;
|
DestAddr6->sin6_scope_id = gIF_INDEX;
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Invalid device address family.\n");
|
"Invalid device address family.\n");
|
||||||
}
|
}
|
||||||
@@ -459,7 +535,10 @@ int DeviceAdvertisement(char *DevType, int RootDev, char *Udn, char *Location,
|
|||||||
/* If deviceis a root device , here we need to send 3 advertisement
|
/* If deviceis a root device , here we need to send 3 advertisement
|
||||||
* or reply */
|
* or reply */
|
||||||
if (RootDev) {
|
if (RootDev) {
|
||||||
sprintf(Mil_Usn, "%s::upnp:rootdevice", Udn);
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s::upnp:rootdevice",
|
||||||
|
Udn);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
CreateServicePacket(MSGTYPE_ADVERTISEMENT, "upnp:rootdevice",
|
CreateServicePacket(MSGTYPE_ADVERTISEMENT, "upnp:rootdevice",
|
||||||
Mil_Usn, Location, Duration, &msgs[0],
|
Mil_Usn, Location, Duration, &msgs[0],
|
||||||
AddressFamily, PowerState, SleepPeriod,
|
AddressFamily, PowerState, SleepPeriod,
|
||||||
@@ -469,16 +548,15 @@ int DeviceAdvertisement(char *DevType, int RootDev, char *Udn, char *Location,
|
|||||||
CreateServicePacket(MSGTYPE_ADVERTISEMENT, Udn, Udn,
|
CreateServicePacket(MSGTYPE_ADVERTISEMENT, Udn, Udn,
|
||||||
Location, Duration, &msgs[1], AddressFamily,
|
Location, Duration, &msgs[1], AddressFamily,
|
||||||
PowerState, SleepPeriod, RegistrationState);
|
PowerState, SleepPeriod, RegistrationState);
|
||||||
sprintf(Mil_Usn, "%s::%s", Udn, DevType);
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s::%s", Udn, DevType);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
CreateServicePacket(MSGTYPE_ADVERTISEMENT, DevType, Mil_Usn,
|
CreateServicePacket(MSGTYPE_ADVERTISEMENT, DevType, Mil_Usn,
|
||||||
Location, Duration, &msgs[2], AddressFamily,
|
Location, Duration, &msgs[2], AddressFamily,
|
||||||
PowerState, SleepPeriod, RegistrationState);
|
PowerState, SleepPeriod, RegistrationState);
|
||||||
/* check error */
|
/* check error */
|
||||||
if ((RootDev && msgs[0] == NULL) || msgs[1] == NULL || msgs[2] == NULL) {
|
if ((RootDev && msgs[0] == NULL) || msgs[1] == NULL || msgs[2] == NULL) {
|
||||||
free(msgs[0]);
|
goto error_handler;
|
||||||
free(msgs[1]);
|
|
||||||
free(msgs[2]);
|
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
|
||||||
}
|
}
|
||||||
/* send packets */
|
/* send packets */
|
||||||
if (RootDev) {
|
if (RootDev) {
|
||||||
@@ -491,6 +569,8 @@ int DeviceAdvertisement(char *DevType, int RootDev, char *Udn, char *Location,
|
|||||||
ret_code =
|
ret_code =
|
||||||
NewRequestHandler((struct sockaddr *)&__ss, 2, &msgs[1]);
|
NewRequestHandler((struct sockaddr *)&__ss, 2, &msgs[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_handler:
|
||||||
/* free msgs */
|
/* free msgs */
|
||||||
free(msgs[0]);
|
free(msgs[0]);
|
||||||
free(msgs[1]);
|
free(msgs[1]);
|
||||||
@@ -503,11 +583,12 @@ int SendReply(struct sockaddr *DestAddr, char *DevType, int RootDev,
|
|||||||
char *Udn, char *Location, int Duration, int ByType,
|
char *Udn, char *Location, int Duration, int ByType,
|
||||||
int PowerState, int SleepPeriod, int RegistrationState)
|
int PowerState, int SleepPeriod, int RegistrationState)
|
||||||
{
|
{
|
||||||
int ret_code;
|
int ret_code = UPNP_E_OUTOF_MEMORY;
|
||||||
char *msgs[2];
|
char *msgs[2];
|
||||||
int num_msgs;
|
int num_msgs;
|
||||||
char Mil_Usn[LINE_SIZE];
|
char Mil_Usn[LINE_SIZE];
|
||||||
int i;
|
int i;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
msgs[0] = NULL;
|
msgs[0] = NULL;
|
||||||
msgs[1] = NULL;
|
msgs[1] = NULL;
|
||||||
@@ -515,10 +596,13 @@ int SendReply(struct sockaddr *DestAddr, char *DevType, int RootDev,
|
|||||||
/* one msg for root device */
|
/* one msg for root device */
|
||||||
num_msgs = 1;
|
num_msgs = 1;
|
||||||
|
|
||||||
sprintf(Mil_Usn, "%s::upnp:rootdevice", Udn);
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s::upnp:rootdevice",
|
||||||
|
Udn);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
CreateServicePacket(MSGTYPE_REPLY, "upnp:rootdevice",
|
CreateServicePacket(MSGTYPE_REPLY, "upnp:rootdevice",
|
||||||
Mil_Usn, Location, Duration, &msgs[0],
|
Mil_Usn, Location, Duration, &msgs[0],
|
||||||
DestAddr->sa_family, PowerState,
|
(int)DestAddr->sa_family, PowerState,
|
||||||
SleepPeriod, RegistrationState);
|
SleepPeriod, RegistrationState);
|
||||||
} else {
|
} else {
|
||||||
/* two msgs for embedded devices */
|
/* two msgs for embedded devices */
|
||||||
@@ -528,25 +612,29 @@ int SendReply(struct sockaddr *DestAddr, char *DevType, int RootDev,
|
|||||||
if (!ByType) {
|
if (!ByType) {
|
||||||
CreateServicePacket(MSGTYPE_REPLY, Udn, Udn, Location,
|
CreateServicePacket(MSGTYPE_REPLY, Udn, Udn, Location,
|
||||||
Duration, &msgs[0],
|
Duration, &msgs[0],
|
||||||
DestAddr->sa_family, PowerState,
|
(int)DestAddr->sa_family, PowerState,
|
||||||
SleepPeriod, RegistrationState);
|
SleepPeriod, RegistrationState);
|
||||||
} else {
|
} else {
|
||||||
sprintf(Mil_Usn, "%s::%s", Udn, DevType);
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s::%s", Udn,
|
||||||
|
DevType);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
CreateServicePacket(MSGTYPE_REPLY, DevType, Mil_Usn,
|
CreateServicePacket(MSGTYPE_REPLY, DevType, Mil_Usn,
|
||||||
Location, Duration, &msgs[0],
|
Location, Duration, &msgs[0],
|
||||||
DestAddr->sa_family, PowerState,
|
(int)DestAddr->sa_family, PowerState,
|
||||||
SleepPeriod, RegistrationState);
|
SleepPeriod, RegistrationState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* check error */
|
/* check error */
|
||||||
for (i = 0; i < num_msgs; i++) {
|
for (i = 0; i < num_msgs; i++) {
|
||||||
if (msgs[i] == NULL) {
|
if (msgs[i] == NULL) {
|
||||||
free(msgs[0]);
|
goto error_handler;
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* send msgs */
|
/* send msgs */
|
||||||
ret_code = NewRequestHandler(DestAddr, num_msgs, msgs);
|
ret_code = NewRequestHandler(DestAddr, num_msgs, msgs);
|
||||||
|
|
||||||
|
error_handler:
|
||||||
for (i = 0; i < num_msgs; i++) {
|
for (i = 0; i < num_msgs; i++) {
|
||||||
if (msgs[i] != NULL)
|
if (msgs[i] != NULL)
|
||||||
free(msgs[i]);
|
free(msgs[i]);
|
||||||
@@ -560,7 +648,8 @@ int DeviceReply(struct sockaddr *DestAddr, char *DevType, int RootDev,
|
|||||||
int SleepPeriod, int RegistrationState)
|
int SleepPeriod, int RegistrationState)
|
||||||
{
|
{
|
||||||
char *szReq[3], Mil_Nt[LINE_SIZE], Mil_Usn[LINE_SIZE];
|
char *szReq[3], Mil_Nt[LINE_SIZE], Mil_Usn[LINE_SIZE];
|
||||||
int RetVal;
|
int RetVal = UPNP_E_OUTOF_MEMORY;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
szReq[0] = NULL;
|
szReq[0] = NULL;
|
||||||
szReq[1] = NULL;
|
szReq[1] = NULL;
|
||||||
@@ -568,30 +657,38 @@ int DeviceReply(struct sockaddr *DestAddr, char *DevType, int RootDev,
|
|||||||
/* create 2 or 3 msgs */
|
/* create 2 or 3 msgs */
|
||||||
if (RootDev) {
|
if (RootDev) {
|
||||||
/* 3 replies for root device */
|
/* 3 replies for root device */
|
||||||
strcpy(Mil_Nt, "upnp:rootdevice");
|
memset(Mil_Nt, 0, sizeof(Mil_Nt));
|
||||||
sprintf(Mil_Usn, "%s::upnp:rootdevice", Udn);
|
strncpy(Mil_Nt, "upnp:rootdevice", sizeof(Mil_Nt) - 1);
|
||||||
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s::upnp:rootdevice", Udn);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
CreateServicePacket(MSGTYPE_REPLY, Mil_Nt, Mil_Usn,
|
CreateServicePacket(MSGTYPE_REPLY, Mil_Nt, Mil_Usn,
|
||||||
Location, Duration, &szReq[0],
|
Location, Duration, &szReq[0],
|
||||||
DestAddr->sa_family, PowerState,
|
(int)DestAddr->sa_family, PowerState,
|
||||||
SleepPeriod, RegistrationState);
|
SleepPeriod, RegistrationState);
|
||||||
}
|
}
|
||||||
sprintf(Mil_Nt, "%s", Udn);
|
rc = snprintf(Mil_Nt, sizeof(Mil_Nt), "%s", Udn);
|
||||||
sprintf(Mil_Usn, "%s", Udn);
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Nt))
|
||||||
|
goto error_handler;
|
||||||
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s", Udn);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
CreateServicePacket(MSGTYPE_REPLY, Mil_Nt, Mil_Usn,
|
CreateServicePacket(MSGTYPE_REPLY, Mil_Nt, Mil_Usn,
|
||||||
Location, Duration, &szReq[1], DestAddr->sa_family,
|
Location, Duration, &szReq[1], (int)DestAddr->sa_family,
|
||||||
PowerState, SleepPeriod, RegistrationState);
|
PowerState, SleepPeriod, RegistrationState);
|
||||||
sprintf(Mil_Nt, "%s", DevType);
|
rc = snprintf(Mil_Nt, sizeof(Mil_Nt), "%s", DevType);
|
||||||
sprintf(Mil_Usn, "%s::%s", Udn, DevType);
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Nt))
|
||||||
|
goto error_handler;
|
||||||
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s::%s", Udn, DevType);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
CreateServicePacket(MSGTYPE_REPLY, Mil_Nt, Mil_Usn,
|
CreateServicePacket(MSGTYPE_REPLY, Mil_Nt, Mil_Usn,
|
||||||
Location, Duration, &szReq[2], DestAddr->sa_family,
|
Location, Duration, &szReq[2], (int)DestAddr->sa_family,
|
||||||
PowerState, SleepPeriod, RegistrationState);
|
PowerState, SleepPeriod, RegistrationState);
|
||||||
/* check error */
|
/* check error */
|
||||||
if ((RootDev && szReq[0] == NULL) ||
|
if ((RootDev && szReq[0] == NULL) ||
|
||||||
szReq[1] == NULL || szReq[2] == NULL) {
|
szReq[1] == NULL || szReq[2] == NULL) {
|
||||||
free(szReq[0]);
|
goto error_handler;
|
||||||
free(szReq[1]);
|
|
||||||
free(szReq[2]);
|
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
|
||||||
}
|
}
|
||||||
/* send replies */
|
/* send replies */
|
||||||
if (RootDev) {
|
if (RootDev) {
|
||||||
@@ -599,6 +696,8 @@ int DeviceReply(struct sockaddr *DestAddr, char *DevType, int RootDev,
|
|||||||
} else {
|
} else {
|
||||||
RetVal = NewRequestHandler(DestAddr, 2, &szReq[1]);
|
RetVal = NewRequestHandler(DestAddr, 2, &szReq[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_handler:
|
||||||
/* free */
|
/* free */
|
||||||
free(szReq[0]);
|
free(szReq[0]);
|
||||||
free(szReq[1]);
|
free(szReq[1]);
|
||||||
@@ -608,42 +707,51 @@ int DeviceReply(struct sockaddr *DestAddr, char *DevType, int RootDev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ServiceAdvertisement(char *Udn, char *ServType, char *Location,
|
int ServiceAdvertisement(char *Udn, char *ServType, char *Location,
|
||||||
int Duration, int AddressFamily, int PowerState,
|
int Duration, int AddressFamily,
|
||||||
int SleepPeriod, int RegistrationState)
|
int PowerState, int SleepPeriod, int RegistrationState)
|
||||||
{
|
{
|
||||||
char Mil_Usn[LINE_SIZE];
|
char Mil_Usn[LINE_SIZE];
|
||||||
char *szReq[1];
|
char *szReq[1];
|
||||||
int RetVal = UPNP_E_SUCCESS;
|
int RetVal = UPNP_E_OUTOF_MEMORY;
|
||||||
struct sockaddr_storage __ss;
|
struct sockaddr_storage __ss;
|
||||||
struct sockaddr_in *DestAddr4 = (struct sockaddr_in *)&__ss;
|
struct sockaddr_in *DestAddr4 = (struct sockaddr_in *)&__ss;
|
||||||
struct sockaddr_in6 *DestAddr6 = (struct sockaddr_in6 *)&__ss;
|
struct sockaddr_in6 *DestAddr6 = (struct sockaddr_in6 *)&__ss;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
memset(&__ss, 0, sizeof(__ss));
|
memset(&__ss, 0, sizeof(__ss));
|
||||||
if (AddressFamily == AF_INET) {
|
szReq[0] = NULL;
|
||||||
DestAddr4->sin_family = AF_INET;
|
switch (AddressFamily) {
|
||||||
|
case AF_INET:
|
||||||
|
DestAddr4->sin_family = (sa_family_t)AddressFamily;
|
||||||
inet_pton(AF_INET, SSDP_IP, &DestAddr4->sin_addr);
|
inet_pton(AF_INET, SSDP_IP, &DestAddr4->sin_addr);
|
||||||
DestAddr4->sin_port = htons(SSDP_PORT);
|
DestAddr4->sin_port = htons(SSDP_PORT);
|
||||||
} else if (AddressFamily == AF_INET6) {
|
break;
|
||||||
DestAddr6->sin6_family = AF_INET6;
|
case AF_INET6:
|
||||||
|
DestAddr6->sin6_family = (sa_family_t)AddressFamily;
|
||||||
inet_pton(AF_INET6,
|
inet_pton(AF_INET6,
|
||||||
(isUrlV6UlaGua(Location)) ? SSDP_IPV6_SITELOCAL :
|
(isUrlV6UlaGua(Location)) ? SSDP_IPV6_SITELOCAL :
|
||||||
SSDP_IPV6_LINKLOCAL, &DestAddr6->sin6_addr);
|
SSDP_IPV6_LINKLOCAL, &DestAddr6->sin6_addr);
|
||||||
DestAddr6->sin6_port = htons(SSDP_PORT);
|
DestAddr6->sin6_port = htons(SSDP_PORT);
|
||||||
DestAddr6->sin6_scope_id = gIF_INDEX;
|
DestAddr6->sin6_scope_id = gIF_INDEX;
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Invalid device address family.\n");
|
"Invalid device address family.\n");
|
||||||
}
|
}
|
||||||
sprintf(Mil_Usn, "%s::%s", Udn, ServType);
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s::%s", Udn, ServType);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
/* CreateServiceRequestPacket(1,szReq[0],Mil_Nt,Mil_Usn,
|
/* CreateServiceRequestPacket(1,szReq[0],Mil_Nt,Mil_Usn,
|
||||||
* Server,Location,Duration); */
|
* Server,Location,Duration); */
|
||||||
CreateServicePacket(MSGTYPE_ADVERTISEMENT, ServType, Mil_Usn,
|
CreateServicePacket(MSGTYPE_ADVERTISEMENT, ServType, Mil_Usn,
|
||||||
Location, Duration, &szReq[0], AddressFamily,
|
Location, Duration, &szReq[0], AddressFamily,
|
||||||
PowerState, SleepPeriod, RegistrationState);
|
PowerState, SleepPeriod, RegistrationState);
|
||||||
if (szReq[0] == NULL) {
|
if (szReq[0] == NULL) {
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
goto error_handler;
|
||||||
}
|
}
|
||||||
RetVal = NewRequestHandler((struct sockaddr *)&__ss, 1, szReq);
|
RetVal = NewRequestHandler((struct sockaddr *)&__ss, 1, szReq);
|
||||||
|
|
||||||
|
error_handler:
|
||||||
free(szReq[0]);
|
free(szReq[0]);
|
||||||
|
|
||||||
return RetVal;
|
return RetVal;
|
||||||
@@ -655,64 +763,78 @@ int ServiceReply(struct sockaddr *DestAddr, char *ServType, char *Udn,
|
|||||||
{
|
{
|
||||||
char Mil_Usn[LINE_SIZE];
|
char Mil_Usn[LINE_SIZE];
|
||||||
char *szReq[1];
|
char *szReq[1];
|
||||||
int RetVal;
|
int RetVal = UPNP_E_OUTOF_MEMORY;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
szReq[0] = NULL;
|
szReq[0] = NULL;
|
||||||
sprintf(Mil_Usn, "%s::%s", Udn, ServType);
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s::%s", Udn, ServType);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
CreateServicePacket(MSGTYPE_REPLY, ServType, Mil_Usn,
|
CreateServicePacket(MSGTYPE_REPLY, ServType, Mil_Usn,
|
||||||
Location, Duration, &szReq[0], DestAddr->sa_family,
|
Location, Duration, &szReq[0], (int)DestAddr->sa_family,
|
||||||
PowerState, SleepPeriod, RegistrationState);
|
PowerState, SleepPeriod, RegistrationState);
|
||||||
if (szReq[0] == NULL)
|
if (szReq[0] == NULL)
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
goto error_handler;
|
||||||
RetVal = NewRequestHandler(DestAddr, 1, szReq);
|
RetVal = NewRequestHandler(DestAddr, 1, szReq);
|
||||||
|
|
||||||
|
error_handler:
|
||||||
free(szReq[0]);
|
free(szReq[0]);
|
||||||
|
|
||||||
return RetVal;
|
return RetVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ServiceShutdown(char *Udn, char *ServType, char *Location, int Duration,
|
int ServiceShutdown(char *Udn, char *ServType, char *Location, int Duration,
|
||||||
int AddressFamily, int PowerState, int SleepPeriod,
|
int AddressFamily, int PowerState,
|
||||||
int RegistrationState)
|
int SleepPeriod, int RegistrationState)
|
||||||
{
|
{
|
||||||
char Mil_Usn[LINE_SIZE];
|
char Mil_Usn[LINE_SIZE];
|
||||||
char *szReq[1];
|
char *szReq[1];
|
||||||
struct sockaddr_storage __ss;
|
struct sockaddr_storage __ss;
|
||||||
struct sockaddr_in *DestAddr4 = (struct sockaddr_in *)&__ss;
|
struct sockaddr_in *DestAddr4 = (struct sockaddr_in *)&__ss;
|
||||||
struct sockaddr_in6 *DestAddr6 = (struct sockaddr_in6 *)&__ss;
|
struct sockaddr_in6 *DestAddr6 = (struct sockaddr_in6 *)&__ss;
|
||||||
int RetVal = UPNP_E_SUCCESS;
|
int RetVal = UPNP_E_OUTOF_MEMORY;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
memset(&__ss, 0, sizeof(__ss));
|
memset(&__ss, 0, sizeof(__ss));
|
||||||
if (AddressFamily == AF_INET) {
|
szReq[0] = NULL;
|
||||||
DestAddr4->sin_family = AF_INET;
|
switch (AddressFamily) {
|
||||||
|
case AF_INET:
|
||||||
|
DestAddr4->sin_family = (sa_family_t)AddressFamily;
|
||||||
inet_pton(AF_INET, SSDP_IP, &DestAddr4->sin_addr);
|
inet_pton(AF_INET, SSDP_IP, &DestAddr4->sin_addr);
|
||||||
DestAddr4->sin_port = htons(SSDP_PORT);
|
DestAddr4->sin_port = htons(SSDP_PORT);
|
||||||
} else if (AddressFamily == AF_INET6) {
|
break;
|
||||||
DestAddr6->sin6_family = AF_INET6;
|
case AF_INET6:
|
||||||
|
DestAddr6->sin6_family = (sa_family_t)AddressFamily;
|
||||||
inet_pton(AF_INET6,
|
inet_pton(AF_INET6,
|
||||||
(isUrlV6UlaGua(Location)) ? SSDP_IPV6_SITELOCAL :
|
(isUrlV6UlaGua(Location)) ? SSDP_IPV6_SITELOCAL :
|
||||||
SSDP_IPV6_LINKLOCAL, &DestAddr6->sin6_addr);
|
SSDP_IPV6_LINKLOCAL, &DestAddr6->sin6_addr);
|
||||||
DestAddr6->sin6_port = htons(SSDP_PORT);
|
DestAddr6->sin6_port = htons(SSDP_PORT);
|
||||||
DestAddr6->sin6_scope_id = gIF_INDEX;
|
DestAddr6->sin6_scope_id = gIF_INDEX;
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Invalid device address family.\n");
|
"Invalid device address family.\n");
|
||||||
}
|
}
|
||||||
/* sprintf(Mil_Nt,"%s",ServType); */
|
/* sprintf(Mil_Nt,"%s",ServType); */
|
||||||
sprintf(Mil_Usn, "%s::%s", Udn, ServType);
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s::%s", Udn, ServType);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
/* CreateServiceRequestPacket(0,szReq[0],Mil_Nt,Mil_Usn,
|
/* CreateServiceRequestPacket(0,szReq[0],Mil_Nt,Mil_Usn,
|
||||||
* Server,Location,Duration); */
|
* Server,Location,Duration); */
|
||||||
CreateServicePacket(MSGTYPE_SHUTDOWN, ServType, Mil_Usn,
|
CreateServicePacket(MSGTYPE_SHUTDOWN, ServType, Mil_Usn,
|
||||||
Location, Duration, &szReq[0], AddressFamily,
|
Location, Duration, &szReq[0], AddressFamily,
|
||||||
PowerState, SleepPeriod, RegistrationState);
|
PowerState, SleepPeriod, RegistrationState);
|
||||||
if (szReq[0] == NULL)
|
if (szReq[0] == NULL)
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
goto error_handler;
|
||||||
RetVal = NewRequestHandler((struct sockaddr *)&__ss, 1, szReq);
|
RetVal = NewRequestHandler((struct sockaddr *)&__ss, 1, szReq);
|
||||||
|
|
||||||
|
error_handler:
|
||||||
free(szReq[0]);
|
free(szReq[0]);
|
||||||
|
|
||||||
return RetVal;
|
return RetVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DeviceShutdown(char *DevType, int RootDev, char *Udn, char *_Server,
|
int DeviceShutdown(char *DevType, int RootDev, char *Udn,
|
||||||
char *Location, int Duration, int AddressFamily,
|
char *Location, int Duration, int AddressFamily,
|
||||||
int PowerState, int SleepPeriod, int RegistrationState)
|
int PowerState, int SleepPeriod, int RegistrationState)
|
||||||
{
|
{
|
||||||
@@ -721,30 +843,37 @@ int DeviceShutdown(char *DevType, int RootDev, char *Udn, char *_Server,
|
|||||||
struct sockaddr_in6 *DestAddr6 = (struct sockaddr_in6 *)&__ss;
|
struct sockaddr_in6 *DestAddr6 = (struct sockaddr_in6 *)&__ss;
|
||||||
char *msgs[3];
|
char *msgs[3];
|
||||||
char Mil_Usn[LINE_SIZE];
|
char Mil_Usn[LINE_SIZE];
|
||||||
int ret_code = UPNP_E_SUCCESS;
|
int ret_code = UPNP_E_OUTOF_MEMORY;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
msgs[0] = NULL;
|
msgs[0] = NULL;
|
||||||
msgs[1] = NULL;
|
msgs[1] = NULL;
|
||||||
msgs[2] = NULL;
|
msgs[2] = NULL;
|
||||||
memset(&__ss, 0, sizeof(__ss));
|
memset(&__ss, 0, sizeof(__ss));
|
||||||
if (AddressFamily == AF_INET) {
|
switch (AddressFamily) {
|
||||||
DestAddr4->sin_family = AF_INET;
|
case AF_INET:
|
||||||
|
DestAddr4->sin_family = (sa_family_t)AddressFamily;
|
||||||
inet_pton(AF_INET, SSDP_IP, &DestAddr4->sin_addr);
|
inet_pton(AF_INET, SSDP_IP, &DestAddr4->sin_addr);
|
||||||
DestAddr4->sin_port = htons(SSDP_PORT);
|
DestAddr4->sin_port = htons(SSDP_PORT);
|
||||||
} else if (AddressFamily == AF_INET6) {
|
break;
|
||||||
DestAddr6->sin6_family = AF_INET6;
|
case AF_INET6:
|
||||||
|
DestAddr6->sin6_family = (sa_family_t)AddressFamily;
|
||||||
inet_pton(AF_INET6,
|
inet_pton(AF_INET6,
|
||||||
(isUrlV6UlaGua(Location)) ? SSDP_IPV6_SITELOCAL :
|
(isUrlV6UlaGua(Location)) ? SSDP_IPV6_SITELOCAL :
|
||||||
SSDP_IPV6_LINKLOCAL, &DestAddr6->sin6_addr);
|
SSDP_IPV6_LINKLOCAL, &DestAddr6->sin6_addr);
|
||||||
DestAddr6->sin6_port = htons(SSDP_PORT);
|
DestAddr6->sin6_port = htons(SSDP_PORT);
|
||||||
DestAddr6->sin6_scope_id = gIF_INDEX;
|
DestAddr6->sin6_scope_id = gIF_INDEX;
|
||||||
} else {
|
break;
|
||||||
|
default:
|
||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Invalid device address family.\n");
|
"Invalid device address family.\n");
|
||||||
}
|
}
|
||||||
/* root device has one extra msg */
|
/* root device has one extra msg */
|
||||||
if (RootDev) {
|
if (RootDev) {
|
||||||
sprintf(Mil_Usn, "%s::upnp:rootdevice", Udn);
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s::upnp:rootdevice",
|
||||||
|
Udn);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
CreateServicePacket(MSGTYPE_SHUTDOWN, "upnp:rootdevice",
|
CreateServicePacket(MSGTYPE_SHUTDOWN, "upnp:rootdevice",
|
||||||
Mil_Usn, Location, Duration, &msgs[0],
|
Mil_Usn, Location, Duration, &msgs[0],
|
||||||
AddressFamily, PowerState, SleepPeriod,
|
AddressFamily, PowerState, SleepPeriod,
|
||||||
@@ -756,16 +885,15 @@ int DeviceShutdown(char *DevType, int RootDev, char *Udn, char *_Server,
|
|||||||
CreateServicePacket(MSGTYPE_SHUTDOWN, Udn, Udn,
|
CreateServicePacket(MSGTYPE_SHUTDOWN, Udn, Udn,
|
||||||
Location, Duration, &msgs[1], AddressFamily,
|
Location, Duration, &msgs[1], AddressFamily,
|
||||||
PowerState, SleepPeriod, RegistrationState);
|
PowerState, SleepPeriod, RegistrationState);
|
||||||
sprintf(Mil_Usn, "%s::%s", Udn, DevType);
|
rc = snprintf(Mil_Usn, sizeof(Mil_Usn), "%s::%s", Udn, DevType);
|
||||||
|
if (rc < 0 || (unsigned int) rc >= sizeof(Mil_Usn))
|
||||||
|
goto error_handler;
|
||||||
CreateServicePacket(MSGTYPE_SHUTDOWN, DevType, Mil_Usn,
|
CreateServicePacket(MSGTYPE_SHUTDOWN, DevType, Mil_Usn,
|
||||||
Location, Duration, &msgs[2], AddressFamily,
|
Location, Duration, &msgs[2], AddressFamily,
|
||||||
PowerState, SleepPeriod, RegistrationState);
|
PowerState, SleepPeriod, RegistrationState);
|
||||||
/* check error */
|
/* check error */
|
||||||
if ((RootDev && msgs[0] == NULL) || msgs[1] == NULL || msgs[2] == NULL) {
|
if ((RootDev && msgs[0] == NULL) || msgs[1] == NULL || msgs[2] == NULL) {
|
||||||
free(msgs[0]);
|
goto error_handler;
|
||||||
free(msgs[1]);
|
|
||||||
free(msgs[2]);
|
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
|
||||||
}
|
}
|
||||||
/* send packets */
|
/* send packets */
|
||||||
if (RootDev) {
|
if (RootDev) {
|
||||||
@@ -778,13 +906,14 @@ int DeviceShutdown(char *DevType, int RootDev, char *Udn, char *_Server,
|
|||||||
ret_code =
|
ret_code =
|
||||||
NewRequestHandler((struct sockaddr *)&__ss, 2, &msgs[1]);
|
NewRequestHandler((struct sockaddr *)&__ss, 2, &msgs[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_handler:
|
||||||
/* free msgs */
|
/* free msgs */
|
||||||
free(msgs[0]);
|
free(msgs[0]);
|
||||||
free(msgs[1]);
|
free(msgs[1]);
|
||||||
free(msgs[2]);
|
free(msgs[2]);
|
||||||
|
|
||||||
return ret_code;
|
return ret_code;
|
||||||
_Server = _Server;
|
|
||||||
}
|
}
|
||||||
#endif /* EXCLUDE_SSDP */
|
#endif /* EXCLUDE_SSDP */
|
||||||
#endif /* INCLUDE_DEVICE_APIS */
|
#endif /* INCLUDE_DEVICE_APIS */
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (C) 2011 France Telecom All rights reserved.
|
* Copyright (C) 2011-2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -40,6 +40,8 @@
|
|||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
#else
|
||||||
|
#define snprintf _snprintf
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -106,10 +108,13 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
IXML_Node *tmpNode2 = NULL;
|
IXML_Node *tmpNode2 = NULL;
|
||||||
IXML_Node *textNode = NULL;
|
IXML_Node *textNode = NULL;
|
||||||
const DOMString tmpStr;
|
const DOMString tmpStr;
|
||||||
char SERVER[200];
|
|
||||||
const DOMString dbgStr;
|
const DOMString dbgStr;
|
||||||
int NumCopy = 0;
|
int NumCopy = 0;
|
||||||
|
|
||||||
|
memset(UDNstr, 0, sizeof(UDNstr));
|
||||||
|
memset(devType, 0, sizeof(devType));
|
||||||
|
memset(servType, 0, sizeof(servType));
|
||||||
|
|
||||||
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
||||||
"Inside AdvertiseAndReply with AdFlag = %d\n", AdFlag);
|
"Inside AdvertiseAndReply with AdFlag = %d\n", AdFlag);
|
||||||
|
|
||||||
@@ -120,14 +125,12 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
goto end_function;
|
goto end_function;
|
||||||
}
|
}
|
||||||
defaultExp = SInfo->MaxAge;
|
defaultExp = SInfo->MaxAge;
|
||||||
/* get server info */
|
|
||||||
get_sdk_info(SERVER);
|
|
||||||
/* parse the device list and send advertisements/replies */
|
/* parse the device list and send advertisements/replies */
|
||||||
while (NumCopy == 0 || (AdFlag && NumCopy < NUM_SSDP_COPY)) {
|
while (NumCopy == 0 || (AdFlag && NumCopy < NUM_SSDP_COPY)) {
|
||||||
if (NumCopy != 0)
|
if (NumCopy != 0)
|
||||||
imillisleep(SSDP_PAUSE);
|
imillisleep(SSDP_PAUSE);
|
||||||
NumCopy++;
|
NumCopy++;
|
||||||
for (i = 0;; i++) {
|
for (i = 0lu;; i++) {
|
||||||
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
||||||
"Entering new device list with i = %lu\n\n",
|
"Entering new device list with i = %lu\n\n",
|
||||||
i);
|
i);
|
||||||
@@ -148,10 +151,9 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
continue;
|
continue;
|
||||||
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
||||||
"Extracting UDN for %s\n", dbgStr);
|
"Extracting UDN for %s\n", dbgStr);
|
||||||
dbgStr = ixmlNode_getNodeName(tmpNode);
|
|
||||||
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
||||||
"Extracting device type\n");
|
"Extracting device type\n");
|
||||||
tmpNode2 = ixmlNodeList_item(nodeList, 0);
|
tmpNode2 = ixmlNodeList_item(nodeList, 0lu);
|
||||||
if (!tmpNode2)
|
if (!tmpNode2)
|
||||||
continue;
|
continue;
|
||||||
textNode = ixmlNode_getFirstChild(tmpNode2);
|
textNode = ixmlNode_getFirstChild(tmpNode2);
|
||||||
@@ -162,7 +164,7 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
tmpStr = ixmlNode_getNodeValue(textNode);
|
tmpStr = ixmlNode_getNodeValue(textNode);
|
||||||
if (!tmpStr)
|
if (!tmpStr)
|
||||||
continue;
|
continue;
|
||||||
strcpy(devType, tmpStr);
|
strncpy(devType, tmpStr, sizeof(devType) - 1);
|
||||||
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__,
|
||||||
"Extracting device type = %s\n", devType);
|
"Extracting device type = %s\n", devType);
|
||||||
if (!tmpNode) {
|
if (!tmpNode) {
|
||||||
@@ -179,7 +181,7 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
__LINE__, "UDN not found!\n");
|
__LINE__, "UDN not found!\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
tmpNode2 = ixmlNodeList_item(nodeList, 0);
|
tmpNode2 = ixmlNodeList_item(nodeList, 0lu);
|
||||||
if (!tmpNode2) {
|
if (!tmpNode2) {
|
||||||
UpnpPrintf(UPNP_CRITICAL, API, __FILE__,
|
UpnpPrintf(UPNP_CRITICAL, API, __FILE__,
|
||||||
__LINE__, "UDN not found!\n");
|
__LINE__, "UDN not found!\n");
|
||||||
@@ -197,13 +199,13 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
__LINE__, "UDN not found!\n");
|
__LINE__, "UDN not found!\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
strcpy(UDNstr, tmpStr);
|
strncpy(UDNstr, tmpStr, sizeof(UDNstr) - 1);
|
||||||
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
||||||
"Sending UDNStr = %s \n", UDNstr);
|
"Sending UDNStr = %s \n", UDNstr);
|
||||||
if (AdFlag) {
|
if (AdFlag) {
|
||||||
/* send the device advertisement */
|
/* send the device advertisement */
|
||||||
if (AdFlag == 1) {
|
if (AdFlag == 1) {
|
||||||
DeviceAdvertisement(devType, i == 0,
|
DeviceAdvertisement(devType, i == 0lu,
|
||||||
UDNstr,
|
UDNstr,
|
||||||
SInfo->DescURL, Exp,
|
SInfo->DescURL, Exp,
|
||||||
SInfo->DeviceAf,
|
SInfo->DeviceAf,
|
||||||
@@ -212,8 +214,8 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
SInfo->RegistrationState);
|
SInfo->RegistrationState);
|
||||||
} else {
|
} else {
|
||||||
/* AdFlag == -1 */
|
/* AdFlag == -1 */
|
||||||
DeviceShutdown(devType, i == 0, UDNstr,
|
DeviceShutdown(devType, i == 0lu, UDNstr,
|
||||||
SERVER, SInfo->DescURL,
|
SInfo->DescURL,
|
||||||
Exp, SInfo->DeviceAf,
|
Exp, SInfo->DeviceAf,
|
||||||
SInfo->PowerState,
|
SInfo->PowerState,
|
||||||
SInfo->SleepPeriod,
|
SInfo->SleepPeriod,
|
||||||
@@ -222,14 +224,14 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
} else {
|
} else {
|
||||||
switch (SearchType) {
|
switch (SearchType) {
|
||||||
case SSDP_ALL:
|
case SSDP_ALL:
|
||||||
DeviceReply(DestAddr, devType, i == 0,
|
DeviceReply(DestAddr, devType, i == 0lu,
|
||||||
UDNstr, SInfo->DescURL,
|
UDNstr, SInfo->DescURL,
|
||||||
defaultExp, SInfo->PowerState,
|
defaultExp, SInfo->PowerState,
|
||||||
SInfo->SleepPeriod,
|
SInfo->SleepPeriod,
|
||||||
SInfo->RegistrationState);
|
SInfo->RegistrationState);
|
||||||
break;
|
break;
|
||||||
case SSDP_ROOTDEVICE:
|
case SSDP_ROOTDEVICE:
|
||||||
if (i == 0) {
|
if (i == 0lu) {
|
||||||
SendReply(DestAddr, devType, 1,
|
SendReply(DestAddr, devType, 1,
|
||||||
UDNstr,
|
UDNstr,
|
||||||
SInfo->DescURL,
|
SInfo->DescURL,
|
||||||
@@ -240,7 +242,7 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SSDP_DEVICEUDN: {
|
case SSDP_DEVICEUDN: {
|
||||||
if (DeviceUDN && strlen(DeviceUDN) != 0) {
|
if (DeviceUDN && strlen(DeviceUDN) != (size_t)0) {
|
||||||
if (strcasecmp(DeviceUDN, UDNstr)) {
|
if (strcasecmp(DeviceUDN, UDNstr)) {
|
||||||
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
||||||
"DeviceUDN=%s and search UDN=%s DID NOT match\n",
|
"DeviceUDN=%s and search UDN=%s DID NOT match\n",
|
||||||
@@ -259,9 +261,9 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
case SSDP_DEVICETYPE: {
|
case SSDP_DEVICETYPE: {
|
||||||
if (!strncasecmp(DeviceType, devType, strlen(DeviceType) - 2)) {
|
if (!strncasecmp(DeviceType, devType, strlen(DeviceType) - (size_t)2)) {
|
||||||
if (atoi(strrchr(DeviceType, ':') + 1)
|
if (atoi(strrchr(DeviceType, ':') + 1)
|
||||||
< atoi(&devType[strlen(devType) - 1])) {
|
< atoi(&devType[strlen(devType) - (size_t)1])) {
|
||||||
/* the requested version is lower than the device version
|
/* the requested version is lower than the device version
|
||||||
* must reply with the lower version number and the lower
|
* must reply with the lower version number and the lower
|
||||||
* description URL */
|
* description URL */
|
||||||
@@ -274,7 +276,7 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
SInfo->SleepPeriod,
|
SInfo->SleepPeriod,
|
||||||
SInfo->RegistrationState);
|
SInfo->RegistrationState);
|
||||||
} else if (atoi(strrchr(DeviceType, ':') + 1)
|
} else if (atoi(strrchr(DeviceType, ':') + 1)
|
||||||
== atoi(&devType[strlen(devType) - 1])) {
|
== atoi(&devType[strlen(devType) - (size_t)1])) {
|
||||||
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
||||||
"DeviceType=%s and search devType=%s MATCH\n",
|
"DeviceType=%s and search devType=%s MATCH\n",
|
||||||
devType, DeviceType);
|
devType, DeviceType);
|
||||||
@@ -328,7 +330,7 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
"Service not found 3\n");
|
"Service not found 3\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (j = 0;; j++) {
|
for (j = 0lu;; j++) {
|
||||||
tmpNode = ixmlNodeList_item(nodeList, j);
|
tmpNode = ixmlNodeList_item(nodeList, j);
|
||||||
if (!tmpNode) {
|
if (!tmpNode) {
|
||||||
break;
|
break;
|
||||||
@@ -341,7 +343,7 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
"ServiceType not found \n");
|
"ServiceType not found \n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
tmpNode2 = ixmlNodeList_item(tmpNodeList, 0);
|
tmpNode2 = ixmlNodeList_item(tmpNodeList, 0lu);
|
||||||
if (!tmpNode2)
|
if (!tmpNode2)
|
||||||
continue;
|
continue;
|
||||||
textNode = ixmlNode_getFirstChild(tmpNode2);
|
textNode = ixmlNode_getFirstChild(tmpNode2);
|
||||||
@@ -351,7 +353,7 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
tmpStr = ixmlNode_getNodeValue(textNode);
|
tmpStr = ixmlNode_getNodeValue(textNode);
|
||||||
if (!tmpStr)
|
if (!tmpStr)
|
||||||
continue;
|
continue;
|
||||||
strcpy(servType, tmpStr);
|
strncpy(servType, tmpStr, sizeof(servType) - 1);
|
||||||
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
||||||
"ServiceType = %s\n", servType);
|
"ServiceType = %s\n", servType);
|
||||||
if (AdFlag) {
|
if (AdFlag) {
|
||||||
@@ -384,9 +386,9 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
break;
|
break;
|
||||||
case SSDP_SERVICE:
|
case SSDP_SERVICE:
|
||||||
if (ServiceType) {
|
if (ServiceType) {
|
||||||
if (!strncasecmp(ServiceType, servType, strlen(ServiceType) - 2)) {
|
if (!strncasecmp(ServiceType, servType, strlen(ServiceType) - (size_t)2)) {
|
||||||
if (atoi(strrchr(ServiceType, ':') + 1) <
|
if (atoi(strrchr(ServiceType, ':') + 1) <
|
||||||
atoi(&servType[strlen(servType) - 1])) {
|
atoi(&servType[strlen(servType) - (size_t)1])) {
|
||||||
/* the requested version is lower than the service version
|
/* the requested version is lower than the service version
|
||||||
* must reply with the lower version number and the lower
|
* must reply with the lower version number and the lower
|
||||||
* description URL */
|
* description URL */
|
||||||
@@ -399,7 +401,7 @@ int AdvertiseAndReply(int AdFlag, UpnpDevice_Handle Hnd,
|
|||||||
SInfo->SleepPeriod,
|
SInfo->SleepPeriod,
|
||||||
SInfo->RegistrationState);
|
SInfo->RegistrationState);
|
||||||
} else if (atoi(strrchr (ServiceType, ':') + 1) ==
|
} else if (atoi(strrchr (ServiceType, ':') + 1) ==
|
||||||
atoi(&servType[strlen(servType) - 1])) {
|
atoi(&servType[strlen(servType) - (size_t)1])) {
|
||||||
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
||||||
"ServiceType=%s and search servType=%s MATCH\n",
|
"ServiceType=%s and search servType=%s MATCH\n",
|
||||||
ServiceType, servType);
|
ServiceType, servType);
|
||||||
@@ -452,9 +454,9 @@ int unique_service_name(char *cmd, SsdpEvent *Evt)
|
|||||||
char *ptr2 = NULL;
|
char *ptr2 = NULL;
|
||||||
char *ptr3 = NULL;
|
char *ptr3 = NULL;
|
||||||
int CommandFound = 0;
|
int CommandFound = 0;
|
||||||
size_t n = 0;
|
size_t n = (size_t)0;
|
||||||
|
|
||||||
if ((TempPtr = strstr(cmd, "uuid:schemas")) != NULL) {
|
if (strstr(cmd, "uuid:schemas") != NULL) {
|
||||||
ptr1 = strstr(cmd, ":device");
|
ptr1 = strstr(cmd, ":device");
|
||||||
if (ptr1 != NULL)
|
if (ptr1 != NULL)
|
||||||
ptr2 = strstr(ptr1 + 1, ":");
|
ptr2 = strstr(ptr1 + 1, ":");
|
||||||
@@ -464,45 +466,60 @@ int unique_service_name(char *cmd, SsdpEvent *Evt)
|
|||||||
ptr3 = strstr(ptr2 + 1, ":");
|
ptr3 = strstr(ptr2 + 1, ":");
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
if (ptr3 != NULL)
|
if (ptr3 != NULL) {
|
||||||
sprintf(Evt->UDN, "uuid:%s", ptr3 + 1);
|
if (strlen("uuid:") + strlen(ptr3 + 1) >= sizeof Evt->UDN)
|
||||||
|
return -1;
|
||||||
|
snprintf(Evt->UDN, sizeof Evt->UDN, "uuid:%s", ptr3 + 1);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
ptr1 = strstr(cmd, ":");
|
ptr1 = strstr(cmd, ":");
|
||||||
if (ptr1 != NULL) {
|
if (ptr1 != NULL) {
|
||||||
n = (size_t) (ptr3 - ptr1);
|
n = (size_t)ptr3 - (size_t)ptr1;
|
||||||
|
n = n >= sizeof TempBuf ? sizeof TempBuf - 1 : n;
|
||||||
strncpy(TempBuf, ptr1, n);
|
strncpy(TempBuf, ptr1, n);
|
||||||
TempBuf[n] = '\0';
|
TempBuf[n] = '\0';
|
||||||
sprintf(Evt->DeviceType, "urn%s", TempBuf);
|
if (strlen("urn") + strlen(TempBuf) >= sizeof(Evt->DeviceType))
|
||||||
|
return -1;
|
||||||
|
snprintf(Evt->DeviceType, sizeof(Evt->DeviceType),
|
||||||
|
"urn%s", TempBuf);
|
||||||
} else
|
} else
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if ((TempPtr = strstr(cmd, "uuid")) != NULL) {
|
if ((TempPtr = strstr(cmd, "uuid")) != NULL) {
|
||||||
if ((Ptr = strstr(cmd, "::")) != NULL) {
|
if ((Ptr = strstr(cmd, "::")) != NULL) {
|
||||||
n = (size_t) (Ptr - TempPtr);
|
n = (size_t)Ptr - (size_t)TempPtr;
|
||||||
|
n = n >= sizeof Evt->UDN ? sizeof Evt->UDN - 1 : n;
|
||||||
strncpy(Evt->UDN, TempPtr, n);
|
strncpy(Evt->UDN, TempPtr, n);
|
||||||
Evt->UDN[n] = '\0';
|
Evt->UDN[n] = '\0';
|
||||||
} else
|
} else {
|
||||||
strcpy(Evt->UDN, TempPtr);
|
memset(Evt->UDN, 0, sizeof(Evt->UDN));
|
||||||
|
strncpy(Evt->UDN, TempPtr, sizeof Evt->UDN - 1);
|
||||||
|
}
|
||||||
CommandFound = 1;
|
CommandFound = 1;
|
||||||
}
|
}
|
||||||
if (strstr(cmd, "urn:") != NULL && strstr(cmd, ":service:") != NULL) {
|
if (strstr(cmd, "urn:") != NULL && strstr(cmd, ":service:") != NULL) {
|
||||||
if ((TempPtr = strstr(cmd, "urn")) != NULL) {
|
if ((TempPtr = strstr(cmd, "urn")) != NULL) {
|
||||||
strcpy(Evt->ServiceType, TempPtr);
|
memset(Evt->ServiceType, 0, sizeof Evt->ServiceType);
|
||||||
|
strncpy(Evt->ServiceType, TempPtr,
|
||||||
|
sizeof Evt->ServiceType - 1);
|
||||||
CommandFound = 1;
|
CommandFound = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (strstr(cmd, "urn:") != NULL && strstr(cmd, ":device:") != NULL) {
|
if (strstr(cmd, "urn:") != NULL && strstr(cmd, ":device:") != NULL) {
|
||||||
if ((TempPtr = strstr(cmd, "urn")) != NULL) {
|
if ((TempPtr = strstr(cmd, "urn")) != NULL) {
|
||||||
strcpy(Evt->DeviceType, TempPtr);
|
memset(Evt->DeviceType, 0, sizeof Evt->DeviceType);
|
||||||
|
strncpy(Evt->DeviceType, TempPtr,
|
||||||
|
sizeof Evt->DeviceType - 1);
|
||||||
CommandFound = 1;
|
CommandFound = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((TempPtr = strstr(cmd, "::upnp:rootdevice")) != NULL) {
|
if ((TempPtr = strstr(cmd, "::upnp:rootdevice")) != NULL) {
|
||||||
/* Everything before "::upnp::rootdevice" is the UDN. */
|
/* Everything before "::upnp::rootdevice" is the UDN. */
|
||||||
if (TempPtr != cmd) {
|
if (TempPtr != cmd) {
|
||||||
n = (size_t) (TempPtr - cmd);
|
n = (size_t)TempPtr - (size_t)cmd;
|
||||||
|
n = n >= sizeof Evt->UDN ? sizeof Evt->UDN - 1 : n;
|
||||||
strncpy(Evt->UDN, cmd, n);
|
strncpy(Evt->UDN, cmd, n);
|
||||||
Evt->UDN[n] = 0;
|
Evt->UDN[n] = 0;
|
||||||
CommandFound = 1;
|
CommandFound = 1;
|
||||||
@@ -573,14 +590,14 @@ static UPNP_INLINE int valid_ssdp_msg(
|
|||||||
memptr hdr_value;
|
memptr hdr_value;
|
||||||
|
|
||||||
/* check for valid methods - NOTIFY or M-SEARCH */
|
/* check for valid methods - NOTIFY or M-SEARCH */
|
||||||
if (hmsg->method != HTTPMETHOD_NOTIFY &&
|
if (hmsg->method != (http_method_t)HTTPMETHOD_NOTIFY &&
|
||||||
hmsg->method != HTTPMETHOD_MSEARCH &&
|
hmsg->method != (http_method_t)HTTPMETHOD_MSEARCH &&
|
||||||
hmsg->request_method != HTTPMETHOD_MSEARCH) {
|
hmsg->request_method != (http_method_t)HTTPMETHOD_MSEARCH) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (hmsg->request_method != HTTPMETHOD_MSEARCH) {
|
if (hmsg->request_method != (http_method_t)HTTPMETHOD_MSEARCH) {
|
||||||
/* check PATH == "*" */
|
/* check PATH == "*" */
|
||||||
if (hmsg->uri.type != RELATIVE ||
|
if (hmsg->uri.type != (enum uriType)RELATIVE ||
|
||||||
strncmp("*", hmsg->uri.pathquery.buff,
|
strncmp("*", hmsg->uri.pathquery.buff,
|
||||||
hmsg->uri.pathquery.size) != 0) {
|
hmsg->uri.pathquery.size) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -620,8 +637,8 @@ static UPNP_INLINE int start_event_handler(
|
|||||||
|
|
||||||
parser = &data->parser;
|
parser = &data->parser;
|
||||||
status = parser_parse(parser);
|
status = parser_parse(parser);
|
||||||
if (status == PARSE_FAILURE) {
|
if (status == (parse_status_t)PARSE_FAILURE) {
|
||||||
if (parser->msg.method != HTTPMETHOD_NOTIFY ||
|
if (parser->msg.method != (http_method_t)HTTPMETHOD_NOTIFY ||
|
||||||
!parser->valid_ssdp_notify_hack) {
|
!parser->valid_ssdp_notify_hack) {
|
||||||
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
||||||
"SSDP recvd bad msg code = %d\n", status);
|
"SSDP recvd bad msg code = %d\n", status);
|
||||||
@@ -629,7 +646,7 @@ static UPNP_INLINE int start_event_handler(
|
|||||||
goto error_handler;
|
goto error_handler;
|
||||||
}
|
}
|
||||||
/* valid notify msg */
|
/* valid notify msg */
|
||||||
} else if (status != PARSE_SUCCESS) {
|
} else if (status != (parse_status_t)PARSE_SUCCESS) {
|
||||||
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
||||||
"SSDP recvd bad msg code = %d\n", status);
|
"SSDP recvd bad msg code = %d\n", status);
|
||||||
|
|
||||||
@@ -661,8 +678,8 @@ static void ssdp_event_handler_thread(
|
|||||||
if (start_event_handler(the_data) != 0)
|
if (start_event_handler(the_data) != 0)
|
||||||
return;
|
return;
|
||||||
/* send msg to device or ctrlpt */
|
/* send msg to device or ctrlpt */
|
||||||
if (hmsg->method == HTTPMETHOD_NOTIFY ||
|
if (hmsg->method == (http_method_t)HTTPMETHOD_NOTIFY ||
|
||||||
hmsg->request_method == HTTPMETHOD_MSEARCH) {
|
hmsg->request_method == (http_method_t)HTTPMETHOD_MSEARCH) {
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
ssdp_handle_ctrlpt_msg(hmsg,
|
ssdp_handle_ctrlpt_msg(hmsg,
|
||||||
&data->dest_addr,
|
&data->dest_addr,
|
||||||
@@ -686,7 +703,9 @@ void readFromSSDPSocket(SOCKET socket)
|
|||||||
ssdp_thread_data *data = NULL;
|
ssdp_thread_data *data = NULL;
|
||||||
socklen_t socklen = sizeof(__ss);
|
socklen_t socklen = sizeof(__ss);
|
||||||
ssize_t byteReceived = 0;
|
ssize_t byteReceived = 0;
|
||||||
char ntop_buf[64];
|
char ntop_buf[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
|
memset(&job, 0, sizeof(job));
|
||||||
|
|
||||||
requestBuf = staticBuf;
|
requestBuf = staticBuf;
|
||||||
/* in case memory can't be allocated, still drain the socket using a
|
/* in case memory can't be allocated, still drain the socket using a
|
||||||
@@ -715,23 +734,28 @@ void readFromSSDPSocket(SOCKET socket)
|
|||||||
data = NULL;
|
data = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
byteReceived = recvfrom(socket, requestBuf, BUFSIZE - 1, 0,
|
byteReceived = recvfrom(socket, requestBuf, BUFSIZE - (size_t)1, 0,
|
||||||
(struct sockaddr *)&__ss, &socklen);
|
(struct sockaddr *)&__ss, &socklen);
|
||||||
if (byteReceived > 0) {
|
if (byteReceived > 0) {
|
||||||
requestBuf[byteReceived] = '\0';
|
requestBuf[byteReceived] = '\0';
|
||||||
if (__ss.ss_family == AF_INET)
|
switch (__ss.ss_family) {
|
||||||
|
case AF_INET:
|
||||||
inet_ntop(AF_INET,
|
inet_ntop(AF_INET,
|
||||||
&((struct sockaddr_in *)&__ss)->sin_addr,
|
&((struct sockaddr_in *)&__ss)->sin_addr,
|
||||||
ntop_buf, sizeof(ntop_buf));
|
ntop_buf, sizeof(ntop_buf));
|
||||||
|
break;
|
||||||
#ifdef UPNP_ENABLE_IPV6
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
else if (__ss.ss_family == AF_INET6)
|
case AF_INET6:
|
||||||
inet_ntop(AF_INET6,
|
inet_ntop(AF_INET6,
|
||||||
&((struct sockaddr_in6 *)&__ss)->sin6_addr,
|
&((struct sockaddr_in6 *)&__ss)->sin6_addr,
|
||||||
ntop_buf, sizeof(ntop_buf));
|
ntop_buf, sizeof(ntop_buf));
|
||||||
|
break;
|
||||||
#endif /* UPNP_ENABLE_IPV6 */
|
#endif /* UPNP_ENABLE_IPV6 */
|
||||||
else
|
default:
|
||||||
|
memset(ntop_buf, 0, sizeof(ntop_buf));
|
||||||
strncpy(ntop_buf, "<Invalid address family>",
|
strncpy(ntop_buf, "<Invalid address family>",
|
||||||
sizeof(ntop_buf));
|
sizeof(ntop_buf) - 1);
|
||||||
|
}
|
||||||
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
||||||
"Start of received response ----------------------------------------------------\n"
|
"Start of received response ----------------------------------------------------\n"
|
||||||
"%s\n"
|
"%s\n"
|
||||||
@@ -764,7 +788,7 @@ static int create_ssdp_sock_v4(
|
|||||||
{
|
{
|
||||||
char errorBuffer[ERROR_BUFFER_LEN];
|
char errorBuffer[ERROR_BUFFER_LEN];
|
||||||
int onOff;
|
int onOff;
|
||||||
u_char ttl = 4;
|
u_char ttl = (u_char)4;
|
||||||
struct ip_mreq ssdpMcastAddr;
|
struct ip_mreq ssdpMcastAddr;
|
||||||
struct sockaddr_storage __ss;
|
struct sockaddr_storage __ss;
|
||||||
struct sockaddr_in *ssdpAddr4 = (struct sockaddr_in *)&__ss;
|
struct sockaddr_in *ssdpAddr4 = (struct sockaddr_in *)&__ss;
|
||||||
@@ -787,12 +811,10 @@ static int create_ssdp_sock_v4(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() SO_REUSEADDR: %s\n",
|
"Error in setsockopt() SO_REUSEADDR: %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_ERROR;
|
|
||||||
}
|
}
|
||||||
#if defined(BSD) || defined(__OSX__) || defined(__APPLE__)
|
#if (defined(BSD) && !defined(__GNU__)) || defined(__OSX__) || defined(__APPLE__)
|
||||||
onOff = 1;
|
onOff = 1;
|
||||||
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_REUSEPORT,
|
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_REUSEPORT,
|
||||||
(char *)&onOff, sizeof(onOff));
|
(char *)&onOff, sizeof(onOff));
|
||||||
@@ -801,14 +823,12 @@ static int create_ssdp_sock_v4(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() SO_REUSEPORT: %s\n",
|
"Error in setsockopt() SO_REUSEPORT: %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_ERROR;
|
|
||||||
}
|
}
|
||||||
#endif /* BSD, __OSX__, __APPLE__ */
|
#endif /* BSD, __OSX__, __APPLE__ */
|
||||||
memset(&__ss, 0, sizeof(__ss));
|
memset(&__ss, 0, sizeof(__ss));
|
||||||
ssdpAddr4->sin_family = AF_INET;
|
ssdpAddr4->sin_family = (sa_family_t)AF_INET;
|
||||||
ssdpAddr4->sin_addr.s_addr = htonl(INADDR_ANY);
|
ssdpAddr4->sin_addr.s_addr = htonl(INADDR_ANY);
|
||||||
ssdpAddr4->sin_port = htons(SSDP_PORT);
|
ssdpAddr4->sin_port = htons(SSDP_PORT);
|
||||||
ret = bind(*ssdpSock, (struct sockaddr *)ssdpAddr4, sizeof(*ssdpAddr4));
|
ret = bind(*ssdpSock, (struct sockaddr *)ssdpAddr4, sizeof(*ssdpAddr4));
|
||||||
@@ -817,10 +837,8 @@ static int create_ssdp_sock_v4(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in bind(), addr=0x%08X, port=%d: %s\n",
|
"Error in bind(), addr=0x%08X, port=%d: %s\n",
|
||||||
INADDR_ANY, SSDP_PORT, errorBuffer);
|
INADDR_ANY, SSDP_PORT, errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_BIND;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_BIND;
|
|
||||||
}
|
}
|
||||||
memset((void *)&ssdpMcastAddr, 0, sizeof(struct ip_mreq));
|
memset((void *)&ssdpMcastAddr, 0, sizeof(struct ip_mreq));
|
||||||
ssdpMcastAddr.imr_interface.s_addr = inet_addr(gIF_IPV4);
|
ssdpMcastAddr.imr_interface.s_addr = inet_addr(gIF_IPV4);
|
||||||
@@ -832,10 +850,8 @@ static int create_ssdp_sock_v4(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() IP_ADD_MEMBERSHIP (join multicast group): %s\n",
|
"Error in setsockopt() IP_ADD_MEMBERSHIP (join multicast group): %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_ERROR;
|
|
||||||
}
|
}
|
||||||
/* Set multicast interface. */
|
/* Set multicast interface. */
|
||||||
memset((void *)&addr, 0, sizeof(struct in_addr));
|
memset((void *)&addr, 0, sizeof(struct in_addr));
|
||||||
@@ -850,7 +866,7 @@ static int create_ssdp_sock_v4(
|
|||||||
/* This is probably not a critical error, so let's continue. */
|
/* This is probably not a critical error, so let's continue. */
|
||||||
}
|
}
|
||||||
/* result is not checked becuase it will fail in WinMe and Win9x. */
|
/* result is not checked becuase it will fail in WinMe and Win9x. */
|
||||||
ret = setsockopt(*ssdpSock, IPPROTO_IP,
|
setsockopt(*ssdpSock, IPPROTO_IP,
|
||||||
IP_MULTICAST_TTL, &ttl, sizeof(ttl));
|
IP_MULTICAST_TTL, &ttl, sizeof(ttl));
|
||||||
onOff = 1;
|
onOff = 1;
|
||||||
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_BROADCAST,
|
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_BROADCAST,
|
||||||
@@ -860,13 +876,22 @@ static int create_ssdp_sock_v4(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() SO_BROADCAST (set broadcast): %s\n",
|
"Error in setsockopt() SO_BROADCAST (set broadcast): %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_NETWORK_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
}
|
||||||
|
ret = UPNP_E_SUCCESS;
|
||||||
|
|
||||||
return UPNP_E_NETWORK_ERROR;
|
error_handler:
|
||||||
|
if (ret != UPNP_E_SUCCESS) {
|
||||||
|
if (shutdown(*ssdpSock, SD_BOTH) == -1) {
|
||||||
|
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
||||||
|
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
||||||
|
"Error in shutdown: %s\n", errorBuffer);
|
||||||
|
}
|
||||||
|
UpnpCloseSocket(*ssdpSock);
|
||||||
}
|
}
|
||||||
|
|
||||||
return UPNP_E_SUCCESS;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
@@ -928,12 +953,10 @@ static int create_ssdp_sock_v6(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() SO_REUSEADDR: %s\n",
|
"Error in setsockopt() SO_REUSEADDR: %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_ERROR;
|
|
||||||
}
|
}
|
||||||
#if defined(BSD) || defined(__OSX__) || defined(__APPLE__)
|
#if (defined(BSD) && !defined(__GNU__)) || defined(__OSX__) || defined(__APPLE__)
|
||||||
onOff = 1;
|
onOff = 1;
|
||||||
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_REUSEPORT,
|
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_REUSEPORT,
|
||||||
(char *)&onOff, sizeof(onOff));
|
(char *)&onOff, sizeof(onOff));
|
||||||
@@ -942,14 +965,23 @@ static int create_ssdp_sock_v6(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() SO_REUSEPORT: %s\n",
|
"Error in setsockopt() SO_REUSEPORT: %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_ERROR;
|
|
||||||
}
|
}
|
||||||
#endif /* BSD, __OSX__, __APPLE__ */
|
#endif /* BSD, __OSX__, __APPLE__ */
|
||||||
|
onOff = 1;
|
||||||
|
ret = setsockopt(*ssdpSock, IPPROTO_IPV6, IPV6_V6ONLY,
|
||||||
|
(char *)&onOff, sizeof(onOff));
|
||||||
|
if (ret == -1) {
|
||||||
|
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
||||||
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
|
"Error in setsockopt() IPV6_V6ONLY: %s\n",
|
||||||
|
errorBuffer);
|
||||||
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
|
goto error_handler;
|
||||||
|
}
|
||||||
memset(&__ss, 0, sizeof(__ss));
|
memset(&__ss, 0, sizeof(__ss));
|
||||||
ssdpAddr6->sin6_family = AF_INET6;
|
ssdpAddr6->sin6_family = (sa_family_t)AF_INET6;
|
||||||
ssdpAddr6->sin6_addr = in6addr_any;
|
ssdpAddr6->sin6_addr = in6addr_any;
|
||||||
ssdpAddr6->sin6_scope_id = gIF_INDEX;
|
ssdpAddr6->sin6_scope_id = gIF_INDEX;
|
||||||
ssdpAddr6->sin6_port = htons(SSDP_PORT);
|
ssdpAddr6->sin6_port = htons(SSDP_PORT);
|
||||||
@@ -959,10 +991,8 @@ static int create_ssdp_sock_v6(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in bind(), addr=0x%032lX, port=%d: %s\n",
|
"Error in bind(), addr=0x%032lX, port=%d: %s\n",
|
||||||
0lu, SSDP_PORT, errorBuffer);
|
0lu, SSDP_PORT, errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_BIND;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_BIND;
|
|
||||||
}
|
}
|
||||||
memset((void *)&ssdpMcastAddr, 0, sizeof(ssdpMcastAddr));
|
memset((void *)&ssdpMcastAddr, 0, sizeof(ssdpMcastAddr));
|
||||||
ssdpMcastAddr.ipv6mr_interface = gIF_INDEX;
|
ssdpMcastAddr.ipv6mr_interface = gIF_INDEX;
|
||||||
@@ -975,10 +1005,8 @@ static int create_ssdp_sock_v6(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() IPV6_JOIN_GROUP (join multicast group): %s\n",
|
"Error in setsockopt() IPV6_JOIN_GROUP (join multicast group): %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_ERROR;
|
|
||||||
}
|
}
|
||||||
onOff = 1;
|
onOff = 1;
|
||||||
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_BROADCAST,
|
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_BROADCAST,
|
||||||
@@ -988,13 +1016,22 @@ static int create_ssdp_sock_v6(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() SO_BROADCAST (set broadcast): %s\n",
|
"Error in setsockopt() SO_BROADCAST (set broadcast): %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_NETWORK_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
}
|
||||||
|
ret = UPNP_E_SUCCESS;
|
||||||
|
|
||||||
return UPNP_E_NETWORK_ERROR;
|
error_handler:
|
||||||
|
if (ret != UPNP_E_SUCCESS) {
|
||||||
|
if (shutdown(*ssdpSock, SD_BOTH) == -1) {
|
||||||
|
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
||||||
|
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
||||||
|
"Error in shutdown: %s\n", errorBuffer);
|
||||||
|
}
|
||||||
|
UpnpCloseSocket(*ssdpSock);
|
||||||
}
|
}
|
||||||
|
|
||||||
return UPNP_E_SUCCESS;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif /* IPv6 */
|
#endif /* IPv6 */
|
||||||
|
|
||||||
@@ -1029,12 +1066,10 @@ static int create_ssdp_sock_v6_ula_gua(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() SO_REUSEADDR: %s\n",
|
"Error in setsockopt() SO_REUSEADDR: %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_ERROR;
|
|
||||||
}
|
}
|
||||||
#if defined(BSD) || defined(__OSX__) || defined(__APPLE__)
|
#if (defined(BSD) && !defined(__GNU__)) || defined(__OSX__) || defined(__APPLE__)
|
||||||
onOff = 1;
|
onOff = 1;
|
||||||
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_REUSEPORT,
|
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_REUSEPORT,
|
||||||
(char *)&onOff, sizeof(onOff));
|
(char *)&onOff, sizeof(onOff));
|
||||||
@@ -1043,14 +1078,23 @@ static int create_ssdp_sock_v6_ula_gua(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() SO_REUSEPORT: %s\n",
|
"Error in setsockopt() SO_REUSEPORT: %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_ERROR;
|
|
||||||
}
|
}
|
||||||
#endif /* BSD, __OSX__, __APPLE__ */
|
#endif /* BSD, __OSX__, __APPLE__ */
|
||||||
|
onOff = 1;
|
||||||
|
ret = setsockopt(*ssdpSock, IPPROTO_IPV6, IPV6_V6ONLY,
|
||||||
|
(char *)&onOff, sizeof(onOff));
|
||||||
|
if (ret == -1) {
|
||||||
|
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
||||||
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
|
"Error in setsockopt() IPV6_V6ONLY: %s\n",
|
||||||
|
errorBuffer);
|
||||||
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
|
goto error_handler;
|
||||||
|
}
|
||||||
memset(&__ss, 0, sizeof(__ss));
|
memset(&__ss, 0, sizeof(__ss));
|
||||||
ssdpAddr6->sin6_family = AF_INET6;
|
ssdpAddr6->sin6_family = (sa_family_t)AF_INET6;
|
||||||
ssdpAddr6->sin6_addr = in6addr_any;
|
ssdpAddr6->sin6_addr = in6addr_any;
|
||||||
ssdpAddr6->sin6_scope_id = gIF_INDEX;
|
ssdpAddr6->sin6_scope_id = gIF_INDEX;
|
||||||
ssdpAddr6->sin6_port = htons(SSDP_PORT);
|
ssdpAddr6->sin6_port = htons(SSDP_PORT);
|
||||||
@@ -1060,10 +1104,8 @@ static int create_ssdp_sock_v6_ula_gua(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in bind(), addr=0x%032lX, port=%d: %s\n",
|
"Error in bind(), addr=0x%032lX, port=%d: %s\n",
|
||||||
0lu, SSDP_PORT, errorBuffer);
|
0lu, SSDP_PORT, errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_BIND;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_BIND;
|
|
||||||
}
|
}
|
||||||
memset((void *)&ssdpMcastAddr, 0, sizeof(ssdpMcastAddr));
|
memset((void *)&ssdpMcastAddr, 0, sizeof(ssdpMcastAddr));
|
||||||
ssdpMcastAddr.ipv6mr_interface = gIF_INDEX;
|
ssdpMcastAddr.ipv6mr_interface = gIF_INDEX;
|
||||||
@@ -1077,10 +1119,8 @@ static int create_ssdp_sock_v6_ula_gua(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() IPV6_JOIN_GROUP (join multicast group): %s\n",
|
"Error in setsockopt() IPV6_JOIN_GROUP (join multicast group): %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_SOCKET_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
|
||||||
return UPNP_E_SOCKET_ERROR;
|
|
||||||
}
|
}
|
||||||
onOff = 1;
|
onOff = 1;
|
||||||
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_BROADCAST,
|
ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_BROADCAST,
|
||||||
@@ -1090,13 +1130,22 @@ static int create_ssdp_sock_v6_ula_gua(
|
|||||||
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
|
||||||
"Error in setsockopt() SO_BROADCAST (set broadcast): %s\n",
|
"Error in setsockopt() SO_BROADCAST (set broadcast): %s\n",
|
||||||
errorBuffer);
|
errorBuffer);
|
||||||
shutdown(*ssdpSock, SD_BOTH);
|
ret = UPNP_E_NETWORK_ERROR;
|
||||||
UpnpCloseSocket(*ssdpSock);
|
goto error_handler;
|
||||||
|
}
|
||||||
|
ret = UPNP_E_SUCCESS;
|
||||||
|
|
||||||
return UPNP_E_NETWORK_ERROR;
|
error_handler:
|
||||||
|
if (ret != UPNP_E_SUCCESS) {
|
||||||
|
if (shutdown(*ssdpSock, SD_BOTH) == -1) {
|
||||||
|
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
||||||
|
UpnpPrintf(UPNP_INFO, SSDP, __FILE__, __LINE__,
|
||||||
|
"Error in shutdown: %s\n", errorBuffer);
|
||||||
|
}
|
||||||
|
UpnpCloseSocket(*ssdpSock);
|
||||||
}
|
}
|
||||||
|
|
||||||
return UPNP_E_SUCCESS;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif /* IPv6 */
|
#endif /* IPv6 */
|
||||||
|
|
||||||
@@ -1139,7 +1188,7 @@ int get_ssdp_sockets(MiniServerSockArray * out)
|
|||||||
out->ssdpReqSock4 = INVALID_SOCKET;
|
out->ssdpReqSock4 = INVALID_SOCKET;
|
||||||
out->ssdpReqSock6 = INVALID_SOCKET;
|
out->ssdpReqSock6 = INVALID_SOCKET;
|
||||||
/* Create the IPv4 socket for SSDP REQUESTS */
|
/* Create the IPv4 socket for SSDP REQUESTS */
|
||||||
if (strlen(gIF_IPV4) > 0) {
|
if (strlen(gIF_IPV4) > (size_t)0) {
|
||||||
retVal = create_ssdp_sock_reqv4(&out->ssdpReqSock4);
|
retVal = create_ssdp_sock_reqv4(&out->ssdpReqSock4);
|
||||||
if (retVal != UPNP_E_SUCCESS)
|
if (retVal != UPNP_E_SUCCESS)
|
||||||
return retVal;
|
return retVal;
|
||||||
@@ -1149,7 +1198,7 @@ int get_ssdp_sockets(MiniServerSockArray * out)
|
|||||||
out->ssdpReqSock4 = INVALID_SOCKET;
|
out->ssdpReqSock4 = INVALID_SOCKET;
|
||||||
/* Create the IPv6 socket for SSDP REQUESTS */
|
/* Create the IPv6 socket for SSDP REQUESTS */
|
||||||
#ifdef UPNP_ENABLE_IPV6
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
if (strlen(gIF_IPV6) > 0) {
|
if (strlen(gIF_IPV6) > (size_t)0) {
|
||||||
retVal = create_ssdp_sock_reqv6(&out->ssdpReqSock6);
|
retVal = create_ssdp_sock_reqv6(&out->ssdpReqSock6);
|
||||||
if (retVal != UPNP_E_SUCCESS) {
|
if (retVal != UPNP_E_SUCCESS) {
|
||||||
shutdown(out->ssdpReqSock4, SD_BOTH);
|
shutdown(out->ssdpReqSock4, SD_BOTH);
|
||||||
@@ -1163,7 +1212,7 @@ int get_ssdp_sockets(MiniServerSockArray * out)
|
|||||||
#endif /* IPv6 */
|
#endif /* IPv6 */
|
||||||
#endif /* INCLUDE_CLIENT_APIS */
|
#endif /* INCLUDE_CLIENT_APIS */
|
||||||
/* Create the IPv4 socket for SSDP */
|
/* Create the IPv4 socket for SSDP */
|
||||||
if (strlen(gIF_IPV4) > 0) {
|
if (strlen(gIF_IPV4) > (size_t)0) {
|
||||||
retVal = create_ssdp_sock_v4(&out->ssdpSock4);
|
retVal = create_ssdp_sock_v4(&out->ssdpSock4);
|
||||||
if (retVal != UPNP_E_SUCCESS) {
|
if (retVal != UPNP_E_SUCCESS) {
|
||||||
#ifdef INCLUDE_CLIENT_APIS
|
#ifdef INCLUDE_CLIENT_APIS
|
||||||
@@ -1178,7 +1227,7 @@ int get_ssdp_sockets(MiniServerSockArray * out)
|
|||||||
out->ssdpSock4 = INVALID_SOCKET;
|
out->ssdpSock4 = INVALID_SOCKET;
|
||||||
/* Create the IPv6 socket for SSDP */
|
/* Create the IPv6 socket for SSDP */
|
||||||
#ifdef UPNP_ENABLE_IPV6
|
#ifdef UPNP_ENABLE_IPV6
|
||||||
if (strlen(gIF_IPV6) > 0) {
|
if (strlen(gIF_IPV6) > (size_t)0) {
|
||||||
retVal = create_ssdp_sock_v6(&out->ssdpSock6);
|
retVal = create_ssdp_sock_v6(&out->ssdpSock6);
|
||||||
if (retVal != UPNP_E_SUCCESS) {
|
if (retVal != UPNP_E_SUCCESS) {
|
||||||
shutdown(out->ssdpSock4, SD_BOTH);
|
shutdown(out->ssdpSock4, SD_BOTH);
|
||||||
@@ -1193,7 +1242,7 @@ int get_ssdp_sockets(MiniServerSockArray * out)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
out->ssdpSock6 = INVALID_SOCKET;
|
out->ssdpSock6 = INVALID_SOCKET;
|
||||||
if (strlen(gIF_IPV6_ULA_GUA) > 0) {
|
if (strlen(gIF_IPV6_ULA_GUA) > (size_t)0) {
|
||||||
retVal = create_ssdp_sock_v6_ula_gua(&out->ssdpSock6UlaGua);
|
retVal = create_ssdp_sock_v6_ula_gua(&out->ssdpSock6UlaGua);
|
||||||
if (retVal != UPNP_E_SUCCESS) {
|
if (retVal != UPNP_E_SUCCESS) {
|
||||||
shutdown(out->ssdpSock4, SD_BOTH);
|
shutdown(out->ssdpSock4, SD_BOTH);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -49,41 +50,55 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#define snprintf _snprintf
|
||||||
#else
|
#else
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef INCLUDE_DEVICE_APIS
|
||||||
|
#ifdef INTERNAL_WEB_SERVER
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Function : addrToString
|
* Function : addrToString
|
||||||
*
|
*
|
||||||
* Parameters :
|
* Parameters :
|
||||||
* IN const struct sockaddr* addr ; socket address object with
|
* IN const struct sockaddr* addr ; socket address object with
|
||||||
* the IP Address and port information
|
* the IP Address and port information
|
||||||
* OUT char ipaddr_port[] ; character array which will hold the
|
* OUT char ipaddr_port ; character array which will hold the
|
||||||
* IP Address in a string format.
|
* IP Address in a string format.
|
||||||
|
* IN size_t ipaddr_port_size ; ipaddr_port buffer size
|
||||||
*
|
*
|
||||||
* Description : Converts an Internet address to a string and stores it
|
* Description : Converts an Internet address to a string and stores it
|
||||||
* a buffer.
|
* a buffer.
|
||||||
*
|
*
|
||||||
* Return : void ;
|
* Return : int ;
|
||||||
|
* UPNP_E_SUCCESS - On Success.
|
||||||
|
* UPNP_E_BUFFER_TOO_SMALL - Given buffer doesn't have enough size.
|
||||||
*
|
*
|
||||||
* Note :
|
* Note :
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static UPNP_INLINE void
|
static UPNP_INLINE int
|
||||||
addrToString( IN const struct sockaddr *addr,
|
addrToString( IN const struct sockaddr *addr,
|
||||||
OUT char ipaddr_port[] )
|
OUT char *ipaddr_port,
|
||||||
|
IN size_t ipaddr_port_size )
|
||||||
{
|
{
|
||||||
char buf_ntop[64];
|
char buf_ntop[INET6_ADDRSTRLEN];
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
if( addr->sa_family == AF_INET ) {
|
if( addr->sa_family == AF_INET ) {
|
||||||
struct sockaddr_in* sa4 = (struct sockaddr_in*)addr;
|
struct sockaddr_in* sa4 = (struct sockaddr_in*)addr;
|
||||||
inet_ntop(AF_INET, &sa4->sin_addr, buf_ntop, sizeof(buf_ntop) );
|
inet_ntop(AF_INET, &sa4->sin_addr, buf_ntop, sizeof(buf_ntop) );
|
||||||
sprintf( ipaddr_port, "%s:%d", buf_ntop, ntohs( sa4->sin_port ) );
|
rc = snprintf( ipaddr_port, ipaddr_port_size, "%s:%d", buf_ntop,
|
||||||
|
(int)ntohs( sa4->sin_port ) );
|
||||||
} else if( addr->sa_family == AF_INET6 ) {
|
} else if( addr->sa_family == AF_INET6 ) {
|
||||||
struct sockaddr_in6* sa6 = (struct sockaddr_in6*)addr;
|
struct sockaddr_in6* sa6 = (struct sockaddr_in6*)addr;
|
||||||
inet_ntop(AF_INET6, &sa6->sin6_addr, buf_ntop, sizeof(buf_ntop) );
|
inet_ntop(AF_INET6, &sa6->sin6_addr, buf_ntop, sizeof(buf_ntop) );
|
||||||
sprintf( ipaddr_port, "[%s]:%d", buf_ntop, ntohs( sa6->sin6_port ) );
|
rc = snprintf( ipaddr_port, ipaddr_port_size, "[%s]:%d", buf_ntop,
|
||||||
|
(int)ntohs( sa6->sin6_port ) );
|
||||||
}
|
}
|
||||||
|
if (rc < 0 || (unsigned int) rc >= ipaddr_port_size)
|
||||||
|
return UPNP_E_BUFFER_TOO_SMALL;
|
||||||
|
return UPNP_E_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
@@ -128,13 +143,12 @@ static UPNP_INLINE int calc_alias(
|
|||||||
aliasPtr = alias + 1;
|
aliasPtr = alias + 1;
|
||||||
else
|
else
|
||||||
aliasPtr = alias;
|
aliasPtr = alias;
|
||||||
new_alias_len = root_len + strlen(temp_str) + strlen(aliasPtr);
|
new_alias_len = root_len + strlen(temp_str) + strlen(aliasPtr) + (size_t)1;
|
||||||
alias_temp = malloc(new_alias_len + 1);
|
alias_temp = malloc(new_alias_len);
|
||||||
if (alias_temp == NULL)
|
if (alias_temp == NULL)
|
||||||
return UPNP_E_OUTOF_MEMORY;
|
return UPNP_E_OUTOF_MEMORY;
|
||||||
strcpy(alias_temp, rootPath);
|
memset(alias_temp, 0, new_alias_len);
|
||||||
strcat(alias_temp, temp_str);
|
snprintf(alias_temp, new_alias_len, "%s%s%s", rootPath, temp_str, aliasPtr);
|
||||||
strcat(alias_temp, aliasPtr);
|
|
||||||
|
|
||||||
*newAlias = alias_temp;
|
*newAlias = alias_temp;
|
||||||
return UPNP_E_SUCCESS;
|
return UPNP_E_SUCCESS;
|
||||||
@@ -169,12 +183,10 @@ static UPNP_INLINE int calc_descURL(
|
|||||||
assert(ipPortStr != NULL && strlen(ipPortStr) > 0);
|
assert(ipPortStr != NULL && strlen(ipPortStr) > 0);
|
||||||
assert(alias != NULL && strlen(alias) > 0);
|
assert(alias != NULL && strlen(alias) > 0);
|
||||||
|
|
||||||
len = strlen(http_scheme) + strlen(ipPortStr) + strlen(alias);
|
len = strlen(http_scheme) + strlen(ipPortStr) + strlen(alias) + (size_t)1;
|
||||||
if (len > (LINE_SIZE - 1))
|
if (len > (size_t)LINE_SIZE)
|
||||||
return UPNP_E_URL_TOO_BIG;
|
return UPNP_E_URL_TOO_BIG;
|
||||||
strcpy(descURL, http_scheme);
|
snprintf(descURL, len, "%s%s%s", http_scheme, ipPortStr, alias);
|
||||||
strcat(descURL, ipPortStr);
|
|
||||||
strcat(descURL, alias);
|
|
||||||
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__,
|
||||||
"desc url: %s\n", descURL);
|
"desc url: %s\n", descURL);
|
||||||
|
|
||||||
@@ -211,10 +223,8 @@ static int config_description_doc(
|
|||||||
IN const char *ip_str,
|
IN const char *ip_str,
|
||||||
OUT char **root_path_str )
|
OUT char **root_path_str )
|
||||||
{
|
{
|
||||||
int addNew = FALSE;
|
|
||||||
IXML_NodeList *baseList;
|
IXML_NodeList *baseList;
|
||||||
IXML_Element *element = NULL;
|
IXML_Element *element = NULL;
|
||||||
IXML_Element *newElement = NULL;
|
|
||||||
IXML_Node *textNode = NULL;
|
IXML_Node *textNode = NULL;
|
||||||
IXML_Node *rootNode = NULL;
|
IXML_Node *rootNode = NULL;
|
||||||
IXML_Node *urlbase_node = NULL;
|
IXML_Node *urlbase_node = NULL;
|
||||||
@@ -232,7 +242,6 @@ static int config_description_doc(
|
|||||||
baseList = ixmlDocument_getElementsByTagName(doc, urlBaseStr);
|
baseList = ixmlDocument_getElementsByTagName(doc, urlBaseStr);
|
||||||
if (baseList == NULL) {
|
if (baseList == NULL) {
|
||||||
/* urlbase not found -- create new one */
|
/* urlbase not found -- create new one */
|
||||||
addNew = TRUE;
|
|
||||||
element = ixmlDocument_createElement(doc, urlBaseStr);
|
element = ixmlDocument_createElement(doc, urlBaseStr);
|
||||||
if (element == NULL) {
|
if (element == NULL) {
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
@@ -251,6 +260,7 @@ static int config_description_doc(
|
|||||||
err_code =
|
err_code =
|
||||||
ixmlNode_appendChild(rootNode, (IXML_Node *) element);
|
ixmlNode_appendChild(rootNode, (IXML_Node *) element);
|
||||||
if (err_code != IXML_SUCCESS) {
|
if (err_code != IXML_SUCCESS) {
|
||||||
|
err_code = UPNP_E_INVALID_DESC;
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
}
|
}
|
||||||
textNode =
|
textNode =
|
||||||
@@ -261,11 +271,12 @@ static int config_description_doc(
|
|||||||
err_code =
|
err_code =
|
||||||
ixmlNode_appendChild((IXML_Node *) element, textNode);
|
ixmlNode_appendChild((IXML_Node *) element, textNode);
|
||||||
if (err_code != IXML_SUCCESS) {
|
if (err_code != IXML_SUCCESS) {
|
||||||
|
err_code = UPNP_E_INTERNAL_ERROR;
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* urlbase found */
|
/* urlbase found */
|
||||||
urlbase_node = ixmlNodeList_item(baseList, 0);
|
urlbase_node = ixmlNodeList_item(baseList, 0lu);
|
||||||
assert(urlbase_node != NULL);
|
assert(urlbase_node != NULL);
|
||||||
textNode = ixmlNode_getFirstChild(urlbase_node);
|
textNode = ixmlNode_getFirstChild(urlbase_node);
|
||||||
if (textNode == NULL) {
|
if (textNode == NULL) {
|
||||||
@@ -305,12 +316,13 @@ static int config_description_doc(
|
|||||||
}
|
}
|
||||||
/* add trailing '/' if missing */
|
/* add trailing '/' if missing */
|
||||||
if (url_str.buf[url_str.length - 1] != '/') {
|
if (url_str.buf[url_str.length - 1] != '/') {
|
||||||
if (membuffer_append(&url_str, "/", 1) != 0) {
|
if (membuffer_append(&url_str, "/", (size_t)1) != 0) {
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err_code = ixmlNode_setNodeValue(textNode, url_str.buf);
|
err_code = ixmlNode_setNodeValue(textNode, url_str.buf);
|
||||||
if (err_code != IXML_SUCCESS) {
|
if (err_code != IXML_SUCCESS) {
|
||||||
|
err_code = UPNP_E_OUTOF_MEMORY;
|
||||||
goto error_handler;
|
goto error_handler;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -319,7 +331,7 @@ static int config_description_doc(
|
|||||||
|
|
||||||
error_handler:
|
error_handler:
|
||||||
if (err_code != UPNP_E_SUCCESS) {
|
if (err_code != UPNP_E_SUCCESS) {
|
||||||
ixmlElement_free(newElement);
|
ixmlElement_free(element);
|
||||||
}
|
}
|
||||||
ixmlNodeList_free(baseList);
|
ixmlNodeList_free(baseList);
|
||||||
membuffer_destroy(&root_path);
|
membuffer_destroy(&root_path);
|
||||||
@@ -371,10 +383,11 @@ configure_urlbase( INOUT IXML_Document * doc,
|
|||||||
int err_code;
|
int err_code;
|
||||||
char ipaddr_port[LINE_SIZE];
|
char ipaddr_port[LINE_SIZE];
|
||||||
|
|
||||||
err_code = UPNP_E_OUTOF_MEMORY; /* default error */
|
|
||||||
|
|
||||||
/* get IP address and port */
|
/* get IP address and port */
|
||||||
addrToString( serverAddr, ipaddr_port );
|
err_code = addrToString( serverAddr, ipaddr_port, sizeof(ipaddr_port) );
|
||||||
|
if ( err_code != UPNP_E_SUCCESS ) {
|
||||||
|
goto error_handler;
|
||||||
|
}
|
||||||
|
|
||||||
/* config url-base in 'doc' */
|
/* config url-base in 'doc' */
|
||||||
err_code = config_description_doc( doc, ipaddr_port, &root_path );
|
err_code = config_description_doc( doc, ipaddr_port, &root_path );
|
||||||
@@ -415,3 +428,5 @@ error_handler:
|
|||||||
}
|
}
|
||||||
return err_code;
|
return err_code;
|
||||||
}
|
}
|
||||||
|
#endif /* INCLUDE_DEVICE_APIS */
|
||||||
|
#endif /* INTERNAL_WEB_SERVER */
|
||||||
|
|||||||
131
upnp/test/test_url.c
Normal file
131
upnp/test/test_url.c
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "upnp.h"
|
||||||
|
#include "upnptools.h"
|
||||||
|
|
||||||
|
struct test {
|
||||||
|
const char *base;
|
||||||
|
const char *rel;
|
||||||
|
const char *expect;
|
||||||
|
int line;
|
||||||
|
int error;
|
||||||
|
};
|
||||||
|
#define TEST(BaseURL, RelURL, expect, ...) {BaseURL, RelURL, expect, __LINE__, ##__VA_ARGS__}
|
||||||
|
|
||||||
|
static int
|
||||||
|
result(const struct test *test)
|
||||||
|
{
|
||||||
|
char *absurl = NULL;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
ret = UpnpResolveURL2(test->base, test->rel, &absurl);
|
||||||
|
if (ret == test->error && (test->expect == NULL || strcmp(test->expect, absurl) == 0)) {
|
||||||
|
ret = 0;
|
||||||
|
} else {
|
||||||
|
printf("%s:%d: '%s' | '%s' -> '%s' != '%s' (%d)\n", __FILE__, test->line, test->base, test->rel, absurl, test->expect, ret);
|
||||||
|
ret = 1;
|
||||||
|
}
|
||||||
|
free(absurl);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The URLs must be resolvale! */
|
||||||
|
static const char ABS_URL1[] = "http://www.libupnp.org/path1/";
|
||||||
|
static const char ABS_URL2[] = "http://www.libupnp.org/path1/path1";
|
||||||
|
static const char ABS_URL3[] = "http://localhost/path1/";
|
||||||
|
static const char ABS_URL4[] = "http://127.0.0.1/path1/";
|
||||||
|
static const char ABS_URL5[] = "http://127.0.0.1:6544/path1/";
|
||||||
|
static const char ABS_URL6[] = "http://[::1]:6544/path1/";
|
||||||
|
|
||||||
|
static const char REL_URL1[] = "//localhost/path2";
|
||||||
|
static const char REL_URL2[] = "/path3";
|
||||||
|
static const char REL_URL3[] = "path4";
|
||||||
|
static const char REL_URL4[] = "../path5";
|
||||||
|
static const char REL_URL5[] = "?query1";
|
||||||
|
static const char REL_URL6[] = "#frag1";
|
||||||
|
|
||||||
|
static const char ABS_RFC[] = "http://localhost/b/c/d;p?q";
|
||||||
|
// s,\<a\>,localhost,
|
||||||
|
// s,//g\>,//127.0.0.1,
|
||||||
|
|
||||||
|
static const struct test RFC3986[] = {
|
||||||
|
// Errors
|
||||||
|
TEST(NULL, NULL, NULL, UPNP_E_INVALID_PARAM),
|
||||||
|
TEST(ABS_URL1, NULL, NULL, UPNP_E_INVALID_PARAM),
|
||||||
|
TEST("foo", "bar", NULL, UPNP_E_INVALID_URL),
|
||||||
|
// Custom
|
||||||
|
TEST(NULL, ABS_URL1, ABS_URL1),
|
||||||
|
TEST(ABS_URL1, ABS_URL2, ABS_URL2),
|
||||||
|
TEST(ABS_URL1, "", ABS_URL1),
|
||||||
|
TEST(ABS_URL1, REL_URL1, "http://localhost/path2"),
|
||||||
|
TEST(ABS_URL2, REL_URL1, "http://localhost/path2"),
|
||||||
|
TEST(ABS_URL1, REL_URL2, "http://www.libupnp.org/path3"),
|
||||||
|
TEST(ABS_URL2, REL_URL2, "http://www.libupnp.org/path3"),
|
||||||
|
TEST(ABS_URL1, REL_URL3, "http://www.libupnp.org/path1/path4"),
|
||||||
|
TEST(ABS_URL2, REL_URL3, "http://www.libupnp.org/path1/path4"),
|
||||||
|
TEST(ABS_URL1, REL_URL4, "http://www.libupnp.org/path5"),
|
||||||
|
TEST(ABS_URL2, REL_URL4, "http://www.libupnp.org/path5"),
|
||||||
|
TEST(ABS_URL1, REL_URL6, "http://www.libupnp.org/path1/#frag1"),
|
||||||
|
TEST(ABS_URL2, REL_URL6, "http://www.libupnp.org/path1/path1#frag1"),
|
||||||
|
TEST("http://127.0.0.1:6544/getDeviceDesc", "CDS_Event", "http://127.0.0.1:6544/CDS_Event"),
|
||||||
|
// <http://tools.ietf.org/html/rfc3986#section-5.4.1> Normal Examples
|
||||||
|
TEST(ABS_RFC, "g:h", "g:h"),
|
||||||
|
TEST(ABS_RFC, "g", "http://localhost/b/c/g"),
|
||||||
|
TEST(ABS_RFC, "./g", "http://localhost/b/c/g"),
|
||||||
|
TEST(ABS_RFC, "g/", "http://localhost/b/c/g/"),
|
||||||
|
TEST(ABS_RFC, "/g", "http://localhost/g"),
|
||||||
|
TEST(ABS_RFC, "//127.0.0.1", "http://127.0.0.1"),
|
||||||
|
TEST(ABS_RFC, "?y", "http://localhost/b/c/d;p?y"),
|
||||||
|
TEST(ABS_RFC, "g?y", "http://localhost/b/c/g?y"),
|
||||||
|
TEST(ABS_RFC, "#s", "http://localhost/b/c/d;p?q#s"),
|
||||||
|
TEST(ABS_RFC, "g#s", "http://localhost/b/c/g#s"),
|
||||||
|
TEST(ABS_RFC, "g?y#s", "http://localhost/b/c/g?y#s"),
|
||||||
|
TEST(ABS_RFC, ";x", "http://localhost/b/c/;x"),
|
||||||
|
TEST(ABS_RFC, "g;x", "http://localhost/b/c/g;x"),
|
||||||
|
TEST(ABS_RFC, "g;x?y#s", "http://localhost/b/c/g;x?y#s"),
|
||||||
|
TEST(ABS_RFC, "", "http://localhost/b/c/d;p?q"),
|
||||||
|
TEST(ABS_RFC, ".", "http://localhost/b/c/"),
|
||||||
|
TEST(ABS_RFC, "./", "http://localhost/b/c/"),
|
||||||
|
TEST(ABS_RFC, "..", "http://localhost/b/"),
|
||||||
|
TEST(ABS_RFC, "../", "http://localhost/b/"),
|
||||||
|
TEST(ABS_RFC, "../g", "http://localhost/b/g"),
|
||||||
|
TEST(ABS_RFC, "../..", "http://localhost/"),
|
||||||
|
TEST(ABS_RFC, "../../", "http://localhost/"),
|
||||||
|
TEST(ABS_RFC, "../../g", "http://localhost/g"),
|
||||||
|
// <http://tools.ietf.org/html/rfc3986#section-5.4.2> Abnormal Examples
|
||||||
|
TEST(ABS_RFC, "../../../g", "http://localhost/g"),
|
||||||
|
TEST(ABS_RFC, "../../../../g", "http://localhost/g"),
|
||||||
|
TEST(ABS_RFC, "/./g", "http://localhost/g"),
|
||||||
|
TEST(ABS_RFC, "/../g", "http://localhost/g"),
|
||||||
|
TEST(ABS_RFC, "g.", "http://localhost/b/c/g."),
|
||||||
|
TEST(ABS_RFC, ".g", "http://localhost/b/c/.g"),
|
||||||
|
TEST(ABS_RFC, "g..", "http://localhost/b/c/g.."),
|
||||||
|
TEST(ABS_RFC, "..g", "http://localhost/b/c/..g"),
|
||||||
|
TEST(ABS_RFC, "./../g", "http://localhost/b/g"),
|
||||||
|
TEST(ABS_RFC, "./g/.", "http://localhost/b/c/g/"),
|
||||||
|
TEST(ABS_RFC, "g/./h", "http://localhost/b/c/g/h"),
|
||||||
|
TEST(ABS_RFC, "g/../h", "http://localhost/b/c/h"),
|
||||||
|
TEST(ABS_RFC, "g;x=1/./y", "http://localhost/b/c/g;x=1/y"),
|
||||||
|
TEST(ABS_RFC, "g;x=1/../y", "http://localhost/b/c/y"),
|
||||||
|
TEST(ABS_RFC, "g?y/./x", "http://localhost/b/c/g?y/./x"),
|
||||||
|
TEST(ABS_RFC, "g?y/../x", "http://localhost/b/c/g?y/../x"),
|
||||||
|
TEST(ABS_RFC, "g#s/./x", "http://localhost/b/c/g#s/./x"),
|
||||||
|
TEST(ABS_RFC, "g#s/../x", "http://localhost/b/c/g#s/../x"),
|
||||||
|
TEST(ABS_RFC, "http:g", "http:g"),
|
||||||
|
};
|
||||||
|
#define ARRAY_SIZE(a) (sizeof (a) / sizeof *(a))
|
||||||
|
|
||||||
|
int
|
||||||
|
main (int argc, char* argv[])
|
||||||
|
{
|
||||||
|
int i, ret = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(RFC3986); i++)
|
||||||
|
ret += result(&RFC3986[i]);
|
||||||
|
|
||||||
|
exit (ret ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
// gcc -o url-test -g url-test.c -I ixml/inc -I threadutil/inc -I upnp/inc upnp/.libs/libupnp.a -L ixml/.libs -lixml -L threadutil/.libs -lthreadutil -lpthread
|
||||||
Reference in New Issue
Block a user