Compare commits

..

259 Commits

Author SHA1 Message Date
Marcelo Roberto Jimenez
bc335f5df7 Bug tracker #124 Build fails with --enable-debug
Build environment
Fedora 21
X86-64
gcc 4.9.2

how to repeat
$ ./configure --enable debug
$ make
libtool: compile: gcc -dhave_config_h -i. -i.. -i../upnp/inc -i./inc
-i../threadutil/inc
-i../ixml/inc -i./src/inc -pthread -g -o2 -wall -mt
src/api/libupnp_la-upnpstring.lo
-md -mp -mf src/api/.deps/libupnp_la-upnpstring.tpo -c
src/api/upnpstring.c
-fpic -dpic -o src/api .libs/libupnp_la-upnpstring.o
src/api/UpnpString.c:47:16:
error: expected identifier or '(' before 'extension'
extern char *strndup(const char *string, size_t __n);
^
Makefile:1016: recipe for target 'src/api/libupnp_la-UpnpString.lo'
failed

Reason for failure
Build enables -O2 optimization flags which causes the inclusion of a
macro implementation of strndup from include/bits/string2.h.

Workarounds
Disable optimization when configuring or making:
$ configure CFLAGS='-g -pthread -O0' --enable-debug
$ make
or
$ configure --enable-debug
$ make CFLAGS='-g -pthread -O0' Define NO_STRING_INLINES
$ export CFLAGS="-DNO_STRING_INLINES -O2"
$ ./configure --enagble-debug
$ make

Fix
* Don't declare strndup in src/api/UpnpString.c if it exists
2015-02-04 22:34:08 -02:00
Marcelo Roberto Jimenez
cf31814e55 Looks like I did something wrong two commits ago 2015-02-04 22:25:15 -02:00
Marcelo Roberto Jimenez
3b0fd070fd Update .gitignore 2015-02-04 22:18:23 -02:00
Marcelo Roberto Jimenez
9f69fb1b80 _LARGEFILE_SOURCE definition has changed in the last autotools 2015-02-01 22:31:30 -02:00
Jean-Francois Dockes
c124ae6507 Fix out-of-tree compilation: missing include directive and build
subdirectory

Out-of-tree builds seem to be currently broken, because ixml and
threadutil files need an include path to include UpnpGlobal.h, and
configure tries to copy files into a directory which it does not create.
The patch fixes both issues.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2015-02-01 22:27:39 -02:00
Nick Leverton
51a01cdba1 Adjust NUM_MEDIA_TYPES to allow for the addition of css in commit 72460df7. 2014-10-02 20:34:58 +01:00
Marcelo Jimenez
6905714a7e Update the THANKS file
Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-26 13:59:38 -03:00
Dirk
72460df747 #121 Support css files in webserver
Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-26 13:49:43 -03:00
Philipp Matthias Hahn
a596abfbe3 Add unit test for parse_uri()
Tested through the public function UpnpResolveURL2().

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:59:04 -03:00
Philipp Matthias Hahn
fbbb24f406 Fix remove_dots()
Rewrite to handle all normal and abnormal examples mentioned in RFC 3986
section 5.4.
The previous implementation failed the following test cases:

'http://www.libupnp.org/path1/path1' | '#frag1' -> 'http://www.libupnp.org/path1/#frag1' != 'http://www.libupnp.org/path1/path1#frag1' (0)
'http://127.0.0.1:6544/getDeviceDesc' | 'CDS_Event' -> 'http://127.0.0.1:6544/CDS_EventDesc' != 'http://127.0.0.1:6544/CDS_Event' (0)
'http://localhost/b/c/d;p?q' | 'g' -> 'http://localhost/b/c/g;p' != 'http://localhost/b/c/g' (0)
'http://localhost/b/c/d;p?q' | 'g/' -> 'http://localhost/b/c/g/p' != 'http://localhost/b/c/g/' (0)
'http://localhost/b/c/d;p?q' | '?y' -> 'http://localhost/b/c/?yp' != 'http://localhost/b/c/d;p?y' (0)
'http://localhost/b/c/d;p?q' | '#s' -> 'http://localhost/b/c/#sp' != 'http://localhost/b/c/d;p?q#s' (0)
'http://localhost/b/c/d;p?q' | ';x' -> 'http://localhost/b/c/;xp' != 'http://localhost/b/c/;x' (0)
'http://localhost/b/c/d;p?q' | '.' -> 'http://localhost/b/c/.;p' != 'http://localhost/b/c/' (0)
'http://localhost/b/c/d;p?q' | './' -> 'http://localhost/b/c/p' != 'http://localhost/b/c/' (0)
'http://localhost/b/c/d;p?q' | '..' -> 'http://localhost/b/c/..p' != 'http://localhost/b/' (0)
'http://localhost/b/c/d;p?q' | '/./g' -> 'http://localhost/./g' != 'http://localhost/g' (0)
'http://localhost/b/c/d;p?q' | '/../g' -> 'http://localhost/../g' != 'http://localhost/g' (0)
'http://localhost/b/c/d;p?q' | 'g.' -> 'http://localhost/b/c/g.p' != 'http://localhost/b/c/g.' (0)
'http://localhost/b/c/d;p?q' | '.g' -> 'http://localhost/b/c/.gp' != 'http://localhost/b/c/.g' (0)

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:59:04 -03:00
Philipp Matthias Hahn
0508fb0d6e Fix resolve_rel_url()
This reworks commit 0edaf3361d, which
broke resolving relative url, where the relative URL is shorter than the
absolute URL:
    "http://127.0.0.1:6544/getDeviceDesc" + "CDS_Event"
    Wrong: "http://127.0.0.1:6544/CDS_EventDesc"
    Right: "http://127.0.0.1:6544/CDS_Event"

While reviewing that commit, improve code by:
1. Move the simple cases to the beginning of the function.
2. Keep track of the remaining target buffer size.
3. Fix URI concatenation with queries.
4. Fix URI concatenation with fragments.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:19:25 -03:00
Philipp Matthias Hahn
848d66e69d Fix broken strncat(..., strlen())
commit 0edaf3361d replaced several
malloc()+strcat() sequences with strncat() using strlen() on the
*source* string.
This is still vulnerable to overwrite the *target* buffer.

While reviewing this commit change the code to directly use snprintf()
for concatenating strings and check the length of the target buffer.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:19:25 -03:00
Philipp Matthias Hahn
04fb684323 Directly use strdup()
commit 0edaf3361d replaced several
malloc()+strcpy() sequences with memset()+strncpy() using strlen().
This doesn't improve security and introduced a bug URI handling.

While reviewing this commit change the code to directly use strdup()
instead of re-implementing it multiple times, as shortens the code and
thus improves readability.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:19:25 -03:00
Fabrice Fontaine
faaef39a3c Fix getaddrinfo() loop
Commit b116d10f did the following change:
    Use switch, int and sa_family_t with AF_INET in uri.c.

This breaks when getaddrinfo() only returns a single record, as in that
case the "break" only exits the switch statement and the loop-step
"res=res->ai_next" is still executed. After that "res == NULL" is
wrongly interpreted as not having found an AF_INET or AF_INET6 address.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-09-22 11:19:25 -03:00
Peng
a1193f385e rewrite soap_device.c
1) separate HTTP handling from SOAP handling
2) remove repeated validity check, each check is performed exactly once
3) fix HTTP status code per UPnP spec, SOAP spec and RFC 2774

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2014-01-17 10:00:00 -02:00
Marcelo Roberto Jimenez
c20f2bd3a1 Homekeeping for the next release. 2013-11-15 14:16:13 -02:00
Marcelo Roberto Jimenez
3fc0f9ad1d Adjust the library numbers for release. 2013-11-15 14:10:05 -02:00
Marcelo Roberto Jimenez
2211cc14e6 Access violation due to changed usage of pthreads-win32
SF Bug Tracker #119, Creator: Klaus Fischer

Dear libupnp developers,

I have experienced a crash (access violation) when using libupnp on
Windows. The crash is actually located in pthreads-win32 and happens
when repeatedly de-/initializing libupnp on Win32 in the same process
and both libupnp and pthreads-win32 are compiled as static libraries.

So I'm doing this:
- UpnpInit()
- UpnpFinish()
- UpnpInit() <- Crash

I am already in touch with Ross Johnson on the pthreads-win32 mailing
list regarding this issue:

http://sourceware.org/ml/pthreads-win32/2013/msg00020.html

He told me the problem is that the functions
pthread_win32_process_attach/detach_np() should no longer be called
directly, but are invoked automatically now since version 2.9.0 of
pthreads-win32, which has been released approx. 1.5 years ago. Please
refer to above link for in-depth information.

So for proper using of latest pthreads-win32 library, those function
calls should vanish inside libupnp. Could you consider adapting libupnp
in that way? I would really like to use both libraries out-of-the-box
without local modifications, and this issue prevents that.

Best regards,
Klaus
2013-11-14 15:06:31 -02:00
Peng
bf60dc06e0 Fix several minor bugs in soap_device.c
1) remove redundant free
2) avoid user-provided ErrStr being overwritten by the default one
3) eliminated memory leak possiblity in handle_query_variable

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2013-11-08 16:03:09 -02:00
Peng
908785fba7 Fix return value check of parse_uri
Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2013-11-08 11:07:08 -02:00
Yoichi Nakayama
1a28e8ff51 tv_ctrlpt crashes after detecting a later version of tvcontrol service
SF Bug Tracker #118, Creator: T.Iwamoto

	From:  gon3456@users.sf.net
	Steps to reproduce:
	1. Extracts and build libupnp-1.6.18
	$ tar -xjf /path/to/archive/libupnp-1.6.18.tar.bz2
	$ cd libupnp-1.6.18
	$ ./configure
	$ make
	2. Applies the attached patch and remake.
	$ patch -p1 < /path/to/patch/libupnp-1.6.18.patch
	$ make
	3. Run tv_device.
	$ cd upnp/sample
	$ ./tv_device
	4. Run tv_ctrlpt; the tv_ctrlpt crashes soon.
	$ ./tv_ctrlpt
	Segmentation fault (core dumped)
	This is an issue report about the sample program of control point.
	The tv_ctrlpt crashes after detecting a tvdevice that contains tvcontrol:2 or higher version of tvcontrol service.
	tv_ctrlpt should detect correctly such devices due to forward compatibility of control points with device.
	For more information about the compatibility, please refer the following document:
	DLNA Architectures and Protocols Part 1 2011 December - 7.3.2.1.3 (GUN:GZJXU)
	The attached patch changes the sample programs as below:
	- device: changes version of tvcontrol service from 1 to 2. This change may occur in the future.
	- cp: nothing changed: cp knows version 1 of tvcontrol service only.
	I know many vendors implements their control points based on the tv_ctrlpt, so I hope to fix this issue ASAP.

	==

	From: Yoichi NAKAYAMA
	SEGV is caused by strcpy with NULL argument.
	Attached patch will avoid SEGV in strcpy, but there may be other inconsistencies.

	> I know many vendors implements their control points based on the tv_ctrlpt,

	I don't think so. I think tv_ctrlpt is just a sample to be used with tv_device.

Signed-off-by: Marcelo Roberto Jimenez <mroberto@users.sourceforge.net>
2013-10-29 17:55:23 -02:00
Pino Toscano
89ad5e6779 Fix compilation on GNU/Hurd 2013-10-28 14:01:11 -02:00
Peng
062ac0c926 Fix return value of http_RecvPostMessage and update httpparser.c's comments 2013-10-28 11:35:23 -02:00
Peng
06aa3b17c4 Fix return value of process_request and related subroutines
1) Only HTTP_XXX should be return
2) Make default return value work for process_request
2013-10-28 11:34:58 -02:00
Peng
9f444a680e Fix Content-Range generation bug 2013-10-28 11:34:52 -02:00
zexian chen
8e3a71905b Fix memory leaks when when calling ThreadPoolAdd() or ThreadPoolAddPersistent()
Hi,

I had found some bugs about memory leak on libupnp-1.6.18.

It may lead to memory leak  when calling ThreadPoolAdd() or
ThreadPoolAddPersistent() which does not return 0.

See the attachment for patch.
2013-09-10 17:27:07 -03:00
Peng
72c29ef1f6 Fix return value of config_description_doc.
UPNP_E_XXX should not be used instead of IXML_XXX
2013-09-04 09:57:33 -03:00
Peng
f6a3102b48 Remove faulty free in GetDescDocumentAndURL.
temp_str, which points to part of description, should not be freed.
2013-09-04 09:57:32 -03:00
Peng
9a9c4e829e Avoid malicious client exploit to exhaust the device's memory
Suppose the UPnP device is listening on 192.168.1.102:49152. Use the following to send
garbage bytes to the device:
while true; do echo "\""; done | netcat 192.168.1.102 49152

The device just keeps receiving these bytes and its memory usage keeps growing.
Malicious client may exploit it to exhaust the device's memory.

The attached patch eliminates this possibility.
2013-09-02 14:56:11 -03:00
Peng
7a571f513e Scanner problems
1) restore the scanner's original cursor position in case of
   insufficient input;
2) free the memories allocated for a new header in case of a failure.
2013-09-02 14:38:04 -03:00
Peng
f10730f616 Patch to fix behaviou when char is signed
it seems to me that there is still something wrong:

	1)  the new is_qdtext_char() is incorrect.
	There is a trap if char is implemented as signed char.
	Suppose that c is '\xFF', it will be -1 when converted to an int.
	By definition, c should be qdtext:
	qdtext = <any TEXT except <">>
	TEXT = <any OCTET except CTLs, but including LWS>
	OCTET = <any 8-bit sequence of data>

	2) the character after '\\' could be either part of a quoted-pair
	(together with '\\'), or a normal qdtext, since '\\' itself can
	be treated as a qdtext. This is equivalent to saying that the
	character after '\\' in a quoted string could be ANY octet.

	A patch based on the above two observations is attached.

	Peng
2013-08-16 14:16:47 -03:00
Marcelo Roberto Jimenez
c70f5ce323 Enforce RFC 2616 and accept "0" after a backslash for quoted-strings.
Reported by Peng <howtofly(at)gmail.com>
2013-08-14 09:51:41 -03:00
Peng
a3c540bc9b scanner_get_token: robustness improvement
Patch to make scanner_get_token more robust (avoid over-reading).
2013-08-14 09:22:43 -03:00
Robert Buckley
7b1aa4c9e3 SF ticket #53 Action Error Response not returned
In soap_ctrlpt.c, in function get_response_value:

upnp_error_code is checked to see if it is less than 400 because that
would indicate a SOAP error code.

However it should be checked to see if it is greater than 400.
2013-07-30 17:07:30 -03:00
Zheng Peng
907c7c2621 SF ticket #116 UpnpRemoveVirtualDir wrong linked list operation
What if pVirtualDirList has two nodes and what we want to delete is the
first one. Patch attached.
2013-07-30 16:02:14 -03:00
Sebastian Brandt
25c27b8af7 Fix for crash in webserver.c by Sebastian Brandt
Dear libupnp-devels,
when POST'ing to the simple web server in libupnp, the application crashes.
This is caused by a missing "..." argument in webserver.c:1533.
Seems it has been there for a long time ... 1.6.9 and 1.6.18 have it.

webserver.c:1533 calls http_MakeMessage
/* Send response. */
http_MakeMessage(&headers, 1, 1,
	 "RTLSXcCc",
	 ret, "text/html", X_USER_AGENT);
The format parameter RTLSXcCc needs four arguments -
R - response code - ret,
T- content type - text/html,
L - struct SendInstruction * - NOT PRESENT
X - user agent - X_USER_AGENT

This results in a crash.

Changing to
http_MakeMessage(&headers, 1, 1,
	 "RTLSXcCc",
	 ret, "text/html", &RespInstr, X_USER_AGENT);
solves the situation.

Yours,
Sebastian Brandt
2013-07-30 11:46:46 -03:00
Marcelo Roberto Jimenez
dcbbc30f5c Fix for portability issue with GNU make extension 'sort'
upnp/sample/Makefile.am:67: warning: sort \
upnp/sample/Makefile.am:67:                     $(tv_ctrlpt_SOURCES: non-POSIX variable name
upnp/sample/Makefile.am:67: (probably a GNU make extension)

Reference:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13771#8
2013-07-30 11:26:09 -03:00
Marcelo Roberto Jimenez
3509991872 Fix for warning issue in libtool
Reference:
http://lists.gnu.org/archive/html/automake/2012-05/msg00014.html

Re: automake 1.12 and AM_PROG_AR

From:	 Nick Bowler
Subject:	 Re: automake 1.12 and AM_PROG_AR
Date:	 Thu, 10 May 2012 17:16:04 -0400
User-agent:	 Mutt/1.5.21 (2010-09-15)
On 2012-05-10 12:52 +0200, Simon Josefsson wrote:
> Hi,
>
> I have received patches similar to the one below for several of my
> projects already, and I'm beginning to think there may be something that
> could be improved in automake.  Why does automake 1.12 need something
> that 1.11 doesn't even recognize?  Perhaps a smoother way to introduce
> this behaviour is to let 1.12 automatically enable it?
>
> Alternatively, is there some other way to address the warnings that is
> better?  Does it indicate a real problem in my projects?
>
> http://lists.gnu.org/archive/html/help-libidn/2012-05/msg00000.html
> http://lists.gnu.org/archive/html/help-libidn/2012-05/txtqAGOGgtPqj.txt

FYI, since the patch is so short it would have been helpful to include
it inline in your email.  I've taken the liberty of reproducing it
below:

> --- libidn-1.24.orig/configure.ac
> +++ libidn-1.24/configure.ac
> @@ -34,6 +34,10 @@ AC_SUBST(LT_CURRENT, 17)
>  AC_SUBST(LT_REVISION, 7)
>  AC_SUBST(LT_AGE, 6)
>
> +# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
> +m4_pattern_allow([AM_PROG_AR])
> +AM_PROG_AR
> +
>  AC_PROG_CC
>  gl_EARLY
>  lgl_EARLY

First off, this patch seems wrong at a first glance by its use of
m4_pattern_allow: this is saying that "It's ok for AM_PROG_AR to appear
verbatim in the configure script".  This suggests to me that the patch
didn't actually get tested (well) on Automake 1.11, since there will
almost certainly be an error about AM_PROG_AR at configure time.

This one should actually work properly on both old and new Automake
(untested):

  m4_ifdef([AM_PROG_AR], [AM_PROG_AR])

That being said, the new warning is enabled by the -Wextra-portability
option that was added to Automake-1.12.  I'm by no means an export on
this issue, but I think it relates to new support for building with the
Microsoft compiler: in other words, I think that ignoring this warning
will not cause regressions in your package but, instead, your package
will simply not be able to make use of the new feature.

Regardless, I believe that for most packages the new warning is actually
caused by Libtool, and therefore the correct place to add the call to
AM_PROG_AR is in libtool itself, rather than ad-hoc patching of each
package individually.  You can silence the warnings (but not fix them)
by adding -Wno-extra-portability to AM_INIT_AUTOMAKE.

Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
2013-07-30 10:39:30 -03:00
Marcelo Roberto Jimenez
6279b7fa5f Homekeeping for the next release. 2013-01-29 12:11:56 -02:00
Marcelo Roberto Jimenez
6cd1f11154 Adjust the library numbers for release. 2013-01-29 12:04:00 -02:00
Marcelo Roberto Jimenez
f015a132e8 Security fix for CERT issue VU#922681
This patch addresses three possible buffer overflows in function
unique_service_name(). The three issues have the folowing CVE
numbers:

CVE-2012-5958 Issue #2: Stack buffer overflow of Tempbuf
CVE-2012-5959 Issue #4: Stack buffer overflow of Event->UDN
CVE-2012-5960 Issue #8: Stack buffer overflow of Event->UDN

Notice that the following issues have already been dealt by previous
work:

CVE-2012-5961 Issue #1: Stack buffer overflow of Evt->UDN
CVE-2012-5962 Issue #3: Stack buffer overflow of Evt->DeviceType
CVE-2012-5963 Issue #5: Stack buffer overflow of Event->UDN
CVE-2012-5964 Issue #6: Stack buffer overflow of Event->DeviceType
CVE-2012-5965 Issue #7: Stack buffer overflow of Event->DeviceType
2012-12-06 15:43:15 -02:00
Marcelo Roberto Jimenez
40e90e89fc Remove an unused variable 2012-06-20 21:34:01 -03:00
Marcelo Roberto Jimenez
40ddff1096 Remove an unused variable ifndef INET_IPV6 2012-06-20 21:26:05 -03:00
Marcelo Roberto Jimenez
692813d03e Remove a pointless way to test a return value 2012-06-20 21:15:01 -03:00
Yoichi NAKAYAMA
d9e90499b7 Fix memory leak and access violation in UpnpSendAction(Ex)Async.
Free buffers after malloc or ixmlPrintNode failure.
Free Param->Header before destructing Param.
2012-06-19 19:13:46 +09:00
Anoop Mohan
6db2271ac3 Fixes a bug in non blocking connect call
This patch fixes a bug in non blocking connect call where the sock
option length for SO_ERROR was passed as 0 instead of sizeof(int).
2012-05-25 11:59:21 -03:00
Yoichi NAKAYAMA
4d21d45da7 Disable SetGenaCallback call if device is disabled.
If device is disabled, SetGenaCallback definition is disabled,
but its call remains. A link error will occur in Win32.
2012-04-25 00:29:42 +09:00
Yoichi NAKAYAMA
708ea30806 Fix condition for allocation failure in get_content_type().
At the end of get_content_type() in webserver.c, it should check
return value of ixmlCloneDOMString().
2012-04-21 21:48:55 +09:00
Yoichi NAKAYAMA
39dfad2cba Fix problems detected as dead assignment warning by clang scan-build.
Wrong assignment by shutdown result hides the real error code
of NewRequestHandler() in ssdp_device.c.
Fix return code description of NewRequestHandler().
Handle return code from ithread_create in sample applications.
Remove unused assignments.
2012-04-21 11:38:20 +09:00
Yoichi NAKAYAMA
3d7c1dbd59 Avoid dereference of null pointer in ixmlNode_setNodeProperties.
The problem can occur if one of the arguments is NULL.
Test argument and fix assertion.
2012-04-21 01:48:47 +09:00
Yoichi NAKAYAMA
e52e7e0bd3 Create intermediate directory per project on vc9.
Sample applications share sample_util.c and collisions of
object file can occur in parallel build. Modify project files to
split intermediate directories against it.
Apply similar changes also to library projects, like vc10 projects.
2012-04-17 20:40:51 +09:00
Thijs Schreijer
d5d680d131 Updated the readme regarding the newer visual studio versions and the 'VC runtime dependency hell'
(cherry picked from commit e570b7943d)
2012-04-11 20:17:37 -03:00
Thijs Schreijer
7ee266076d Added pthreads folder back in, put in on the ignore list this time so it won't be included in the repository 2012-04-11 20:16:37 -03:00
Thijs Schreijer
90fad896c4 - Copied the VC9 build directory and renamed to VC10 to prepare for Visual Studio 2010 update - Upgraded build/VC10 dir from VC9 to VC10 (using wizard) - Updated the Debug build configuration to be functional, including references for pthread.dll and the web example folders. Other build configurations still to be fixed. - Added output directory to GIT-ignore list. - Updated the Win32 build configurations to make them all work. x64 remains to be done. - Updated build process, after build events (copying sample files and pthreadVC2.dll to the target directory)
(cherry picked from commit e385d5a27e)
2012-04-11 20:13:00 -03:00
Marcelo Roberto Jimenez
0ea9c438e5 Update THANKS file 2012-04-11 17:42:22 -03:00
Marcelo Roberto Jimenez
c661180d15 Add errno.h inclusion in unixutil.h only in WIN32 2012-04-11 17:41:51 -03:00
Thijs Schreijer
1a98394781 Fixed warning by adding an explicit cast to long; TimerThread.c ..\..\threadutil\src\TimerThread.c(110): warning C4244: '=' : conversion from 'time_t' to 'long', possible loss of data 2012-04-11 17:39:13 -03:00
Thijs Schreijer
89fe655aee Fixed redefinition warnings for EAFNOSUPPORT and EADDRINUSE, Google turned up that they are newly defined in VS2010
unixutil.h, line 41
upnputil.h, line 125

Had a look here; http://bugs.ruby-lang.org/issues/3092 and added the mentioned fixes as found here; http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/win32.h?r1=27222&r2=27236&pathrev=27258&diff_format=h and here http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/win32.h?r1=27236&r2=27258&pathrev=27258&diff_format=h
2012-04-11 17:39:08 -03:00
Yoichi NAKAYAMA
d72bb5cff5 Avoid access violation after parser_parse_chunky_headers call.
In parser_parse_chunky_headers, parser->msg.msg.buf can be changed
by membuffer_delete call. Therefore if we save the pointer to
parser->msg.entity.buf before calling membuffer_delete, it will
induce access to released memory.
2012-04-12 01:51:12 +09:00
Marcelo Roberto Jimenez
e02753736a Update THANKS file. 2012-04-11 12:00:33 -03:00
Gustavo Zacarias
1c21e6e54f ssdp_device: exclude IPv6 stuff when there's no IPv6
Add an additional INET_IPV6 exclusion around IPV6_MULTICAST_HOPS since
the definition isn't guaranteed to exist when the toolchain lacks IPv6
support.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2012-04-11 11:56:40 -03:00
Yoichi NAKAYAMA
a383cbb8e2 Remove possibility of access violation.
1. Test Instr before dereference it in http_RecvPostMessage.
(Though it never becomes NULL because NULL is not passed to
the static method)
2. Avoid strdup(NULL) in ixmlElement_setAttributeNS.
Those are detected by llvm scan-build.
2012-04-06 23:21:18 +09:00
Yoichi NAKAYAMA
34a77cc095 SF Bug Tracker id 3507819 - Use of thread-unsafe gmtime() in httpreadwrite.c
Define http_gmtime_r and web_server_asctime_r and use it.
Those prefix are added since pthread for Win32 already
has macro gmtime_r and asctime_r.
2012-04-06 03:13:43 +09:00
Yoichi NAKAYAMA
e10bc2ec0c Fix type of local variable stopSock in RunMiniServer()
The variable is declared as SOCKET, but it is used to
store return value of int receive_from_stopSock(...).
The type was changed in the commit
4b47e6a51d by mistake.
2012-04-06 00:07:56 +09:00
Fabrice Fontaine
777c936f4c Compilation optimisation
Do not compile the code related to the webserver in http_SendMessage
when --disable-webserver is set
2012-04-03 16:11:31 +02:00
Marcelo Roberto Jimenez
04c1bf3fb0 White space fix. 2012-04-03 09:59:58 -03:00
Marcelo Roberto Jimenez
ab792e4223 Homekeeping for the next release. 2012-04-03 09:25:36 -03:00
Marcelo Roberto Jimenez
d0b16d056e Adjust the library numbers for release. 2012-04-03 09:19:45 -03:00
Fabrice Fontaine
dc4eda529f Memory leak fix in threadutil
Put thread in a detached state when calling pthread_create otherwise in
some circumstances, thread can end before the call to pthread_detach.
2012-04-02 15:51:46 +02:00
Marcelo Roberto Jimenez
c154c63cdc Update of auto-generated file. 2012-03-30 17:34:48 -03:00
Fabrice Fontaine
49af91fe48 Add --enable-unspecified_server
Add --enable-unspecified_server configure option to set to "Unspecified"
the OS name, OS version, product name and product version normally
contained in the SERVER header as this could be used by an attacker.
2012-03-30 21:57:51 +02:00
Fabrice Fontaine
df27ba505f Removing implicit casts in miniserver.c
Removing implicit integer or enum casts in miniserver.c.
2012-03-29 17:10:07 +02:00
Fabrice Fontaine
9a33782ab5 SF Bug Tracker id 3512833 - Miniserver is wrongly disabled
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-29 07:36:34 PDT

Miniserver is disabled if ECXLUDE_GENA, EXCLUDE_SOAP and
EXCLUDE_WEBSERVER are set.
However, SSDP needs the Miniserver to answer to M-SEARCH requests.
So, MiniServer should not be disabled if EXCLUDE_SSDP is not also set.
2012-03-29 16:40:40 +02:00
Yoichi NAKAYAMA
e0e81e6cd2 SF Bug Tracker id 3510693 - build fail with --disable-device
Use INCLUDE_DEVICE_APIS instead of UPNP_HAVE_DEVICE as in other sources.
Don't use soap_device_callback if INCLUDE_DEVICE_APIS is not set,
otherwise link error occur on Windows.
2012-03-27 00:59:50 +09:00
Fabrice Fontaine
02afbb09c9 SF Bug Tracker id 3511149 - --disable-ssdp has no effect
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-03-25 18:14:34 PDT

There are typos in upnp/src/inc/config.h "EXCLUDE_SSSDP" (shold be
EXCLUDE_SSDP), therefore EXCLUDE_SSDP is always 0, and --disable-ssdp
has no effect.
2012-03-26 14:07:52 +02:00
Fabrice Fontaine
804088d859 Remove implicit casts
Cast parameters of htonl in uint32_t in IN6_IS_ADDR_GLOBAL and
IN6_IS_ADDR_ULA definitions.
Remove comparison with 0 in while statement of vfmatch,
http_SendMessage and http_MakeMessage.
2012-03-24 22:20:18 +01:00
Yoichi NAKAYAMA
679ebeec48 SF Bug Tracker id 3510693 - build fail with --disable-device
GetDeviceHandleInfo just fail without using undefined member DeviceAf
if UPNP_HAVE_DEVICE is not defined.
Move ContentTypeHeader definition to soap_common.c, since it is
also used in soap_ctrlpt.c.
2012-03-24 13:11:23 +09:00
Marcelo Roberto Jimenez
19ec877b2a Homekeeping for the next release. 2012-03-21 19:58:13 -03:00
Marcelo Roberto Jimenez
01d7c05fb8 Adjust the library numbers for release. 2012-03-21 19:49:49 -03:00
Marcelo Roberto Jimenez
952492b44e Fixes anoying order issue in autoconfig.h
autoconf seems to generate the contents in another order, and it
generates anoying changes to git.
2012-03-21 19:45:07 -03:00
Fabrice Fontaine
a04c36f47e Replace sprintf by snprintf in http_WriteHttpPost
Replace sprintf by snprintf in http_WriteHttpPost to avoid buffer
overflow.
2012-03-18 16:14:41 +01:00
Fabrice Fontaine
e13ffe3bf8 Add infoSize parameter to get_sdk_info
Add infoSize parameter to get_sdk_info function to replace sprintf call
by a snprintf call.
2012-03-18 15:23:59 +01:00
Fabrice Fontaine
d3d17da6e5 Check return code in ixml
Check return code of ixmlDocument_CreateElementEx in
ixmlDocument_CreateElement.
Check return code of ixmlNode_setNodeName and ixmlNode_setNodeValue in
ixmlNode_cloneCDATASect and ixmlNode_cloneTextNode.
2012-03-16 17:30:27 +01:00
Marcelo Roberto Jimenez
e0444b26e6 Don't use // as comments, it breaks some C compilers
Also, really remove the dead code.
2012-03-16 11:51:10 -03:00
Fabrice Fontaine
cb07623dde Add more explicit casts and remove dead code
Comment unused SERVER from DeviceShutdown.
Comment unused max from parse_hostport.
Comment unused nodeptr from ixmlNode_cloneDoc.
Comment unused newNode from Parser_hasDefaultNamespace.
Comment unused Parser_parseReference function
Check return code of shutdown and display an error if needed.
2012-03-16 11:30:42 +01:00
Marcelo Roberto Jimenez
c9f3e26f24 Fix for compiler warning messages
src/genlib/net/http/httpreadwrite.c: In function ‘http_Download’:
src/genlib/net/http/httpreadwrite.c:790:5: warning: format ‘%d’ expects
type ‘int’, but argument 6 has type ‘size_t’
src/genlib/net/http/httpreadwrite.c:790:5: warning: format ‘%d’ expects
type ‘int’, but argument 7 has type ‘size_t’
(cherry picked from commit 5969530dcf)
2012-03-15 11:50:48 -03:00
Fabrice Fontaine
a3d038c885 Fix previous commit
Replace HAVE_UPNP_OPTSSDP by UPNP_HAVE_OPTSSDP in upnpapi.c.
2012-03-15 15:06:51 +01:00
Fabrice Fontaine
731512b0e5 Add --disable-optssdp option
Modify configure.ac to add --disable-optssdp option. This option will
remove OPT, 01-NLS and X_USER_AGENT headers from SSDP messages as those
headers are optional. If --disable-gena and disable-optssdp are both
used, uuid part will not be compiled anymore.
2012-03-15 14:13:27 +01:00
Fabrice Fontaine
76eb3f869b Bug fix in ixmlNode_allowChildren
Commit d48d73720b added a bug in
ixmlNode_allowChildren, this function was returning FALSE instead of
TRUE when newChild->nodeName was eELEMENT_NODE.
2012-03-15 11:07:54 +01:00
Fabrice Fontaine
b116d10f37 Improve upnp/genlib/net
Change ret_code from int to parse_status_t in match.
Set back return code of ReadResponseLineAndHeaders from parse_status_t
to int as this function can return UPNP_E_BAD_HTTPMSG. As a result, do
not cast the result of this function into parse_status_t in
http_OpenHttpGetProxy and http_OpenHttpGetEx.
Use switch with PARSE_OK in parsetools.c.
Add missing explicit casts of integer constants in uri.c and
httpreadwrite.c.
Use switch, int and sa_family_t with AF_INET in uri.c.
Print an error in http_Download if realloc failed.
2012-03-15 09:31:44 +01:00
Fabrice Fontaine
1a083479a9 Use switch instead of if with enums in upnpapi.c
Replace if statements with switch when using HND_DEVICE and HND_CLIENT
enum constants.
Correct also UpnpUnRegisterRootDeviceLowPower and UpnpUnRegisterClient
as those functions were wrongly awaiting an UPNP_E_INVALID_HANDLE
instead of HND_INVALID from GetHandleInfo.
2012-03-14 22:22:43 +01:00
Fabrice Fontaine
850e6b4849 Improve ssdp part
Do not compile CreateClientRequestPacketUlaGua if IPv6 is disable.
Cast DestAddr->sa_family from sa_family_t into int when calling
CreateServicePacket as this function has been set back to accept int in
a692e591de.
Use switch instead of if with AF_INET and AF_INET6.
Add missing casts from AF_INET and AF_INET6 into sa_family_t when using
them to set sin_family and sin6_family.
Add missing explicit casts into size_t or lu when using integer
constants with strlen or unsigned long indexes.
Set SSDP_PAUSE to be unsigned as it is used with usleep.
2012-03-14 21:30:55 +01:00
Fabrice Fontaine
d48d73720b Use switch insted of if with enums in ixml
Replace if statements with switch when using enums in ixml.
Remove uneeded initialization in ixmlAttr_init, Parser_init and
ixmlNode_init which was added by wrongly added in commit
06660b6383.
2012-03-14 20:04:04 +01:00
Fabrice Fontaine
b7f83bb7c6 Use switch insted of if with enums in threadutil
Replace if statements with switch when using enums in threadutil.
2012-03-14 18:52:20 +01:00
Fabrice Fontaine
05fb3f8026 Fix missing break in http_RecvMessage
There was a missing break in PARSE_INCOMPLETE_ENTITY due to commit
2eb3e069ba.
2012-03-14 18:43:14 +01:00
Yoichi NAKAYAMA
7178f300bb Fix parse failure observed with tvdevice sample.
Commit c40d2bc0c9 has a problem
at removing the parentheses in parser_parse_responseline.
Difference of pointers was used with intention, don't cast
them separately.
2012-03-15 01:02:48 +09:00
Yoichi NAKAYAMA
f7a801c3ae Fix compile error on Windows.
Include UpnpStdInt.h for ssize_t.
Define sa_family_t in UpnpInet.h.
2012-03-14 23:40:32 +09:00
Yoichi NAKAYAMA
f299d6597a Avoid ambiguous change of SsdpEvent in unique_service_name.
Handle overflow before changing SsdpEvent.
Because the behavior of "snprintf" is platform dependent in such case.
2012-03-14 23:06:46 +09:00
Yoichi NAKAYAMA
35819a7a44 SF Bug Tracker id 3502958 - The commit 5944960e prevents a pupnp client (amule) from receiving replies from an IGD device.
Previous change broke the feature. The error of unique_service_name
in ssdp_request_type should be ignored.
This reverts commit 5944960e17.
2012-03-14 23:04:51 +09:00
Marcelo Roberto Jimenez
f1c4ffefda Fix for compiler warning
src/genlib/net/sock.c: In function ‘sock_read_write’:
src/genlib/net/sock.c:172:4: warning: conversion to ‘long int’ from
‘size_t’ may change the sign of the result
2012-03-13 14:57:22 -03:00
Marcelo Roberto Jimenez
a692e591de Address family is an int
Reference: "man 2 socket".
2012-03-13 14:32:19 -03:00
Marcelo Roberto Jimenez
ad7272d2b5 SF Bug Tracker id 3175217 - Crash bug in Parser_addNamespace()
(This is a fix to commit 86bef09787)
2012-03-13 10:55:06 -03:00
Marcelo Roberto Jimenez
86bef09787 SF Bug Tracker id 3175217 - Crash bug in Parser_addNamespace()
This is a fix to commit 2fb791c9bb.
2012-03-12 11:48:21 -03:00
Fabrice Fontaine
c40d2bc0c9 Remove more implicit casts in upnp part
Remove more "implicit integer or enum conversions" errors as well as
dead code.
2012-03-11 22:45:10 +01:00
Yoichi NAKAYAMA
8e39b2af85 Suppress compiler warning in CreateClientRequestPacketUlaGua.
It is a static function and is called with AF_INET6,
so there is no real problem.
2012-03-11 21:35:03 +09:00
Fabrice Fontaine
2eb3e069ba Remove more implicit casts in upnp part
Remove more "implicit integer or enum conversions" as well as memset
before snprintf.
2012-03-10 22:52:57 +01:00
Yoichi NAKAYAMA
db532afb9b Avoid out of range access in CheckOtherHTTPHeaders.
There was a problem in HDR_ACCEPT_LANGUAGE case.
It may read from TmpBuf larger amount than allocated,
since condition was always true.
Terminate RespInstr->AcceptLanguageHeader correctly.
Skip allocation if there is already sufficient buffer.
2012-03-11 13:21:40 +09:00
Yoichi NAKAYAMA
1b38cc963a Suppress compiler warning in CreateClientRequestPacket.
It is a static function and is called with AF_INET or AF_INET6,
so there is no real problem.
2012-03-11 12:41:32 +09:00
Fabrice Fontaine
c67187ac94 Remove some of the implicit cast in upnp part
Remove some of the "implicit integer or enum conversions" as well as
some access to NULL reference in upnp part.
2012-03-10 20:44:49 +01:00
Fabrice Fontaine
d45f3c28cf Remove lock in ThreadPoolInit
If ThreadPoolInit returned EAGAIN, tp->lock was not freed.
2012-03-10 18:10:42 +01:00
Fabrice Fontaine
06660b6383 Improve ixml
Remove "implicit integer conversions" and
"dereference NULL return value" errors in ixml part.
2012-03-10 17:58:12 +01:00
Yoichi NAKAYAMA
41412c16ef Exclude IPv6 stuff in SearchByTarget when UPNP_ENABLE_IPV6 is not defined. 2012-03-11 04:00:09 +09:00
Yoichi NAKAYAMA
04e5767ea0 Use strncpy with the standard way in readFromSSDPSocket. 2012-03-11 03:54:41 +09:00
Yoichi NAKAYAMA
5944960e17 Respect unique_service_name error in ssdp_request_type.
Respect unique_service_name error in ssdp_request_type
so as not to touch non-terminated buffer under Evt.
2012-03-11 03:52:37 +09:00
Yoichi NAKAYAMA
d952ebfb44 Handle overflow in http_SendMessage. 2012-03-11 03:33:14 +09:00
Yoichi NAKAYAMA
56b44fee91 Detect overflow in addrToString called from configure_urlbase.
Pass output buffer size to addrToString and detect overflow.
Handle addrToString error in configure_urlbase.
2012-03-11 03:25:41 +09:00
Yoichi NAKAYAMA
ff635f92c0 Detect overflow in CreateClientRequestPacket(UlaGua).
Pass output buffer size to CreateClientRequestPacket(UlaGua)
from SearchByTarget and detect overflow.
Handle SearchByTarget error in UpnpSearchAsync.
2012-03-11 02:47:58 +09:00
Yoichi NAKAYAMA
19a23dafba Clarify the last argument of GetDescDocumentAndURL has size LINE_SIZE. 2012-03-11 02:15:16 +09:00
Yoichi NAKAYAMA
bd7f83feb5 For inet_ntop, use buffer with size INET6_ADDRSTRLEN or INET_ADDRSTRLEN. 2012-03-11 01:57:34 +09:00
Yoichi NAKAYAMA
e4678168fa Treat large argument as error in UpnpAddVirtualDir. 2012-03-11 01:40:48 +09:00
Yoichi NAKAYAMA
a0dc3482dc Do not clear buffer before snprintf.
It had no effect since snprintf can overwrite whole buffer.
2012-03-11 01:16:12 +09:00
Yoichi NAKAYAMA
87d1d3c3ec Add assertion and narrow variable scope in resolve_rel_url().
I've confirmed enough buffer is allocated for output.
2012-03-11 00:42:49 +09:00
Yoichi NAKAYAMA
194397b6d6 Handle allocation error in strndup to avoid access violation.
Return NULL before calling strncpy.
Platforms with HAVE_STRNDUP are not affected.
2012-03-10 23:15:37 +09:00
Yoichi NAKAYAMA
b78eaf4e43 Fix buffer size for strncpy in UpnpAddVirtualDir()
Since 1st argument precedes the beginning of the buffer,
it is necessary to reduce the value of 3rd argument.
2012-03-10 22:29:44 +09:00
Yoichi NAKAYAMA
a54d6e7e83 Synchronize autoconfig.h with upnpconfig.h.
It fixes WIN32 build where configure is not invoked.
2012-03-10 14:37:59 +09:00
Yoichi NAKAYAMA
18bf3b1c9c fix missing assignment in commit e722d8c375 2012-03-10 12:50:11 +09:00
Fabrice Fontaine
bb140000c0 More compilaton optimisation
Do not compile most of service_table.c and client_table.c if
--disable-gena is used.
Do not compile urlconfig.c if --disable-webserver is used.
Adding new UPNP_HAVE_xxx variables in upnpconfig.h and upnpconfig.h.in.
2012-03-10 00:33:17 +01:00
Fabrice Fontaine
7aef73d7eb Optimisation of --disable-webserver
Do not compile webserver.c if --disable-webserver is used.
2012-03-09 23:28:18 +01:00
Fabrice
77c73884b8 Improve threadutil
Remove "dereference NULL return" errors and implicit conversions to
double or enum types.
2012-03-09 22:49:19 +01:00
Fabrice Fontaine
72eecacf56 Optimisation of --disable-webserver
Do not compile miniserver.c if --disable-webserver is used.
2012-03-09 17:09:34 +01:00
Fabrice Fontaine
601332f88f Adding configure options
Adding --disable-ssdp, --disable-soap, --disable-gena options to
configure script.
2012-03-09 17:08:01 +01:00
Raymond Wen
4605314569 fix bug: the project can't compile on windows with vs 2005
- define UPNP_USE_MSVCPP when necessary
- set release build's output directory to be consistent with debug build
- add missing ClientSubscription.c to libupnp project
- reference correct source files in sample project

(backport of commit 0097180ce4)
2012-03-09 11:19:18 -03:00
Fabrice Fontaine
e95b4cc53a Bug fix of last commit
_snprintf was wrongly defined in ssdp_server.c
2012-03-09 16:13:43 +01:00
Fabrice Fontaine
e722d8c375 SF Bug Tracker id 3499781 - msvc doesn't have snprintf
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-03-08 10:18:39 PST

97a17ff5ad commit breaks build on
windows/msvc since there is no snprintf.

Note:
* Some existing sources use _snprintf when WIN32 is defined, but its
behavior is a bit different from C99 snprintf.
* snprintf does terminate the buffer, so the commit (use buffer size
minus 1 as argument) changes the behavior at the boundary.
* Truncation might be better than crash in some cases. But it may
result in not good.
2012-03-09 15:02:49 +01:00
Marcelo Roberto Jimenez
29ee36b1ca SF Bug Tracker id 3499878 - UpnpUnSubscribeAsync(): ‘retVal’ may be used uninitialized
Submitted: Marcelo Roberto Jimenez ( mroberto ) - 2012-03-08 12:38:57 PST

src/api/upnpapi.c: In function ‘UpnpUnSubscribeAsync’:
src/api/upnpapi.c:2060:6: warning: ‘retVal’ may be used uninitialized in this function
2012-03-08 17:42:02 -03:00
Marcelo Roberto Jimenez
2fb791c9bb SF Bug Tracker id 3175217 - Crash bug in Parser_addNamespace()
Submitted: Terry Farnham ( tfarnham ) - 2011-02-07 09:25:25 PST

Details: The strcmp(pNode->prefix,pCur->prefix) crashes on pCur->prefix
being NULL. This occurs on invalidly formatted xml where a node uses an
undefined namespace. I would expect to receive IXML_FAILED in this
situation.
2012-03-08 13:51:29 -03:00
Marcelo Roberto Jimenez
d909297aa7 White spaces and coding style 2012-03-08 13:39:31 -03:00
Fabrice Fontaine
9b616a08df Removing access to NULL pointers in node.c and element.c
Check that newNode is not NULL ixmlNode_cloneNodeTree and pass newAttr
as the return node in the ixmlElement_setAttributeNodeNS call of
ixmlElement_setAttributeNS.
2012-03-08 16:09:03 +01:00
Fabrice Fontaine
3ab8d536a0 Memory leaks correction in upnpapi.c
Fix memory leaks in UpnpUnSubscribe, SendActionExAsync and
RenewSubscription.
2012-03-08 15:40:23 +01:00
Fabrice Fontaine
4f34a12a83 SF Bug Tracker id 3496993 - Write after free in ixmlNode_insertBefore
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 04:54:40 PST

If ixmlNode_isParent(nodeptr, newChild) returns TRUE,
ixmlNode_removeChild(nodeptr, newChild, NULL) will free newChild before
the modifications of newChild->nextSibling and newChild->prevSibling.
2012-03-08 14:22:54 +01:00
Fabrice Fontaine
97a17ff5ad Remove most of strcpy, sprintf and strcat
Replace strcpy, sprintf and strcat by strncpy, snprintf and strncat to
avoid buffer overflows.
2012-03-08 14:07:27 +01:00
zephyrus
9965f02727 SF Patches Tracker id 3498437 - a header patch: ixml.h 1.6.15
Submitted: zephyrus ( zephyrus00jp ) - 2012-03-07 02:31:14 PST

Details: a function is declared as
EXPORT_SPEC IXML_Document *ixmlDocument_createDocument();

This should read as follows in order to suppress strict prototype checking by GCC.
EXPORT_SPEC IXML_Document *ixmlDocument_createDocument(void);
2012-03-07 17:15:54 -03:00
Marcelo Roberto Jimenez
861a538cea White spaces, coding style 2012-03-07 15:07:50 -03:00
Marcelo Roberto Jimenez
c12d33aca6 White spaces, coding style 2012-03-07 15:06:26 -03:00
Yoichi NAKAYAMA
4c3532585d SF Bug Tracker id 3497714 - Buffer overflows
Fix compile error on WIN32.

Local variables must be declared first.
Remove outdated comment.
2012-03-08 01:37:03 +09:00
Yoichi NAKAYAMA
71ab707e81 Avoid access violation in assertion.
xmlParser->pCurElement was dereferenced before null check.
Affects debug build only.
2012-03-08 01:22:59 +09:00
Fabrice Fontaine
cec9d55c4c Remove SIZEOF_MISTACH error in notify_send_and_recv
Replace sizeof(CRLF) by strlen(CRLF) as CRLF is a const char*.
2012-03-07 14:30:37 +01:00
Fabrice Fontaine
56c26b5199 SF Bug Tracker id 3498442 - Memory leak in get_file_info
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-07 02:44:30 PST

info->contentType is not freed before being set to NULL.
2012-03-07 12:49:13 +01:00
Fabrice Fontaine
0469388b73 SF Bug Tracker id 3498439 - Memory leak in removeServiceTable
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-07 02:35:46 PST

UDN is not freed.
2012-03-07 12:41:21 +01:00
Fabrice Fontaine
268abf72fb SF Bug Tracker id 3498436 - Memory leak in Parser_processAttributeName
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-07 02:30:57 PST

attr is not freed if ixmlNode_setNodeProperties or
ixmlNode_setAttributeNode return an error in
Parser_processAttributeName.
2012-03-07 12:36:45 +01:00
Fabrice Fontaine
288ef35cee Fixing an error in d6db7c555d commit
Evt.Sid should not be cast into char* when calling sizeof otherwise
size will be 4.
2012-03-07 10:26:42 +01:00
Fabrice Fontaine
7ef089b09a Removing two unused variables in ssdp_server.c
Removing first TempPtr allocation in unique_service_name as well as one
of the dbgStr allocation in AdvertizeAndReply as those values were not
used.
2012-03-06 18:36:48 +01:00
Fabrice Fontaine
c13b1f7e37 SF Bug Tracker id 3497714 - Buffer overflows
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-06 07:36:08 PST

Call to strcpy should be replaced by call to memset and strncpy to
avoid getting buffer overflows.
2012-03-06 17:41:47 +01:00
Fabrice Fontaine
3e7bf14488 Merge branch 'branch-1.6.x' of ssh://pupnp.git.sourceforge.net/gitroot/pupnp/pupnp into branch-1.6.x 2012-03-06 09:58:54 +01:00
Fabrice Fontaine
a8bcbe9491 SF Bug Tracker id 3497159 - Bug fix in Parser_readFileOrBuffer
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 14:20:58 PST

fileSize = ftell( xmlFilePtr ); can return a negative value, in this
case the function should exit (at the moment, the function exits only
if ftell returns 0).
2012-03-06 00:23:54 +01:00
Fabrice Fontaine
1a1570fe0f SF Bug Tracker id 3497140 - Bug fix in http_get_code_text
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 13:07:03 PST

Replace if( statusCode < 100 && statusCode >= 600 ) which can't be true
by if( statusCode < 100 || statusCode >= 600 ).
2012-03-06 00:14:45 +01:00
Fabrice Fontaine
30badb44c7 SF Bug Tracker id 3497126 - Resource leak in http_RecvPostMessage
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 12:33:59 PST

Fp is not closed when an error is raised on membuffer_append or
sock_read.
2012-03-05 22:35:54 +01:00
Nick Leverton
3504b13eae SF Bug Tracker id 2989399 - UpnpSetVirtualDirCallbacks API removal in 1.6.x
Submitted: Nick Leverton ( leveret ) - 2010-04-19 07:44:10 PDT

Details: The recent codebase merge has removed a significant API call
which is used by several pupnp devices such as mediatomb and gmediaserver.
UpnpSetVirtualDirCallbacks() has been replaced by individual routines to
set each callback. Essentially this means that 1.6.7 will in fact be a majo
bump and 1.6.6 devices can no longer link against it. Could we have the call
reinstated please, perhaps as a wrapper around the individual calls ? As
it is, all distros will have to patch their 1.6.x apps, rebuild and re-link them.

The other removed API calls and external variables don't seem to be used
by any of the apps I have copies of, but UpnpSetVirtualDirCallbacks is
important for maintaining compatibility within 1.6.x.
2012-03-05 18:21:49 -03:00
Yoichi NAKAYAMA
d6f1e4112e SF Bug Tracker id 3325246 - Memory Leak in XML Parser
Submitted: Terry Farnham ( tfarnham ) - 2011-06-23 09:45:54 PDT

Details: The following bit of xml results in a memory leak from the xml
parser:

const char *xmlbuffer="<?xml version=\"1.0\" encoding=\"utf-8\"?>
<root xmlns=\"urn:schemas-upnp-org:device-1-0\" xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">
<dlna:X_DLNADOC xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\">DMS-1.50</dlna:X_DLNADOC></root>";

When I execute the following code:

IXML_Document *doc = ixmlParseBuffer(xmlbuffer);
ixmlDocument_free(doc);

It results in a memory leak in ixmlparser.c line 2107 where it calls
safe_strdup( newElement->namespaceURI ); It's difficult to figure out why.
2012-03-05 16:59:15 -03:00
Yoichi NAKAYAMA
e5887c9036 SF Bug Tracker id 3417134 - Crash seen in UpnpFinish
Submitted: Sunil ( sunilangadi ) - 2011-10-02 08:28:47 PDT

Details: I observed crash in the below mentioned log statement in
function upnpfinish(file: upnpapi.c).
UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Exiting UpnpFinish:
	UpnpSdkInit is :%d:\n", UpnpSdkInit);

In particular it was crashing in ithread_self in
UpnpDisplayFileAndLine(file upnpdebug.c) on WIN32.

Moving the call ithread_cleanup_library() below the upnp printf call
mentioned above in function upnpfinish fixed the crash but I couldn't get
to the root of the problem.

The problem was observed on WIN32.
2012-03-05 15:05:20 -03:00
Fabrice Fontaine
eeab71082f SF Bug Tracker id 3497034 - Buffer not null terminated in UpnpGetIfInfo
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 06:43:52 PST

gIF_NAME might be not null terminated.
2012-03-05 17:43:26 +01:00
Fabrice Fontaine
f6e88d5b0a SF Bug Tracker id 3497033 - Buffer not null terminated in UpnpInit
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 06:42:18 PST

gIF_IPV4, gIF_IPV6 and gIF_IPV6_ULA_GUA might be not null terminated.
Moreover, gIF_IPV4 should be 16 characters (INET_ADDRSTRLEN) and not 22
and gIF_IPV6 should be 46 characters (INET6_ADDRSTRLEN) and not 65.
2012-03-05 17:36:41 +01:00
Fabrice Fontaine
add51536fc Bug fix of lastest commit (parse_hostport)
Missing parenthesis in memset.
2012-03-05 17:31:20 +01:00
Fabrice Fontaine
40864da7c1 SF Bug Tracker id 3497027 - Buffer not null terminated in parse_hostport
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 06:28:38 PST

workbuf might be not null terminated.
2012-03-05 17:13:08 +01:00
Fabrice Fontaine
5caaf3ad07 SF Bug Tracker id 3497009 - Resource leak in http_SendMessage
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 05:51:44 PST

Fp is not closed if fseeko(Fp, Instr->RangeOffset, SEEK_CUR) does not return 0.
2012-03-05 17:12:15 +01:00
Fabrice Fontaine
26c3f87eca HInfo->ServiceTable initialization in UpnpRegisterRootDevice2 and UpnpRegisterRootDevice4
Initialize also HInfo->ServiceTable in UpnpRegisterRootDevice2 and
UpnpRegisterRootDevice4 functions
2012-03-05 12:43:07 +01:00
Yoichi NAKAYAMA
20372ccef6 Initialize ServiceTable. 2012-03-05 12:36:29 +01:00
Yoichi NAKAYAMA
47c86542bc Add error handling. 2012-03-05 12:26:41 +01:00
Fabrice Fontaine
da244683cf SF Bug Tracker id 3496942 - Memory leak in config_description_doc
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:55:54 PST

element was not freed if membuffer_append_str(&url_str, "http://") does
not return 0. Moreover addNew was not used.
2012-03-05 11:58:54 +01:00
Fabrice Fontaine
7301f46269 SF Bug Tracker id 3496938 - Missing structures initialisation in some functions
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:31:16 PST

Memsetting to 0 some of the structures: finfo in process_request,
job in readFromSSDPSocket, request in http_OpenHttpGetEx, job in
genaNotifyThread, job in genaNotifyAllExt, job in genaNotifyAll,
job in genaInitNotifyExt, job in genaInitNotify, LocalAddr in
getlocalhostname.
2012-03-05 11:52:22 +01:00
Fabrice Fontaine
bd203e780e SF Bug Tracker id 3496934 - Memory leaks in getlocalhostname and UpnpGetIfInfo
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:25:42 PST

LocalSock is not closed if ioctl(LocalSock, SIOCGIFCONF, &ifConf);
returns an error.
2012-03-05 11:33:12 +01:00
Fabrice Fontaine
69f3fe2330 SF Bug Tracker id 3496933 - Out-of-bounds access in CheckOtherHTTPHeaders
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 01:15:34 PST

An out-of-bands access is raised because size of
RespInst->AcceptLanguageHeader is 200 and TmpBuf size is 180.
2012-03-05 11:20:07 +01:00
Fabrice Fontaine
52df3081df Remove unused currentDevice variable in removeServiceTable
currentDevice is not used in this function.
2012-03-05 11:12:37 +01:00
Fabrice Fontaine
71e77a5b27 SF Bug Tracker id 3496581 - Memory leak in getServiceList
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-03 08:43:23 PST

serviceNodeList is not freed if
current->next = malloc(sizeof(service_info)); returns NULL.
2012-03-05 10:59:20 +01:00
Fabrice Fontaine
a79a149e6a SF Bug Tracker id 3495616 - Memory leak in ixmlElement_setAttributeNS
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-02-29 02:09:43 PST

newAttrNode is not freed if newAttr->n.nodeValue = strdup(value); returns
NULL or if ixmlElement_setAttributeNodeNS(element, newAttr, NULL) does
not return IXML_SUCCESS.
2012-03-01 14:04:26 +01:00
Fabrice Fontaine
0693adc7dc SF Bug Tracker id 3495286 - Double free in get_action_node
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-02-28 04:27:54 PST

ixmlFreeDOMString(ActNodeName); is called twice if
ixmlParseBufferEx(ActNodeName, RespNode); does not return IXML_SUCCESS.
2012-03-01 14:02:34 +01:00
Fabrice Fontaine
076f8e5be6 SF Bug Tracker id 3495280 - Memory leak in ixmlDocument_createElementEx
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-02-28 04:01:02 PST

There is a memory leak in ixmlDocument_createElementEx:
newElement->tagName is not freed if
newElement->n.nodeName = strdup(tagName); returns NULL.
2012-03-01 10:47:10 +01:00
Fabrice Fontaine
60f9df425b SF Bug Tracker id 3494865 - Use of non-initialized variable in parser_parse_requestline
Submitted: Marcelo Roberto jimenez ( mroberto ) - 2012-02-26 16:50:23 PST

src/genlib/net/http/httpparser.c: In function ‘parser_parse_requestline’:
src/genlib/net/http/httpparser.c:1319:28: warning: ‘index’ may be used uninitialized in this function
(cherry picked from commit 9125d82010)
2012-02-29 15:15:28 -03:00
Marcelo Roberto Jimenez
fa83dd4a00 Update of THANKS file 2012-02-26 21:58:28 -03:00
Marcelo Roberto Jimenez
795de3e077 SF Bug Tracker id 3489999 - UpnpString leaks in genaSubscribe()
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-02-21 07:06:35 PST

In genaSubscribe() (defined in upnp/src/gena/gena_ctrlpt.c),
ActualSID and EventURL will not be freed if ScheduleGenaAutoRenew
returns UPNP_E_SUCCESS.

This fixes the an issue introduced by the previous fix.
2012-02-26 21:36:24 -03:00
Yoichi NAKAYAMA
a567576100 Remove files missing in branch-1.6.x. 2012-02-26 01:36:59 -03:00
Marcelo Roberto Jimenez
bc473d5e68 SF Bug Tracker id 3489999 - UpnpString leaks in genaSubscribe()
Submitted: Yoichi NAKAYAMA ( yoichi ) - 2012-02-21 07:06:35 PST

In genaSubscribe() (defined in upnp/src/gena/gena_ctrlpt.c),
ActualSID and EventURL will not be freed if ScheduleGenaAutoRenew
returns UPNP_E_SUCCESS.

This fixes the original issue.
2012-02-26 01:12:59 -03:00
Marcelo Roberto Jimenez
2940cbf94a SF Bug Tracker: UpnpString leaks in genaSubscribe()
In genaSubscribe() (defined in upnp/src/gena/gena_ctrlpt.c),
ActualSID and EventURL will not be freed.
2012-02-23 16:30:19 -02:00
Marcelo Roberto Jimenez
d87c966ec5 SF Bug Tracker: http lib only accepts HTTP/1.1 - ID:3485745
Submitted by Berend Dekens ( Berend Dekens ) - 2012-02-08 06:24:31 PST

In httpparser.c on line 1385 it says that HTTP 1.0 replies are blocked
because the UPnP verfication tool requires this.

I looked in the specs and as far as I can find, one should only be
carefull to send chunked communication to hosts supporting HTTP 1.1.
There is no requirement to support only HTTP 1.1.

The XBMC media server uses the Platinum UPnP library which replies
using HTTP/1.0 messages. As it is now, libupnp returns an error while
trying to parse the response while the response itself is completely
valid.

Is there a requirement in the UPnP 1.0 spec that I missed or is this
restriction self-imposed? And can it be lifted?

-------------------------------------------------------------------

Comment by Fabrice Fontaine:

Hide
Hi,

You're right, this modification should be removed. This version checking
was wrongly added in parser_parse_responseline function.

...
2012-02-23 15:29:45 -02:00
Marcelo Roberto Jimenez
e88d9dbedc White spaces. 2012-02-23 15:20:02 -02:00
Fabrice Fontaine
33fcfeb79f Bug fix for IPv4-mapped IPv6 addresses.
Setting IPv6 sockets with IPV6_V6ONLY flag to avoid getting IP packets
with IPv4-mapped IPv6 addresses on IPv6 sockets.
2012-02-18 16:05:50 -02:00
Edwin Stearns
a9c24fc7f3 Be nice to a server that returns its URL without a trailing slash
Attached is a patch that resolved an issue I found with a server that
gave its device description URI without a trailing slash (e.g.
`http://127.0.0.1:5555`).
2012-02-18 11:35:21 -02:00
Fabrice Fontaine
537581d8ad Bug fix for IPv4-mapped IPv6 addresses.
Setting IPv6 sockets with IPV6_V6ONLY flag to avoid getting IP packets
with IPv4-mapped IPv6 addresses on IPv6 sockets.
2012-02-18 11:22:53 -02:00
Marcelo Roberto Jimenez
66ea2ab11d Homekeeping for the next release. 2012-01-25 10:40:26 -02:00
Marcelo Roberto Jimenez
4ca0b382ea Adjust the library numbers for release. 2012-01-25 10:34:43 -02:00
Fabrice Fontaine
c155d3c68f Bug fix on M-SEARCH for IPv6 CPs.
Small bug fix on IPv6 Control Point: now CP will also send M-SEARCH on
site-scope address (FF05::C) instead of only sending M-SEARCH on
link-scope (FF02::C).
2012-01-25 09:56:02 -02:00
Fabrice Fontaine
03bd7759cd Retrieve IPv6 addresses in Upnp_Discovery.
Changing sockaddr_in into sockaddr_storage in Upnp_Discovery to be able
to retrieve IPv6 addresses of devices in Control Points using pupnp.
2012-01-25 09:54:14 -02:00
Fabrice Fontaine
80a65e5f61 Bug fix for IPv4-mapped IPv6 addresses.
Setting IPv6 sockets with IPV6_V6ONLY flag to avoid getting IP packets
with IPv4-mapped IPv6 addresses on IPv6 sockets.
2012-01-25 09:41:59 -02:00
Marcelo Roberto Jimenez
3b33626e2f Fix for return value of UpnpResolveURL and UpnpResolveURL2
SF Bug tracker, ID: 3469344
	Submitted: dimmman ( dimmman ) - 2012-01-04 01:44:29 PST
	Details: Looking at the code (v1.6.14, upnptools.c) for UpnpResolveURL
	and UpnpResolveURL2 it shows that the ExitFunction: always returns
	UPNP_E_SUCCESS.

	I'm farily sure it's a simple mistake that should have been "return ret;"
	in both cases.

	Br,
	Jonny
2012-01-09 08:58:03 -02:00
Marcelo Roberto Jimenez
b35761e893 Homekeeping for the next release. 2011-11-14 12:54:21 -02:00
Marcelo Roberto Jimenez
631259dcfc Adjust the library numbers for release. 2011-11-14 12:20:20 -02:00
Fabrice Fontaine
98e4f938d6 UPnP Low Power support
Adding two new functions (UpnpSendAdvertisementLowPower and
UpnpUnRegisterRootDeviceLowPower) which can be used to specify values
for the three SSDP headers defined by UPnP Low Power. Those headers are
Powerstate, SleepPeriod and RegistrationState.
2011-11-04 20:21:58 -02:00
Fabrice Fontaine
92c93a8010 Bug fix in IN6_IS_ADDR_GLOBAL.
Changing IN6_IS_ADDR_GLOBAL to accept all IPv6 addresses which have a
2000::/3 prefix.
2011-11-01 18:59:49 -02:00
Nick Leverton
e40e6b49d4 Summary: upnptools.h should #include upnpconfig.h - ID: 3426326
(cherry picked from commit ef7bbc4866)
2011-10-20 12:30:05 +01:00
Marcelo Roberto Jimenez
cec07d641a autoconfig.h for windows builds. 2011-07-20 06:21:32 -03:00
Fabrice Fontaine
6c6fb3707f Bug Fix on M-SEARCH.
Do not answer to M-SEARCH using HTTP version 1.0 as specified by the
UPnP Device Architecture.
2011-07-20 06:10:07 -03:00
Iain Denniston
92ea719804 Fixes for compilation under Windows (specifically MSVC). Also added MSVC supported "_inline", and fixed some WIN32 specific warnings. 2011-04-02 23:47:00 -03:00
Iain Denniston
fed316ff3e Several fixes to correctly use SOCKET (and related) types instead of non-portable variations. 2011-04-02 23:38:53 -03:00
Marcelo Roberto Jimenez
8eb7d1c1a5 Homekeeping for the next release. 2011-03-17 09:27:55 -03:00
Marcelo Roberto Jimenez
2b263b6574 Adjust the library numbers for release. 2011-03-17 09:15:19 -03:00
Marcelo Roberto Jimenez
e16cb4b225 Silence compiler warning message.
warning: unused parameter ‘listen_port6’
2011-03-15 18:27:17 -03:00
Fabrice Fontaine
0996d23318 Putting ssdpReqSocks under compilation flag.
Putting all access to ssdpReqSock4 and ssdpReqSock6 under
INCLUDE_CLIENT_APIS compilation flag to be able to compile when
client part of library is disable.
2011-03-15 18:22:30 -03:00
Fabrice Fontaine
11f9a2bafe New UpnpRegisterRootDevice4 for legacy CPs.
Add a new UpnpRegisterRootDevice4 which allow user to specify a
description URL to be returned for legacy CPs (for example, CPs
searching for a v1 when the device is v2). Most of those CPs does not
work if they found a v2 in the XML description, so this new function is
only used to solve interoperability issues.
2011-03-15 18:17:05 -03:00
Iain Denniston
8aca337de7 Fix for memory leak 2011-03-11 18:33:43 -03:00
Iain Denniston
a78a048577 Fix and Update of MSVC9 solution and project files 2011-03-11 18:07:49 -03:00
Iain Denniston
7338411c08 Partial fix for UpnpGetIfInfo with MSVC 2011-03-11 17:52:07 -03:00
Marcelo Roberto Jimenez
3a9ae348bc Created the macros PRIzd and PRIzx to deal with MSVC lack of C99.
Thanks to Iain Denniston for pointing it out.
2011-03-11 17:20:17 -03:00
Iain Denniston
840669b253 Fixes for headers when compiled under C++ 2011-03-11 16:07:51 -03:00
Marcelo Roberto Jimenez
e30e7bd586 Fix for uuid_unpack incorrect shift precedence. 2011-03-10 16:21:25 -03:00
Marcelo Roberto Jimenez
0d3412bb24 Homekeeping for the next release. 2011-02-08 21:48:46 -02:00
Marcelo Roberto Jimenez
e52dafda3b Adjust the library numbers for release. 2011-02-08 21:44:31 -02:00
Marcelo Roberto Jimenez
bab22c694b Undo the "incorrectly exported include files".
Legacy applications like linux-igd and igd2-for-linux are using those
API to create a thread pool for managing their GENA events.

Leave it to be reworked in 1.8.x.
2011-02-08 21:37:13 -02:00
Marcelo Roberto Jimenez
74665acd57 Homekeeping for the next release. 2011-02-07 22:41:08 -02:00
Marcelo Roberto Jimenez
b1629b8ac8 Adjust the library numbers for release. 2011-02-07 22:35:57 -02:00
Marcelo Roberto Jimenez
32e510b45a Remove PrintThreadPoolStats() from the public API.
This function uses a ThreadPool object as an argument, which is not
supposed to be exported. Also, debug compilation was broken.
2011-02-07 22:33:42 -02:00
Fabrice Fontaine
063d472f80 Major bug fix in IPv6 code.
Major bug fix in miniserver.c for IPv6, bug was introduced when
changing implementation of get_port in November 20th 2010 ("gena:fix
several compiler warnings" commit).
2011-02-07 21:27:41 -02:00
Marcelo Roberto Jimenez
0bbe9f62df Fix for incorrectly exported include files.
The files FreeList.h, LinkedList.h, ThreadPool.h and TimerThread.h
from the threautil library were being installed in the include
directory of the library, incorrectly exposing internal data structure
of the library.
2011-02-06 11:52:47 -02:00
Marcelo Roberto Jimenez
fdb8b9ef2f White spaces and indentation. 2011-01-30 09:40:48 -02:00
Chandra Penke
6c125feea0 Fix for compilation errors
Fix for compilation warnings of unused variables in upnpdebug.c in
release builds.
2011-01-30 09:36:05 -02:00
Chandra Penke
c4e9757bcf Fix for Race condition can hang miniserver thread.
Add 'requiredThreads' field to the ThreadPool structure, to avoid
a race condition when waiting for a new thread to be created. The
race condition occurs when a thread is destroyed while the master
thread is waiting for a new thread to be created.

Thanks to Chuck Thomason for pointing the problem.

Summary: Race condition can hang miniserver thread - ID: 3158591

Details:
Hello,

I have found a race condition in the thread pool handling of
libupnp-1.6.6 that periodically results in the miniserver thread
getting blocked infinitely.

In my setup, I have the miniserver thread pool configured with 1
job per thread, 2 threads minimum, and 50 threads maximum.

Just before the lockup occurs, the miniserver thread pool contains
2 threads: one worker thread hanging around from a previous HTTP
request job (let's call that thread "old_worker") and the
miniserver thread itself.

A new HTTP request comes in. Accordingly, the miniserver enters
schedule_request_job() and then ThreadPoolAdd(). In
ThreadPoolAdd(), the job gets added to the medium-priority queue,
and AddWorker() is called. In AddWorker(), jobs = 1 and threads =
1, so CreateWorker gets called.

When we enter CreateWorker(), tp->totalThreads is 2, so
currentThreads is 3. The function creates a new thread and then
blocks on tp->start_and_shutdown. The miniserver thread expects
the newly created thread to increment tp->totalThreads and then
signal the condition variable to wake up the miniserver thread and
let it proceed.

The newly created thread starts in the WorkerThread() function. It
increments tp->totalThreads to 3, does a broadcast on the
start_and_shutdown condition, and starts running its job. However,
before the miniserver thread wakes up, "old_worker" times out. It
sees that there are no jobs in any queue and that the total number
of threads (3) is more than the minimum (2). As a result, it
reduces tp->totalThreads to 2 and dies.

Now the miniserver thread finally wakes up. It checks
tp->totalThreads and sees that its value is 2, so it blocks on
tp->start_and_shutdown again. It has now "missed" seeing
tp->totalThreads get incremented to 3 and will never be unblocked
again.

When this issue does occur for a server device, the miniserver
port remains open, but becomes unresponsive since the miniserver
thread is stuck. SSDP alive messages keep getting sent out, as
they are handled by a separate thread. Reproducing the issue is
difficult due to the timing coincidence involved, but in my
environment I am presently seeing it at least once a day. I
figured out the sequence described above through addition of my
own debug logs.

The relevant code involved in this bug has not changed
substantially in libupnp-1.6.10, though I am planning to test
against 1.6.10 as well in the near future.

Do you have any input for an elegant fix for this issue?

Thanks,

Chuck Thomason
2011-01-20 04:45:27 -02:00
Marcelo Roberto Jimenez
639d3a5a03 Update the documentation about samples in README.
Thanks to Tom (tomdev2).
2011-01-17 11:36:52 -02:00
Chandra Penke
f46683fd0e Fix for typo in strndup() function definition. 2011-01-17 09:03:34 -02:00
Marcelo Roberto Jimenez
abfa841318 Define _FILE_OFFSET_BITS, _LARGEFILE_SOURCE and _LARGE_FILE_SOURCE in upnpconfig.h.
Make these definitions available to programs using the library.
Thanks to Chandra Penke for pointing the problem.
2011-01-16 22:38:18 -02:00
Chandra Penke
3c4ff99cdb Allow virtual callbacks to use chunked encoding by setting the file length of a UpnpFileInfo object to be UPNP_USING_CHUNKED. 2011-01-16 21:28:13 -02:00
Marcelo Roberto Jimenez
541679d651 Use config.h to test for the availability of strndup() and strnlen(). 2011-01-16 21:05:07 -02:00
Chandra Penke
cb1188d2bc Fixes chunked transfer encoding in HTTP client API 2011-01-15 21:11:24 -02:00
Marcelo Roberto Jimenez
189ce59dbe Null termination of strndup() implementation on systems missing it.
Also, implementation of strnlen() on systems missing it.
2011-01-14 22:05:22 -02:00
Marcelo Roberto Jimenez
4815e52586 Doxygen on membuffer. 2011-01-14 10:26:45 -02:00
Marcelo Roberto Jimenez
9051731a93 Minor change in membuffer.c to include "membuffer.h"
...without looking in the standard header path. This allows pupnp
to build in xcode.
2011-01-14 09:54:59 -02:00
Marcelo Roberto Jimenez
39fd869db8 Leave just one call to gmtime() in http_MakeMessage(). 2011-01-02 22:36:13 -02:00
Marcelo Roberto Jimenez
8997e7fff6 Make sure va_end() is called in http_MakeMessage(). 2011-01-02 22:31:10 -02:00
Marcelo Roberto Jimenez
7e8d1787c9 Fixes many problems in sample code.
In particular, undoes 25c908c558:
SF Patch Tracker [ 2836704 ] Search for nested serviceList (not
stopping at the first lis
Submitted By: zephyrus ( zephyrus00jp )

The original zephyrus' code is still #ifdef'd in the file, if someone
wishes to fix it, check for "#ifdef OLD_FIND_SERVICE_CODE".
2010-12-23 22:22:32 -02:00
Marcelo Roberto Jimenez
70d2a7c9e7 Simplify code in SampleUtil_GetFirstDocumentItem(). 2010-12-23 18:40:53 -02:00
Marcelo Roberto Jimenez
40e6e4503c Doxygen and white spaces in samples. 2010-12-22 11:54:45 -02:00
Marcelo Roberto Jimenez
4b0c8d52b8 Remove unnecessary inclusion of param.h. 2010-12-22 11:02:14 -02:00
Marcelo Roberto Jimenez
c05bbec6ec Fix for segfault in sample code. 2010-12-22 10:52:29 -02:00
Marcelo Roberto Jimenez
d5af7efeb8 Fix debug compilation when CFLAGS is set on the configure line. 2010-12-22 09:58:48 -02:00
Marcelo Roberto Jimenez
c8af5ec806 White spaces and some debugging information. 2010-12-22 09:55:48 -02:00
Marcelo Roberto Jimenez
1ee8cd9e1a Ivan Romanov's system file inclusion patch for WIN32 (mingw). 2010-12-21 08:33:57 -02:00
Marcelo Roberto Jimenez
a0ebf23785 Missed this inline in ssdplib.h. 2010-12-19 22:57:01 -02:00
Marcelo Roberto Jimenez
cdf35baa34 Remove unused enum SsdpCmdType and unused typedef Event. 2010-12-19 22:53:08 -02:00
Marcelo Roberto Jimenez
6d7702d3a7 Syncronize ssdplib in 1.6.x and 1.8.x, part 2. 2010-12-19 21:39:19 -02:00
Marcelo Roberto Jimenez
6af93e6ca6 White spaces. 2010-12-19 21:19:44 -02:00
Marcelo Roberto Jimenez
2ce88f80f0 Syncronize ssdplib in 1.6.x and 1.8.x. 2010-12-19 21:14:39 -02:00
Marcelo Roberto Jimenez
f67ed1949b Less include file mess and doxygenation. 2010-12-19 19:02:42 -02:00
Marcelo Roberto Jimenez
04d64a893b Doxygenation of SSDP library. 2010-12-19 13:41:58 -02:00
Marcelo Roberto Jimenez
704dca3df1 Doxygen. 2010-12-18 20:01:49 -02:00
Marcelo Roberto Jimenez
b2a88aa70b SF Tracker: Patches - Fedora mingw32 compilation - ID: 3138849
Details:
Hello. I trying compile libupnp-1.6.10 on the Fedora 14 MinGW
Environment and get many errors. I create patch to fix it. With this
patch i can get static library. This patch is very raw.

Submitted: Ivan Romanov (ivanromanov) - 2010-12-16 23:29:19 UTC
2010-12-18 19:29:24 -02:00
Marcelo Roberto Jimenez
bb5a80c05b Get rid of useless integer typedefs.
Remove unsigned32, unsigned16 and unsigned8 references in the code.
2010-12-18 18:17:14 -02:00
Marcelo Roberto Jimenez
7e8e5621a8 Remove unnecessary header <sys/utsname.h> from upnpapi.c. 2010-12-18 18:09:35 -02:00
Marcelo Roberto Jimenez
462505ff62 Use the new include files UpnpIntTypes.h, UpnpStdInt.h and UpnpUniStd.h.
Trying to keep platform dependency on the headers and clean the main
code a little bit.
2010-12-18 17:08:36 -02:00
Marcelo Roberto Jimenez
d6418b3e17 White spaces. 2010-12-18 16:00:35 -02:00
Marcelo Roberto Jimenez
e8106e4f05 Doxygen. 2010-12-13 09:33:49 -02:00
Marcelo Roberto Jimenez
3dd133a03c Homekeeping for the next release. 2010-12-11 16:42:20 -02:00
121 changed files with 15857 additions and 7683 deletions

15
.gitignore vendored
View File

@@ -73,6 +73,14 @@ GRTAGS
GSYMS
GTAGS
# QT-Creator files
Makefile.am.user
pupnp.config
pupnp.creator
pupnp.creator.user
pupnp.files
pupnp.includes
*.orig
*~
\#*#
@@ -101,5 +109,12 @@ upnp/inc/upnpconfig.h
upnp/sample/tv_combo
upnp/sample/tv_ctrlpt
upnp/sample/tv_device
upnp/unittest/unittest
upnp/unittest/*.pp.c
docs/doxygen
/build/vc10/out.vc9.Win32/Debug
/build/vc10/out.vc10.Win32
/build/vc10/out.vc10.x64
/pthreads

1536
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -31,7 +31,7 @@ PROJECT_NAME = libUPnP
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 1.6.10
PROJECT_NUMBER = 1.6.20
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.

23
README
View File

@@ -227,17 +227,18 @@ To build the samples (note: this is the default behaviour):
% ./configure --enable-samples
% make
will build the sample device "$(LIBUPNP)/upnp/upnp_tv_device" and
sample control point "$(LIBUPNP)/upnp/upnp_tv_ctrlpt".
will build the sample device "$(LIBUPNP)/upnp/tv_device" and
sample control point "$(LIBUPNP)/upnp/tv_ctrlpt".
Note : the sample device won't be built if --disable-device has been
configured, and the sample control point won't be build if --disable-client
has been configured.
To run the sample device, you need the "$(LIBUPNP)/upnp/sample/tvdevice/web"
sub-directory. Example :
To run the sample device, you need to create a tvdevice directory and move
the web directory there, giving: "$(LIBUPNP)/upnp/sample/tvdevice/web".
To run the sample invoke from the command line as follows:
% cd $(LIBUPNP)/upnp/sample/tvdevice
% ../../upnp_tv_device
% ../tv_device
@@ -265,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:
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
top level source folder.
Rename Pre-build.2 to pthreads.
Open the provided workspace build\libupnp.dsw with Visual C++ 6.0 and select
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
pthreads-w32 library following switches need to be defined additionally:

22
THANKS
View File

@@ -8,13 +8,14 @@ exempt of errors.
- Alex (afaucher)
- Andre Sodermans (wienerschnitzel)
- Anoop Mohan (an00p)
- Anthony Viallard (homer242)
- Apostolos Syropoulos
- Arno Willig
- Bob Ciora
- Carlo Parata
- Carl Benson
- Chandra (inactiveneurons)
- Chandra Penke (inactiveneurons)
- Chaos
- Charles Nepveu (cnepveu)
- Chris Pickel
@@ -22,17 +23,22 @@ exempt of errors.
- Craig Nelson
- David Blanchet
- David Maass
- Dirk (dirk_vdb)
- Emil Ljungdahl
- Erik Johansson
- Eric Tanguy
- Erwan Velu
- Eugene Christensen
- Fabrice Fontaine
- Fabrice Fontaine (ffontaine)
- Fredrik Svensson
- Glen Masgai
- Gustavo Zacarias (gustavoz)
- Hartmut Holzgraefe (hholzgra)
- Iain Denniston (ectotropic)
- Ingo Hofmann
- Ivan Romanov (ivanromanov)
- Jiri Zouhar
- Jean-Francois Dockes (medoc)
- John Dennis
- Jonathan Casiot (no_dice)
- Josh Carroll
@@ -50,14 +56,26 @@ exempt of errors.
- Oskar Liljeblad
- Michael (oxygenic)
- Paul Vixie
- Peng
- Peter Hartley
- Philipp Matthias Hahn
- Pino Toscano (pinotree)
- Rene Hexel
- Robert Buckley (rbuckley)
- Robert Gingher (robsbox)
- Ronan Menard
- Sebastian Brandt
- Shaun Marko (semarko)
- Siva Chandran
- Stefan Sommerfeld (zerocom)
- Stéphane Corthésy
- Steve Bresson
- Thijs Schreijer
- Timothy Redaelli
- Titus Winters
- Tom (tomdev2)
- Yoichi Nakayama (yoichi)
- zephyrus (zephyrus00jp)
- zexian chen
- Zheng Peng (darkelf2010)

View File

@@ -49,6 +49,12 @@
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Defines if strndup is available on your system */
#define HAVE_STRNDUP 1
/* Defines if strnlen is available on your system */
#define HAVE_STRNLEN 1
/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H 1
@@ -99,13 +105,16 @@
#define PACKAGE_NAME "libupnp"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libupnp 1.6.10"
#define PACKAGE_STRING "libupnp 1.6.20"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libupnp"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.6.10"
#define PACKAGE_VERSION "1.6.20"
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
@@ -123,6 +132,9 @@
/* see upnpconfig.h */
#define UPNP_ENABLE_NOTIFICATION_REORDERING 1
/* see upnpconfig.h */
/* #undef UPNP_ENABLE_UNSPECIFIED_SERVER */
/* see upnpconfig.h */
#define UPNP_HAVE_CLIENT 1
@@ -132,6 +144,18 @@
/* see upnpconfig.h */
#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 */
#define UPNP_HAVE_TOOLS 1
@@ -148,13 +172,13 @@
#define UPNP_VERSION_MINOR 6
/* see upnpconfig.h */
#define UPNP_VERSION_PATCH 10
#define UPNP_VERSION_PATCH 20
/* see upnpconfig.h */
#define UPNP_VERSION_STRING "1.6.10"
#define UPNP_VERSION_STRING "1.6.20"
/* Version number of package */
#define VERSION "1.6.10"
#define VERSION "1.6.20"
/* File Offset size */
#define _FILE_OFFSET_BITS 64

View File

@@ -40,7 +40,7 @@
***************************************************************************/
/** The library version (string) e.g. "1.3.0" */
#define UPNP_VERSION_STRING "1.6.10"
#define UPNP_VERSION_STRING "1.6.20"
/** Major version of the library */
#define UPNP_VERSION_MAJOR 1
@@ -49,7 +49,7 @@
#define UPNP_VERSION_MINOR 6
/** Patch version of the library */
#define UPNP_VERSION_PATCH 10
#define UPNP_VERSION_PATCH 20
/** The library version (numeric) e.g. 10300 means version 1.3.0 */
#define UPNP_VERSION \
@@ -57,9 +57,22 @@
/***************************************************************************
* Large file support
***************************************************************************/
/** File Offset size */
#define _FILE_OFFSET_BITS 64
/** Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#define _LARGEFILE_SOURCE 1
/** Large files support */
#define _LARGE_FILE_SOURCE /**/
/***************************************************************************
* Library optional features
***************************************************************************/
***************************************************************************/
/*
* The following defines can be tested in order to know which
@@ -87,6 +100,26 @@
#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
* (i.e. configure --enable-tools) : <upnp/upnptools.h> file is available */
#define UPNP_HAVE_TOOLS 1
@@ -95,5 +128,9 @@
* (i.e. configure --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 */

3
build/vc10/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*.suo
*.user

361
build/vc10/ixml.vcxproj Normal file
View 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>

View 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
View 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
View 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>

View 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>

View 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>

View 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
View 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>

View 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
View 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>

View 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
View 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>

View 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>

View File

@@ -1,217 +1,217 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="ixml"
ProjectGUID="{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}"
RootNamespace="ixml"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="WIN32;DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
UseOfMFC="0"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc"
PreprocessorDefinitions="WIN32;IXML_INLINE="
RuntimeLibrary="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\ixml\src\attr.c"
>
</File>
<File
RelativePath="..\..\ixml\src\document.c"
>
</File>
<File
RelativePath="..\..\ixml\src\element.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixml.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmldebug.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmlmembuf.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmlparser.c"
>
</File>
<File
RelativePath="..\..\ixml\src\namedNodeMap.c"
>
</File>
<File
RelativePath="..\..\ixml\src\node.c"
>
</File>
<File
RelativePath="..\..\ixml\src\nodeList.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\ixml\inc\ixml.h"
>
</File>
<File
RelativePath="..\..\ixml\inc\ixmldebug.h"
>
</File>
<File
RelativePath="..\..\ixml\src\inc\ixmlmembuf.h"
>
</File>
<File
RelativePath="..\..\ixml\src\inc\ixmlparser.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="ixml"
ProjectGUID="{AD489FAF-9CDD-411B-BFE9-1B9C6C16D427}"
RootNamespace="ixml"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="WIN32;DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
UseOfMFC="0"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="WIN32;DEBUG;IXML_INLINE="
RuntimeLibrary="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\ixml\src\attr.c"
>
</File>
<File
RelativePath="..\..\ixml\src\document.c"
>
</File>
<File
RelativePath="..\..\ixml\src\element.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixml.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmldebug.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmlmembuf.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixmlparser.c"
>
</File>
<File
RelativePath="..\..\ixml\src\namedNodeMap.c"
>
</File>
<File
RelativePath="..\..\ixml\src\node.c"
>
</File>
<File
RelativePath="..\..\ixml\src\nodeList.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\ixml\inc\ixml.h"
>
</File>
<File
RelativePath="..\..\ixml\inc\ixmldebug.h"
>
</File>
<File
RelativePath="..\..\ixml\src\inc\ixmlmembuf.h"
>
</File>
<File
RelativePath="..\..\ixml\src\inc\ixmlparser.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -50,7 +50,7 @@
Optimization="2"
InlineFunctionExpansion="1"
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"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
@@ -80,8 +80,8 @@
OutputFile="$(OutDir)\libupnp.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile=".\Release/libupnp.pdb"
ImportLibrary=".\Release/libupnp.lib"
ProgramDatabaseFile="$(OutDir)\libupnp.pdb"
ImportLibrary="$(OutDir)\libupnp.lib"
TargetMachine="1"
/>
<Tool
@@ -96,7 +96,7 @@
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/libupnp.bsc"
OutputFile="$(OutDir)\libupnp.bsc"
/>
<Tool
Name="VCFxCopTool"
@@ -218,14 +218,6 @@
Name="sources"
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
RelativePath="..\..\ixml\src\attr.c"
>
@@ -234,10 +226,6 @@
RelativePath="..\..\upnp\src\genlib\client_table\client_table.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\Discovery.c"
>
</File>
<File
RelativePath="..\..\ixml\src\document.c"
>
@@ -246,18 +234,6 @@
RelativePath="..\..\ixml\src\element.c"
>
</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
RelativePath="..\..\threadutil\src\FreeList.c"
>
@@ -358,10 +334,6 @@
RelativePath="..\..\upnp\src\ssdp\ssdp_device.c"
>
</File>
<File
RelativePath="..\..\upnp\src\ssdp\ssdp_ResultData.c"
>
</File>
<File
RelativePath="..\..\upnp\src\ssdp\ssdp_server.c"
>
@@ -370,22 +342,10 @@
RelativePath="..\..\upnp\src\genlib\net\http\statcodes.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\StateVarComplete.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\StateVarRequest.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\util\strintmap.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\SubscriptionRequest.c"
>
</File>
<File
RelativePath="..\..\upnp\src\uuid\sysdep.c"
>
@@ -447,14 +407,6 @@
Name="headers"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\upnp\inc\ActionComplete.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\actionrequest.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\client_table.h"
>
@@ -463,22 +415,6 @@
RelativePath="..\..\upnp\src\inc\config.h"
>
</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
RelativePath="..\..\upnp\src\inc\gena.h"
>
@@ -563,14 +499,6 @@
RelativePath="..\..\upnp\src\inc\statcodes.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\StateVarComplete.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\statevarrequest.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\statuscodes.h"
>
@@ -579,10 +507,6 @@
RelativePath="..\..\upnp\src\inc\strintmap.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\SubscriptionRequest.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\sysdep.h"
>

View File

@@ -40,7 +40,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include"
PreprocessorDefinitions="WIN32;DEBUG"
PreprocessorDefinitions="WIN32;DEBUG;UPNP_USE_MSVCPP"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -80,9 +80,9 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
@@ -103,6 +103,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include"
PreprocessorDefinitions="WIN32;UPNP_USE_MSVCPP"
RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
@@ -118,18 +120,11 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
@@ -139,12 +134,6 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>

View File

@@ -40,7 +40,7 @@
Name="VCCLCompilerTool"
Optimization="0"
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"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -91,8 +91,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
@@ -114,6 +114,8 @@
/>
<Tool
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"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
@@ -130,6 +132,8 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
@@ -174,15 +178,15 @@
>
</File>
<File
RelativePath="..\..\upnp\sample\tvcombo\linux\upnp_tv_combo_main.c"
RelativePath="..\..\upnp\sample\linux\tv_combo_main.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_ctrlpt.c"
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_device.c"
RelativePath="..\..\upnp\sample\common\tv_device.c"
>
</File>
</Filter>

View File

@@ -40,7 +40,7 @@
Name="VCCLCompilerTool"
Optimization="0"
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"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -91,8 +91,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
@@ -114,6 +114,8 @@
/>
<Tool
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"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
@@ -130,6 +132,8 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
@@ -174,11 +178,11 @@
>
</File>
<File
RelativePath="..\..\upnp\sample\tvctrlpt\upnp_tv_ctrlpt.c"
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvctrlpt\linux\upnp_tv_ctrlpt_main.c"
RelativePath="..\..\upnp\sample\linux\tv_ctrlpt_main.c"
>
</File>
</Filter>

View File

@@ -40,7 +40,7 @@
Name="VCCLCompilerTool"
Optimization="0"
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"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -91,8 +91,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
OutputDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc8.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
@@ -114,6 +114,8 @@
/>
<Tool
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"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
@@ -130,6 +132,8 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;out.vc8.$(ConfigurationName)\ixml&quot;;&quot;out.vc8.$(ConfigurationName)\threadutil&quot;;&quot;out.vc8.$(ConfigurationName)\libupnp&quot;"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
@@ -174,11 +178,11 @@
>
</File>
<File
RelativePath="..\..\upnp\sample\tvdevice\upnp_tv_device.c"
RelativePath="..\..\upnp\sample\common\tv_device.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvdevice\linux\upnp_tv_device_main.c"
RelativePath="..\..\upnp\sample\linux\tv_device_main.c"
>
</File>
</Filter>

View File

@@ -11,16 +11,20 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -41,12 +45,16 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
PreprocessorDefinitions="DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="4"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -59,6 +67,75 @@
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
@@ -78,11 +155,12 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -102,13 +180,19 @@
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -121,6 +205,354 @@
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
EnableManagedIncrementalBuild="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\ixml\inc;..\..\ixml\src\inc;..\inc;..\..\upnp\inc"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"

View File

@@ -28,34 +28,112 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tvcombo", "tvcombo.vcproj",
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

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="libupnp"
ProjectGUID="{6227F51A-1498-4C4A-B213-F6FDED605125}"
RootNamespace="libupnp"
@@ -11,19 +11,22 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -49,19 +52,23 @@
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\pthreads\include,..\ixml\src\inc,..\ixml\inc,..\threadutil\inc,..\upnp\inc,..\upnp\src\inc,.\inc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/libupnp.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
BrowseInformation="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
BrowseInformation="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -76,14 +83,20 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadvc2.lib ws2_32.lib iphlpapi.lib"
OutputFile=".\Release/libupnp.dll"
AdditionalDependencies="pthreadvc2.lib ws2_32.lib iphlpapi.lib ixml.lib threadutil.lib"
OutputFile="$(OutDir)\$(ProjectName).dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile=".\Release/libupnp.pdb"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary=".\Release/libupnp.lib"
ImportLibrary="$(TargetDir)$(TargetName).lib"
TargetMachine="1"
/>
<Tool
@@ -111,11 +124,115 @@
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
Name="Release|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
TypeLibraryName=".\Release/libupnp.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\inc&quot;;&quot;$(SolutionDir)\..\msvc&quot;;&quot;$(SolutionDir)\..\..\upnp\inc&quot;;&quot;$(SolutionDir)\..\..\upnp\src\inc&quot;;&quot;$(SolutionDir)\..\..\ixml\inc&quot;;&quot;$(SolutionDir)\..\..\ixml\src\inc&quot;;&quot;$(SolutionDir)\..\..\threadutil\inc&quot;;&quot;$(SolutionDir)\..\..\pthreads&quot;;&quot;$(SolutionDir)\..\..\pthreads\include&quot;"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
BrowseInformation="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1031"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadvc2.lib ws2_32.lib iphlpapi.lib ixml.lib threadutil.lib"
OutputFile="$(OutDir)\$(ProjectName).dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(TargetDir)$(TargetName).lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/libupnp.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
@@ -144,19 +261,20 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\pthreads\include;..\..\ixml\src\inc;..\..\ixml\inc;..\..\threadutil\inc;..\..\upnp\inc;..\..\upnp\src\inc;..\inc;..\msvc"
PreprocessorDefinitions="DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS"
AdditionalIncludeDirectories="..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile="$(OutDir)\libupnp.pch"
AssemblerListingLocation="$(OutDir)\"
ObjectFile="$(OutDir)\"
ProgramDataBaseFileName="$(OutDir)\"
BrowseInformation="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
BrowseInformation="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -171,15 +289,17 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadvc2.lib ws2_32.lib iphlpapi.lib $(TargetDir)..\ixml\ixml.lib"
OutputFile="$(OutDir)\libupnp.dll"
LinkIncremental="2"
AdditionalDependencies="pthreadvc2.lib ws2_32.lib iphlpapi.lib ixml.lib threadutil.lib"
OutputFile="$(OutDir)\$(ProjectName).dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\libupnp.pdb"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(OutDir)\libupnp.lib"
ImportLibrary="$(TargetDir)$(TargetName).lib"
TargetMachine="1"
/>
<Tool
@@ -206,6 +326,436 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
TypeLibraryName=".\Debug/libupnp.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\inc&quot;;&quot;$(SolutionDir)\..\msvc&quot;;&quot;$(SolutionDir)\..\..\upnp\inc&quot;;&quot;$(SolutionDir)\..\..\upnp\src\inc&quot;;&quot;$(SolutionDir)\..\..\ixml\inc&quot;;&quot;$(SolutionDir)\..\..\ixml\src\inc&quot;;&quot;$(SolutionDir)\..\..\threadutil\inc&quot;;&quot;$(SolutionDir)\..\..\pthreads&quot;;&quot;$(SolutionDir)\..\..\pthreads\include&quot;"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
BrowseInformation="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1031"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadvc2.lib ws2_32.lib iphlpapi.lib ixml.lib threadutil.lib"
OutputFile="$(OutDir)\$(ProjectName).dll"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(TargetDir)$(TargetName).lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(OutDir)\libupnp.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/libupnp.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
BrowseInformation="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1031"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(OutDir)\libupnp.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
TypeLibraryName=".\Debug/libupnp.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\inc&quot;;&quot;$(SolutionDir)\..\msvc&quot;;&quot;$(SolutionDir)\..\..\upnp\inc&quot;;&quot;$(SolutionDir)\..\..\upnp\src\inc&quot;;&quot;$(SolutionDir)\..\..\ixml\inc&quot;;&quot;$(SolutionDir)\..\..\ixml\src\inc&quot;;&quot;$(SolutionDir)\..\..\threadutil\inc&quot;;&quot;$(SolutionDir)\..\..\pthreads&quot;;&quot;$(SolutionDir)\..\..\pthreads\include&quot;"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
BrowseInformation="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1031"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(OutDir)\libupnp.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/libupnp.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\inc;..\msvc;..\..\upnp\inc;..\..\upnp\src\inc;..\..\ixml\inc;..\..\ixml\src\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
BrowseInformation="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1031"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/libupnp.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
TypeLibraryName=".\Release/libupnp.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\inc&quot;;&quot;$(SolutionDir)\..\msvc&quot;;&quot;$(SolutionDir)\..\..\upnp\inc&quot;;&quot;$(SolutionDir)\..\..\upnp\src\inc&quot;;&quot;$(SolutionDir)\..\..\ixml\inc&quot;;&quot;$(SolutionDir)\..\..\ixml\src\inc&quot;;&quot;$(SolutionDir)\..\..\threadutil\inc&quot;;&quot;$(SolutionDir)\..\..\pthreads&quot;;&quot;$(SolutionDir)\..\..\pthreads\include&quot;"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
BrowseInformation="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1031"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/libupnp.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
@@ -214,14 +764,6 @@
Name="sources"
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
RelativePath="..\..\ixml\src\attr.c"
>
@@ -230,10 +772,6 @@
RelativePath="..\..\upnp\src\genlib\client_table\client_table.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\Discovery.c"
>
</File>
<File
RelativePath="..\..\ixml\src\document.c"
>
@@ -242,18 +780,6 @@
RelativePath="..\..\ixml\src\element.c"
>
</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
RelativePath="..\..\threadutil\src\FreeList.c"
>
@@ -278,10 +804,6 @@
RelativePath="..\..\upnp\src\genlib\net\http\httpreadwrite.c"
>
</File>
<File
RelativePath="..\..\upnp\src\inet_pton.c"
>
</File>
<File
RelativePath="..\..\ixml\src\ixml.c"
>
@@ -354,10 +876,6 @@
RelativePath="..\..\upnp\src\ssdp\ssdp_device.c"
>
</File>
<File
RelativePath="..\..\upnp\src\ssdp\ssdp_ResultData.c"
>
</File>
<File
RelativePath="..\..\upnp\src\ssdp\ssdp_server.c"
>
@@ -366,22 +884,10 @@
RelativePath="..\..\upnp\src\genlib\net\http\statcodes.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\StateVarComplete.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\StateVarRequest.c"
>
</File>
<File
RelativePath="..\..\upnp\src\genlib\util\strintmap.c"
>
</File>
<File
RelativePath="..\..\upnp\src\api\SubscriptionRequest.c"
>
</File>
<File
RelativePath="..\..\upnp\src\uuid\sysdep.c"
>
@@ -444,11 +950,11 @@
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\upnp\inc\ActionComplete.h"
RelativePath="..\inc\autoconfig.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\ActionRequest.h"
RelativePath="..\..\upnp\inc\Callback.h"
>
</File>
<File
@@ -459,22 +965,6 @@
RelativePath="..\..\upnp\src\inc\config.h"
>
</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
RelativePath="..\..\upnp\src\inc\gena.h"
>
@@ -495,10 +985,6 @@
RelativePath="..\..\upnp\src\inc\gmtdate.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\http_client.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\httpparser.h"
>
@@ -508,7 +994,7 @@
>
</File>
<File
RelativePath="..\..\upnp\src\inc\inet_pton.h"
RelativePath="..\msvc\inttypes.h"
>
</File>
<File
@@ -559,28 +1045,32 @@
RelativePath="..\..\upnp\src\inc\statcodes.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\StateVarComplete.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\StateVarRequest.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\statuscodes.h"
>
</File>
<File
RelativePath="..\msvc\stdint.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\strintmap.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\SubscriptionRequest.h"
RelativePath="..\..\upnp\src\inc\sysdep.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\sysdep.h"
RelativePath="..\..\upnp\inc\TemplateInclude.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\TemplateSource.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\TemplateUndef.h"
>
</File>
<File
@@ -599,10 +1089,30 @@
RelativePath="..\..\upnp\src\inc\upnpapi.h"
>
</File>
<File
RelativePath="..\inc\upnpconfig.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\upnpdebug.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\UpnpGlobal.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\UpnpInet.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\UpnpIntTypes.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\UpnpStdInt.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\UpnpString.h"
>
@@ -611,6 +1121,14 @@
RelativePath="..\..\upnp\inc\upnptools.h"
>
</File>
<File
RelativePath="..\..\upnp\inc\UpnpUniStd.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\upnputil.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\uri.h"
>
@@ -619,27 +1137,19 @@
RelativePath="..\..\upnp\src\inc\urlconfig.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\util.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\utilall.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\uuid.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\VirtualDir.h"
>
</File>
<File
RelativePath="..\..\upnp\src\inc\webserver.h"
>
</File>
</Filter>
<File
RelativePath="..\..\..\..\libupnp_win32.patch"
>
</File>
</Files>
<Globals>
</Globals>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="threadutil"
ProjectGUID="{1D3EEF7A-D248-48C0-B6B5-ECA229FE4B3D}"
RootNamespace="threadutil"
@@ -11,14 +11,17 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
>
@@ -40,13 +43,15 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include"
PreprocessorDefinitions="DEBUG;WIN32;_USRDLL;LIBUPNP_EXPORTS;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="4"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
@@ -60,8 +65,73 @@
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="pthreadVC2.lib"
AdditionalLibraryDirectories="..\..\pthreads\lib"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
@@ -81,9 +151,9 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
>
@@ -105,11 +175,15 @@
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\ixml\inc;..\..\pthreads\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBUPNP_EXPORTS;PTW32_STATIC_LIB;UPNP_STATIC_LIB;UPNP_USE_MSVCPP;_CRT_SECURE_NO_WARNINGS"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
@@ -124,18 +198,12 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
@@ -146,7 +214,341 @@
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\lib\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\threadutil\inc;..\..\upnp\inc;..\..\pthreads;..\..\pthreads\include"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
@@ -204,12 +606,6 @@
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="tvcombo"
ProjectGUID="{6365804B-22C6-4D5E-91F3-0C052EB55B4F}"
RootNamespace="tvcombo"
@@ -11,16 +11,19 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
@@ -40,13 +43,15 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
PreprocessorDefinitions="DEBUG;WIN32"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="4"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
@@ -60,9 +65,12 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib $(TargetDir)..\libupnp\libupnp.lib"
AdditionalLibraryDirectories="&quot;$(TargetDir)..\ixml&quot;;&quot;$(TargetDir)..\threadutil&quot;;&quot;$(TargetDir)..\libupnp&quot;"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
@@ -88,11 +96,89 @@
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
@@ -114,8 +200,13 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
@@ -131,7 +222,12 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
@@ -158,6 +254,406 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
@@ -172,24 +668,18 @@
>
</File>
<File
RelativePath="..\..\upnp\sample\tvcombo\linux\upnp_tv_combo_main.c"
RelativePath="..\..\upnp\sample\linux\tv_combo_main.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_ctrlpt.c"
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_device.c"
RelativePath="..\..\upnp\sample\common\tv_device.c"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
@@ -200,11 +690,11 @@
>
</File>
<File
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_ctrlpt.h"
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.h"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvcombo\upnp_tv_device.h"
RelativePath="..\..\upnp\sample\common\tv_device.h"
>
</File>
</Filter>

View File

@@ -11,14 +11,17 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
@@ -40,13 +43,16 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt"
PreprocessorDefinitions="WIN32;DEBUG"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="4"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -59,9 +65,12 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;.\out.vc9.$(ConfigurationName)\ixml&quot;;&quot;.\out.vc9.$(ConfigurationName)\threadutil&quot;;&quot;.\out.vc9.$(ConfigurationName)\libupnp&quot;"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
@@ -86,10 +95,88 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
@@ -113,10 +200,16 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -129,7 +222,12 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
@@ -156,6 +254,406 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\ixml\inc;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvctrlpt\linux;..\..\upnp\sample\tvctrlpt"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
@@ -170,11 +668,11 @@
>
</File>
<File
RelativePath="..\..\upnp\sample\tvctrlpt\upnp_tv_ctrlpt.c"
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvctrlpt\linux\upnp_tv_ctrlpt_main.c"
RelativePath="..\..\upnp\sample\linux\tv_ctrlpt_main.c"
>
</File>
</Filter>
@@ -188,16 +686,10 @@
>
</File>
<File
RelativePath="..\..\upnp\sample\tvctrlpt\upnp_tv_ctrlpt.h"
RelativePath="..\..\upnp\sample\common\tv_ctrlpt.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>

View File

@@ -11,14 +11,17 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory=".\out.vc9.$(ConfigurationName)\$(ProjectName)"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
@@ -40,13 +43,16 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
PreprocessorDefinitions="WIN32;DEBUG"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="4"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -59,9 +65,12 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\pthreads\lib\pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;;&quot;.\out.vc9.$(ConfigurationName)\ixml&quot;;&quot;.\out.vc9.$(ConfigurationName)\threadutil&quot;;&quot;.\out.vc9.$(ConfigurationName)\libupnp&quot;"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
@@ -86,10 +95,88 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
@@ -113,10 +200,16 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -129,7 +222,12 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
@@ -156,6 +254,406 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\ixml\inc;..\..\upnp\sample\common;..\inc;..\..\threadutil\inc;..\..\pthreads;..\..\pthreads\include;..\..\upnp\sample\tvdevice;..\..\upnp\sample\tvdevice\linux"
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|Win32"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Lib|x64"
OutputDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\bin\"
IntermediateDirectory="$(SolutionDir)\out.vc9.$(PlatformName)\$(ConfigurationName)\tmp\$(ProjectName)\"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\..\upnp\inc;..\..\upnp\sample\common;..\..\upnp\sample;..\..\ixml\inc;..\..\pthreads;..\..\pthreads\include;..\inc;..\..\threadutil\inc;..\..\upnp\sample\tvcombo"
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"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreadVC2.lib ixml.lib threadutil.lib libupnp.lib ws2_32.lib iphlpapi.lib "
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\pthreads\;..\..\pthreads\lib;$(OutDir)\..\lib;$(OutDir)\..\bin"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
@@ -170,11 +668,11 @@
>
</File>
<File
RelativePath="..\..\upnp\sample\tvdevice\upnp_tv_device.c"
RelativePath="..\..\upnp\sample\common\tv_device.c"
>
</File>
<File
RelativePath="..\..\upnp\sample\tvdevice\linux\upnp_tv_device_main.c"
RelativePath="..\..\upnp\sample\linux\tv_device_main.c"
>
</File>
</Filter>
@@ -188,16 +686,10 @@
>
</File>
<File
RelativePath="..\..\upnp\sample\tvdevice\upnp_tv_device.h"
RelativePath="..\..\upnp\sample\common\tv_device.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>

View File

@@ -9,7 +9,7 @@
AC_PREREQ(2.60)
AC_INIT([libupnp], [1.6.10], [mroberto@users.sourceforge.net])
AC_INIT([libupnp], [1.6.20], [mroberto@users.sourceforge.net])
dnl ############################################################################
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:
@@ -197,7 +197,7 @@ dnl ############################################################################
dnl # Release 1.6.10:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed inxml
dnl # - Code has changed in ixml
dnl # revision: 5 -> 6
dnl # - Code has changed in threadutil
dnl # revision: 2 -> 3
@@ -208,13 +208,152 @@ dnl # current: 4 -> 5
dnl # revision: 3 -> 0
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:3:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [5:0:0])
dnl ############################################################################
dnl # Release 1.6.11:
dnl # "current:revision:age"
dnl #
############################################################################
AC_SUBST([LT_VERSION_IXML], [2:6:0])
AC_SUBST([LT_VERSION_THREADUTIL], [5:3:2])
AC_SUBST([LT_VERSION_UPNP], [5:0:0])
dnl # - Code has changed in threadutil
dnl # revision: 3 -> 4
dnl # - Code has changed in upnp
dnl # revision: 3 -> 4
dnl # - interface has changed in upnp
dnl # current: 5 -> 6
dnl # revision: 4 -> 0
dnl #
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:4:2])
dnl #AC_SUBST([LT_VERSION_UPNP], [6:0:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.12:
dnl # "current:revision:age"
dnl #
dnl # - interface added in threadutil
dnl # current: 5 -> 6
dnl # revision: 4 - > 0
dnl # age: 2 -> 3
dnl # - interfaces removed in threadutil
dnl # age: 3 -> 0
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], [6:0:0])
dnl #
dnl ############################################################################
dnl # Release 1.6.13:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in upnp
dnl # revision: 0 -> 1
dnl # - interface added in upnp
dnl # current: 6 -> 7
dnl # revision: 1 - > 0
dnl # age: 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], [7:0:1])
dnl #
dnl ############################################################################
dnl # Release 1.6.14:
dnl # "current:revision:age"
dnl #
dnl # - Code has changed in upnp
dnl # revision: 0 -> 1
dnl # - interface added in upnp
dnl # current: 7 -> 8
dnl # revision: 1 - > 0
dnl # age: 1 -> 2
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:0:2])
dnl #
dnl ############################################################################
dnl # Release 1.6.15:
dnl # "current:revision:age"
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 # Repeating the algorithm to place it closer to the modificatin place:
dnl # - library code modified: revision++
@@ -302,6 +441,29 @@ if test "x$enable_webserver" = xyes ; then
AC_DEFINE(UPNP_HAVE_WEBSERVER, 1, [see upnpconfig.h])
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])
if test "x$enable_tools" = xyes ; then
@@ -313,6 +475,11 @@ if test "x$enable_ipv6" = xyes ; then
AC_DEFINE(UPNP_ENABLE_IPV6, 1, [see upnpconfig.h])
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])
if test "x$enable_notification_reordering" = xyes ; then
AC_DEFINE(UPNP_ENABLE_NOTIFICATION_REORDERING, 1, [see upnpconfig.h])
@@ -364,6 +531,7 @@ AC_MSG_RESULT($docdir)
#
AC_PROG_CC
AM_PROG_CC_C_O
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_MAKE_SET
@@ -383,10 +551,11 @@ freebsd*)
*)
echo "Using non-specific system compiler settings"
if test x"$enable_debug" = xyes; then
# AC_PROG_CC already sets CFLAGS to "-g -O2" by default
# AC_PROG_CC already sets CFLAGS to "-g -O2" by default,
# but only if CFLAGS was not previously set.
#:
# Use -O0 in debug so that variables do not get optimized out
AX_CFLAGS_GCC_OPTION([-O0])
AX_CFLAGS_GCC_OPTION([-O0, -g])
else
# add optimise for size
AX_CFLAGS_GCC_OPTION([-Os])
@@ -487,6 +656,10 @@ fi
#
AC_FUNC_VPRINTF
AC_FUNC_FSEEKO
AC_CHECK_FUNC(strnlen,
AC_DEFINE(HAVE_STRNLEN, 1, [Defines if strnlen is available on your system]))
AC_CHECK_FUNC(strndup,
AC_DEFINE(HAVE_STRNDUP, 1, [Defines if strndup is available on your system]))
#
# Solaris needs -lsocket -lnsl -lrt
AC_SEARCH_LIBS([bind], [socket])
@@ -552,6 +725,7 @@ AC_OUTPUT
# Files copied for windows compilation.
#
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
echo "configure: copying \"upnp/inc/upnpconfig.h\" to \"build/inc/upnpconfig.h\""
cp upnp/inc/upnpconfig.h build/inc/upnpconfig.h

View File

@@ -7,7 +7,8 @@
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 =
LDADD = libixml.la

View File

@@ -738,7 +738,7 @@ EXPORT_SPEC int ixmlDocument_createDocumentEx(
* \return A pointer to the new \b Document object with the nodeName set to
* "#document" or \c NULL on failure.
*/
EXPORT_SPEC IXML_Document *ixmlDocument_createDocument();
EXPORT_SPEC IXML_Document *ixmlDocument_createDocument(void);
/*!

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -143,6 +144,7 @@ int ixmlDocument_createElementEx(
newElement->n.nodeType = eELEMENT_NODE;
newElement->n.nodeName = strdup(tagName);
if (newElement->n.nodeName == NULL) {
free(newElement->tagName);
ixmlElement_free(newElement);
newElement = NULL;
errCode = IXML_INSUFFICIENT_MEMORY;
@@ -163,8 +165,14 @@ IXML_Element *ixmlDocument_createElement(
const DOMString tagName)
{
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;
}
@@ -183,7 +191,7 @@ int ixmlDocument_createDocumentEx(IXML_Document **rtDoc)
ixmlDocument_init(doc);
doc->n.nodeName = strdup(DOCUMENTNODENAME);
doc->n.nodeName = strdup((const char*)DOCUMENTNODENAME);
if (doc->n.nodeName == NULL) {
ixmlDocument_free(doc);
doc = NULL;
@@ -232,7 +240,7 @@ int ixmlDocument_createTextNodeEx(
/* initialize the node */
ixmlNode_init(returnNode);
returnNode->nodeName = strdup(TEXTNODENAME);
returnNode->nodeName = strdup((const char*)TEXTNODENAME);
if (returnNode->nodeName == NULL) {
ixmlNode_free(returnNode);
returnNode = NULL;
@@ -318,7 +326,8 @@ IXML_Attr *ixmlDocument_createAttribute(
{
IXML_Attr *attrNode = NULL;
ixmlDocument_createAttributeEx(doc, name, &attrNode);
if(ixmlDocument_createAttributeEx(doc, name, &attrNode) != IXML_SUCCESS)
return NULL;
return attrNode;
}
@@ -401,7 +410,7 @@ int ixmlDocument_createCDATASectionEx(
ixmlCDATASection_init(cDSectionNode);
cDSectionNode->n.nodeType = eCDATA_SECTION_NODE;
cDSectionNode->n.nodeName = strdup(CDATANODENAME);
cDSectionNode->n.nodeName = strdup((const char*)CDATANODENAME);
if (cDSectionNode->n.nodeName == NULL) {
ixmlCDATASection_free(cDSectionNode);
cDSectionNode = NULL;

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -232,53 +233,42 @@ int ixmlElement_setAttributeNode(
IXML_Node *preSib = NULL;
IXML_Node *nextSib = NULL;
if (element == NULL || newAttr == NULL) {
if (!element || !newAttr)
return IXML_INVALID_PARAMETER;
}
if (newAttr->n.ownerDocument != element->n.ownerDocument) {
if (newAttr->n.ownerDocument != element->n.ownerDocument)
return IXML_WRONG_DOCUMENT_ERR;
}
if (newAttr->ownerElement != NULL) {
if (newAttr->ownerElement)
return IXML_INUSE_ATTRIBUTE_ERR;
}
newAttr->ownerElement = element;
node = (IXML_Node *)newAttr;
attrNode = element->n.firstAttr;
while (attrNode != NULL) {
if (strcmp(attrNode->nodeName, node->nodeName) == 0) {
while (attrNode) {
if (!strcmp(attrNode->nodeName, node->nodeName))
/* Found it */
break;
} else {
else
attrNode = attrNode->nextSibling;
}
}
if (attrNode != NULL) {
if (attrNode) {
/* Already present, will replace by newAttr */
preSib = attrNode->prevSibling;
nextSib = attrNode->nextSibling;
if (preSib != NULL) {
if (preSib)
preSib->nextSibling = node;
}
if (nextSib != NULL) {
if (nextSib)
nextSib->prevSibling = node;
}
if (element->n.firstAttr == attrNode) {
if (element->n.firstAttr == attrNode)
element->n.firstAttr = node;
}
if (rtAttr != NULL) {
if (rtAttr)
*rtAttr = (IXML_Attr *)attrNode;
}
else
ixmlAttr_free((IXML_Attr *)attrNode);
} else {
/* Add this attribute */
if (element->n.firstAttr != NULL) {
if (element->n.firstAttr) {
prevAttr = element->n.firstAttr;
nextAttr = prevAttr->nextSibling;
while (nextAttr != NULL) {
while (nextAttr) {
prevAttr = nextAttr;
nextAttr = prevAttr->nextSibling;
}
@@ -290,10 +280,8 @@ int ixmlElement_setAttributeNode(
node->prevSibling = NULL;
node->nextSibling = NULL;
}
if (rtAttr != NULL) {
if (rtAttr)
*rtAttr = NULL;
}
}
return IXML_SUCCESS;
@@ -443,7 +431,7 @@ int ixmlElement_setAttributeNS(
/* see DOM 2 spec page 59 */
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(qualifiedName, "xmlns") == 0 &&
strcmp(namespaceURI, "http://www.w3.org/2000/xmlns/") != 0)) {
@@ -467,11 +455,14 @@ int ixmlElement_setAttributeNS(
free(attrNode->prefix);
}
/* replace it with the new prefix */
attrNode->prefix = strdup( newAttrNode.prefix );
if (attrNode->prefix == NULL) {
Parser_freeNodeContent(&newAttrNode);
return IXML_INSUFFICIENT_MEMORY;
}
if (newAttrNode.prefix != NULL) {
attrNode->prefix = strdup( newAttrNode.prefix );
if (attrNode->prefix == NULL) {
Parser_freeNodeContent(&newAttrNode);
return IXML_INSUFFICIENT_MEMORY;
}
} else
attrNode->prefix = newAttrNode.prefix;
if (attrNode->nodeValue != NULL) {
free(attrNode->nodeValue);
@@ -490,15 +481,18 @@ int ixmlElement_setAttributeNS(
qualifiedName,
&newAttr);
if (rc != IXML_SUCCESS) {
Parser_freeNodeContent(&newAttrNode);
return rc;
}
newAttr->n.nodeValue = strdup(value);
if (newAttr->n.nodeValue == NULL) {
ixmlAttr_free(newAttr);
Parser_freeNodeContent(&newAttrNode);
return IXML_INSUFFICIENT_MEMORY;
}
if (ixmlElement_setAttributeNodeNS(element, newAttr, NULL) != IXML_SUCCESS) {
if (ixmlElement_setAttributeNodeNS(element, newAttr, &newAttr) != IXML_SUCCESS) {
ixmlAttr_free(newAttr);
Parser_freeNodeContent(&newAttrNode);
return IXML_FAILED;
}
}

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -49,7 +50,7 @@
#define MAXVAL(a, b) ( (a) > (b) ? (a) : (b) )
#define MEMBUF_DEF_SIZE_INC 20
#define MEMBUF_DEF_SIZE_INC 20u
/*!

View File

@@ -60,7 +60,7 @@ static void copy_with_escape(
if (p == NULL)
return;
plen = strlen(p);
for (i = 0; i < plen; ++i) {
for (i = (size_t)0; i < plen; ++i) {
switch (p[i]) {
case '<':
ixml_membuf_append_str(buf, "&lt;");
@@ -175,7 +175,7 @@ static void ixmlPrintDomTreeRecursive(
default:
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTreeRecursive",
"Warning, unknown node type %d\n",
ixmlNode_getNodeType(nodeptr));
(int)ixmlNode_getNodeType(nodeptr));
break;
}
}
@@ -247,7 +247,7 @@ static void ixmlPrintDomTree(
default:
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTree",
"Warning, unknown node type %d\n",
ixmlNode_getNodeType(nodeptr));
(int)ixmlNode_getNodeType(nodeptr));
break;
}
}
@@ -318,7 +318,7 @@ static void ixmlDomTreetoString(
default:
IxmlPrintf(__FILE__, __LINE__, "ixmlPrintDomTreeRecursive",
"Warning, unknown node type %d\n",
ixmlNode_getNodeType(nodeptr));
(int)ixmlNode_getNodeType(nodeptr));
break;
}
}

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* 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);
temp_buf = realloc(m->buf, alloc_len + 1);
temp_buf = realloc(m->buf, alloc_len + (size_t)1);
if (temp_buf == NULL) {
/* try smaller size */
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) {
return IXML_INSUFFICIENT_MEMORY;
}
@@ -110,8 +111,8 @@ void ixml_membuf_init(ixml_membuf *m)
m->size_inc = MEMBUF_DEF_SIZE_INC;
m->buf = NULL;
m->length = 0;
m->capacity = 0;
m->length = (size_t)0;
m->capacity = (size_t)0;
}
@@ -171,7 +172,7 @@ int ixml_membuf_append(
{
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;
}
if (buf == NULL || buf_len == 0) {
if (buf == NULL || buf_len == (size_t)0) {
return 0;
}
/* alloc mem */

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -409,7 +410,7 @@ static void Parser_skipWhiteSpaces(
Parser *xmlParser)
{
while( ( *( xmlParser->curPtr ) != 0 ) &&
( strchr( WHITESPACE, *( xmlParser->curPtr ) ) != NULL ) ) {
( strchr( WHITESPACE, ( int ) *( xmlParser->curPtr ) ) != NULL ) ) {
xmlParser->curPtr++;
}
}
@@ -693,12 +694,12 @@ static BOOL Parser_isNameChar(
/*! [in] TRUE if you also want to check in the NameChar table. */
BOOL bNameChar)
{
if (Parser_isCharInTable(c, Letter, LETTERTABLESIZE)) {
if (Parser_isCharInTable(c, Letter, (int)LETTERTABLESIZE)) {
return TRUE;
}
if (bNameChar &&
Parser_isCharInTable(c, NameChar, NAMECHARTABLESIZE)) {
Parser_isCharInTable(c, NameChar, (int)NAMECHARTABLESIZE)) {
return TRUE;
}
@@ -745,7 +746,7 @@ static int Parser_getChar(
*cLen = 0;
if (*src != '&') {
if (*src > 0 && Parser_isXmlChar(*src)) {
if (*src > 0 && Parser_isXmlChar((int)*src)) {
*cLen = 1;
ret = *src;
goto ExitFunction;
@@ -762,30 +763,30 @@ static int Parser_getChar(
ret = i;
goto ExitFunction;
} else if (strncasecmp(src, QUOT, strlen(QUOT)) == 0) {
*cLen = strlen(QUOT);
*cLen = (int)strlen(QUOT);
ret = '"';
goto ExitFunction;
} else if (strncasecmp(src, LT, strlen(LT)) == 0) {
*cLen = strlen(LT);
*cLen = (int)strlen(LT);
ret = '<';
goto ExitFunction;
} else if (strncasecmp(src, GT, strlen(GT)) == 0) {
*cLen = strlen(GT);
*cLen = (int)strlen(GT);
ret = '>';
goto ExitFunction;
} else if (strncasecmp(src, APOS, strlen(APOS)) == 0) {
*cLen = strlen(APOS);
*cLen = (int)strlen(APOS);
ret = '\'';
goto ExitFunction;
} else if (strncasecmp(src, AMP, strlen(AMP)) == 0) {
*cLen = strlen(AMP);
*cLen = (int)strlen(AMP);
ret = '&';
goto ExitFunction;
} else if (strncasecmp(src, ESC_HEX, strlen(ESC_HEX)) == 0) {
/* Read in escape characters of type &#xnn where nn is a hexadecimal value */
pnum = src + strlen( ESC_HEX );
sum = 0;
while (strchr(HEX_NUMBERS, *pnum) != 0) {
while (strchr(HEX_NUMBERS, (int)*pnum) != 0) {
c = *pnum;
if (c <= '9') {
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 */
pnum = src + strlen(ESC_DEC);
sum = 0;
while (strchr(DEC_NUMBERS, *pnum) != 0) {
while (strchr(DEC_NUMBERS, (int)*pnum) != 0) {
sum = sum * 10 + ( *pnum - '0' );
pnum++;
}
@@ -1095,7 +1096,7 @@ static char *safe_strdup(
assert(s != NULL);
if (s == NULL) {
return strdup("");
return strdup((const char*)"");
}
return strdup(s);
}
@@ -1214,7 +1215,7 @@ static int Parser_processCDSect(
IXML_Node *node)
{
char *pEnd;
size_t tokenLength = 0;
size_t tokenLength = (size_t)0;
char *pCDataStart;
if( *pSrc == NULL ) {
@@ -1223,7 +1224,7 @@ static int Parser_processCDSect(
pCDataStart = *pSrc + strlen( CDSTART );
pEnd = pCDataStart;
while( ( Parser_isXmlChar( *pEnd ) == TRUE ) && ( *pEnd != '\0' ) ) {
while( ( Parser_isXmlChar( (int)*pEnd ) == TRUE ) && ( *pEnd != '\0' ) ) {
if( strncmp( pEnd, CDEND, strlen( CDEND ) ) == 0 ) {
break;
} else {
@@ -1232,8 +1233,8 @@ static int Parser_processCDSect(
}
if( ( pEnd - pCDataStart > 0 ) && ( *pEnd != '\0' ) ) {
tokenLength = (size_t)(pEnd - pCDataStart);
node->nodeValue = (char *)malloc(tokenLength + 1);
tokenLength = (size_t)pEnd - (size_t)pCDataStart;
node->nodeValue = (char *)malloc(tokenLength + (size_t)1);
if( node->nodeValue == NULL ) {
return IXML_INSUFFICIENT_MEMORY;
}
@@ -1268,7 +1269,6 @@ static int Parser_processContent(
int ret = IXML_SUCCESS;
int line = 0;
char *pEndContent;
BOOL bReadContent;
ptrdiff_t tokenLength;
const char *notAllowed = "]]>";
char *pCurToken = NULL;
@@ -1324,10 +1324,6 @@ static int Parser_processContent(
pEndContent++;
}
if (*pEndContent == '\0') {
bReadContent = FALSE;
}
if (strncmp(pEndContent, (const char *)notAllowed, strlen(notAllowed)) == 0) {
line = __LINE__;
ret = IXML_SYNTAX_ERR;
@@ -1455,6 +1451,7 @@ ExitFunction:
*
* \return IXML_SUCCESS.
*/
#if 0
static int Parser_parseReference(
/*! [in] Currently unused. */
char *pStr)
@@ -1463,6 +1460,7 @@ static int Parser_parseReference(
return IXML_SUCCESS;
pStr = pStr;
}
#endif
/*!
@@ -1502,47 +1500,39 @@ static int Parser_addNamespace(
/*! [in] The XML parser. */
Parser *xmlParser)
{
IXML_Node *pNode;
IXML_ElementStack *pCur;
const char *namespaceUri;
IXML_Node *pNode;
IXML_ElementStack *pCur;
const char *namespaceUri;
pNode = xmlParser->pNeedPrefixNode;
pCur = xmlParser->pCurElement;
pNode = xmlParser->pNeedPrefixNode;
pCur = xmlParser->pCurElement;
if (!pNode->prefix) {
/* element does not have prefix */
if (strcmp(pNode->nodeName, pCur->element) != 0)
return IXML_FAILED;
if (pCur->namespaceUri) {
/* it would be wrong that pNode->namespace != NULL. */
assert(pNode->namespaceURI == NULL);
pNode->namespaceURI = safe_strdup(pCur->namespaceUri);
if (!pNode->namespaceURI)
return IXML_INSUFFICIENT_MEMORY;
}
xmlParser->pNeedPrefixNode = NULL;
} else {
if (!pCur->prefix ||
((strcmp(pNode->nodeName, pCur->element) != 0) &&
(strcmp(pNode->prefix, pCur->prefix) != 0)))
return IXML_FAILED;
namespaceUri = Parser_getNameSpace(xmlParser, pCur->prefix);
if (namespaceUri) {
pNode->namespaceURI = safe_strdup(namespaceUri);
if (!pNode->namespaceURI)
return IXML_INSUFFICIENT_MEMORY;
xmlParser->pNeedPrefixNode = NULL;
}
}
if( pNode->prefix == NULL ) {
/* element does not have prefix */
if( strcmp( pNode->nodeName, pCur->element ) != 0 ) {
return IXML_FAILED;
}
if( pCur->namespaceUri != NULL ) {
/* it would be wrong that pNode->namespace != NULL. */
assert( pNode->namespaceURI == NULL );
pNode->namespaceURI = safe_strdup( pCur->namespaceUri );
if( pNode->namespaceURI == NULL ) {
return IXML_INSUFFICIENT_MEMORY;
}
}
xmlParser->pNeedPrefixNode = NULL;
} else {
if( ( strcmp( pNode->nodeName, pCur->element ) != 0 ) &&
( strcmp( pNode->prefix, pCur->prefix ) != 0 ) ) {
return IXML_FAILED;
}
namespaceUri = Parser_getNameSpace( xmlParser, pCur->prefix );
if( namespaceUri != NULL ) {
pNode->namespaceURI = safe_strdup( namespaceUri );
if( pNode->namespaceURI == NULL ) {
return IXML_INSUFFICIENT_MEMORY;
}
xmlParser->pNeedPrefixNode = NULL;
}
}
return IXML_SUCCESS;
return IXML_SUCCESS;
}
@@ -1593,6 +1583,9 @@ static int Parser_xmlNamespace(
}
if (pCur->prefix != NULL &&
strcmp(pCur->prefix, newNode->localName) == 0) {
if (pCur->namespaceUri != NULL) {
free(pCur->namespaceUri);
}
pCur->namespaceUri = safe_strdup(newNode->nodeValue);
if (pCur->namespaceUri == NULL) {
ret = IXML_INSUFFICIENT_MEMORY;
@@ -1755,9 +1748,9 @@ static int Parser_processAttribute(
line = __LINE__;
goto ExitFunction;
}
if (*pCur == '&') {
/*if (*pCur == '&') {
Parser_parseReference(++pCur);
}
}*/
pCur++;
}
/* clear token buffer */
@@ -1843,7 +1836,7 @@ static int Parser_getNextNode(
{
char *pCurToken = NULL;
char *lastElement = NULL;
IXML_ERRORCODE ret = IXML_SUCCESS;
int ret = IXML_SUCCESS;
int line = 0;
ptrdiff_t tokenLen = 0;
@@ -1855,11 +1848,12 @@ static int Parser_getNextNode(
goto ExitFunction;
}
if (xmlParser->state == eCONTENT) {
switch (xmlParser->state) {
case eCONTENT:
line = __LINE__;
ret = Parser_processContent(xmlParser, node);
goto ExitFunction;
} else {
default:
Parser_skipWhiteSpaces(xmlParser);
tokenLen = Parser_getNextToken(xmlParser);
if (tokenLen == 0 &&
@@ -1869,7 +1863,7 @@ static int Parser_getNextNode(
line = __LINE__;
ret = IXML_SUCCESS;
goto ExitFunction;
} else if ((xmlParser->tokenBuf).length == 0) {
} else if ((xmlParser->tokenBuf).length == (size_t)0) {
line = __LINE__;
ret = IXML_SYNTAX_ERR;
goto ExitFunction;
@@ -1909,8 +1903,16 @@ static int Parser_getNextNode(
line = __LINE__;
ret = IXML_SUCCESS;
goto ExitFunction;
} else if (xmlParser->state == eATTRIBUTE && xmlParser->pCurElement != NULL) {
if (Parser_processAttribute(xmlParser, node) != IXML_SUCCESS) {
} else if (xmlParser->pCurElement != NULL) {
switch (xmlParser->state) {
case eATTRIBUTE:
if (Parser_processAttribute(xmlParser, node) != IXML_SUCCESS) {
line = __LINE__;
ret = IXML_SYNTAX_ERR;
goto ExitFunction;
}
break;
default:
line = __LINE__;
ret = IXML_SYNTAX_ERR;
goto ExitFunction;
@@ -2050,11 +2052,15 @@ static int Parser_processAttributeName(
rc = ixmlNode_setNodeProperties( ( IXML_Node * ) attr, newNode );
if( rc != IXML_SUCCESS ) {
ixmlAttr_free( attr );
return rc;
}
rc = ixmlElement_setAttributeNode(
(IXML_Element *)xmlParser->currentNodePtr, attr, NULL );
if( rc != IXML_SUCCESS ) {
ixmlAttr_free( attr );
}
return rc;
}
@@ -2142,8 +2148,6 @@ static int isTopLevelElement(
static BOOL Parser_hasDefaultNamespace(
/*! [in] The XML parser. */
Parser *xmlParser,
/*! [in] The Node to process. */
IXML_Node *newNode,
/*! [in,out] The name space URI. */
char **nsURI )
{
@@ -2159,7 +2163,6 @@ static BOOL Parser_hasDefaultNamespace(
}
return FALSE;
newNode = newNode;
}
@@ -2212,11 +2215,17 @@ static int Parser_processElementName(
} else {
/* does element has default namespace */
/* the node may have default namespace definition */
if (Parser_hasDefaultNamespace(xmlParser, newNode, &nsURI)) {
if (Parser_hasDefaultNamespace(xmlParser, &nsURI)) {
Parser_setElementNamespace(newElement, nsURI);
} else if (xmlParser->state == eATTRIBUTE) {
/* the default namespace maybe defined later */
xmlParser->pNeedPrefixNode = (IXML_Node *)newElement;
} else {
switch (xmlParser->state) {
case eATTRIBUTE:
/* the default namespace maybe defined later */
xmlParser->pNeedPrefixNode = (IXML_Node *)newElement;
break;
default:
break;
}
}
}
@@ -2246,14 +2255,14 @@ static int Parser_isValidEndElement(
IXML_Node *newNode)
{
assert(xmlParser);
assert(xmlParser->pCurElement->element);
assert(newNode);
assert(newNode->nodeName);
if (xmlParser->pCurElement == NULL) {
return 0;
}
assert(xmlParser->pCurElement->element);
assert(newNode);
assert(newNode->nodeName);
return strcmp(xmlParser->pCurElement->element, newNode->nodeName) == 0;
}
@@ -2297,13 +2306,17 @@ static int Parser_eTagVerification(
assert( newNode->nodeName );
assert( xmlParser->currentNodePtr );
if( newNode->nodeType == eELEMENT_NODE ) {
switch( newNode->nodeType ) {
case eELEMENT_NODE:
if( Parser_isValidEndElement( xmlParser, newNode ) == TRUE ) {
Parser_popElement( xmlParser );
} else {
/* syntax error */
return IXML_SYNTAX_ERR;
}
break;
default:
break;
}
if( strcmp( newNode->nodeName, xmlParser->currentNodePtr->nodeName ) ==
@@ -2460,16 +2473,16 @@ ErrorHandler:
BOOL Parser_isValidXmlName(const DOMString name)
{
const char *pstr = NULL;
size_t i = 0;
size_t nameLen = 0;
size_t i = (size_t)0;
size_t nameLen = (size_t)0;
assert(name != NULL);
nameLen = strlen(name);
pstr = name;
if (Parser_isNameChar(*pstr, FALSE) == TRUE) {
for (i = 1; i < nameLen; ++i) {
if (Parser_isNameChar(*(pstr + i), TRUE) == FALSE) {
if (Parser_isNameChar((int)*pstr, FALSE) == TRUE) {
for (i = (size_t)1; i < nameLen; ++i) {
if (Parser_isNameChar((int)*(pstr + i), TRUE) == FALSE) {
/* illegal char */
return FALSE;
}
@@ -2522,7 +2535,7 @@ static int Parser_readFileOrBuffer(
BOOL file)
{
long fileSize = 0;
size_t bytesRead = 0;
size_t bytesRead = (size_t)0;
FILE *xmlFilePtr = NULL;
if( file ) {
@@ -2532,12 +2545,12 @@ static int Parser_readFileOrBuffer(
} else {
fseek( xmlFilePtr, 0, SEEK_END );
fileSize = ftell( xmlFilePtr );
if( fileSize == 0 ) {
if( fileSize <= 0 ) {
fclose( xmlFilePtr );
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 ) {
fclose( xmlFilePtr );
return IXML_INSUFFICIENT_MEMORY;
@@ -2545,7 +2558,7 @@ static int Parser_readFileOrBuffer(
fseek( xmlFilePtr, 0, SEEK_SET );
bytesRead =
fread(xmlParser->dataBuffer, 1, (size_t)fileSize, xmlFilePtr);
fread(xmlParser->dataBuffer, (size_t)1, (size_t)fileSize, xmlFilePtr);
/* append null */
xmlParser->dataBuffer[bytesRead] = '\0';
fclose( xmlFilePtr );
@@ -2652,12 +2665,12 @@ int Parser_setNodePrefixAndLocalName(
/* fill in the local name and prefix */
pLocalName = ( char * )pStrPrefix + 1;
nPrefix = pStrPrefix - node->nodeName;
node->prefix = malloc((size_t)nPrefix + 1);
node->prefix = malloc((size_t)nPrefix + (size_t)1);
if (!node->prefix) {
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);
node->localName = safe_strdup( pLocalName );

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -53,11 +54,11 @@ static unsigned long ixmlNamedNodeMap_getItemNumber(
IN const char *name)
{
IXML_Node *tempNode;
unsigned long returnItemNo = 0;
unsigned long returnItemNo = 0lu;
assert(nnMap != NULL && name != NULL);
if (nnMap == NULL || name == NULL) {
return IXML_INVALID_ITEM_NUMBER;
return (unsigned long)IXML_INVALID_ITEM_NUMBER;
}
tempNode = nnMap->nodeItem;
@@ -69,7 +70,7 @@ static unsigned long ixmlNamedNodeMap_getItemNumber(
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);
if (index == IXML_INVALID_ITEM_NUMBER) {
if (index == (unsigned long)IXML_INVALID_ITEM_NUMBER) {
return NULL;
} else {
return ixmlNamedNodeMap_item(nnMap, index);
@@ -111,12 +112,12 @@ IXML_Node *ixmlNamedNodeMap_item(
return NULL;
}
if (index > ixmlNamedNodeMap_getLength(nnMap) - 1) {
if (index > ixmlNamedNodeMap_getLength(nnMap) - 1lu) {
return NULL;
}
tempNode = nnMap->nodeItem;
for (i = 0; i < index && tempNode != NULL; ++i) {
for (i = 0u; i < index && tempNode != NULL; ++i) {
tempNode = tempNode->nextSibling;
}
@@ -127,11 +128,11 @@ IXML_Node *ixmlNamedNodeMap_item(
unsigned long ixmlNamedNodeMap_getLength(IXML_NamedNodeMap *nnMap)
{
IXML_Node *tempNode;
unsigned long length = 0;
unsigned long length = 0lu;
if (nnMap != NULL) {
tempNode = nnMap->nodeItem;
for (length = 0; tempNode != NULL; ++length) {
for (length = 0lu; tempNode != NULL; ++length) {
tempNode = tempNode->nextSibling;
}
}

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -90,9 +91,13 @@ static void ixmlNode_freeSingleNode(
if (nodeptr->localName != NULL) {
free(nodeptr->localName);
}
if (nodeptr->nodeType == eELEMENT_NODE) {
switch (nodeptr->nodeType ) {
case eELEMENT_NODE:
element = (IXML_Element *)nodeptr;
free(element->tagName);
break;
default:
break;
}
free(nodeptr);
}
@@ -280,7 +285,7 @@ unsigned short ixmlNode_getNodeType(IXML_Node *nodeptr)
if (nodeptr != NULL) {
return nodeptr->nodeType;
} else {
return eINVALID_NODE;
return (unsigned short)eINVALID_NODE;
}
}
@@ -397,7 +402,8 @@ static BOOL ixmlNode_isParent(
assert(nodeptr != NULL && toFind != NULL);
found = toFind->parentNode == nodeptr;
if (nodeptr != NULL && toFind != NULL)
found = toFind->parentNode == nodeptr;
return found;
}
@@ -422,17 +428,22 @@ static BOOL ixmlNode_allowChildren(
case eTEXT_NODE:
case eCDATA_SECTION_NODE:
return FALSE;
break;
case eELEMENT_NODE:
if (newChild->nodeType == eATTRIBUTE_NODE ||
newChild->nodeType == eDOCUMENT_NODE) {
switch (newChild->nodeType) {
case eATTRIBUTE_NODE:
case eDOCUMENT_NODE:
return FALSE;
default:
break;
}
break;
case eDOCUMENT_NODE:
if (newChild->nodeType != eELEMENT_NODE) {
switch (newChild->nodeType) {
case eELEMENT_NODE:
break;
default:
return FALSE;
}
@@ -500,7 +511,7 @@ int ixmlNode_insertBefore(
if (refChild != NULL) {
if (ixmlNode_isParent(nodeptr, newChild) == TRUE) {
ixmlNode_removeChild(nodeptr, newChild, NULL);
ixmlNode_removeChild(nodeptr, newChild, &newChild);
newChild->nextSibling = NULL;
newChild->prevSibling = NULL;
}
@@ -566,29 +577,23 @@ int ixmlNode_removeChild(
IXML_Node *oldChild,
IXML_Node **returnNode)
{
if (nodeptr == NULL || oldChild == NULL) {
if (!nodeptr || !oldChild)
return IXML_INVALID_PARAMETER;
}
if (ixmlNode_isParent(nodeptr, oldChild) == FALSE ) {
if (!ixmlNode_isParent(nodeptr, oldChild))
return IXML_NOT_FOUND_ERR;
}
if (oldChild->prevSibling != NULL) {
if (oldChild->prevSibling)
oldChild->prevSibling->nextSibling = oldChild->nextSibling;
}
if (nodeptr->firstChild == oldChild) {
if (nodeptr->firstChild == oldChild)
nodeptr->firstChild = oldChild->nextSibling;
}
if (oldChild->nextSibling != NULL) {
if (oldChild->nextSibling)
oldChild->nextSibling->prevSibling = oldChild->prevSibling;
}
oldChild->nextSibling = NULL;
oldChild->prevSibling = NULL;
oldChild->parentNode = NULL;
if (returnNode != NULL) {
if (returnNode)
*returnNode = oldChild;
}
else
ixmlNode_free(oldChild);
return IXML_SUCCESS;
}
@@ -617,7 +622,7 @@ int ixmlNode_appendChild(IXML_Node *nodeptr, IXML_Node *newChild)
}
if (ixmlNode_isParent(nodeptr, newChild) == TRUE ) {
ixmlNode_removeChild(nodeptr, newChild, NULL);
ixmlNode_removeChild(nodeptr, newChild, &newChild);
}
/* set the parent node pointer */
newChild->parentNode = nodeptr;
@@ -650,6 +655,7 @@ static IXML_Node *ixmlNode_cloneTextNode(
IXML_Node *nodeptr)
{
IXML_Node *newNode = NULL;
int rc;
assert(nodeptr != NULL);
@@ -658,8 +664,16 @@ static IXML_Node *ixmlNode_cloneTextNode(
return NULL;
} else {
ixmlNode_init(newNode);
ixmlNode_setNodeName(newNode, nodeptr->nodeName);
ixmlNode_setNodeValue(newNode, nodeptr->nodeValue);
rc = ixmlNode_setNodeName(newNode, nodeptr->nodeName);
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;
}
@@ -678,15 +692,24 @@ static IXML_CDATASection *ixmlNode_cloneCDATASect(
IXML_CDATASection *newCDATA = NULL;
IXML_Node *newNode;
IXML_Node *srcNode;
int rc;
assert(nodeptr != NULL);
newCDATA = (IXML_CDATASection *)malloc(sizeof (IXML_CDATASection));
if (newCDATA != NULL) {
newNode = (IXML_Node *)newCDATA;
ixmlNode_init(newNode);
ixmlCDATASection_init(newCDATA);
srcNode = (IXML_Node *)nodeptr;
ixmlNode_setNodeName(newNode, srcNode->nodeName);
ixmlNode_setNodeValue(newNode, srcNode->nodeValue);
rc = ixmlNode_setNodeName(newNode, srcNode->nodeName);
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;
}
@@ -761,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
* just mallocs the IXML_Document, sets the node type and name. Curiously,
* the parameter nodeptr is not actually used.
* just mallocs the IXML_Document, sets the node type and name.
*
* \return A clone of a document node.
* \return A new document node.
*/
static IXML_Document *ixmlNode_cloneDoc(
/*! [in] The \b Node to clone. */
IXML_Document *nodeptr)
static IXML_Document *ixmlNode_newDoc(void)
{
IXML_Document *newDoc;
IXML_Node *docNode;
int rc;
assert(nodeptr != NULL);
newDoc = (IXML_Document *)malloc(sizeof (IXML_Document));
if (newDoc == NULL) {
if (!newDoc)
return NULL;
}
ixmlDocument_init(newDoc);
docNode = (IXML_Node *)newDoc;
rc = ixmlNode_setNodeName(docNode, DOCUMENTNODENAME);
if (rc != IXML_SUCCESS) {
ixmlDocument_free(newDoc);
return NULL;
}
newDoc->n.nodeType = eDOCUMENT_NODE;
return newDoc;
nodeptr = nodeptr;
}
/*!
@@ -921,6 +934,8 @@ static IXML_Node *ixmlNode_cloneNodeTreeRecursive(
switch (nodeptr->nodeType) {
case eELEMENT_NODE:
newElement = ixmlNode_cloneElement((IXML_Element *)nodeptr);
if (newElement == NULL)
return NULL;
newElement->n.firstAttr = ixmlNode_cloneNodeTreeRecursive(
nodeptr->firstAttr, deep);
if (deep) {
@@ -941,6 +956,8 @@ static IXML_Node *ixmlNode_cloneNodeTreeRecursive(
case eATTRIBUTE_NODE:
newAttr = ixmlNode_cloneAttr((IXML_Attr *)nodeptr);
if (newAttr == NULL)
return NULL;
nextSib = ixmlNode_cloneNodeTreeRecursive(nodeptr->nextSibling, deep);
newAttr->n.nextSibling = nextSib;
if (nextSib != NULL) {
@@ -959,7 +976,9 @@ static IXML_Node *ixmlNode_cloneNodeTreeRecursive(
break;
case eDOCUMENT_NODE:
newDoc = ixmlNode_cloneDoc((IXML_Document *)nodeptr);
newDoc = ixmlNode_newDoc();
if (newDoc == NULL)
return NULL;
newNode = (IXML_Node *)newDoc;
if (deep) {
newNode->firstChild = ixmlNode_cloneNodeTreeRecursive(
@@ -1006,6 +1025,8 @@ static IXML_Node *ixmlNode_cloneNodeTree(
switch (nodeptr->nodeType) {
case eELEMENT_NODE:
newElement = ixmlNode_cloneElement((IXML_Element *)nodeptr);
if (newElement == NULL)
return NULL;
newElement->n.firstAttr = ixmlNode_cloneNodeTreeRecursive(nodeptr->firstAttr, deep);
if (deep) {
newElement->n.firstChild = ixmlNode_cloneNodeTreeRecursive(
@@ -1046,7 +1067,8 @@ static IXML_Node *ixmlNode_cloneNodeTree(
}
/* by spec, the duplicate node has no parent */
newNode->parentNode = NULL;
if (newNode != NULL)
newNode->parentNode = NULL;
return newNode;
}
@@ -1117,7 +1139,8 @@ IXML_NamedNodeMap *ixmlNode_getAttributes(IXML_Node *nodeptr)
return NULL;
}
if(nodeptr->nodeType == eELEMENT_NODE) {
switch(nodeptr->nodeType) {
case eELEMENT_NODE:
returnNamedNodeMap = (IXML_NamedNodeMap *)malloc(sizeof(IXML_NamedNodeMap));
if(returnNamedNodeMap == NULL) {
return NULL;
@@ -1135,7 +1158,7 @@ IXML_NamedNodeMap *ixmlNode_getAttributes(IXML_Node *nodeptr)
tempNode = tempNode->nextSibling;
}
return returnNamedNodeMap;
} else {
default:
/* if not an ELEMENT_NODE */
return NULL;
}
@@ -1155,8 +1178,13 @@ BOOL ixmlNode_hasChildNodes(IXML_Node *nodeptr)
BOOL ixmlNode_hasAttributes(IXML_Node *nodeptr)
{
if (nodeptr != NULL) {
if (nodeptr->nodeType == eELEMENT_NODE && nodeptr->firstAttr != NULL) {
return TRUE;
switch (nodeptr->nodeType) {
case eELEMENT_NODE:
if (nodeptr->firstAttr != NULL)
return TRUE;
break;
default:
break;
}
}
@@ -1311,7 +1339,10 @@ int ixmlNode_setNodeProperties(
{
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);
if(rc != IXML_SUCCESS) {

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -62,12 +63,12 @@ IXML_Node *ixmlNodeList_item(
return NULL;
}
/* if index is more than list length */
if (index > ixmlNodeList_length(nList) - 1) {
if (index > ixmlNodeList_length(nList) - 1lu) {
return NULL;
}
next = nList;
for (i = 0; i < index && next != NULL; ++i) {
for (i = 0u; i < index && next != NULL; ++i) {
next = next->next;
}
@@ -127,7 +128,7 @@ int ixmlNodeList_addToNodeList(
unsigned long ixmlNodeList_length(IXML_NodeList *nList)
{
IXML_NodeList *list;
unsigned long length = 0;
unsigned long length = 0lu;
list = nList;
while (list != NULL) {

View File

@@ -1,4 +1,4 @@
Version: 1.6.10
Version: 1.6.20
Summary: Universal Plug and Play (UPnP) SDK
Name: libupnp
Release: 1%{?dist}

View File

@@ -1,11 +1,11 @@
# $Id: Makefile.am,v 1.2 2006/02/27 21:38:56 r3mi Exp $
#
# "Makefile.am" for "libupnp/threadutil"
#
# (C) Copyright 2005 R<EFBFBD>mi 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
AM_CPPFLAGS += -DDEBUG -DSTATS
@@ -19,12 +19,21 @@ lib_LTLIBRARIES = libthreadutil.la
libthreadutil_la_LDFLAGS = -version-info $(LT_VERSION_THREADUTIL)
libthreadutil_la_SOURCES = \
src/FreeList.c src/LinkedList.c \
src/ThreadPool.c src/TimerThread.c
inc/FreeList.h \
src/FreeList.c \
inc/LinkedList.h \
src/LinkedList.c \
inc/ThreadPool.h \
src/ThreadPool.c \
inc/TimerThread.h \
src/TimerThread.c
upnpincludedir = $(includedir)/upnp
upnpinclude_HEADERS = \
inc/FreeList.h inc/LinkedList.h \
inc/ThreadPool.h inc/TimerThread.h \
inc/ithread.h
upnpinclude_HEADERS = \
inc/ithread.h \
inc/FreeList.h \
inc/LinkedList.h \
inc/ThreadPool.h \
inc/TimerThread.h

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -98,7 +99,7 @@ typedef enum priority {
#define DEFAULT_MAX_THREADS 10
/*! default stack size used by TPAttrInit */
#define DEFAULT_STACK_SIZE 0
#define DEFAULT_STACK_SIZE 0u
/*! default jobs per thread used by TPAttrInit */
#define DEFAULT_JOBS_PER_THREAD 10
@@ -165,7 +166,7 @@ typedef struct THREADPOOLJOB
void *arg;
free_routine free_func;
struct timeval requestTime;
int priority;
ThreadPriority priority;
int jobId;
} ThreadPoolJob;
@@ -222,6 +223,8 @@ typedef struct THREADPOOL
int shutdown;
/*! total number of threads */
int totalThreads;
/*! flag that's set when waiting for a new worker thread to start */
int pendingWorkerThreadStart;
/*! number of threads that are currently executing jobs */
int busyThreads;
/*! number of persistent threads */

View File

@@ -1,7 +1,11 @@
#ifndef ITHREAD_H
#define ITHREAD_H
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -29,38 +33,24 @@
*
******************************************************************************/
#ifndef ITHREAD_H
#define ITHREAD_H
/*!
* \file
*/
#if !defined(WIN32)
#include <sys/param.h>
#endif
#include "UpnpGlobal.h" /* For UPNP_INLINE, EXPORT_SPEC */
#include "UpnpUniStd.h" /* for close() */
#ifdef __cplusplus
extern "C" {
#endif
#include <pthread.h>
#ifdef WIN32
/* Do not #include <unistd.h> */
#else
#include <unistd.h>
#endif
#if defined(BSD)
#if defined(BSD) && !defined(__GNU__)
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
#endif
@@ -87,7 +77,8 @@ extern "C" {
#define ITHREAD_STACK_MIN PTHREAD_STACK_MIN
#define ITHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
#define ITHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
/***************************************************************************
* Name: ithread_t
@@ -209,10 +200,6 @@ typedef pthread_rwlockattr_t ithread_rwlockattr_t;
static UPNP_INLINE int ithread_initialize_library(void) {
int ret = 0;
#if defined(WIN32) && defined(PTW32_STATIC_LIB)
ret = !pthread_win32_process_attach_np();
#endif
return ret;
}
@@ -231,10 +218,6 @@ static UPNP_INLINE int ithread_initialize_library(void) {
static UPNP_INLINE int ithread_cleanup_library(void) {
int ret = 0;
#if defined(WIN32) && defined(PTW32_STATIC_LIB)
ret = !pthread_win32_process_detach_np();
#endif
return ret;
}
@@ -789,6 +772,22 @@ static UPNP_INLINE int ithread_cleanup_thread(void) {
***************************************************************************/
#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
*
@@ -933,7 +932,8 @@ static UPNP_INLINE int ithread_cleanup_thread(void) {
#endif
#if !defined(PTHREAD_MUTEX_RECURSIVE) && !defined(__DragonFly__)
#if !defined(PTHREAD_MUTEX_RECURSIVE) && !defined(__DragonFly__) && !defined(UPNP_USE_MSVCPP)
/* !defined(UPNP_USE_MSVCPP) should probably also have pthreads version check - but it's not clear if that is possible */
/* NK: Added for satisfying the gcc compiler */
EXPORT_SPEC int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind);
#endif

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* 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.next = NULL;
return 0;
return retCode;
}
ListNode *ListAddHead(LinkedList *list, void *item)

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -59,15 +60,15 @@ static long DiffMillis(
/*! . */
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 */
temp *= 1000;
temp *= 1000.0;
/* convert microseconds to milliseconds and add to temp */
/* 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;
}
@@ -82,22 +83,23 @@ static void StatsInit(
/*! Must be valid non null stats structure. */
ThreadPoolStats *stats)
{
stats->totalIdleTime = 0;
stats->totalIdleTime = 0.0;
stats->totalJobsHQ = 0;
stats->totalJobsLQ = 0;
stats->totalJobsMQ = 0;
stats->totalTimeHQ = 0;
stats->totalTimeMQ = 0;
stats->totalTimeLQ = 0;
stats->totalWorkTime = 0;
stats->totalIdleTime = 0;
stats->avgWaitHQ = 0;
stats->avgWaitMQ = 0;
stats->avgWaitLQ = 0;
stats->totalTimeHQ = 0.0;
stats->totalTimeMQ = 0.0;
stats->totalTimeLQ = 0.0;
stats->totalWorkTime = 0.0;
stats->totalIdleTime = 0.0;
stats->avgWaitHQ = 0.0;
stats->avgWaitMQ = 0.0;
stats->avgWaitLQ = 0.0;
stats->workerThreads = 0;
stats->idleThreads = 0;
stats->persistentThreads = 0;
stats->maxThreads = 0; stats->totalThreads = 0;
stats->maxThreads = 0;
stats->totalThreads = 0;
}
/*!
@@ -291,8 +293,8 @@ static int SetPriority(
/*! . */
ThreadPriority priority)
{
int retVal = 0;
#if defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING > 0
int retVal = 0;
int currentPolicy;
int minPriority = 0;
int maxPriority = 0;
@@ -324,11 +326,12 @@ static int SetPriority(
sched_result = pthread_setschedparam(ithread_self(), currentPolicy, &newPriority);
retVal = (sched_result == 0 || errno == EPERM) ? 0 : sched_result;
#else
retVal = 0;
#endif
exit_function:
return retVal;
#else
return 0;
priority = priority;
#endif
}
/*!
@@ -413,11 +416,11 @@ static void SetSeed(void)
gettimeofday(&t, NULL);
#if defined(WIN32)
srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id().p);
srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id().p);
#elif defined(BSD) || defined(__OSX__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id());
srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id());
#elif defined(__linux__) || defined(__sun) || defined(__CYGWIN__) || defined(__GLIBC__)
srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id());
srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id());
#else
{
volatile union {
@@ -459,6 +462,7 @@ static void *WorkerThread(
/* Increment total thread count */
ithread_mutex_lock(&tp->mutex);
tp->totalThreads++;
tp->pendingWorkerThreadStart = 0;
ithread_cond_broadcast(&tp->start_and_shutdown);
ithread_mutex_unlock(&tp->mutex);
@@ -473,7 +477,7 @@ static void *WorkerThread(
}
retCode = 0;
tp->stats.idleThreads++;
tp->stats.totalWorkTime += (double)(StatsTime(NULL) - start);
tp->stats.totalWorkTime += (double)StatsTime(NULL) - (double)start;
StatsTime(&start);
if (persistent == 0) {
tp->stats.workerThreads--;
@@ -506,7 +510,7 @@ static void *WorkerThread(
}
tp->stats.idleThreads--;
/* idle time */
tp->stats.totalIdleTime += (double)(StatsTime(NULL) - start);
tp->stats.totalIdleTime += (double)StatsTime(NULL) - (double)start;
/* work time */
StatsTime(&start);
/* bump priority of starved jobs */
@@ -528,16 +532,28 @@ static void *WorkerThread(
/* Pick the highest priority job */
if (tp->highJobQ.size > 0) {
head = ListHead(&tp->highJobQ);
if (head == NULL) {
tp->stats.workerThreads--;
goto exit_function;
}
job = (ThreadPoolJob *) head->item;
CalcWaitTime(tp, HIGH_PRIORITY, job);
ListDelNode(&tp->highJobQ, head, 0);
} else if (tp->medJobQ.size > 0) {
head = ListHead(&tp->medJobQ);
if (head == NULL) {
tp->stats.workerThreads--;
goto exit_function;
}
job = (ThreadPoolJob *) head->item;
CalcWaitTime(tp, MED_PRIORITY, job);
ListDelNode(&tp->medJobQ, head, 0);
} else if (tp->lowJobQ.size > 0) {
head = ListHead(&tp->lowJobQ);
if (head == NULL) {
tp->stats.workerThreads--;
goto exit_function;
}
job = (ThreadPoolJob *) head->item;
CalcWaitTime(tp, LOW_PRIORITY, job);
ListDelNode(&tp->lowJobQ, head, 0);
@@ -602,6 +618,9 @@ static ThreadPoolJob *CreateThreadPoolJob(
* \brief Creates a worker thread, if the thread pool does not already have
* max threads.
*
* \remark The ThreadPool object mutex must be locked prior to calling this
* function.
*
* \internal
*
* \return
@@ -610,25 +629,36 @@ static ThreadPoolJob *CreateThreadPoolJob(
* \li \c EAGAIN if system can not create thread.
*/
static int CreateWorker(
/*! . */
/*! A pointer to the ThreadPool object. */
ThreadPool *tp)
{
ithread_t temp;
int rc = 0;
int currentThreads = tp->totalThreads + 1;
ithread_attr_t attr;
/* if a new worker is the process of starting, wait until it fully starts */
while (tp->pendingWorkerThreadStart) {
ithread_cond_wait(&tp->start_and_shutdown, &tp->mutex);
}
if (tp->attr.maxThreads != INFINITE_THREADS &&
currentThreads > tp->attr.maxThreads) {
tp->totalThreads + 1 > tp->attr.maxThreads) {
return EMAXTHREADS;
}
ithread_attr_init(&attr);
ithread_attr_setstacksize(&attr, tp->attr.stackSize);
ithread_attr_setdetachstate(&attr, ITHREAD_CREATE_DETACHED);
rc = ithread_create(&temp, &attr, WorkerThread, tp);
ithread_attr_destroy(&attr);
if (rc == 0) {
rc = ithread_detach(temp);
while (tp->totalThreads < currentThreads) {
/* ithread_detach will return EINVAL if thread has been
successfully detached by ithread_create */
if (rc == EINVAL)
rc = 0;
tp->pendingWorkerThreadStart = 1;
/* wait until the new worker thread starts */
while (tp->pendingWorkerThreadStart) {
ithread_cond_wait(&tp->start_and_shutdown, &tp->mutex);
}
}
@@ -643,10 +673,13 @@ static int CreateWorker(
* \brief Determines whether or not a thread should be added based on the
* jobsPerThread ratio. Adds a thread if appropriate.
*
* \remark The ThreadPool object mutex must be locked prior to calling this
* function.
*
* \internal
*/
static void AddWorker(
/*! . */
/*! A pointer to the ThreadPool object. */
ThreadPool *tp)
{
long jobs = 0;
@@ -679,6 +712,10 @@ int ThreadPoolInit(ThreadPool *tp, ThreadPoolAttr *attr)
retCode += ithread_cond_init(&tp->condition, NULL);
retCode += ithread_cond_init(&tp->start_and_shutdown, NULL);
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;
}
if (attr) {
@@ -709,6 +746,7 @@ int ThreadPoolInit(ThreadPool *tp, ThreadPoolAttr *attr)
tp->totalThreads = 0;
tp->busyThreads = 0;
tp->persistentThreads = 0;
tp->pendingWorkerThreadStart = 0;
for (i = 0; i < tp->attr.minThreads; ++i) {
retCode = CreateWorker(tp);
if (retCode) {
@@ -765,9 +803,8 @@ int ThreadPoolAddPersistent(ThreadPool *tp, ThreadPoolJob *job, int *jobId)
ithread_cond_signal(&tp->condition);
/* wait until long job has been picked up */
while (tp->persistentJob) {
while (tp->persistentJob)
ithread_cond_wait(&tp->start_and_shutdown, &tp->mutex);
}
*jobId = tp->lastJobId++;
exit_function:
@@ -783,9 +820,8 @@ int ThreadPoolAdd(ThreadPool *tp, ThreadPoolJob *job, int *jobId)
long totalJobs;
ThreadPoolJob *temp = NULL;
if (!tp || !job) {
if (!tp || !job)
return EINVAL;
}
ithread_mutex_lock(&tp->mutex);
@@ -794,38 +830,32 @@ int ThreadPoolAdd(ThreadPool *tp, ThreadPoolJob *job, int *jobId)
fprintf(stderr, "total jobs = %ld, too many jobs", totalJobs);
goto exit_function;
}
if (!jobId) {
if (!jobId)
jobId = &tempId;
}
*jobId = INVALID_JOB_ID;
temp = CreateThreadPoolJob(job, tp->lastJobId, tp);
if (!temp) {
if (!temp)
goto exit_function;
switch (job->priority) {
case HIGH_PRIORITY:
if (ListAddTail(&tp->highJobQ, temp))
rc = 0;
break;
case MED_PRIORITY:
if (ListAddTail(&tp->medJobQ, temp))
rc = 0;
break;
default:
if (ListAddTail(&tp->lowJobQ, temp))
rc = 0;
}
if (job->priority == HIGH_PRIORITY) {
if (ListAddTail(&tp->highJobQ, temp)) {
rc = 0;
}
} else if (job->priority == MED_PRIORITY) {
if (ListAddTail(&tp->medJobQ, temp)) {
rc = 0;
}
} else {
if (ListAddTail(&tp->lowJobQ, temp)) {
rc = 0;
}
}
/* AddWorker if appropriate */
AddWorker(tp);
/* Notify a waiting thread */
if (rc == 0) {
if (rc == 0)
ithread_cond_signal(&tp->condition);
} else {
else
FreeThreadPoolJob(tp, temp);
}
*jobId = tp->lastJobId++;
exit_function:
@@ -841,12 +871,10 @@ int ThreadPoolRemove(ThreadPool *tp, int jobId, ThreadPoolJob *out)
ListNode *tempNode = NULL;
ThreadPoolJob dummy;
if (!tp) {
if (!tp)
return EINVAL;
}
if (!out) {
if (!out)
out = &dummy;
}
dummy.jobId = jobId;
ithread_mutex_lock(&tp->mutex);
@@ -895,16 +923,13 @@ exit_function:
int ThreadPoolGetAttr(ThreadPool *tp, ThreadPoolAttr *out)
{
if (!tp || !out) {
if (!tp || !out)
return EINVAL;
}
if (!tp->shutdown) {
if (!tp->shutdown)
ithread_mutex_lock(&tp->mutex);
}
*out = tp->attr;
if (!tp->shutdown) {
if (!tp->shutdown)
ithread_mutex_unlock(&tp->mutex);
}
return 0;
}
@@ -915,20 +940,17 @@ int ThreadPoolSetAttr(ThreadPool *tp, ThreadPoolAttr *attr)
ThreadPoolAttr temp;
int i = 0;
if (!tp) {
if (!tp)
return EINVAL;
}
ithread_mutex_lock(&tp->mutex);
if (attr) {
if (attr)
temp = *attr;
} else {
else
TPAttrInit(&temp);
}
if (SetPolicyType(temp.schedPolicy) != 0) {
ithread_mutex_unlock(&tp->mutex);
return INVALID_POLICY;
}
tp->attr = temp;
@@ -946,10 +968,9 @@ int ThreadPoolSetAttr(ThreadPool *tp, ThreadPoolAttr *attr)
ithread_mutex_unlock(&tp->mutex);
if (retCode != 0) {
if (retCode != 0)
/* clean up if the min threads could not be created */
ThreadPoolShutdown(tp);
}
return retCode;
}
@@ -959,54 +980,56 @@ int ThreadPoolShutdown(ThreadPool *tp)
ListNode *head = NULL;
ThreadPoolJob *temp = NULL;
if (!tp) {
if (!tp)
return EINVAL;
}
ithread_mutex_lock(&tp->mutex);
/* clean up high priority jobs */
while (tp->highJobQ.size) {
head = ListHead(&tp->highJobQ);
temp = (ThreadPoolJob *)head->item;
if (temp->free_func) {
temp->free_func(temp->arg);
if (head == NULL) {
ithread_mutex_unlock(&tp->mutex);
return EINVAL;
}
temp = (ThreadPoolJob *)head->item;
if (temp->free_func)
temp->free_func(temp->arg);
FreeThreadPoolJob(tp, temp);
ListDelNode(&tp->highJobQ, head, 0);
}
ListDestroy(&tp->highJobQ, 0);
/* clean up med priority jobs */
while (tp->medJobQ.size) {
head = ListHead(&tp->medJobQ);
temp = (ThreadPoolJob *)head->item;
if (temp->free_func) {
temp->free_func(temp->arg);
if (head == NULL) {
ithread_mutex_unlock(&tp->mutex);
return EINVAL;
}
temp = (ThreadPoolJob *)head->item;
if (temp->free_func)
temp->free_func(temp->arg);
FreeThreadPoolJob(tp, temp);
ListDelNode(&tp->medJobQ, head, 0);
}
ListDestroy(&tp->medJobQ, 0);
/* clean up low priority jobs */
while (tp->lowJobQ.size) {
head = ListHead(&tp->lowJobQ);
temp = (ThreadPoolJob *)head->item;
if (temp->free_func) {
temp->free_func(temp->arg);
if (head == NULL) {
ithread_mutex_unlock(&tp->mutex);
return EINVAL;
}
temp = (ThreadPoolJob *)head->item;
if (temp->free_func)
temp->free_func(temp->arg);
FreeThreadPoolJob(tp, temp);
ListDelNode(&tp->lowJobQ, head, 0);
}
ListDestroy(&tp->lowJobQ, 0);
/* clean up long term job */
if (tp->persistentJob) {
temp = tp->persistentJob;
if (temp->free_func) {
if (temp->free_func)
temp->free_func(temp->arg);
}
FreeThreadPoolJob(tp, temp);
tp->persistentJob = NULL;
}
@@ -1014,33 +1037,25 @@ int ThreadPoolShutdown(ThreadPool *tp)
tp->shutdown = 1;
ithread_cond_broadcast(&tp->condition);
/* wait for all threads to finish */
while (tp->totalThreads > 0) {
while (tp->totalThreads > 0)
ithread_cond_wait(&tp->start_and_shutdown, &tp->mutex);
}
/* destroy condition */
while (ithread_cond_destroy(&tp->condition) != 0) {
/**/
}
while (ithread_cond_destroy(&tp->start_and_shutdown) != 0) {
/**/
}
while (ithread_cond_destroy(&tp->condition) != 0) {}
while (ithread_cond_destroy(&tp->start_and_shutdown) != 0) {}
FreeListDestroy(&tp->jobFreeList);
ithread_mutex_unlock(&tp->mutex);
/* destroy mutex */
while (ithread_mutex_destroy(&tp->mutex) != 0) {
/**/
}
while (ithread_mutex_destroy(&tp->mutex) != 0) {}
return 0;
}
int TPAttrInit(ThreadPoolAttr *attr)
{
if (!attr) {
if (!attr)
return EINVAL;
}
attr->jobsPerThread = DEFAULT_JOBS_PER_THREAD;
attr->maxIdleTime = DEFAULT_IDLE_TIME;
attr->maxThreads = DEFAULT_MAX_THREADS;
@@ -1055,9 +1070,8 @@ int TPAttrInit(ThreadPoolAttr *attr)
int TPJobInit(ThreadPoolJob *job, start_routine func, void *arg)
{
if (!job || !func) {
if (!job || !func)
return EINVAL;
}
job->func = func;
job->arg = arg;
job->priority = DEFAULT_PRIORITY;
@@ -1068,24 +1082,23 @@ int TPJobInit(ThreadPoolJob *job, start_routine func, void *arg)
int TPJobSetPriority(ThreadPoolJob *job, ThreadPriority priority)
{
if (!job) {
if (!job)
return EINVAL;
}
if (priority == LOW_PRIORITY ||
priority == MED_PRIORITY ||
priority == HIGH_PRIORITY) {
switch (priority) {
case LOW_PRIORITY:
case MED_PRIORITY:
case HIGH_PRIORITY:
job->priority = priority;
return 0;
} else {
default:
return EINVAL;
}
}
int TPJobSetFreeFunction(ThreadPoolJob *job, free_routine func)
{
if(!job) {
if(!job)
return EINVAL;
}
job->free_func = func;
return 0;
@@ -1093,9 +1106,8 @@ int TPJobSetFreeFunction(ThreadPoolJob *job, free_routine func)
int TPAttrSetMaxThreads(ThreadPoolAttr *attr, int maxThreads)
{
if (!attr) {
if (!attr)
return EINVAL;
}
attr->maxThreads = maxThreads;
return 0;
@@ -1103,9 +1115,8 @@ int TPAttrSetMaxThreads(ThreadPoolAttr *attr, int maxThreads)
int TPAttrSetMinThreads(ThreadPoolAttr *attr, int minThreads)
{
if (!attr) {
if (!attr)
return EINVAL;
}
attr->minThreads = minThreads;
return 0;
@@ -1113,9 +1124,8 @@ int TPAttrSetMinThreads(ThreadPoolAttr *attr, int minThreads)
int TPAttrSetStackSize(ThreadPoolAttr *attr, size_t stackSize)
{
if (!attr) {
if (!attr)
return EINVAL;
}
attr->stackSize = stackSize;
return 0;
@@ -1123,9 +1133,8 @@ int TPAttrSetStackSize(ThreadPoolAttr *attr, size_t stackSize)
int TPAttrSetIdleTime(ThreadPoolAttr *attr, int idleTime)
{
if (!attr) {
if (!attr)
return EINVAL;
}
attr->maxIdleTime = idleTime;
return 0;
@@ -1133,9 +1142,8 @@ int TPAttrSetIdleTime(ThreadPoolAttr *attr, int idleTime)
int TPAttrSetJobsPerThread(ThreadPoolAttr *attr, int jobsPerThread)
{
if (!attr) {
if (!attr)
return EINVAL;
}
attr->jobsPerThread = jobsPerThread;
return 0;
@@ -1143,9 +1151,8 @@ int TPAttrSetJobsPerThread(ThreadPoolAttr *attr, int jobsPerThread)
int TPAttrSetStarvationTime(ThreadPoolAttr *attr, int starvationTime)
{
if (!attr) {
if (!attr)
return EINVAL;
}
attr->starvationTime = starvationTime;
return 0;
@@ -1153,9 +1160,8 @@ int TPAttrSetStarvationTime(ThreadPoolAttr *attr, int starvationTime)
int TPAttrSetSchedPolicy(ThreadPoolAttr *attr, PolicyType schedPolicy)
{
if (!attr) {
if (!attr)
return EINVAL;
}
attr->schedPolicy = schedPolicy;
return 0;
@@ -1163,9 +1169,8 @@ int TPAttrSetSchedPolicy(ThreadPoolAttr *attr, PolicyType schedPolicy)
int TPAttrSetMaxJobsTotal(ThreadPoolAttr *attr, int maxJobsTotal)
{
if (!attr) {
if (!attr)
return EINVAL;
}
attr->maxJobsTotal = maxJobsTotal;
return 0;
@@ -1174,9 +1179,8 @@ int TPAttrSetMaxJobsTotal(ThreadPoolAttr *attr, int maxJobsTotal)
#ifdef STATS
void ThreadPoolPrintStats(ThreadPoolStats *stats)
{
if (!stats) {
if (!stats)
return;
}
/* some OSses time_t length may depending on platform, promote it to long for safety */
printf("ThreadPoolStats at Time: %ld\n", (long)StatsTime(NULL));
printf("High Jobs pending: %d\n", stats->currentJobsHQ);
@@ -1196,40 +1200,34 @@ void ThreadPoolPrintStats(ThreadPoolStats *stats)
int ThreadPoolGetStats(ThreadPool *tp, ThreadPoolStats *stats)
{
if (tp == NULL || stats == NULL) {
if (tp == NULL || stats == NULL)
return EINVAL;
}
/* if not shutdown then acquire mutex */
if (!tp->shutdown) {
if (!tp->shutdown)
ithread_mutex_lock(&tp->mutex);
}
*stats = tp->stats;
if (stats->totalJobsHQ > 0) {
stats->avgWaitHQ = stats->totalTimeHQ / stats->totalJobsHQ;
} else {
stats->avgWaitHQ = 0;
}
if (stats->totalJobsMQ > 0) {
stats->avgWaitMQ = stats->totalTimeMQ / stats->totalJobsMQ;
} else {
stats->avgWaitMQ = 0;
}
if (stats->totalJobsLQ > 0) {
stats->avgWaitLQ = stats->totalTimeLQ / stats->totalJobsLQ;
} else {
stats->avgWaitLQ = 0;
}
if (stats->totalJobsHQ > 0)
stats->avgWaitHQ = stats->totalTimeHQ / (double)stats->totalJobsHQ;
else
stats->avgWaitHQ = 0.0;
if (stats->totalJobsMQ > 0)
stats->avgWaitMQ = stats->totalTimeMQ / (double)stats->totalJobsMQ;
else
stats->avgWaitMQ = 0.0;
if (stats->totalJobsLQ > 0)
stats->avgWaitLQ = stats->totalTimeLQ / (double)stats->totalJobsLQ;
else
stats->avgWaitLQ = 0.0;
stats->totalThreads = tp->totalThreads;
stats->persistentThreads = tp->persistentThreads;
stats->currentJobsHQ = (int)ListSize(&tp->highJobQ);
stats->currentJobsLQ = (int)ListSize(&tp->lowJobQ);
stats->currentJobsMQ = (int)ListSize(&tp->medJobQ);
/* if not shutdown then release mutex */
if (!tp->shutdown) {
if (!tp->shutdown)
ithread_mutex_unlock(&tp->mutex);
}
return 0;
}
@@ -1273,4 +1271,3 @@ int ThreadPoolGetStats(ThreadPool *tp, ThreadPoolStats *stats)
return 0;
}
#endif /* WIN32 */

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -84,6 +85,10 @@ static void *TimerThreadWorker(
/* Get the next event if possible. */
if (timer->eventQ.size > 0) {
head = ListHead( &timer->eventQ );
if (head == NULL) {
ithread_mutex_unlock( &timer->mutex );
return NULL;
}
nextEvent = ( TimerEvent * ) head->item;
nextEventTime = nextEvent->eventTime;
}
@@ -91,10 +96,17 @@ static void *TimerThreadWorker(
/* If time has elapsed, schedule job. */
if (nextEvent && currentTime >= nextEventTime) {
if( nextEvent->persistent ) {
ThreadPoolAddPersistent( timer->tp, &nextEvent->job,
&tempId );
if (ThreadPoolAddPersistent( timer->tp, &nextEvent->job, &tempId ) != 0) {
if (nextEvent->job.arg != NULL && nextEvent->job.free_func != NULL) {
nextEvent->job.free_func(nextEvent->job.arg);
}
}
} 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 );
FreeTimerEvent( timer, nextEvent );
@@ -102,7 +114,7 @@ static void *TimerThreadWorker(
}
if (nextEvent) {
timeToWait.tv_nsec = 0;
timeToWait.tv_sec = nextEvent->eventTime;
timeToWait.tv_sec = (long)nextEvent->eventTime;
ithread_cond_timedwait( &timer->condition, &timer->mutex,
&timeToWait );
} else {
@@ -128,9 +140,10 @@ static int CalculateEventTime(
assert( timeout != NULL );
if (type == ABS_SEC)
switch (type) {
case ABS_SEC:
return 0;
else /*if (type == REL_SEC) */{
default: /* REL_SEC) */
time(&now);
( *timeout ) += now;
return 0;

View File

@@ -23,7 +23,10 @@ upnpinclude_HEADERS = \
inc/upnp.h \
inc/upnpdebug.h \
inc/UpnpGlobal.h \
inc/UpnpInet.h
inc/UpnpInet.h \
inc/UpnpIntTypes.h \
inc/UpnpStdInt.h \
inc/UpnpUniStd.h
nodist_upnpinclude_HEADERS = inc/upnpconfig.h
if ENABLE_TOOLS
@@ -76,16 +79,21 @@ libupnp_la_SOURCES = \
src/inc/webserver.h
# ssdp
if ENABLE_SSDP
libupnp_la_SOURCES += \
src/ssdp/ssdp_ResultData.h \
src/ssdp/ssdp_device.c \
src/ssdp/ssdp_ctrlpt.c \
src/ssdp/ssdp_server.c
endif
# soap
if ENABLE_SOAP
libupnp_la_SOURCES += \
src/soap/soap_device.c \
src/soap/soap_ctrlpt.c \
src/soap/soap_common.c
endif
# genlib
libupnp_la_SOURCES += \
@@ -105,10 +113,12 @@ libupnp_la_SOURCES += \
src/genlib/net/uri/uri.c
# gena
if ENABLE_GENA
libupnp_la_SOURCES += \
src/gena/gena_device.c \
src/gena/gena_ctrlpt.c \
src/gena/gena_callback2.c
endif
# api
libupnp_la_SOURCES += \
@@ -125,10 +135,12 @@ endif
# uuid
if ENABLE_UUID
libupnp_la_SOURCES += \
src/uuid/md5.c \
src/uuid/sysdep.c \
src/uuid/uuid.c
endif
# urlconfig
@@ -142,9 +154,10 @@ libupnp_la_SOURCES += \
# check / distcheck tests
check_PROGRAMS = test_init
TESTS = test_init
check_PROGRAMS = test_init test_url
TESTS = test_init test_url
test_init_SOURCES = test/test_init.c
test_url_SOURCES = test/test_url.c
EXTRA_DIST = \

View File

@@ -1,24 +1,19 @@
#ifndef UPNPGLOBAL_H
#define UPNPGLOBAL_H
/*!
* \file
*
* \brief Defines constants that for some reason are not defined on some systems.
*/
#if defined MYLIB_LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 != 64
#if defined __GNUC__
#warning libupnp requires largefile mode - use AC_SYS_LARGEFILE
#else
#error libupnp requires largefile mode - use AC_SYS_LARGEFILE
#endif
#endif
#endif
#ifdef WIN32
/*
@@ -36,21 +31,23 @@
#endif /* LIBUPNP_EXPORTS */
#endif /* UPNP_STATIC_LIB */
/*
* UPNP_INLINE
* PRId64
* PRIzd
* PRIzu
* PRIzx
*/
#ifdef UPNP_USE_MSVCPP
/* define some things the M$ VC++ doesn't know */
#define UPNP_INLINE
#define UPNP_INLINE _inline
typedef __int64 int64_t;
#define PRId64 "I64d"
#define PRIzd "ld"
#define PRIzu "lu"
#define PRIzx "lx"
#endif /* UPNP_USE_MSVCPP */
#ifdef UPNP_USE_BCBPP
/* define some things Borland Builder doesn't know */
#define UPNP_INLINE inline
@@ -58,18 +55,20 @@
#warning The Borland C compiler is probably broken on PRId64,
#warning please someone provide a proper fix here
#define PRId64 "I64d"
#define PRIzd "zd"
#define PRIzu "zu"
#define PRIzx "zx"
#endif /* UPNP_USE_BCBPP */
#ifdef __GNUC__
#define UPNP_INLINE inline
/* Note with PRIzu that in the case of Mingw32, it's the MS C
* runtime printf which ends up getting called, not the glibc
* printf, so it genuinely doesn't have "zu"
*/
#define PRIzd "ld"
#define PRIzu "lu"
#define PRIzx "lx"
#endif /* __GNUC__ */
#else
/*!
@@ -93,7 +92,7 @@
#else
#define UPNP_INLINE inline
#endif
/*!
* \brief Supply the PRId64 printf() macro.
*
@@ -102,16 +101,17 @@
/* #define PRId64 PRId64 */
/*!
* \brief Supply the PRIzu printf() macro.
* \brief Supply the PRIz* printf() macros.
*
* This macro was invented so that we can live a little longer with
* These macros were invented so that we can live a little longer with
* MSVC lack of C99. "z" is the correct printf() size specifier for
* the size_t type.
*/
#define PRIzd "zd"
#define PRIzu "zu"
#define PRIzx "zx"
#endif
/*
* Defining this macro here gives some interesting information about unused
* functions in the code. Of course, this should never go uncommented on a
@@ -119,6 +119,4 @@
*/
/*#define inline*/
#endif /* UPNPGLOBAL_H */

View File

@@ -1,40 +1,67 @@
#ifndef UPNPINET_H
#define UPNPINET_H
/*!
* \addtogroup Sock
*
* @{
*
* \file
*
* \brief Provides a platform independent way to include TCP/IP types and functions.
*/
#include "UpnpUniStd.h" /* for close() */
#ifdef WIN32
#include <iphlpapi.h>
#include <stdarg.h>
#ifndef UPNP_USE_MSVCPP
/* Removed: not required (and cause compilation issues) */
#include <winbase.h>
#include <windef.h>
#endif
#include <winsock2.h>
#include <Ws2tcpip.h>
#include <iphlpapi.h>
#include <ws2tcpip.h>
#define UpnpCloseSocket closesocket
#else
#if(_WIN32_WINNT < 0x0600)
typedef short sa_family_t;
#else
typedef ADDRESS_FAMILY sa_family_t;
#endif
#else /* WIN32 */
#include <sys/param.h>
#if (defined(BSD) && BSD >= 199306) || defined (__FreeBSD_kernel__)
#if defined(__sun)
#include <fcntl.h>
#include <sys/sockio.h>
#elif (defined(BSD) && BSD >= 199306) || defined (__FreeBSD_kernel__)
#include <ifaddrs.h>
/* Do not move or remove the include below for "sys/socket"!
* Will break FreeBSD builds. */
#include <sys/socket.h>
#endif
#include <arpa/inet.h> /* for inet_pton() */
#include <net/if.h>
#include <netinet/in.h>
/* include <unistd.h> for close().
* Do not include this file in win32. */
#include <unistd.h>
/* SOCKET is unsigned and is not a file descriptor on win32. */
#define SOCKET int
/* INVALID_SOCKET is unsigned on win32. */
/*! This typedef makes the code slightly more WIN32 tolerant.
* On WIN32 systems, SOCKET is unsigned and is not a file
* descriptor. */
typedef int SOCKET;
/*! INVALID_SOCKET is unsigned on win32. */
#define INVALID_SOCKET (-1)
/* select() returns SOCKET_ERROR on win32. */
/*! select() returns SOCKET_ERROR on win32. */
#define SOCKET_ERROR (-1)
/*! Alias to close() to make code more WIN32 tolerant. */
#define UpnpCloseSocket close
#endif
#endif /* WIN32 */
/* @} Sock */
#endif /* UPNPINET_H */

11
upnp/inc/UpnpIntTypes.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef UPNPINTTYPES_H
#define UPNPINTTYPES_H
#if !defined(UPNP_USE_BCBPP)
/* Printf format for integers. */
#include <inttypes.h>
#endif /* !defined(UPNP_USE_BCBPP) */
#endif /* UPNPINTTYPES_H */

20
upnp/inc/UpnpStdInt.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef UPNPSTDINT_H
#define UPNPSTDINT_H
#if !defined(UPNP_USE_BCBPP)
/* Sized integer types. */
#include <stdint.h>
#ifdef UPNP_USE_MSVCPP
/* no ssize_t defined for VC */
#ifdef _WIN64
typedef int64_t ssize_t;
#else
typedef int32_t ssize_t;
#endif
#endif
#endif /* !defined(UPNP_USE_BCBPP) */
#endif /* UPNPSTDINT_H */

10
upnp/inc/UpnpUniStd.h Normal file
View File

@@ -0,0 +1,10 @@
#ifndef UPNPUNISTD_H
#define UPNPUNISTD_H
#ifdef WIN32
/* Do not #include <unistd.h> on WIN32. */
#else /* WIN32 */
#include <unistd.h> /* for close() */
#endif /* WIN32 */
#endif /* UPNPUNISTD_H */

View File

@@ -1,7 +1,11 @@
#ifndef UPNP_H
#define UPNP_H
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (C) 2011-2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -29,48 +33,36 @@
*
******************************************************************************/
#ifndef UPNP_H
#define UPNP_H
/*!
* \file
*
* \defgroup UPnPAPI UPnP API
*
* @{
*
* \file
*/
#include "ixml.h"
#include "upnpconfig.h"
#include "UpnpGlobal.h"
#include "UpnpInet.h"
/*
* \todo Document the exact reason of these include files and solve this
* include mess in an include file like UpnpTime.h
*/
#ifdef WIN32
#include <time.h>
#ifdef UPNP_USE_MSVCPP
#include <sys/types.h> /* needed for off_t */
#endif
#elif (defined(BSD) && BSD >= 199306)
#include <time.h>
#else
/* Other systems ??? */
#endif
#ifdef WIN32
/* Do not #include <sys/param.h> */
#else
#include <sys/param.h>
#endif
#define LINE_SIZE 180
#define NAME_SIZE 256
#define LINE_SIZE (size_t)180
#define NAME_SIZE (size_t)256
#define MNFT_NAME_SIZE 64
#define MODL_NAME_SIZE 32
#define SERL_NUMR_SIZE 64
@@ -79,7 +71,6 @@
#define UPNP_USING_CHUNKED -3
#define UPNP_UNTIL_CLOSE -4
/*!
* \name Error codes
*
@@ -141,8 +132,9 @@
#define UPNP_E_BUFFER_TOO_SMALL -106
/*!
* \brief The description document passed to \b UpnpRegisterRootDevice or
* \b UpnpRegisterRootDevice2 is invalid.
* \brief The description document passed to \b UpnpRegisterRootDevice,
* \b UpnpRegisterRootDevice2 \b UpnpRegisterRootDevice3 or
* \b UpnpRegisterRootDevice4 is invalid.
*/
#define UPNP_E_INVALID_DESC -107
@@ -388,19 +380,6 @@
/* @} ErrorCodes */
#ifndef OUT
#define OUT
#endif
#ifndef IN
#define IN
#endif
#ifndef INOUT
#define INOUT
#endif
#if UPNP_VERSION >= 10800
/*
* Opaque data structures. The following includes are data structures that
@@ -423,7 +402,6 @@
#include "SubscriptionRequest.h"
#endif /* UPNP_VERSION >= 10800 */
/*!
* \name Constants and Types
*
@@ -447,7 +425,8 @@ typedef int UpnpClient_Handle;
/*!
* \brief Returned when a device application registers with
* \b UpnpRegisterRootDevice or \b UpnpRegisterRootDevice2.
* \b UpnpRegisterRootDevice, \b UpnpRegisterRootDevice2,
* \b UpnpRegisterRootDevice3 or \b UpnpRegisterRootDevice4.
*
* Device handles can only be used with functions that operate with a device
* handle.
@@ -620,7 +599,6 @@ enum Upnp_DescType_e {
typedef enum Upnp_DescType_e Upnp_DescType;
#if UPNP_VERSION < 10800
/** Returned as part of a {\bf UPNP_CONTROL_ACTION_COMPLETE} callback. */
@@ -778,7 +756,7 @@ struct Upnp_Discovery
char Ext[LINE_SIZE];
/** 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
@@ -821,7 +799,6 @@ struct Upnp_Subscription_Request
};
struct File_Info
{
/** The length of the file. A length less than 0 indicates the size
@@ -848,7 +825,6 @@ struct File_Info
};
#endif /* UPNP_VERSION < 10800 */
/*!
* All callback functions share the same prototype, documented below.
* Note that any memory passed to the callback function
@@ -884,19 +860,16 @@ typedef int (*Upnp_FunPtr)(
/* @} Constants and Types */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*!
* \name Initialization and Registration
*
* @{
*/
/*!
* \brief Initializes the Linux SDK for UPnP Devices (IPv4 only).
*
@@ -938,7 +911,6 @@ EXPORT_SPEC int UpnpInit(
* \c NULL will pick an arbitrary free port. */
unsigned short DestPort);
/*!
* \brief Initializes the Linux SDK for UPnP Devices (IPv4 or IPv6).
*
@@ -982,7 +954,6 @@ EXPORT_SPEC int UpnpInit2(
unsigned short DestPort);
#endif
/*!
* \brief Terminates the Linux SDK for UPnP Devices.
*
@@ -1004,7 +975,6 @@ EXPORT_SPEC int UpnpInit2(
*/
EXPORT_SPEC int UpnpFinish(void);
/*!
* \brief Returns the internal server IPv4 UPnP listening port.
*
@@ -1018,7 +988,6 @@ EXPORT_SPEC int UpnpFinish(void);
*/
EXPORT_SPEC unsigned short UpnpGetServerPort(void);
/*!
* \brief Returns the internal server IPv6 UPnP listening port.
*
@@ -1046,7 +1015,6 @@ EXPORT_SPEC unsigned short UpnpGetServerPort6(void);
*/
EXPORT_SPEC char *UpnpGetServerIpAddress(void);
/*!
* \brief Returns the local IPv6 listening ip address.
*
@@ -1198,7 +1166,6 @@ EXPORT_SPEC int UpnpRegisterRootDevice2(
/*! [out] Pointer to a variable to store the new device handle. */
UpnpDevice_Handle* Hnd);
/*!
* \brief Registers a device application for a specific address family with
* the UPnP library.
@@ -1246,12 +1213,65 @@ EXPORT_SPEC int UpnpRegisterRootDevice3(
UpnpDevice_Handle *Hnd,
/*! [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. */
const int AddressFamily);
int AddressFamily);
/*!
* \brief Unregisters a root device registered with \b UpnpRegisterRootDevice or
* \b UpnpRegisterRootDevice2.
* \brief Registers a device application for a specific address family with
* the UPnP library. This function can also be used to specify a dedicated
* description URL to be returned for legacy CPs.
*
* A device application cannot make any other API calls until it registers
* using this function. Device applications can also register as control
* points (see \b UpnpRegisterClient to get a control point handle to perform
* control point functionality).
*
* This is synchronous and does not generate any callbacks. Callbacks can occur
* as soon as this function returns.
*
* \return An integer representing one of the following:
* \li \c UPNP_E_SUCCESS: The operation completed successfully.
* \li \c UPNP_E_FINISH: The SDK is already terminated or
* is not initialized.
* \li \c UPNP_E_INVALID_DESC: The description document was not
* a valid device description.
* \li \c UPNP_E_INVALID_URL: The URL for the description document
* is not valid.
* \li \c UPNP_E_INVALID_PARAM: Either \b Callback or \b Hnd
* is not a valid pointer or \b DescURL is \c NULL.
* \li \c UPNP_E_NETWORK_ERROR: A network error occurred.
* \li \c UPNP_E_SOCKET_WRITE: An error or timeout occurred writing
* to a socket.
* \li \c UPNP_E_SOCKET_READ: An error or timeout occurred reading
* from a socket.
* \li \c UPNP_E_SOCKET_BIND: An error occurred binding a socket.
* \li \c UPNP_E_SOCKET_CONNECT: An error occurred connecting the
* socket.
* \li \c UPNP_E_OUTOF_SOCKET: Too many sockets are currently
* allocated.
* \li \c UPNP_E_OUTOF_MEMORY: There are insufficient resources to
* register this root device.
*/
EXPORT_SPEC int UpnpRegisterRootDevice4(
/*! [in] Pointer to a string containing the description URL for this root
* device instance. */
const char *DescUrl,
/*! [in] Pointer to the callback function for receiving asynchronous events. */
Upnp_FunPtr Callback,
/*! [in] Pointer to user data returned with the callback function when invoked. */
const void *Cookie,
/*! [out] Pointer to a variable to store the new device handle. */
UpnpDevice_Handle *Hnd,
/*! [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. */
int AddressFamily,
/*! [in] Pointer to a string containing the description URL to be returned for
* legacy CPs for this root device instance. */
const char *LowerDescUrl);
/*!
* \brief Unregisters a root device registered with \b UpnpRegisterRootDevice,
* \b UpnpRegisterRootDevice2, \b UpnpRegisterRootDevice3 or
* \b UpnpRegisterRootDevice4.
*
* After this call, the \b UpnpDevice_Handle is no longer valid. For all
* advertisements that have not yet expired, the SDK sends a device unavailable
@@ -1268,6 +1288,34 @@ EXPORT_SPEC int UpnpUnRegisterRootDevice(
/*! [in] The handle of the root device instance to unregister. */
UpnpDevice_Handle Hnd);
/*!
* \brief Unregisters a root device registered with \b UpnpRegisterRootDevice,
* \b UpnpRegisterRootDevice2, \b UpnpRegisterRootDevice3 or
* \b UpnpRegisterRootDevice4.
*
* After this call, the \b UpnpDevice_Handle is no longer valid. For all
* advertisements that have not yet expired, the SDK sends a device unavailable
* message automatically.
*
* This is a synchronous call and generates no callbacks. Once this call
* returns, the SDK will no longer generate callbacks to the application.
*
* This function allow a device to specify the SSDP extensions defined by UPnP
* Low Power.
*
* \return An integer representing one of the following:
* \li \c UPNP_E_SUCCESS: The operation completed successfully.
* \li \c UPNP_E_INVALID_HANDLE: The handle is not a valid device handle.
*/
EXPORT_SPEC int UpnpUnRegisterRootDeviceLowPower(
/*! [in] The handle of the root device instance to unregister. */
UpnpDevice_Handle Hnd,
/*! PowerState as defined by UPnP Low Power. */
int PowerState,
/*! SleepPeriod as defined by UPnP Low Power. */
int SleepPeriod,
/*! RegistrationState as defined by UPnP Low Power. */
int RegistrationState);
/*!
* \brief Registers a control point application with the UPnP Library.
@@ -1295,7 +1343,6 @@ EXPORT_SPEC int UpnpRegisterClient(
/*! [out] Pointer to a variable to store the new control point handle. */
UpnpClient_Handle *Hnd);
/*!
* \brief Unregisters a control point application, unsubscribing all active
* subscriptions.
@@ -1316,7 +1363,6 @@ EXPORT_SPEC int UpnpUnRegisterClient(
/*! [in] The handle of the control point instance to unregister. */
UpnpClient_Handle Hnd);
/*!
* \deprecated Use \b UpnpSetMaxContentLength instead.
*
@@ -1330,7 +1376,6 @@ EXPORT_SPEC int UpnpSetContentLength(
/*! [in] Permissible content length */
size_t contentLength);
/*!
* \brief Sets the maximum content-length that the SDK will process on an
* incoming SOAP requests or responses.
@@ -1352,10 +1397,8 @@ EXPORT_SPEC int UpnpSetMaxContentLength(
* in bytes. */
size_t contentLength);
/* @} Initialization and Registration */
/******************************************************************************
******************************************************************************
* *
@@ -1364,14 +1407,12 @@ EXPORT_SPEC int UpnpSetMaxContentLength(
******************************************************************************
******************************************************************************/
/*!
* \name Discovery
*
* @{
*/
/*!
* \brief Searches for devices matching the given search target.
*
@@ -1430,10 +1471,38 @@ EXPORT_SPEC int UpnpSendAdvertisement(
/*! The expiration age, in seconds, of the announcements. */
int Exp);
/*!
* \brief Sends out the discovery announcements for all devices and services
* for a device.
*
* Each announcement is made with the same expiration time.
*
* This is a synchronous call.
*
* This function allow a device to specify the SSDP extensions defined by UPnP
* Low Power.
*
* \return An integer representing one of the following:
* \li \c UPNP_E_SUCCESS: The operation completed successfully.
* \li \c UPNP_E_INVALID_HANDLE: The handle is not a valid
* device handle.
* \li \c UPNP_E_OUTOF_MEMORY: There are insufficient resources to
* send future advertisements.
*/
EXPORT_SPEC int UpnpSendAdvertisementLowPower(
/*! The device handle for which to send out the announcements. */
UpnpDevice_Handle Hnd,
/*! The expiration age, in seconds, of the announcements. */
int Exp,
/*! PowerState as defined by UPnP Low Power. */
int PowerState,
/*! SleepPeriod as defined by UPnP Low Power. */
int SleepPeriod,
/*! RegistrationState as defined by UPnP Low Power. */
int RegistrationState);
/* @} Discovery */
/******************************************************************************
******************************************************************************
* *
@@ -1442,14 +1511,12 @@ EXPORT_SPEC int UpnpSendAdvertisement(
******************************************************************************
******************************************************************************/
/*!
* \name Control
*
* @{
*/
/*!
* \brief Queries the state of a state variable of a service on another device.
*
@@ -1487,7 +1554,6 @@ EXPORT_SPEC int UpnpGetServiceVarStatus(
* \b ixmlFreeDOMString. */
DOMString *StVarVal);
/*!
* \brief Queries the state of a variable of a service, generating a callback
* when the operation is complete.
@@ -1518,7 +1584,6 @@ EXPORT_SPEC int UpnpGetServiceVarStatusAsync(
/*! [in] Pointer to user data to pass to the callback function when invoked. */
const void *Cookie);
/*!
* \brief Sends a message to change a state variable in a service.
*
@@ -1557,7 +1622,6 @@ EXPORT_SPEC int UpnpSendAction(
* this document and the caller needs to free it. */
IXML_Document **RespNode);
/*!
* \brief Sends a message to change a state variable in a service.
*
@@ -1599,7 +1663,6 @@ EXPORT_SPEC int UpnpSendActionEx(
* this document and the caller needs to free it. */
IXML_Document **RespNode);
/*!
* \brief Sends a message to change a state variable in a service, generating a
* callback when the operation is complete.
@@ -1639,7 +1702,6 @@ EXPORT_SPEC int UpnpSendActionAsync(
* invoked. */
const void *Cookie);
/*!
* \brief Sends a message to change a state variable in a service, generating a
* callback when the operation is complete.
@@ -1682,10 +1744,8 @@ EXPORT_SPEC int UpnpSendActionExAsync(
* invoked. */
const void *Cookie);
/*! @} Control */
/******************************************************************************
******************************************************************************
* *
@@ -1694,14 +1754,12 @@ EXPORT_SPEC int UpnpSendActionExAsync(
******************************************************************************
******************************************************************************/
/*!
* \name Eventing
*
* @{
*/
/*!
* \brief Accepts a subscription request and sends out the current state of the
* eventable variables for a service.
@@ -1743,7 +1801,6 @@ EXPORT_SPEC int UpnpAcceptSubscription(
/*! [in] The subscription ID of the newly registered control point. */
const Upnp_SID SubsId);
/*!
* \brief Similar to \b UpnpAcceptSubscription() except that it takes a DOM
* document for the variables to event rather than an array of strings.
@@ -1780,7 +1837,6 @@ EXPORT_SPEC int UpnpAcceptSubscriptionExt(
/*! [in] The subscription ID of the newly registered control point. */
Upnp_SID SubsId);
/*!
* \brief Sends out an event change notification to all control points
* subscribed to a particular service.
@@ -1816,7 +1872,6 @@ EXPORT_SPEC int UpnpNotify(
/*! [in] The count of variables included in this notification. */
int cVariables);
/*!
* \brief Similar to \b UpnpNotify except that it takes a DOM document for the
* event rather than an array of strings.
@@ -1850,7 +1905,6 @@ EXPORT_SPEC int UpnpNotifyExt(
* Plug and Play Device Architecture specification. */
IXML_Document *PropSet);
/*!
* \brief Renews a subscription that is about to expire.
*
@@ -1888,7 +1942,6 @@ EXPORT_SPEC int UpnpRenewSubscription(
/*! [in] The ID for the subscription to renew. */
const Upnp_SID SubsId);
/*!
* \brief Renews a subscription that is about to expire, generating a callback
* when the operation is complete.
@@ -1950,7 +2003,6 @@ EXPORT_SPEC int UpnpRenewSubscriptionAsync(
/*! [in] Pointer to user data passed to the callback function when invoked. */
const void *Cookie);
/*!
* \brief Sets the maximum number of subscriptions accepted per service.
*
@@ -1971,7 +2023,6 @@ EXPORT_SPEC int UpnpSetMaxSubscriptions(
/*! The maximum number of subscriptions to be allowed per service. */
int MaxSubscriptions);
/*!
* \brief Sets the maximum time-out accepted for a subscription request or
* renewal.
@@ -1993,7 +2044,6 @@ EXPORT_SPEC int UpnpSetMaxSubscriptionTimeOut(
/*! The maximum subscription time-out to be accepted. */
int MaxSubscriptionTimeOut);
/*!
* \brief Registers a control point to receive event notifications from another
* device.
@@ -2035,7 +2085,6 @@ EXPORT_SPEC int UpnpSubscribe(
/*! [out] Pointer to a variable to receive the subscription ID (SID). */
Upnp_SID SubsId);
/*!
* \brief Performs the same operation as \b UpnpSubscribe, but returns
* immediately and calls the registered callback function when the operation
@@ -2097,7 +2146,6 @@ EXPORT_SPEC int UpnpSubscribeAsync(
/*! A user data value passed to the callback function when invoked. */
const void *Cookie);
/*!
* \brief Removes the subscription of a control point from a service previously
* subscribed to using \b UpnpSubscribe or \b UpnpSubscribeAsync.
@@ -2133,7 +2181,6 @@ EXPORT_SPEC int UpnpUnSubscribe(
/*! [in] The ID returned when the control point subscribed to the service. */
const Upnp_SID SubsId);
/*!
* \brief Removes a subscription of a control point from a service previously
* subscribed to using \b UpnpSubscribe or \b UpnpSubscribeAsync, generating
@@ -2191,11 +2238,9 @@ EXPORT_SPEC int UpnpUnSubscribeAsync(
/*! [in] Pointer to user data to pass to the callback function when invoked. */
const void *Cookie);
/*! @} Eventing */
/******************************************************************************
******************************************************************************
* *
@@ -2245,7 +2290,6 @@ EXPORT_SPEC int UpnpDownloadUrlItem(
* \c LINE_SIZE bytes in size. */
char *contentType);
/*!
* \brief Gets a file specified in a URL.
*
@@ -2290,7 +2334,6 @@ EXPORT_SPEC int UpnpOpenHttpGet(
* back to the user. */
int timeout);
/*!
* \brief Gets a file specified in a URL through the specified proxy.
*
@@ -2337,7 +2380,6 @@ EXPORT_SPEC int UpnpOpenHttpGetProxy(
* back to the user. */
int timeout);
/*!
* \brief Gets specified number of bytes from a file specified in the URL.
*
@@ -2388,7 +2430,6 @@ EXPORT_SPEC int UpnpOpenHttpGetEx(
* to the user. */
int timeout);
/*!
* \brief Gets specified number of bytes from a file specified in a URL.
*
@@ -2418,7 +2459,6 @@ EXPORT_SPEC int UpnpReadHttpGet(
* the user. */
int timeout);
/*!
* \brief Retrieve progress information of a http-get transfer.
*
@@ -2435,7 +2475,6 @@ EXPORT_SPEC int UpnpHttpGetProgress(
/*! [out] The content length. */
size_t *total);
/*!
* \brief Set the cancel flag of the \b handle parameter.
*
@@ -2461,7 +2500,6 @@ EXPORT_SPEC int UpnpCloseHttpGet(
* \b UpnpOpenHttpGet. */
void *handle);
/*!
* \brief Makes an HTTP POST request message, opens a connection to the server
* and sends the POST request to the server if the connection to the server
@@ -2501,7 +2539,6 @@ EXPORT_SPEC int UpnpOpenHttpPost(
* is expected from the receiver, failing which, an error is reported. */
int timeout);
/*!
* \brief Sends a request to a server to copy the contents of a buffer to the
* URI specified in the \b UpnpOpenHttpPost call.
@@ -2527,7 +2564,6 @@ EXPORT_SPEC int UpnpWriteHttpPost(
* expected from the server, failing which, an error is reported. */
int timeout);
/*!
* \brief Sends and receives any pending data, closes the connection with the
* server, and frees memory allocated during the \b UpnpOpenHttpPost call.
@@ -2550,7 +2586,6 @@ EXPORT_SPEC int UpnpCloseHttpPost(
/*! [in] A time out value sent with the request during which a response is
* expected from the server, failing which, an error is reported. */
int timeout);
/*!
* \brief Downloads an XML document specified in a URL.
@@ -2585,7 +2620,6 @@ EXPORT_SPEC int UpnpDownloadXmlDoc(
/*! [out] A pointer in which to store the XML document. */
IXML_Document **xmlDoc);
/*! @} Control Point HTTP API */
/******************************************************************************
@@ -2622,13 +2656,11 @@ EXPORT_SPEC int UpnpSetWebServerRootDir(
/*! [in] Path of the root directory of the web server. */
const char *rootDir);
/*!
* \brief The type of handle returned by the web server for open requests.
*/
typedef void *UpnpWebFileHandle;
/*!
* \brief Get-info callback function prototype.
*/
@@ -2643,7 +2675,6 @@ typedef int (*VDCallback_GetInfo)(
#endif /* UPNP_VERSION < 10800 */
);
/*!
* \brief Sets the get_info callback function to be used to access a virtual
* directory.
@@ -2654,7 +2685,6 @@ typedef int (*VDCallback_GetInfo)(
*/
EXPORT_SPEC int UpnpVirtualDir_set_GetInfoCallback(VDCallback_GetInfo callback);
/*!
* \brief Open callback function prototype.
*/
@@ -2665,7 +2695,6 @@ typedef UpnpWebFileHandle (*VDCallback_Open)(
* Valid values are \c UPNP_READ or \c UPNP_WRITE. */
enum UpnpOpenFileMode Mode);
/*!
* \brief Sets the open callback function to be used to access a virtual
* directory.
@@ -2676,7 +2705,6 @@ typedef UpnpWebFileHandle (*VDCallback_Open)(
*/
EXPORT_SPEC int UpnpVirtualDir_set_OpenCallback(VDCallback_Open callback);
/*!
* \brief Read callback function prototype.
*/
@@ -2688,7 +2716,6 @@ typedef int (*VDCallback_Read)(
/*! [in] The size of the buffer (i.e. the number of bytes to read). */
size_t buflen);
/*!
* \brief Sets the read callback function to be used to access a virtual
* directory.
@@ -2699,7 +2726,6 @@ typedef int (*VDCallback_Read)(
*/
EXPORT_SPEC int UpnpVirtualDir_set_ReadCallback(VDCallback_Read callback);
/*!
* \brief Write callback function prototype.
*/
@@ -2711,7 +2737,6 @@ typedef int (*VDCallback_Write)(
/*! [in] The number of bytes to write. */
size_t buflen);
/*!
* \brief Sets the write callback function to be used to access a virtual
* directory.
@@ -2722,7 +2747,6 @@ typedef int (*VDCallback_Write)(
*/
EXPORT_SPEC int UpnpVirtualDir_set_WriteCallback(VDCallback_Write callback);
/*!
* \brief Seek callback function prototype.
*/
@@ -2739,7 +2763,6 @@ typedef int (*VDCallback_Seek) (
* specify an absolute offset. */
int origin);
/*!
* \brief Sets the seek callback function to be used to access a virtual
* directory.
@@ -2750,7 +2773,6 @@ typedef int (*VDCallback_Seek) (
*/
EXPORT_SPEC int UpnpVirtualDir_set_SeekCallback(VDCallback_Seek callback);
/*!
* \brief Close callback function prototype.
*/
@@ -2758,7 +2780,6 @@ typedef int (*VDCallback_Close)(
/*! [in] The handle of the file to close. */
UpnpWebFileHandle fileHnd);
/*!
* \brief Sets the close callback function to be used to access a virtual
* directory.
@@ -2769,6 +2790,20 @@ typedef int (*VDCallback_Close)(
*/
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.
@@ -2781,7 +2816,6 @@ EXPORT_SPEC int UpnpEnableWebserver(
/*! [in] \c TRUE to enable, \c FALSE to disable. */
int enable);
/*!
* \brief Returns \c TRUE if the webserver is enabled, or \c FALSE if it is not.
*
@@ -2791,6 +2825,16 @@ EXPORT_SPEC int UpnpEnableWebserver(
*/
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.
@@ -2810,7 +2854,6 @@ EXPORT_SPEC int UpnpAddVirtualDir(
/*! [in] The name of the new directory mapping to add. */
const char *dirName);
/*!
* \brief Removes a virtual directory mapping made with \b UpnpAddVirtualDir.
*
@@ -2822,24 +2865,17 @@ EXPORT_SPEC int UpnpRemoveVirtualDir(
/*! [in] The name of the virtual directory mapping to remove. */
const char *dirName);
/*!
* \brief Removes all virtual directory mappings.
*/
EXPORT_SPEC void UpnpRemoveAllVirtualDirs(void);
/* @} Web Server API */
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* @} UPnPAPI UPnP API */
#endif /* UPNP_H */

View File

@@ -56,9 +56,22 @@
/***************************************************************************
* Large file support
***************************************************************************/
/** File Offset size */
#undef _FILE_OFFSET_BITS
/** Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE
/** Large files support */
#undef _LARGE_FILE_SOURCE
/***************************************************************************
* Library optional features
***************************************************************************/
***************************************************************************/
/*
* The following defines can be tested in order to know which
@@ -86,6 +99,26 @@
#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
* (i.e. configure --enable-tools) : <upnp/upnptools.h> file is available */
#undef UPNP_HAVE_TOOLS
@@ -94,5 +127,9 @@
* (i.e. configure --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 */

View File

@@ -31,7 +31,7 @@
******************************************************************************/
#ifndef UPNP_DEBUG_H
#define UPNP_DEBUG_H
#define UPNP_DEBUG_H
/*!
* \file
@@ -39,7 +39,7 @@
#include "ThreadPool.h"
#include "upnpconfig.h"
#include "UpnpGlobal.h" /* for UPNP_INLINE */
#include "UpnpGlobal.h" /* for UPNP_INLINE */
#include <stdio.h>
@@ -107,7 +107,6 @@ static UPNP_INLINE int UpnpInitLog(void)
return UPNP_E_SUCCESS;
}
#endif
/*!
* \brief Set the log level (see \c Upnp_LogLevel).
*/
@@ -129,7 +128,9 @@ static UPNP_INLINE void UpnpSetLogLevel(Upnp_LogLevel log_level)
#ifdef DEBUG
void UpnpCloseLog(void);
#else
static UPNP_INLINE void UpnpCloseLog(void) {}
static UPNP_INLINE void UpnpCloseLog(void)
{
}
#endif
/*!
@@ -142,8 +143,7 @@ void UpnpSetLogFileNames(
/*! [in] Name of the information file. */
const char *InfoFileName);
#else
static UPNP_INLINE void UpnpSetLogFileNames(
const char *ErrFileName,
static UPNP_INLINE void UpnpSetLogFileNames(const char *ErrFileName,
const char *InfoFileName)
{
return;
@@ -175,7 +175,6 @@ static UPNP_INLINE FILE *UpnpGetDebugFile(Upnp_LogLevel level, Dbg_Module module
}
#endif
/*!
* \brief Returns true if debug output should be done in this module.
*
@@ -189,9 +188,7 @@ int DebugAtThisLevel(
/*! [in] Debug will go in the name of this module. */
Dbg_Module Module);
#else
static UPNP_INLINE int DebugAtThisLevel(
Upnp_LogLevel DLevel,
Dbg_Module Module)
static UPNP_INLINE int DebugAtThisLevel(Upnp_LogLevel DLevel, Dbg_Module Module)
{
return 0;
DLevel = DLevel;
@@ -199,11 +196,10 @@ static UPNP_INLINE int DebugAtThisLevel(
}
#endif
/*!
* \brief Prints the debug statement either on the standard output or log file
* along with the information from where this debug statement is coming.
*/
*/
#ifdef DEBUG
void UpnpPrintf(
/*! [in] The level of the debug logging. It will decide whether debug
@@ -212,27 +208,22 @@ void UpnpPrintf(
/*! [in] debug will go in the name of this module. */
Dbg_Module Module,
/*! [in] Name of the file from where debug statement is coming. */
const char* DbgFileName,
const char *DbgFileName,
/*! [in] Line number of the file from where debug statement is coming. */
int DbgLineNo,
/*! [in] Printf like format specification. */
const char* FmtStr,
/*! [in] Printf like Variable number of arguments that will go in the debug
* statement. */
const char *FmtStr,
/*! [in] Printf like Variable number of arguments that will go in the
* debug statement. */
...)
#if (__GNUC__ >= 3)
/* This enables printf like format checking by the compiler */
__attribute__((format (__printf__, 5, 6)))
/* This enables printf like format checking by the compiler. */
__attribute__ ((format(__printf__, 5, 6)))
#endif
;
;
#else /* DEBUG */
static UPNP_INLINE void UpnpPrintf(
Upnp_LogLevel DLevel,
Dbg_Module Module,
const char* DbgFileName,
int DbgLineNo,
const char* FmtStr,
...)
static UPNP_INLINE void UpnpPrintf(Upnp_LogLevel DLevel, Dbg_Module Module,
const char *DbgFileName, int DbgLineNo, const char *FmtStr, ...)
{
return;
DLevel = DLevel;
@@ -243,24 +234,22 @@ static UPNP_INLINE void UpnpPrintf(
}
#endif /* DEBUG */
/*!
* \brief Writes the file name and file number from where debug statement is
* coming to the log file.
*/
#ifdef DEBUG
void UpnpDisplayFileAndLine(
/*! [in] File descriptor where line number and file name will be written. */
FILE *fd,
/*! [in] File descriptor where line number and file name will be
* written. */
FILE * fd,
/*! [in] Name of the file. */
const char *DbgFileName,
/*! [in] Line number of the file. */
int DbgLineNo);
#else
static UPNP_INLINE void UpnpDisplayFileAndLine(
FILE *fd,
const char *DbgFileName,
int DbgLineNo)
static UPNP_INLINE void UpnpDisplayFileAndLine(FILE *fd,
const char *DbgFileName, int DbgLineNo)
{
return;
fd = fd;
@@ -269,14 +258,13 @@ static UPNP_INLINE void UpnpDisplayFileAndLine(
}
#endif
/*!
* \brief Writes the buffer in the file as per the requested banner
*/
#ifdef DEBUG
void UpnpDisplayBanner(
/*! [in] file descriptor where the banner will be written. */
FILE *fd,
FILE * fd,
/*! [in] The buffer that will be written. */
const char **lines,
/*! [in] Size of the buffer. */
@@ -284,11 +272,8 @@ void UpnpDisplayBanner(
/*! [in] This parameter provides the width of the banner. */
size_t starlength);
#else
static UPNP_INLINE void UpnpDisplayBanner(
FILE *fd,
const char **lines,
size_t size,
int starlength)
static UPNP_INLINE void UpnpDisplayBanner(FILE *fd, const char **lines,
size_t size, int starlength)
{
return;
fd = fd;
@@ -298,35 +283,6 @@ static UPNP_INLINE void UpnpDisplayBanner(
}
#endif
/*!
* \brief Prints thread pool statistics.
*/
#ifdef DEBUG
void PrintThreadPoolStats(
/*! [in] The thread pool. */
ThreadPool *tp,
/*! [in] The file name that called this function, use the macro __FILE__. */
const char *DbgFileName,
/*! [in] The line number that the function was called, use the macro __LINE__. */
int DbgLineNo,
/*! [in] The message. */
const char *msg);
#else
static UPNP_INLINE void PrintThreadPoolStats(
ThreadPool *tp,
const char *DbgFileName,
int DbgLineNo,
const char *msg)
{
return;
tp = tp;
DbgFileName = DbgFileName;
DbgLineNo = DbgLineNo;
msg = msg;
}
#endif
/*@}*/
#ifdef __cplusplus
@@ -334,4 +290,3 @@ static UPNP_INLINE void PrintThreadPoolStats(
#endif
#endif /* UPNP_DEBUG_H */

View File

@@ -50,6 +50,7 @@
#include "ixml.h" /* for IXML_Document */
#include "upnpconfig.h" /* for UPNP_HAVE_TOOLS */
/* Function declarations only if tools compiled into the library */

View File

@@ -14,7 +14,6 @@ LDADD = \
$(top_builddir)/threadutil/libthreadutil.la \
$(top_builddir)/ixml/libixml.la
# samples
noinst_PROGRAMS =
if ENABLE_SAMPLES
@@ -40,7 +39,6 @@ tv_device_CPPFLAGS = \
endif
endif
tv_device_SOURCES = \
common/sample_util.c \
common/sample_util.h \
@@ -48,7 +46,6 @@ tv_device_SOURCES = \
common/tv_device.h \
linux/tv_device_main.c
tv_ctrlpt_SOURCES = \
common/sample_util.c \
common/sample_util.h \
@@ -65,16 +62,13 @@ tv_combo_SOURCES = \
common/tv_device.h \
linux/tv_combo_main.c
if WITH_DOCUMENTATION
examplesdir = $(docdir)/examples
examples_DATA = \
$(sort \
$(tv_ctrlpt_SOURCES) \
$(tv_device_SOURCES))
$(tv_ctrlpt_SOURCES) \
$(tv_device_SOURCES)
endif
EXTRA_DIST = \
web/tvcombodesc.xml \
web/tvcontrolSCPD.xml \

View File

@@ -29,23 +29,25 @@
*
******************************************************************************/
/*!
* \addtogroup UpnpSamples
*
* @{
*
* \file
*/
#define SAMPLE_UTIL_C
#include "sample_util.h"
#include "tv_ctrlpt.h"
#include "tv_device.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#if !UPNP_HAVE_TOOLS
# error "Need upnptools.h to compile samples ; try ./configure --enable-tools"
#endif
static int initialize_init = 1;
static int initialize_register = 1;
@@ -66,12 +68,11 @@ int SampleUtil_Initialize(print_string print_function)
ithread_mutexattr_setkind_np(&attr, ITHREAD_MUTEX_RECURSIVE_NP);
ithread_mutex_init(&display_mutex, &attr);
ithread_mutexattr_destroy(&attr);
/* To shut up valgrind mutex warning. */
ithread_mutex_lock(&display_mutex);
gPrintFun = print_function;
ithread_mutex_unlock(&display_mutex);
/* Finished initializing. */
initialize_init = 0;
}
@@ -104,9 +105,8 @@ char *SampleUtil_GetElementValue(IXML_Element *element)
IXML_Node *child = ixmlNode_getFirstChild((IXML_Node *)element);
char *temp = NULL;
if (child != 0 && ixmlNode_getNodeType(child) == eTEXT_NODE) {
if (child != 0 && ixmlNode_getNodeType(child) == eTEXT_NODE)
temp = strdup(ixmlNode_getNodeValue(child));
}
return temp;
}
@@ -118,7 +118,7 @@ IXML_NodeList *SampleUtil_GetFirstServiceList(IXML_Document *doc)
IXML_Node *servlistnode = NULL;
servlistnodelist =
ixmlDocument_getElementsByTagName( doc, "serviceList" );
ixmlDocument_getElementsByTagName(doc, "serviceList");
if (servlistnodelist && ixmlNodeList_length(servlistnodelist)) {
/* we only care about the first service list, from the root
* device */
@@ -127,13 +127,15 @@ IXML_NodeList *SampleUtil_GetFirstServiceList(IXML_Document *doc)
ServiceList = ixmlElement_getElementsByTagName(
(IXML_Element *)servlistnode, "service");
}
if (servlistnodelist) {
if (servlistnodelist)
ixmlNodeList_free(servlistnodelist);
}
return ServiceList;
}
#define OLD_FIND_SERVICE_CODE
#ifdef OLD_FIND_SERVICE_CODE
#else
/*
* Obtain the service list
* n == 0 the first
@@ -172,20 +174,20 @@ static IXML_NodeList *SampleUtil_GetNthServiceList(
* return (Node*) A pointer to a Node or NULL if there was an
* error. */
servlistnode = ixmlNodeList_item(servlistnodelist, n);
assert(servlistnode != 0);
/* create as list of DOM nodes */
ServiceList = ixmlElement_getElementsByTagName(
(IXML_Element *)servlistnode, "service");
if (!servlistnode) {
/* create as list of DOM nodes */
ServiceList = ixmlElement_getElementsByTagName(
(IXML_Element *)servlistnode, "service");
} else
SampleUtil_Print("%s(%d): ixmlNodeList_item(nodeList, n) returned NULL\n",
__FILE__, __LINE__);
}
if (servlistnodelist) {
if (servlistnodelist)
ixmlNodeList_free(servlistnodelist);
}
return ServiceList;
}
#endif
char *SampleUtil_GetFirstDocumentItem(IXML_Document *doc, const char *item)
{
@@ -200,34 +202,27 @@ char *SampleUtil_GetFirstDocumentItem(IXML_Document *doc, const char *item)
if (tmpNode) {
textNode = ixmlNode_getFirstChild(tmpNode);
if (!textNode) {
SampleUtil_Print("sample_util.c: (bug) "
"ixmlNode_getFirstChild(tmpNode) "
"returned NULL\n");
SampleUtil_Print("%s(%d): (BUG) ixmlNode_getFirstChild(tmpNode) returned NULL\n",
__FILE__, __LINE__);
ret = strdup("");
goto epilogue;
}
if (!ixmlNode_getNodeValue(textNode)) {
SampleUtil_Print("ixmlNode_getNodeValue "
"returned NULL\n");
ret = strdup(ixmlNode_getNodeValue(textNode));
if (!ret) {
SampleUtil_Print("%s(%d): ixmlNode_getNodeValue returned NULL\n",
__FILE__, __LINE__);
ret = strdup("");
goto epilogue;
} else {
ret = strdup(ixmlNode_getNodeValue(textNode));
}
} else {
SampleUtil_Print("ixmlNode_getFirstChild(tmpNode) "
"returned NULL\n");
goto epilogue;
}
} else {
SampleUtil_Print("Error finding %s in XML Node\n", item);
goto epilogue;
}
} else
SampleUtil_Print("%s(%d): ixmlNodeList_item(nodeList, 0) returned NULL\n",
__FILE__, __LINE__);
} else
SampleUtil_Print("%s(%d): Error finding %s in XML Node\n",
__FILE__, __LINE__, item);
epilogue:
if (nodeList) {
if (nodeList)
ixmlNodeList_free(nodeList);
}
return ret;
}
@@ -241,24 +236,23 @@ char *SampleUtil_GetFirstElementItem(IXML_Element *element, const char *item)
nodeList = ixmlElement_getElementsByTagName(element, (char *)item);
if (nodeList == NULL) {
SampleUtil_Print( "Error finding %s in XML Node\n", item);
SampleUtil_Print("%s(%d): Error finding %s in XML Node\n",
__FILE__, __LINE__, item);
return NULL;
}
tmpNode = ixmlNodeList_item(nodeList, 0);
if (tmpNode) {
SampleUtil_Print("Error finding %s value in XML Node\n", item);
if (!tmpNode) {
SampleUtil_Print("%s(%d): Error finding %s value in XML Node\n",
__FILE__, __LINE__, item);
ixmlNodeList_free(nodeList);
return NULL;
}
textNode = ixmlNode_getFirstChild(tmpNode);
ret = strdup(ixmlNode_getNodeValue(textNode));
if (!ret) {
SampleUtil_Print("Error allocating memory for %s in XML Node\n",
item);
SampleUtil_Print("%s(%d): Error allocating memory for %s in XML Node\n",
__FILE__, __LINE__, item);
ixmlNodeList_free(nodeList);
return NULL;
}
ixmlNodeList_free(nodeList);
@@ -512,7 +506,10 @@ int SampleUtil_FindAndParseService(IXML_Document *DescDoc, const char *location,
unsigned long length;
int found = 0;
int ret;
#ifdef OLD_FIND_SERVICE_CODE
#else /* OLD_FIND_SERVICE_CODE */
unsigned int sindex = 0;
#endif /* OLD_FIND_SERVICE_CODE */
char *tempServiceType = NULL;
char *baseURL = NULL;
const char *base = NULL;
@@ -522,13 +519,13 @@ int SampleUtil_FindAndParseService(IXML_Document *DescDoc, const char *location,
IXML_Element *service = NULL;
baseURL = SampleUtil_GetFirstDocumentItem(DescDoc, "URLBase");
if (baseURL) {
if (baseURL)
base = baseURL;
} else {
else
base = location;
}
/* Top level */
#ifdef OLD_FIND_SERVICE_CODE
serviceList = SampleUtil_GetFirstServiceList(DescDoc);
#else /* OLD_FIND_SERVICE_CODE */
for (sindex = 0;
(serviceList = SampleUtil_GetNthServiceList(DescDoc , sindex)) != NULL;
sindex++) {
@@ -536,39 +533,31 @@ int SampleUtil_FindAndParseService(IXML_Document *DescDoc, const char *location,
relcontrolURL = NULL;
releventURL = NULL;
service = NULL;
/* serviceList = SampleUtil_GetFirstServiceList( DescDoc ); */
#endif /* OLD_FIND_SERVICE_CODE */
length = ixmlNodeList_length(serviceList);
for (i = 0; i < length; i++) {
service = (IXML_Element *)ixmlNodeList_item(serviceList, i);
tempServiceType =
SampleUtil_GetFirstElementItem(
(IXML_Element *)service, "serviceType");
if (strcmp(tempServiceType, serviceType) == 0) {
tempServiceType = SampleUtil_GetFirstElementItem(
(IXML_Element *)service, "serviceType");
if (tempServiceType && strcmp(tempServiceType, serviceType) == 0) {
SampleUtil_Print("Found service: %s\n", serviceType);
*serviceId =
SampleUtil_GetFirstElementItem(service, "serviceId");
*serviceId = SampleUtil_GetFirstElementItem(service, "serviceId");
SampleUtil_Print("serviceId: %s\n", *serviceId);
relcontrolURL =
SampleUtil_GetFirstElementItem(service, "controlURL");
releventURL =
SampleUtil_GetFirstElementItem(service, "eventSubURL");
*controlURL =
malloc(strlen(base) + strlen(relcontrolURL)+1);
relcontrolURL = SampleUtil_GetFirstElementItem(service, "controlURL");
releventURL = SampleUtil_GetFirstElementItem(service, "eventSubURL");
*controlURL = malloc(strlen(base) + strlen(relcontrolURL) + 1);
if (*controlURL) {
ret = UpnpResolveURL(base, relcontrolURL, *controlURL);
if (ret != UPNP_E_SUCCESS) {
if (ret != UPNP_E_SUCCESS)
SampleUtil_Print("Error generating controlURL from %s + %s\n",
base, relcontrolURL);
}
}
*eventURL = malloc(strlen(base) + strlen(releventURL)+1);
*eventURL = malloc(strlen(base) + strlen(releventURL) + 1);
if (*eventURL) {
ret = UpnpResolveURL(base, releventURL, *eventURL);
if (ret != UPNP_E_SUCCESS) {
if (ret != UPNP_E_SUCCESS)
SampleUtil_Print("Error generating eventURL from %s + %s\n",
base, releventURL);
}
}
free(relcontrolURL);
free(releventURL);
@@ -582,11 +571,13 @@ int SampleUtil_FindAndParseService(IXML_Document *DescDoc, const char *location,
}
free(tempServiceType);
tempServiceType = NULL;
if (serviceList) {
if (serviceList)
ixmlNodeList_free(serviceList);
}
serviceList = NULL;
#ifdef OLD_FIND_SERVICE_CODE
#else /* OLD_FIND_SERVICE_CODE */
}
#endif /* OLD_FIND_SERVICE_CODE */
free(baseURL);
return found;
@@ -605,9 +596,8 @@ int SampleUtil_Print(const char *fmt, ...)
va_start(ap, fmt);
rc = vsnprintf(buf, MAX_BUF, fmt, ap);
va_end(ap);
if (gPrintFun) {
if (gPrintFun)
gPrintFun("%s", buf);
}
ithread_mutex_unlock(&display_mutex);
@@ -618,9 +608,8 @@ void SampleUtil_StateUpdate(const char *varName, const char *varValue,
const char *UDN, eventType type)
{
/* TBD: Add mutex here? */
if (gStateUpdateFun) {
if (gStateUpdateFun)
gStateUpdateFun(varName, varValue, UDN, type);
}
}
/*!
@@ -629,9 +618,11 @@ void SampleUtil_StateUpdate(const char *varName, const char *varValue,
void linux_print(const char *format, ...)
{
va_list argList;
va_start(argList, format);
vfprintf(stdout, format, argList);
fflush(stdout);
va_end(argList);
}
/*! @} UpnpSamples */

View File

@@ -1,3 +1,6 @@
#ifndef SAMPLE_UTIL_H
#define SAMPLE_UTIL_H
/*******************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
@@ -29,10 +32,11 @@
*
******************************************************************************/
#ifndef SAMPLE_UTIL_H
#define SAMPLE_UTIL_H
/*!
* \defgroup UpnpSamples Sample Code
*
* @{
*
* \file
*/
@@ -259,5 +263,7 @@ void linux_print(const char *format, ...)
#define strcasecmp stricmp
#endif
/*! @} UpnpSamples */
#endif /* SAMPLE_UTIL_H */

View File

@@ -29,6 +29,18 @@
*
******************************************************************************/
/*!
* \addtogroup UpnpSamples
*
* @{
*
* \name Control Point Sample Module
*
* @{
*
* \file
*/
#include "tv_ctrlpt.h"
#include "upnp.h"
@@ -729,6 +741,10 @@ void TvCtrlPointAddDevice(
deviceNode->device.AdvrTimeOut = expires;
for (service = 0; service < TV_SERVICE_SERVCOUNT;
service++) {
if (serviceId[service] == NULL) {
/* not found */
continue;
}
strcpy(deviceNode->device.TvService[service].
ServiceId, serviceId[service]);
strcpy(deviceNode->device.TvService[service].
@@ -1568,3 +1584,6 @@ int TvCtrlPointProcessCommand(char *cmdline)
return TV_SUCCESS;
}
/*! @} Control Point Sample Module */
/*! @} UpnpSamples */

View File

@@ -1,3 +1,6 @@
#ifndef UPNP_TV_CTRLPT_H
#define UPNP_TV_CTRLPT_H
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
@@ -29,10 +32,15 @@
*
**************************************************************************/
#ifndef UPNP_TV_CTRLPT_H
#define UPNP_TV_CTRLPT_H
/*!
* \addtogroup UpnpSamples
*
* @{
*
* \name Contro Point Sample API
*
* @{
*
* \file
*/
@@ -42,7 +50,6 @@ extern "C" {
#include "sample_util.h"
#include "ithread.h"
#include "upnp.h"
#include "UpnpString.h"
#include "upnptools.h"
@@ -50,14 +57,6 @@ extern "C" {
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
/* Do not #include <unistd.h> */
#else
#include <unistd.h>
#endif
#define TV_SERVICE_SERVCOUNT 2
#define TV_SERVICE_CONTROL 0
@@ -218,5 +217,9 @@ int TvCtrlPointProcessCommand(char *cmdline);
};
#endif
#endif /* UPNP_TV_CTRLPT_H */
/*! @} Device Sample */
/*! @} UpnpSamples */
#endif /* UPNP_TV_CTRLPT_H */

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,6 @@
#ifndef UPNP_TV_DEVICE_H
#define UPNP_TV_DEVICE_H
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
@@ -29,10 +32,15 @@
*
**************************************************************************/
#ifndef UPNP_TV_DEVICE_H
#define UPNP_TV_DEVICE_H
/*!
* \addtogroup UpnpSamples
*
* @{
*
* \name Device Sample API
*
* @{
*
* \file
*/
@@ -51,12 +59,6 @@ extern "C" {
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
/* Do not #include <unistd.h> */
#else
#include <unistd.h>
#endif
/*! Color constants */
#define MAX_COLOR 10
#define MIN_COLOR 1
@@ -562,5 +564,8 @@ int device_main(int argc, char *argv[]);
}
#endif
#endif
/*! @} Control Point Sample API */
/*! @} UpnpSamples */
#endif /* UPNP_TV_DEVICE_H */

View File

@@ -55,6 +55,9 @@ int main(int argc, char *argv[])
}
/* start a command loop thread */
code = ithread_create(&cmdloop_thread, NULL, TvCtrlPointCommandLoop, NULL);
if (code != 0) {
return UPNP_E_INTERNAL_ERROR;
}
#ifdef WIN32
ithread_join(cmdloop_thread, NULL);
#else

View File

@@ -54,6 +54,9 @@ int main(int argc, char **argv)
}
/* start a command loop thread */
code = ithread_create(&cmdloop_thread, NULL, TvCtrlPointCommandLoop, NULL);
if (code != 0) {
return UPNP_E_INTERNAL_ERROR;
}
#ifdef WIN32
ithread_join(cmdloop_thread, NULL);
#else

View File

@@ -46,9 +46,16 @@ int main(int argc, char *argv[])
#endif
int code;
device_main(argc, argv);
rc = device_main(argc, argv);
if (rc != UPNP_E_SUCCESS) {
return rc;
}
/* start a command loop thread */
code = ithread_create(&cmdloop_thread, NULL, TvDeviceCommandLoop, NULL);
if (code != 0) {
return UPNP_E_INTERNAL_ERROR;
}
#ifdef WIN32
ithread_join(cmdloop_thread, NULL);
#else

View File

@@ -1,5 +1,3 @@
/*!
* \addtogroup UpnpString
*
@@ -17,37 +15,48 @@
* \brief UpnpString object implementation.
*/
#include "config.h"
#include "UpnpString.h"
#include <stdlib.h> /* for calloc(), free() */
#include <string.h> /* for strlen(), strdup() */
#ifdef WIN32
#define strcasecmp stricmp
#else
/* Other systems have strncasecmp */
#endif
#ifndef UPNP_USE_MSVCPP
/* VC has strnlen which is already included but with (potentially) different linkage */
/* strnlen() is a GNU extension. */
#if HAVE_STRNLEN
extern size_t strnlen(const char *s, size_t maxlen);
#else /* HAVE_STRNLEN */
static size_t strnlen(const char *s, size_t n)
{
const char *p = (const char *)memchr(s, 0, n);
return p ? p - s : n;
}
#endif /* HAVE_STRNLEN */
#endif /* WIN32 */
/* strndup() is a GNU extension. Other systems must fix it with elif's. */
#ifdef __GNUC__
extern char *strndup(__const char *__string, size_t __n);
#elif defined(WIN32)
/* strndup() is a GNU extension. */
#if !HAVE_STRNDUP || defined(WIN32)
static char *strndup(const char *__string, size_t __n)
{
size_t strsize = strnlen(__string,__n);
char *newstr = (char *) malloc(strsize + 1);
strncpy(newstr,__string,__n);
return(newstr);
}
#endif
size_t strsize = strnlen(__string, __n);
char *newstr = (char *)malloc(strsize + 1);
if (newstr == NULL)
return NULL;
strncpy(newstr, __string, strsize);
newstr[strsize] = 0;
return newstr;
}
#endif /* HAVE_STRNDUP && !defined(WIN32) */
/*!
* \brief Internal implementation of the class UpnpString.
@@ -63,11 +72,10 @@ struct SUpnpString
char *m_string;
};
UpnpString *UpnpString_new()
{
/* 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) {
goto error_handler1;
}
@@ -76,7 +84,7 @@ UpnpString *UpnpString_new()
#endif
/* 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) {
goto error_handler2;
}
@@ -90,14 +98,13 @@ error_handler1:
return NULL;
}
void UpnpString_delete(UpnpString *p)
{
struct SUpnpString *q = (struct SUpnpString *)p;
if (!q) return;
q->m_length = 0;
q->m_length = (size_t)0;
free(q->m_string);
q->m_string = NULL;
@@ -105,10 +112,9 @@ void UpnpString_delete(UpnpString *p)
free(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) {
goto error_handler1;
}
@@ -127,7 +133,6 @@ error_handler1:
return NULL;
}
void UpnpString_assign(UpnpString *p, const UpnpString *q)
{
if (p != q) {
@@ -135,13 +140,11 @@ void UpnpString_assign(UpnpString *p, const UpnpString *q)
}
}
size_t UpnpString_get_Length(const UpnpString *p)
{
return ((struct SUpnpString *)p)->m_length;
}
void UpnpString_set_Length(UpnpString *p, size_t n)
{
if (((struct SUpnpString *)p)->m_length > n) {
@@ -151,13 +154,11 @@ void UpnpString_set_Length(UpnpString *p, size_t n)
}
}
const char *UpnpString_get_String(const UpnpString *p)
{
return ((struct SUpnpString *)p)->m_string;
}
int UpnpString_set_String(UpnpString *p, const char *s)
{
char *q = strdup(s);
@@ -170,7 +171,6 @@ error_handler1:
return q != NULL;
}
int UpnpString_set_StringN(UpnpString *p, const char *s, size_t n)
{
char *q = strndup(s, n);
@@ -183,15 +183,13 @@ error_handler1:
return q != NULL;
}
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. */
((struct SUpnpString *)p)->m_string[0] = 0;
}
int UpnpString_cmp(UpnpString *p, UpnpString *q)
{
const char *cp = UpnpString_get_String(p);
@@ -200,7 +198,6 @@ int UpnpString_cmp(UpnpString *p, UpnpString *q)
return strcmp(cp, cq);
}
int UpnpString_casecmp(UpnpString *p, UpnpString *q)
{
const char *cp = UpnpString_get_String(p);
@@ -210,4 +207,3 @@ int UpnpString_casecmp(UpnpString *p, UpnpString *q)
}
/* @} UpnpString */

File diff suppressed because it is too large Load Diff

View File

@@ -29,21 +29,23 @@
*
******************************************************************************/
#include "config.h"
/*!
* \file
*/
#include "config.h"
#include "ithread.h"
#include "ixml.h"
#include "upnp.h"
#include "upnpdebug.h"
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef DEBUG
/*! Mutex to synchronize all the log file opeartions in the debug mode */
static ithread_mutex_t GlobalDebugMutex;
@@ -63,31 +65,25 @@ static const char *errFileName = "IUpnpErrFile.txt";
/*! Name of the info file */
static const char *infoFileName = "IUpnpInfoFile.txt";
#ifdef DEBUG
int UpnpInitLog(void)
{
ithread_mutex_init(&GlobalDebugMutex, NULL);
if(DEBUG_TARGET == 1) {
if((ErrFileHnd = fopen( errFileName, "a")) == NULL) {
if (DEBUG_TARGET == 1) {
if ((ErrFileHnd = fopen(errFileName, "a")) == NULL) {
return -1;
}
if((InfoFileHnd = fopen( infoFileName, "a")) == NULL) {
if ((InfoFileHnd = fopen(infoFileName, "a")) == NULL) {
return -1;
}
}
return UPNP_E_SUCCESS;
}
void UpnpSetLogLevel(Upnp_LogLevel log_level)
{
g_log_level = log_level;
}
void UpnpCloseLog(void)
{
if (DEBUG_TARGET == 1) {
@@ -99,71 +95,57 @@ void UpnpCloseLog(void)
ithread_mutex_destroy(&GlobalDebugMutex);
}
void UpnpSetLogFileNames(
const char *ErrFileName,
const char *InfoFileName)
void UpnpSetLogFileNames(const char *ErrFileName, const char *InfoFileName)
{
if (ErrFileName) {
errFileName = ErrFileName;
}
if (InfoFileName) {
infoFileName = InfoFileName;
}
if (ErrFileName) {
errFileName = ErrFileName;
}
if (InfoFileName) {
infoFileName = InfoFileName;
}
}
int DebugAtThisLevel(
Upnp_LogLevel DLevel,
Dbg_Module Module)
int DebugAtThisLevel(Upnp_LogLevel DLevel, Dbg_Module Module)
{
int ret = DLevel <= g_log_level;
ret &=
DEBUG_ALL ||
(Module == SSDP && DEBUG_SSDP ) ||
(Module == SOAP && DEBUG_SOAP ) ||
(Module == GENA && DEBUG_GENA ) ||
(Module == TPOOL && DEBUG_TPOOL) ||
(Module == MSERV && DEBUG_MSERV) ||
(Module == DOM && DEBUG_DOM ) ||
(Module == HTTP && DEBUG_HTTP );
DEBUG_ALL ||
(Module == SSDP && DEBUG_SSDP) ||
(Module == SOAP && DEBUG_SOAP) ||
(Module == GENA && DEBUG_GENA) ||
(Module == TPOOL && DEBUG_TPOOL) ||
(Module == MSERV && DEBUG_MSERV) ||
(Module == DOM && DEBUG_DOM) || (Module == HTTP && DEBUG_HTTP);
return ret;
Module = Module; /* VC complains about this being unreferenced */
}
void UpnpPrintf(
Upnp_LogLevel DLevel,
Dbg_Module Module,
const char *DbgFileName,
int DbgLineNo,
const char *FmtStr,
...)
void UpnpPrintf(Upnp_LogLevel DLevel,
Dbg_Module Module,
const char *DbgFileName, int DbgLineNo, const char *FmtStr, ...)
{
va_list ArgList;
if (!DebugAtThisLevel(DLevel, Module)) {
if (!DebugAtThisLevel(DLevel, Module))
return;
}
ithread_mutex_lock(&GlobalDebugMutex);
va_start(ArgList, FmtStr);
if (!DEBUG_TARGET) {
if (DbgFileName) {
if (DbgFileName)
UpnpDisplayFileAndLine(stdout, DbgFileName, DbgLineNo);
}
vfprintf(stdout, FmtStr, ArgList);
fflush(stdout);
} else if (DLevel == 0) {
if (DbgFileName) {
UpnpDisplayFileAndLine(ErrFileHnd, DbgFileName, DbgLineNo);
}
if (DbgFileName)
UpnpDisplayFileAndLine(ErrFileHnd, DbgFileName,
DbgLineNo);
vfprintf(ErrFileHnd, FmtStr, ArgList);
fflush(ErrFileHnd);
} else {
if (DbgFileName) {
UpnpDisplayFileAndLine(InfoFileHnd, DbgFileName, DbgLineNo);
}
if (DbgFileName)
UpnpDisplayFileAndLine(InfoFileHnd, DbgFileName,
DbgLineNo);
vfprintf(InfoFileHnd, FmtStr, ArgList);
fflush(InfoFileHnd);
}
@@ -171,31 +153,23 @@ void UpnpPrintf(
ithread_mutex_unlock(&GlobalDebugMutex);
}
FILE *GetDebugFile(Upnp_LogLevel DLevel, Dbg_Module Module)
{
FILE *ret;
if (!DebugAtThisLevel(DLevel, Module)) {
if (!DebugAtThisLevel(DLevel, Module))
ret = NULL;
}
if (!DEBUG_TARGET) {
if (!DEBUG_TARGET)
ret = stdout;
} else if (DLevel == 0) {
else if (DLevel == 0)
ret = ErrFileHnd;
} else {
else
ret = InfoFileHnd;
}
return ret;
}
void UpnpDisplayFileAndLine(
FILE *fd,
const char *DbgFileName,
int DbgLineNo)
void UpnpDisplayFileAndLine(FILE *fd, const char *DbgFileName, int DbgLineNo)
{
#define NLINES 2
#define MAX_LINE_SIZE 512
@@ -205,10 +179,8 @@ void UpnpDisplayFileAndLine(
int i;
/* Initialize the pointer array */
for (i = 0; i < NLINES; i++) {
for (i = 0; i < NLINES; i++)
lines[i] = buf[i];
}
/* Put the debug lines in the buffer */
sprintf(buf[0], "DEBUG - THREAD ID: 0x%lX",
#ifdef WIN32
@@ -216,24 +188,16 @@ void UpnpDisplayFileAndLine(
#else
(unsigned long int)ithread_self()
#endif
);
if (DbgFileName) {
sprintf(buf[1],
"FILE: %s, LINE: %d",
DbgFileName,
DbgLineNo);
}
);
if (DbgFileName)
sprintf(buf[1], "FILE: %s, LINE: %d", DbgFileName, DbgLineNo);
/* Show the lines centered */
UpnpDisplayBanner(fd, lines, NLINES, NUMBER_OF_STARS);
fflush(fd);
}
void UpnpDisplayBanner(
FILE * fd,
const char **lines,
size_t size,
size_t starLength)
void UpnpDisplayBanner(FILE * fd,
const char **lines, size_t size, size_t starLength)
{
size_t leftMarginLength = starLength / 2 + 1;
size_t rightMarginLength = starLength / 2 + 1;
@@ -263,11 +227,10 @@ void UpnpDisplayBanner(
line += starLengthMinus2;
}
leftMarginLength = (starLengthMinus2 - LineSize) / 2;
if (LineSize % 2 == 0) {
if (LineSize % 2 == 0)
rightMarginLength = leftMarginLength;
} else {
else
rightMarginLength = leftMarginLength + 1;
}
memset(leftMargin, ' ', leftMarginLength);
memset(rightMargin, ' ', rightMarginLength);
leftMargin[leftMarginLength] = 0;
@@ -282,45 +245,4 @@ void UpnpDisplayBanner(
free(leftMargin);
}
void PrintThreadPoolStats(
ThreadPool *tp,
const char *DbgFileName,
int DbgLineNo,
const char *msg)
{
ThreadPoolStats stats;
ThreadPoolGetStats(tp, &stats);
UpnpPrintf(UPNP_INFO, API, DbgFileName, DbgLineNo,
"%s\n"
"High Jobs pending: %d\n"
"Med Jobs Pending: %d\n"
"Low Jobs Pending: %d\n"
"Average wait in High Q in milliseconds: %lf\n"
"Average wait in Med Q in milliseconds: %lf\n"
"Average wait in Low Q in milliseconds: %lf\n"
"Max Threads Used: %d\n"
"Worker Threads: %d\n"
"Persistent Threads: %d\n"
"Idle Threads: %d\n"
"Total Threads: %d\n"
"Total Work Time: %lf\n"
"Total Idle Time: %lf\n",
msg,
stats.currentJobsHQ,
stats.currentJobsMQ,
stats.currentJobsLQ,
stats.avgWaitHQ,
stats.avgWaitMQ,
stats.avgWaitLQ,
stats.maxThreads,
stats.workerThreads,
stats.persistentThreads,
stats.idleThreads,
stats.totalThreads,
stats.totalWorkTime,
stats.totalIdleTime);
}
#endif /* DEBUG */

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -55,6 +56,9 @@
/*! Maximum action header buffer length. */
#define HEADER_LENGTH 2000
#ifdef WIN32
#define snprintf _snprintf
#endif
/*!
* \brief Structure to maintain a error code and string associated with the
@@ -157,7 +161,7 @@ int UpnpResolveURL(
ret = UPNP_E_INVALID_URL;
ExitFunction:
return UPNP_E_SUCCESS;
return ret;
}
@@ -177,7 +181,7 @@ int UpnpResolveURL2(
ret = UPNP_E_INVALID_URL;
ExitFunction:
return UPNP_E_SUCCESS;
return ret;
}
@@ -220,14 +224,18 @@ static int addToAction(
}
if (response) {
sprintf(ActBuff,
rc = snprintf(ActBuff, HEADER_LENGTH,
"<u:%sResponse xmlns:u=\"%s\">\r\n</u:%sResponse>",
ActionName, ServType, ActionName);
} else {
sprintf(ActBuff,
rc = snprintf(ActBuff, HEADER_LENGTH,
"<u:%s xmlns:u=\"%s\">\r\n</u:%s>",
ActionName, ServType, ActionName);
}
if (rc < 0 || (unsigned int) rc >= HEADER_LENGTH) {
free(ActBuff);
return UPNP_E_OUTOF_MEMORY;
}
rc = ixmlParseBufferEx(ActBuff, ActionDoc);
free(ActBuff);
@@ -282,6 +290,7 @@ static IXML_Document *makeAction(
IXML_Node *node;
IXML_Element *Ele;
IXML_Node *Txt = NULL;
int rc = 0;
if (ActionName == NULL || ServType == NULL) {
return NULL;
@@ -293,15 +302,16 @@ static IXML_Document *makeAction(
}
if (response) {
sprintf(ActBuff,
rc = snprintf(ActBuff, HEADER_LENGTH,
"<u:%sResponse xmlns:u=\"%s\">\r\n</u:%sResponse>",
ActionName, ServType, ActionName);
} else {
sprintf(ActBuff,
rc = snprintf(ActBuff, HEADER_LENGTH,
"<u:%s xmlns:u=\"%s\">\r\n</u:%s>",
ActionName, ServType, ActionName);
}
if (ixmlParseBufferEx(ActBuff, &ActionDoc) != IXML_SUCCESS) {
if (rc < 0 || (unsigned int) rc >= HEADER_LENGTH ||
ixmlParseBufferEx(ActBuff, &ActionDoc) != IXML_SUCCESS) {
free(ActBuff);
return NULL;
}

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -51,6 +52,9 @@
#include "uuid.h"
#include "upnpapi.h"
#ifdef WIN32
#define snprintf _snprintf
#endif
extern ithread_mutex_t GlobalClientSubscribeMutex;
@@ -142,6 +146,8 @@ static int ScheduleGenaAutoRenew(
const UpnpString *tmpSID = UpnpClientSubscription_get_SID(sub);
const UpnpString *tmpEventURL = UpnpClientSubscription_get_EventURL(sub);
memset(&job, 0, sizeof(job));
if (TimeOut == UPNP_INFINITE) {
return_code = GENA_SUCCESS;
goto end_function;
@@ -152,6 +158,7 @@ static int ScheduleGenaAutoRenew(
return_code = UPNP_E_OUTOF_MEMORY;
goto end_function;
}
memset(RenewEventStruct, 0, sizeof(struct Upnp_Event_Subscribe));
RenewEvent = (upnp_timeout *) malloc(sizeof(upnp_timeout));
if (RenewEvent == NULL) {
@@ -159,11 +166,13 @@ static int ScheduleGenaAutoRenew(
return_code = UPNP_E_OUTOF_MEMORY;
goto end_function;
}
memset(RenewEvent, 0, sizeof(upnp_timeout));
/* schedule expire event */
RenewEventStruct->ErrCode = UPNP_E_SUCCESS;
RenewEventStruct->TimeOut = TimeOut;
strcpy(RenewEventStruct->Sid, UpnpString_get_String(tmpSID));
strncpy(RenewEventStruct->Sid, UpnpString_get_String(tmpSID),
sizeof(RenewEventStruct->Sid) - 1);
strncpy(RenewEventStruct->PublisherUrl,
UpnpString_get_String(tmpEventURL), NAME_SIZE - 1);
@@ -283,6 +292,7 @@ static int gena_subscribe(
membuffer request;
uri_type dest_url;
http_parser_t response;
int rc = 0;
UpnpString_clear(sid);
@@ -291,12 +301,16 @@ static int gena_subscribe(
timeout = &local_timeout;
}
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) {
sprintf(timeout_str, "%d", CP_MINIMUM_SUBSCRIPTION_TIME);
rc = snprintf(timeout_str, sizeof(timeout_str),
"%d", CP_MINIMUM_SUBSCRIPTION_TIME);
} 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 */
return_code = http_FixStrUrl(
@@ -512,6 +526,10 @@ int genaSubscribe(
UpnpString *ActualSID = UpnpString_new();
UpnpString *EventURL = UpnpString_new();
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");
@@ -520,9 +538,9 @@ int genaSubscribe(
HandleReadLock();
/* validate handle */
if (GetHandleInfo(client_handle, &handle_info) != HND_CLIENT) {
HandleUnlock();
return GENA_E_BAD_HANDLE;
return_code = GENA_E_BAD_HANDLE;
SubscribeLock();
goto error_handler;
}
HandleUnlock();
@@ -545,7 +563,11 @@ int genaSubscribe(
/* generate client SID */
uuid_create(&uid );
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);
/* create event url */
@@ -567,11 +589,10 @@ int genaSubscribe(
return_code = ScheduleGenaAutoRenew(client_handle, *TimeOut, newSubscription);
error_handler:
if (return_code != UPNP_E_SUCCESS) {
UpnpString_delete(ActualSID);
UpnpString_delete(EventURL);
UpnpString_delete(ActualSID);
UpnpString_delete(EventURL);
if (return_code != UPNP_E_SUCCESS)
UpnpClientSubscription_delete(newSubscription);
}
HandleUnlock();
SubscribeUnlock();
@@ -789,7 +810,9 @@ void gena_process_notification_event(
/* fill event struct */
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.ChangedVariables = ChangedVars;

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -49,6 +50,10 @@
#include "upnpapi.h"
#include "uuid.h"
#ifdef WIN32
#define snprintf _snprintf
#endif
/*!
* \brief Unregisters a device.
*
@@ -97,12 +102,11 @@ static int GeneratePropertySet(
char *buffer;
int counter = 0;
size_t size = 0;
int temp_counter = 0;
/*size += strlen(XML_VERSION);*/
size += strlen(XML_PROPERTYSET_HEADER);
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 += 2 * strlen(names[counter]) +
strlen(values[counter]) +
@@ -210,7 +214,7 @@ static UPNP_INLINE int notify_send_and_recv(
"bbb",
start_msg.buf, start_msg.length,
propertySet, strlen(propertySet),
CRLF, sizeof CRLF);
CRLF, strlen(CRLF));
if (ret_code) {
membuffer_destroy(&start_msg);
sock_destroy(&info, SD_BOTH);
@@ -253,14 +257,11 @@ static int genaNotify(
{
size_t i;
membuffer mid_msg;
membuffer endmsg;
uri_type *url;
http_parser_t response;
int return_code = -1;
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,
"s" "ssc" "sdcc",
headers,
@@ -315,6 +316,8 @@ static void genaNotifyThread(
struct Handle_Info *handle_info;
ThreadPoolJob job;
memset(&job, 0, sizeof(job));
/* This should be a HandleLock and not a HandleReadLock otherwise if there
* is a lot of notifications, then multiple threads will acquire a read
* lock and the thread which sends the notification will be blocked forever
@@ -410,6 +413,7 @@ static char *AllocGenaHeaders(
char *headers = NULL;
size_t headers_size = 0;
int line = 0;
int rc = 0;
headers_size =
strlen(HEADER_LINE_1 ) +
@@ -422,7 +426,7 @@ static char *AllocGenaHeaders(
line = __LINE__;
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_2A,
strlen(propertySet) + 1,
@@ -431,7 +435,7 @@ static char *AllocGenaHeaders(
HEADER_LINE_4);
ExitFunction:
if (headers == NULL) {
if (headers == NULL || rc < 0 || (unsigned int) rc >= headers_size) {
UpnpPrintf(UPNP_ALL, GENA, __FILE__, line,
"AllocGenaHeaders(): Error UPNP_E_OUTOF_MEMORY\n");
}
@@ -463,6 +467,8 @@ int genaInitNotify(
struct Handle_Info *handle_info;
ThreadPoolJob job;
memset(&job, 0, sizeof(job));
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
"GENA BEGIN INITIAL NOTIFY");
@@ -474,23 +480,20 @@ int genaInitNotify(
}
*reference_count = 0;
UDN_copy = (char *)malloc(strlen(UDN) + 1);
UDN_copy = strdup(UDN);
if (UDN_copy == NULL) {
line = __LINE__;
ret = UPNP_E_OUTOF_MEMORY;
goto ExitFunction;
}
servId_copy = (char *)malloc(strlen(servId) + 1);
servId_copy = strdup(servId);
if (servId_copy == NULL) {
line = __LINE__;
ret = UPNP_E_OUTOF_MEMORY;
goto ExitFunction;
}
strcpy(UDN_copy, UDN);
strcpy(servId_copy, servId);
HandleLock();
if (GetHandleInfo(device_handle, &handle_info) != HND_DEVICE) {
@@ -553,7 +556,9 @@ int genaInitNotify(
thread_struct->UDN = UDN_copy;
thread_struct->headers = headers;
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->reference_count = reference_count;
thread_struct->device_handle = device_handle;
@@ -616,6 +621,8 @@ int genaInitNotifyExt(
struct Handle_Info *handle_info;
ThreadPoolJob job;
memset(&job, 0, sizeof(job));
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
"GENA BEGIN INITIAL NOTIFY EXT");
@@ -627,23 +634,20 @@ int genaInitNotifyExt(
}
*reference_count = 0;
UDN_copy = (char *)malloc(strlen(UDN) + 1);
UDN_copy = strdup(UDN);
if (UDN_copy == NULL) {
line = __LINE__;
ret = UPNP_E_OUTOF_MEMORY;
goto ExitFunction;
}
servId_copy = (char *)malloc(strlen(servId) + 1);
servId_copy = strdup(servId);
if( servId_copy == NULL ) {
line = __LINE__;
ret = UPNP_E_OUTOF_MEMORY;
goto ExitFunction;
}
strcpy(UDN_copy, UDN);
strcpy(servId_copy, servId);
HandleLock();
if (GetHandleInfo(device_handle, &handle_info) != HND_DEVICE) {
@@ -707,7 +711,9 @@ int genaInitNotifyExt(
thread_struct->UDN = UDN_copy;
thread_struct->headers = headers;
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->reference_count = reference_count;
thread_struct->device_handle = device_handle;
@@ -769,6 +775,8 @@ int genaNotifyAllExt(
struct Handle_Info *handle_info;
ThreadPoolJob job;
memset(&job, 0, sizeof(job));
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
"GENA BEGIN NOTIFY ALL EXT");
@@ -780,23 +788,20 @@ int genaNotifyAllExt(
}
*reference_count = 0;
UDN_copy = (char *)malloc(strlen(UDN) + 1);
UDN_copy = strdup(UDN);
if (UDN_copy == NULL) {
line = __LINE__;
ret = UPNP_E_OUTOF_MEMORY;
goto ExitFunction;
}
servId_copy = (char *)malloc(strlen(servId) + 1);
servId_copy = strdup(servId);
if( servId_copy == NULL ) {
line = __LINE__;
ret = UPNP_E_OUTOF_MEMORY;
goto ExitFunction;
}
strcpy(UDN_copy, UDN);
strcpy(servId_copy, servId);
propertySet = ixmlPrintNode((IXML_Node *)PropSet);
if (propertySet == NULL) {
line = __LINE__;
@@ -837,7 +842,10 @@ int genaNotifyAllExt(
thread_struct->servId = servId_copy;
thread_struct->headers = headers;
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->device_handle = device_handle;
/* if overflow, wrap to 1 */
@@ -908,6 +916,8 @@ int genaNotifyAll(
struct Handle_Info *handle_info;
ThreadPoolJob job;
memset(&job, 0, sizeof(job));
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
"GENA BEGIN NOTIFY ALL");
@@ -919,23 +929,20 @@ int genaNotifyAll(
}
*reference_count = 0;
UDN_copy = (char *)malloc(strlen(UDN) + 1);
UDN_copy = strdup(UDN);
if (UDN_copy == NULL) {
line = __LINE__;
ret = UPNP_E_OUTOF_MEMORY;
goto ExitFunction;
}
servId_copy = (char *)malloc(strlen(servId) + 1);
servId_copy = strdup(servId);
if( servId_copy == NULL ) {
line = __LINE__;
ret = UPNP_E_OUTOF_MEMORY;
goto ExitFunction;
}
strcpy(UDN_copy, UDN);
strcpy(servId_copy, servId);
ret = GeneratePropertySet(VarNames, VarValues, var_count, &propertySet);
if (ret != XML_SUCCESS) {
line = __LINE__;
@@ -975,7 +982,10 @@ int genaNotifyAll(
thread_struct->servId = servId_copy;
thread_struct->headers = headers;
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->device_handle = device_handle;
/* if overflow, wrap to 1 */
@@ -1045,14 +1055,22 @@ static int respond_ok(
int return_code;
char timeout_str[100];
int upnp_timeout = UPNP_TIMEOUT;
int rc = 0;
http_CalcResponseVersion( request->major_version,
request->minor_version, &major, &minor );
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 {
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 );
@@ -1184,6 +1202,9 @@ void gena_process_subscription_request(
char *event_url_path = NULL;
memptr callback_hdr;
memptr timeout_hdr;
int rc = 0;
memset(&request_struct, 0, sizeof(request_struct));
UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__,
"Subscription Request Received:\n");
@@ -1314,10 +1335,12 @@ void gena_process_subscription_request(
/* generate SID */
uuid_create(&uid);
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 */
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);
HandleUnlock();
goto exit_function;
@@ -1330,7 +1353,8 @@ void gena_process_subscription_request(
/* finally generate callback for init table dump */
request_struct.ServiceId = service->serviceId;
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 */
callback_fun = handle_info->Callback;

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -44,7 +45,7 @@
#ifdef INCLUDE_CLIENT_APIS
#if EXCLUDE_GENA == 0
#include <stdlib.h> /* for calloc(), free() */
@@ -324,6 +325,6 @@ ClientSubscription *GetClientSubActualSID(ClientSubscription *head, token *sid)
return next;
}
#endif /* INCLUDE_CLIENT_APIS */
#endif /* EXCLUDE_GENA */
#endif /* INCLUDE_CLIENT_APIS */

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (C) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -29,9 +30,9 @@
*
**************************************************************************/
#include "config.h"
#if EXCLUDE_MINISERVER == 0
/*!
* \file
@@ -46,10 +47,8 @@
*
*/
#include "miniserver.h"
#include "httpreadwrite.h"
#include "ithread.h"
#include "ssdplib.h"
@@ -59,7 +58,6 @@
#include "upnpapi.h"
#include "upnputil.h"
#include <assert.h>
#include <errno.h>
#include <stdio.h>
@@ -67,11 +65,9 @@
#include <string.h>
#include <sys/types.h>
/*! . */
#define APPLICATION_LISTENING_PORT 49152
struct mserv_request_t {
/*! Connection handle. */
SOCKET connfd;
@@ -79,7 +75,6 @@ struct mserv_request_t {
struct sockaddr_storage foreign_sockaddr;
};
/*! . */
typedef enum {
/*! . */
@@ -90,26 +85,23 @@ typedef enum {
MSERV_STOPPING
} MiniServerState;
/*! . */
uint16_t miniStopSockPort;
/*!
* module vars
*/
static MiniServerState gMServState = MSERV_IDLE;
#ifdef INTERNAL_WEB_SERVER
static MiniServerCallback gGetCallback = NULL;
static MiniServerCallback gSoapCallback = NULL;
static MiniServerCallback gGenaCallback = NULL;
static MiniServerState gMServState = MSERV_IDLE;
void SetHTTPGetCallback(MiniServerCallback callback)
{
gGetCallback = callback;
}
#ifdef INCLUDE_DEVICE_APIS
void SetSoapCallback(MiniServerCallback callback)
{
@@ -122,8 +114,6 @@ void SetGenaCallback(MiniServerCallback callback)
gGenaCallback = callback;
}
#ifdef INTERNAL_WEB_SERVER
/*!
* \brief Based on the type pf message, appropriate callback is issued.
*
@@ -169,7 +159,6 @@ static int dispatch_request(
return 0;
}
/*!
* \brief Send Error Message.
*/
@@ -186,7 +175,6 @@ static UPNP_INLINE void handle_error(
http_SendStatusResponse(info, http_error_code, major, minor);
}
/*!
* \brief Free memory assigned for handling request and unitialize socket
* functionality.
@@ -201,7 +189,6 @@ static void free_handle_request_arg(
free(request);
}
/*!
* \brief Receive the request and dispatch it for handling.
*/
@@ -262,7 +249,6 @@ error_handler:
"miniserver %d: COMPLETE\n", connfd);
}
/*!
* \brief Initilize the thread pool to handle a request, sets priority for the
* job and adds the job to the thread pool.
@@ -276,6 +262,8 @@ static UPNP_INLINE void schedule_request_job(
struct mserv_request_t *request;
ThreadPoolJob job;
memset(&job, 0, sizeof(job));
request = (struct mserv_request_t *)malloc(
sizeof (struct mserv_request_t));
if (request == NULL) {
@@ -346,13 +334,13 @@ static int receive_from_stopSock(SOCKET ssock, fd_set *set)
socklen_t clientLen;
struct sockaddr_storage clientAddr;
char requestBuf[256];
char buf_ntop[64];
char buf_ntop[INET6_ADDRSTRLEN];
if (FD_ISSET(ssock, set)) {
clientLen = sizeof(clientAddr);
memset((char *)&clientAddr, 0, sizeof(clientAddr));
byteReceived = recvfrom(ssock, requestBuf,
25, 0, (struct sockaddr *)&clientAddr, &clientLen);
(size_t)25, 0, (struct sockaddr *)&clientAddr, &clientLen);
if (byteReceived > 0) {
requestBuf[byteReceived] = '\0';
inet_ntop(AF_INET,
@@ -389,7 +377,7 @@ static void RunMiniServer(
fd_set rdSet;
SOCKET maxMiniSock;
int ret = 0;
SOCKET stopSock = 0;
int stopSock = 0;
maxMiniSock = 0;
maxMiniSock = max(maxMiniSock, miniSock->miniServerSock4);
@@ -398,8 +386,10 @@ static void RunMiniServer(
maxMiniSock = max(maxMiniSock, miniSock->ssdpSock4);
maxMiniSock = max(maxMiniSock, miniSock->ssdpSock6);
maxMiniSock = max(maxMiniSock, miniSock->ssdpSock6UlaGua);
#ifdef INCLUDE_CLIENT_APIS
maxMiniSock = max(maxMiniSock, miniSock->ssdpReqSock4);
maxMiniSock = max(maxMiniSock, miniSock->ssdpReqSock6);
#endif /* INCLUDE_CLIENT_APIS */
++maxMiniSock;
gMServState = MSERV_RUNNING;
@@ -414,8 +404,10 @@ static void RunMiniServer(
fdset_if_valid(miniSock->ssdpSock4, &rdSet);
fdset_if_valid(miniSock->ssdpSock6, &rdSet);
fdset_if_valid(miniSock->ssdpSock6UlaGua, &rdSet);
#ifdef INCLUDE_CLIENT_APIS
fdset_if_valid(miniSock->ssdpReqSock4, &rdSet);
fdset_if_valid(miniSock->ssdpReqSock6, &rdSet);
#endif /* INCLUDE_CLIENT_APIS */
/* select() */
ret = select((int) maxMiniSock, &rdSet, NULL, &expSet, NULL);
if (ret == SOCKET_ERROR && errno == EINTR) {
@@ -447,8 +439,10 @@ static void RunMiniServer(
sock_close(miniSock->ssdpSock4);
sock_close(miniSock->ssdpSock6);
sock_close(miniSock->ssdpSock6UlaGua);
#ifdef INCLUDE_CLIENT_APIS
sock_close(miniSock->ssdpReqSock4);
sock_close(miniSock->ssdpReqSock6);
#endif /* INCLUDE_CLIENT_APIS */
/* Free minisock. */
free(miniSock);
gMServState = MSERV_IDLE;
@@ -456,7 +450,6 @@ static void RunMiniServer(
return;
}
/*!
* \brief Returns port to which socket, sockfd, is bound.
*
@@ -483,12 +476,11 @@ static int get_port(
*port = ntohs(((struct sockaddr_in6*)&sockinfo)->sin6_port);
}
UpnpPrintf(UPNP_INFO, MSERV, __FILE__, __LINE__,
"sockfd = %d, .... port = %u\n", sockfd, *port);
"sockfd = %d, .... port = %d\n", sockfd, (int)*port);
return 0;
}
#ifdef INTERNAL_WEB_SERVER
/*!
* \brief Creates a STREAM socket, binds to INADDR_ANY and listens for
@@ -510,21 +502,26 @@ static int get_miniserver_sockets(
MiniServerSockArray *out,
/*! [in] port on which the server is listening for incoming IPv4
* connections. */
uint16_t listen_port4,
uint16_t listen_port4
#ifdef UPNP_ENABLE_IPV6
,
/*! [in] port on which the server is listening for incoming IPv6
* connections. */
uint16_t listen_port6)
uint16_t listen_port6
#endif
)
{
char errorBuffer[ERROR_BUFFER_LEN];
struct sockaddr_storage __ss_v4;
struct sockaddr_in* serverAddr4 = (struct sockaddr_in*)&__ss_v4;
SOCKET listenfd4;
unsigned short actual_port4;
uint16_t actual_port4 = 0u;
#ifdef UPNP_ENABLE_IPV6
struct sockaddr_storage __ss_v6;
struct sockaddr_in6* serverAddr6 = (struct sockaddr_in6*)&__ss_v6;
SOCKET listenfd6;
unsigned short actual_port6;
uint16_t actual_port6 = 0u;
int onOff;
#endif
int ret_code;
int reuseaddr_on = 0;
@@ -540,25 +537,34 @@ static int get_miniserver_sockets(
#ifdef UPNP_ENABLE_IPV6
listenfd6 = socket(AF_INET6, SOCK_STREAM, 0);
if (listenfd6 == INVALID_SOCKET) {
sock_close(listenfd4);
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
/* As per the IANA specifications for the use of ports by applications
* override the listen port passed in with the first available. */
if (listen_port4 < APPLICATION_LISTENING_PORT) {
listen_port4 = APPLICATION_LISTENING_PORT;
listen_port4 = (uint16_t)APPLICATION_LISTENING_PORT;
}
#ifdef UPNP_ENABLE_IPV6
if (listen_port6 < APPLICATION_LISTENING_PORT) {
listen_port6 = APPLICATION_LISTENING_PORT;
listen_port6 = (uint16_t)APPLICATION_LISTENING_PORT;
}
#endif
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);
#ifdef UPNP_ENABLE_IPV6
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;
#endif
/* Getting away with implementation of re-using address:port and
@@ -635,7 +641,7 @@ static int get_miniserver_sockets(
#endif /* IPv6 */
} else {
if (listenfd4 != INVALID_SOCKET) {
unsigned short orig_listen_port4 = listen_port4;
uint16_t orig_listen_port4 = listen_port4;
do {
serverAddr4->sin_port = htons(listen_port4++);
sockError = bind(listenfd4,
@@ -673,7 +679,7 @@ static int get_miniserver_sockets(
}
#ifdef UPNP_ENABLE_IPV6
if (listenfd6 != INVALID_SOCKET) {
unsigned short orig_listen_port6 = listen_port6;
uint16_t orig_listen_port6 = listen_port6;
do {
serverAddr6->sin6_port = htons(listen_port6++);
sockError = bind(listenfd6,
@@ -747,7 +753,7 @@ static int get_miniserver_sockets(
return UPNP_E_LISTEN;
}
ret_code = get_port(listenfd6, &actual_port6);
if (ret_code <= 0) {
if (ret_code < 0) {
sock_close(listenfd4);
sock_close(listenfd6);
return UPNP_E_INTERNAL_ERROR;
@@ -763,7 +769,6 @@ static int get_miniserver_sockets(
}
#endif /* INTERNAL_WEB_SERVER */
/*!
* \brief Creates the miniserver STOP socket. This socket is created and
* listened on to know when it is time to stop the Miniserver.
@@ -792,7 +797,7 @@ static int get_miniserver_stopsock(
}
/* Bind to local socket. */
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");
ret = bind(miniServerStopSock, (struct sockaddr *)&stop_sockaddr,
sizeof(stop_sockaddr));
@@ -822,20 +827,22 @@ static UPNP_INLINE void InitMiniServerSockArray(MiniServerSockArray *miniSocket)
miniSocket->ssdpSock4 = INVALID_SOCKET;
miniSocket->ssdpSock6 = INVALID_SOCKET;
miniSocket->ssdpSock6UlaGua = INVALID_SOCKET;
miniSocket->stopPort = 0;
miniSocket->miniServerPort4 = 0;
miniSocket->miniServerPort6 = 0;
miniSocket->stopPort = 0u;
miniSocket->miniServerPort4 = 0u;
miniSocket->miniServerPort6 = 0u;
#ifdef INCLUDE_CLIENT_APIS
miniSocket->ssdpReqSock4 = INVALID_SOCKET;
miniSocket->ssdpReqSock6 = INVALID_SOCKET;
#endif /* INCLUDE_CLIENT_APIS */
}
int StartMiniServer(
/*! [in,out] Port on which the server listens for incoming IPv4
* connections. */
unsigned short *listen_port4,
uint16_t *listen_port4,
/*! [in,out] Port on which the server listens for incoming IPv6
* connections. */
unsigned short *listen_port6)
uint16_t *listen_port6)
{
int ret_code;
int count;
@@ -843,7 +850,12 @@ int StartMiniServer(
MiniServerSockArray *miniSocket;
ThreadPoolJob job;
if (gMServState != MSERV_IDLE) {
memset(&job, 0, sizeof(job));
switch (gMServState) {
case MSERV_IDLE:
break;
default:
/* miniserver running. */
return UPNP_E_INTERNAL_ERROR;
}
@@ -856,7 +868,11 @@ int StartMiniServer(
#ifdef INTERNAL_WEB_SERVER
/* V4 and V6 http listeners. */
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) {
free(miniSocket);
return ret_code;
@@ -890,15 +906,18 @@ int StartMiniServer(
sock_close(miniSocket->ssdpSock4);
sock_close(miniSocket->ssdpSock6);
sock_close(miniSocket->ssdpSock6UlaGua);
#ifdef INCLUDE_CLIENT_APIS
sock_close(miniSocket->ssdpReqSock4);
sock_close(miniSocket->ssdpReqSock6);
#endif /* INCLUDE_CLIENT_APIS */
free(miniSocket);
return UPNP_E_OUTOF_MEMORY;
}
/* Wait for miniserver to start. */
count = 0;
while (gMServState != MSERV_RUNNING && count < max_count) {
while (gMServState != (MiniServerState)MSERV_RUNNING && count < max_count) {
/* 0.05s */
usleep(50 * 1000);
usleep(50u * 1000u);
count++;
}
if (count >= max_count) {
@@ -909,8 +928,10 @@ int StartMiniServer(
sock_close(miniSocket->ssdpSock4);
sock_close(miniSocket->ssdpSock6);
sock_close(miniSocket->ssdpSock6UlaGua);
#ifdef INCLUDE_CLIENT_APIS
sock_close(miniSocket->ssdpReqSock4);
sock_close(miniSocket->ssdpReqSock6);
#endif /* INCLUDE_CLIENT_APIS */
return UPNP_E_INTERNAL_ERROR;
}
#ifdef INTERNAL_WEB_SERVER
@@ -921,7 +942,6 @@ int StartMiniServer(
return UPNP_E_SUCCESS;
}
int StopMiniServer()
{
char errorBuffer[ERROR_BUFFER_LEN];
@@ -931,9 +951,11 @@ int StopMiniServer()
char buf[256] = "ShutDown";
size_t bufLen = strlen(buf);
if(gMServState == MSERV_RUNNING) {
switch(gMServState) {
case MSERV_RUNNING:
gMServState = MSERV_STOPPING;
} else {
break;
default:
return 0;
}
sock = socket(AF_INET, SOCK_DGRAM, 0);
@@ -944,20 +966,20 @@ int StopMiniServer()
errorBuffer);
return 0;
}
while(gMServState != MSERV_IDLE) {
ssdpAddr.sin_family = AF_INET;
while(gMServState != (MiniServerState)MSERV_IDLE) {
ssdpAddr.sin_family = (sa_family_t)AF_INET;
ssdpAddr.sin_addr.s_addr = inet_addr("127.0.0.1");
ssdpAddr.sin_port = htons(miniStopSockPort);
sendto(sock, buf, bufLen, 0,
(struct sockaddr *)&ssdpAddr, socklen);
usleep(1000);
if (gMServState == MSERV_IDLE) {
usleep(1000u);
if (gMServState == (MiniServerState)MSERV_IDLE) {
break;
}
isleep(1);
isleep(1u);
}
sock_close(sock);
return 0;
}
#endif /* EXCLUDE_MINISERVER */

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* 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)
{
scanner->cursor = 0;
scanner->cursor = (size_t)0;
scanner->msg = bufptr;
scanner->entire_msg_loaded = FALSE;
}
@@ -137,12 +138,12 @@ static UPNP_INLINE void scanner_init(OUT scanner_t *scanner, IN membuffer *bufpt
* Parameters :
* 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 :
* 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);
}
@@ -168,7 +169,7 @@ static UPNP_INLINE int is_identifier_char(IN char c)
* 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;
}
@@ -179,23 +180,20 @@ static UPNP_INLINE int is_control_char(IN char c)
* Parameters :
* 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() */
assert( c != '"' );
/* we don't check for this; it's checked in get_token() */
assert( c != '"' );
if( ( c >= 32 && c != 127 ) ||
( c == TOKCHAR_CR || c == TOKCHAR_LF || c == '\t' )
) {
return TRUE;
} else {
return FALSE;
}
return
(c >= 32 && c != 127) ||
c < 0 ||
c == TOKCHAR_CR ||
c == TOKCHAR_LF ||
c == '\t';
}
/************************************************************************
@@ -223,7 +221,7 @@ static parse_status_t scanner_get_token(
{
char *cursor;
char *null_terminator; /* point to null-terminator in buffer */
char c;
int c;
token_type_t token_type;
int got_end_quote;
@@ -242,22 +240,22 @@ static parse_status_t scanner_get_token(
/* scan identifier */
token->buf = cursor++;
token_type = TT_IDENTIFIER;
while (is_identifier_char(*cursor))
while (cursor < null_terminator && is_identifier_char(*cursor))
cursor++;
if (!scanner->entire_msg_loaded && cursor == null_terminator)
/* possibly more valid chars */
return PARSE_INCOMPLETE;
/* calc token length */
token->length = (size_t)(cursor - token->buf);
token->length = (size_t)cursor - (size_t)token->buf;
} else if (c == ' ' || c == '\t') {
token->buf = cursor++;
token_type = TT_WHITESPACE;
while (*cursor == ' ' || *cursor == '\t')
while (cursor < null_terminator && (*cursor == ' ' || *cursor == '\t'))
cursor++;
if (!scanner->entire_msg_loaded && cursor == null_terminator)
/* possibly more chars */
return PARSE_INCOMPLETE;
token->length = (size_t)(cursor - token->buf);
token->length = (size_t)cursor - (size_t)token->buf;
} else if (c == TOKCHAR_CR) {
/* scan CRLF */
token->buf = cursor++;
@@ -267,16 +265,16 @@ static parse_status_t scanner_get_token(
if (*cursor != TOKCHAR_LF) {
/* couldn't match CRLF; match as CR */
token_type = TT_CTRL; /* ctrl char */
token->length = 1;
token->length = (size_t)1;
} else {
/* got CRLF */
token->length = 2;
token->length = (size_t)2;
token_type = TT_CRLF;
cursor++;
}
} else if (c == TOKCHAR_LF) { /* accept \n as CRLF */
token->buf = cursor++;
token->length = 1;
token->length = (size_t)1;
token_type = TT_CRLF;
} else if (c == '"') {
/* quoted text */
@@ -291,9 +289,7 @@ static parse_status_t scanner_get_token(
} else if (c == '\\') {
if (cursor < null_terminator) {
c = *cursor++;
/*if ( !(c > 0 && c <= 127) ) */
if (c == 0)
return PARSE_FAILURE;
/* the char after '\\' could be ANY octet */
}
/* else, while loop handles incomplete buf */
} else if (is_qdtext_char(c)) {
@@ -303,7 +299,7 @@ static parse_status_t scanner_get_token(
return PARSE_FAILURE;
}
if (got_end_quote)
token->length = (size_t)(cursor - token->buf);
token->length = (size_t)cursor - (size_t)token->buf;
else { /* incomplete */
assert(cursor == null_terminator);
@@ -313,12 +309,12 @@ static parse_status_t scanner_get_token(
/* scan separator */
token->buf = cursor++;
token_type = TT_SEPARATOR;
token->length = 1;
token->length = (size_t)1;
} else if (is_control_char(c)) {
/* scan ctrl char */
token->buf = cursor++;
token_type = TT_CTRL;
token->length = 1;
token->length = (size_t)1;
} else
return PARSE_FAILURE;
@@ -405,7 +401,7 @@ void httpmsg_init(INOUT http_message_t *msg)
{
msg->initialized = 1;
msg->entity.buf = NULL;
msg->entity.length = 0;
msg->entity.length = ( size_t ) 0;
ListInit( &msg->headers, httpmsg_compare, httpheader_free );
membuffer_init( &msg->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.
*
* Return : int ;
*
* Note :
* Return : parse_status_t ;
* PARSE_OK
* 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;
token_type_t tok_type;
@@ -532,9 +529,10 @@ static UPNP_INLINE int skip_blank_lines(INOUT scanner_t *scanner)
/* skip ws, crlf */
do {
status = scanner_get_token(scanner, &token, &tok_type);
} while (status == PARSE_OK &&
(tok_type == TT_WHITESPACE || tok_type == TT_CRLF));
if (status == PARSE_OK) {
} while (status == (parse_status_t)PARSE_OK &&
(tok_type == (token_type_t)TT_WHITESPACE ||
tok_type == (token_type_t)TT_CRLF));
if (status == (parse_status_t)PARSE_OK) {
/* pushback a non-whitespace token */
scanner->cursor -= token.length;
}
@@ -557,7 +555,7 @@ static UPNP_INLINE int skip_blank_lines(INOUT scanner_t *scanner)
*
* 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;
token_type_t tok_type;
@@ -571,13 +569,14 @@ static UPNP_INLINE int skip_lws(INOUT scanner_t *scanner)
/* get CRLF or WS */
status = scanner_get_token( scanner, &token, &tok_type );
if( status == PARSE_OK ) {
if( tok_type == TT_CRLF ) {
if( status == ( parse_status_t ) PARSE_OK ) {
if( tok_type == ( token_type_t ) TT_CRLF ) {
/* get WS */
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;
} else {
/* did not match LWS; pushback token(s) */
@@ -587,7 +586,8 @@ static UPNP_INLINE int skip_lws(INOUT scanner_t *scanner)
} while( matched );
/* 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;
}
@@ -623,13 +623,14 @@ static UPNP_INLINE parse_status_t match_non_ws_string(
save_cursor = scanner->cursor;
str->length = 0;
str->length = ( size_t ) 0;
str->buf = scanner_get_str( scanner ); /* point to next char in input */
while( !done ) {
status = scanner_get_token( scanner, &token, &tok_type );
if( status == PARSE_OK &&
tok_type != TT_WHITESPACE && tok_type != TT_CRLF ) {
if( status == ( parse_status_t ) PARSE_OK &&
tok_type != ( token_type_t ) TT_WHITESPACE &&
tok_type != ( token_type_t ) TT_CRLF ) {
/* append non-ws token */
str->length += token.length;
} 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 */
scanner->cursor -= token.length;
}
/* tolerate 'incomplete' msg */
if( status == PARSE_OK ||
( status == PARSE_INCOMPLETE && scanner->entire_msg_loaded )
if( status == ( parse_status_t ) PARSE_OK ||
( status == ( parse_status_t ) PARSE_INCOMPLETE &&
scanner->entire_msg_loaded )
) {
if( str->length == 0 ) {
if( str->length == ( size_t ) 0 ) {
/* no strings found */
return PARSE_NO_MATCH;
} else {
@@ -686,7 +688,7 @@ static UPNP_INLINE parse_status_t match_raw_value(
parse_status_t status;
int done = FALSE;
int saw_crlf = FALSE;
size_t pos_at_crlf = 0;
size_t pos_at_crlf = ( size_t ) 0;
size_t save_pos;
char c;
@@ -694,13 +696,13 @@ static UPNP_INLINE parse_status_t match_raw_value(
/* value points to start of input */
raw_value->buf = scanner_get_str( scanner );
raw_value->length = 0;
raw_value->length = ( size_t ) 0;
while( !done ) {
status = scanner_get_token( scanner, &token, &tok_type );
if( status == PARSE_OK ) {
if( status == ( parse_status_t ) PARSE_OK ) {
if( !saw_crlf ) {
if( tok_type == TT_CRLF ) {
if( tok_type == ( token_type_t ) TT_CRLF ) {
/* CRLF could end value */
saw_crlf = TRUE;
@@ -711,7 +713,7 @@ static UPNP_INLINE parse_status_t match_raw_value(
raw_value->length += token.length;
} else /* already seen CRLF */
{
if( tok_type == TT_WHITESPACE ) {
if( tok_type == ( token_type_t ) TT_WHITESPACE ) {
/* start again; forget CRLF */
saw_crlf = FALSE;
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 */
while( raw_value->length > 0 ) {
while( raw_value->length > ( size_t ) 0 ) {
/* 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' &&
c != TOKCHAR_CR && c != TOKCHAR_LF ) {
@@ -768,7 +770,7 @@ static UPNP_INLINE parse_status_t match_raw_value(
* PARSE_FAILURE -- bad input
* PARSE_INCOMPLETE
************************************************************************/
static UPNP_INLINE int match_int(
static UPNP_INLINE parse_status_t match_int(
INOUT scanner_t *scanner,
IN int base,
OUT int *value)
@@ -782,8 +784,8 @@ static UPNP_INLINE int match_int(
save_pos = scanner->cursor;
status = scanner_get_token(scanner, &token, &tok_type);
if (status == PARSE_OK) {
if (tok_type == TT_IDENTIFIER) {
if (status == (parse_status_t)PARSE_OK) {
if (tok_type == (token_type_t)TT_IDENTIFIER) {
errno = 0;
num = strtol(token.buf, &end_ptr, base);
/* 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;
}
}
if (status != PARSE_OK) {
if (status != (parse_status_t)PARSE_OK) {
/* restore scanner position for bad values */
scanner->cursor = save_pos;
}
@@ -822,7 +824,7 @@ static UPNP_INLINE int match_int(
* PARSE_FAILURE
* PARSE_INCOMPLETE
************************************************************************/
static UPNP_INLINE int
static UPNP_INLINE parse_status_t
read_until_crlf( INOUT scanner_t * scanner,
OUT memptr * str )
{
@@ -837,9 +839,10 @@ read_until_crlf( INOUT scanner_t * scanner,
/* read until we hit a crlf */
do {
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 */
scanner->cursor -= token.length;
@@ -944,7 +947,7 @@ match_char( INOUT scanner_t * scanner,
*
* Note :
************************************************************************/
static int vfmatch(
static parse_status_t vfmatch(
INOUT scanner_t *scanner,
IN const char *fmt,
va_list argp)
@@ -970,8 +973,8 @@ static int vfmatch(
save_pos = scanner->cursor;
status = PARSE_OK;
while( ( ( c = *fmt_ptr++ ) != 0 ) && ( status == PARSE_OK )
) {
while( ( c = *fmt_ptr++ ) &&
( status == ( parse_status_t ) PARSE_OK ) ) {
if( c == '%' ) {
c = *fmt_ptr++;
switch ( c ) {
@@ -985,7 +988,8 @@ static int vfmatch(
assert( str_ptr != NULL );
status = scanner_get_token( scanner, str_ptr,
&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 */
status = PARSE_NO_MATCH;
}
@@ -993,7 +997,8 @@ static int vfmatch(
case 'c': /* crlf */
status = scanner_get_token( scanner,
&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 */
status = PARSE_NO_MATCH;
}
@@ -1014,7 +1019,7 @@ static int vfmatch(
}
assert( str_ptr != NULL );
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 * );
assert( uri_ptr != NULL );
stat = parse_uri( str_ptr->buf, str_ptr->length,
@@ -1043,7 +1048,8 @@ static int vfmatch(
str_ptr = ( memptr * ) va_arg( argp, memptr * );
status =
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 */
}
break;
@@ -1051,7 +1057,8 @@ static int vfmatch(
/* optional whitespace */
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 ) {
/* restore non-whitespace token */
scanner->cursor -= token.length;
}
@@ -1085,7 +1092,8 @@ static int vfmatch(
case '\t': /* Whitespace */
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 ) {
/* not whitespace token */
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 */
scanner->cursor = save_pos;
}
@@ -1120,13 +1128,14 @@ static int vfmatch(
* PARSE_OK
* PARSE_NO_MATCH
* PARSE_INCOMPLETE
* PARSE_FAILURE - bad input
************************************************************************/
static int match(
static parse_status_t match(
INOUT scanner_t *scanner,
IN const char *fmt,
...)
{
int ret_code;
parse_status_t ret_code;
va_list args;
va_start(args, fmt);
@@ -1152,14 +1161,15 @@ static int match(
* PARSE_OK
* PARSE_NO_MATCH -- failure to match pattern 'fmt'
* PARSE_FAILURE -- 'str' is bad input
* PARSE_INCOMPLETE
************************************************************************/
int
parse_status_t
matchstr( IN char *str,
IN size_t slen,
IN const char *fmt,
... )
{
int ret_code;
parse_status_t ret_code;
char save_char;
scanner_t scanner;
membuffer buf;
@@ -1226,6 +1236,8 @@ parser_init( OUT http_parser_t * parser )
* PARSE_OK
* PARSE_SUCCESS
* PARSE_FAILURE
* PARSE_INCOMPLETE
* PARSE_NO_MATCH
************************************************************************/
static parse_status_t
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 );
status = skip_blank_lines( &parser->scanner );
if( status != PARSE_OK ) {
if( status != ( parse_status_t ) PARSE_OK ) {
return status;
}
/*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 =
match( &parser->scanner, "%s\t%S%w%c", &method_str, &url_str );
if( status == PARSE_OK ) {
if( status == ( parse_status_t ) PARSE_OK ) {
index =
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,
"%s\t%S\t%ihttp%w/%w%L%c", &method_str, &url_str,
&version_str );
if( status != PARSE_OK ) {
if( status != ( parse_status_t ) PARSE_OK ) {
return status;
}
/* store url */
@@ -1303,17 +1315,6 @@ parser_parse_requestline( INOUT http_parser_t * parser )
HTTP_SUCCESS ) {
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 ||
hmsg->major_version < 0 || hmsg->minor_version < 0 ) {
/* error; bad http version */
return PARSE_FAILURE;
}
index =
map_str_to_int( method_str.buf, method_str.length,
@@ -1324,7 +1325,24 @@ parser_parse_requestline( INOUT http_parser_t * parser )
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 */
return PARSE_OK;
@@ -1336,12 +1354,13 @@ parser_parse_requestline( INOUT http_parser_t * parser )
* Parameters:
* 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:
* PARSE_OK
* PARSE_SUCCESS
* PARSE_FAILURE
* PARSE_INCOMPLETE
* PARSE_NO_MATCH
************************************************************************/
parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
{
@@ -1357,14 +1376,14 @@ parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
assert(parser->position == POS_RESPONSE_LINE);
status = skip_blank_lines(&parser->scanner);
if (status != PARSE_OK)
if (status != ( parse_status_t) PARSE_OK)
return status;
/* response line */
/*status = match( &parser->scanner, "%ihttp%w/%w%d\t.\t%d\t%d\t%L%c", */
/* &hmsg->major_version, &hmsg->minor_version, */
/* &hmsg->status_code, &hmsg->status_msg ); */
status = match(&parser->scanner, "%ihttp%w/%w%L%c", &line);
if (status != PARSE_OK)
if (status != ( parse_status_t ) PARSE_OK)
return status;
save_char = line.buf[line.length];
line.buf[line.length] = '\0'; /* null-terminate */
@@ -1373,10 +1392,9 @@ parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
&hmsg->major_version, &hmsg->minor_version,
&hmsg->status_code);
line.buf[line.length] = save_char; /* restore */
if (num_scanned != 3 || hmsg->major_version < 0 ||
/* HTTP version equals to 1.0 should fail as required by the
* UPnP certification tool */
hmsg->minor_version < 1 || hmsg->status_code < 0)
if (num_scanned != 3 ||
hmsg->major_version < 0 || hmsg->minor_version < 0 ||
hmsg->status_code < 0)
/* bad response line */
return PARSE_FAILURE;
/* point to status msg */
@@ -1397,7 +1415,7 @@ parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
while (*p == ' ' || *p == '\t')
p++;
/* 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) {
/* out of mem */
parser->http_error_code = HTTP_INTERNAL_SERVER_ERROR;
@@ -1414,12 +1432,14 @@ parse_status_t parser_parse_responseline(INOUT http_parser_t *parser)
* Parameters:
* INOUT http_parser_t* parser ; HTTP Parser object
*
* Description: Get HTTP Method, URL location and version information.
* Description: Read HTTP header fields.
*
* Returns:
* PARSE_OK
* PARSE_SUCCESS
* PARSE_FAILURE
* PARSE_INCOMPLETE
* PARSE_NO_MATCH
************************************************************************/
parse_status_t parser_parse_headers(INOUT http_parser_t *parser)
{
@@ -1437,33 +1457,37 @@ parse_status_t parser_parse_headers(INOUT http_parser_t *parser)
char save_char;
int ret2;
assert(parser->position == POS_HEADERS ||
assert(parser->position == (parser_pos_t)POS_HEADERS ||
parser->ent_position == ENTREAD_CHUNKY_HEADERS);
while (TRUE) {
save_pos = scanner->cursor;
/* check end of headers */
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;
}
if (tok_type == TT_CRLF) {
switch (tok_type) {
case TT_CRLF:
/* end of headers */
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 */
/*is handled separately */
return PARSE_SUCCESS;
}
parser->position = POS_ENTITY; /* read entity next */
return PARSE_OK;
}
/* not end; read header */
if (tok_type != TT_IDENTIFIER) {
case TT_IDENTIFIER:
/* not end; read header */
break;
default:
return PARSE_FAILURE; /* didn't see header name */
}
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 */
scanner->cursor = save_pos;
return status;
@@ -1501,15 +1525,17 @@ parse_status_t parser_parse_headers(INOUT http_parser_t *parser)
membuffer_init(&header->name_buf);
membuffer_init(&header->value);
/* 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. */
hdr_value.buf = "\0";
hdr_value.length = 1;
hdr_value.length = (size_t)1;
}
/* save in header in buffers */
if (membuffer_assign(&header->name_buf, token.buf, token.length) ||
membuffer_assign(&header->value, hdr_value.buf, hdr_value.length)) {
/* not enough mem */
membuffer_destroy(&header->value);
membuffer_destroy(&header->name_buf);
free(header);
parser->http_error_code = HTTP_INTERNAL_SERVER_ERROR;
return PARSE_FAILURE;
@@ -1517,16 +1543,14 @@ parse_status_t parser_parse_headers(INOUT http_parser_t *parser)
header->name.buf = header->name_buf.buf;
header->name.length = header->name_buf.length;
header->name_id = header_id;
ListAddTail(&parser->msg.headers, header);
/*NNS: ret = dlist_append( &parser->msg.headers, header ); */
/** TODO: remove that? */
if (ret == UPNP_E_OUTOF_MEMORY) {
parser->http_error_code =
HTTP_INTERNAL_SERVER_ERROR;
if (!ListAddTail(&parser->msg.headers, header)) {
membuffer_destroy(&header->value);
membuffer_destroy(&header->name_buf);
free(header);
parser->http_error_code = HTTP_INTERNAL_SERVER_ERROR;
return PARSE_FAILURE;
}
/** end of remove that? */
} else if (hdr_value.length > 0) {
} else if (hdr_value.length > (size_t)0) {
/* append value to existing header */
/* append space */
ret = membuffer_append_str(&orig_header->value, ", ");
@@ -1556,7 +1580,6 @@ parse_status_t parser_parse_headers(INOUT http_parser_t *parser)
*
* Returns:
* PARSE_INCOMPLETE
* PARSE_FAILURE -- entity length > content-length value
* PARSE_SUCCESS
************************************************************************/
static UPNP_INLINE parse_status_t
@@ -1569,7 +1592,7 @@ parser_parse_entity_using_clen( INOUT http_parser_t * parser )
/* determine entity (i.e. body) length so far */
parser->msg.entity.length =
parser->msg.msg.length - parser->entity_start_position +
parser->msg.entity_offset;
parser->msg.amount_discarded;
if( parser->msg.entity.length < parser->content_length ) {
/* more data to be read */
@@ -1577,16 +1600,16 @@ parser_parse_entity_using_clen( INOUT http_parser_t * parser )
} else {
if( parser->msg.entity.length > parser->content_length ) {
/* silently discard extra data */
parser->msg.msg.buf[parser->entity_start_position -
parser->msg.entity_offset +
parser->content_length] = '\0';
parser->msg.msg.buf[parser->entity_start_position +
parser->content_length -
parser->msg.amount_discarded] = '\0';
}
/* save entity length */
parser->msg.entity.length = parser->content_length;
/* save entity start ptr; (the very last thing to do) */
parser->msg.entity.buf = parser->msg.msg.buf +
parser->entity_start_position;
parser->entity_start_position;
/* done reading entity */
parser->position = POS_COMPLETE;
@@ -1603,9 +1626,10 @@ parser_parse_entity_using_clen( INOUT http_parser_t * parser )
* Description: Read data in the chunks
*
* Returns:
* PARSE_CONTINUE_1
* PARSE_INCOMPLETE
* PARSE_FAILURE -- entity length > content-length value
* PARSE_SUCCESS
* PARSE_FAILURE
* PARSE_NO_MATCH
************************************************************************/
static UPNP_INLINE parse_status_t parser_parse_chunky_body(
INOUT http_parser_t *parser)
@@ -1614,13 +1638,13 @@ static UPNP_INLINE parse_status_t parser_parse_chunky_body(
size_t save_pos;
/* 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 */
parser->scanner.cursor += parser->chunk_size;
save_pos = parser->scanner.cursor;
/* discard CRLF */
status = match(&parser->scanner, "%c");
if (status != PARSE_OK) {
if (status != (parse_status_t)PARSE_OK) {
/*move back */
parser->scanner.cursor -= parser->chunk_size;
/*parser->scanner.cursor = save_pos; */
@@ -1647,8 +1671,9 @@ static UPNP_INLINE parse_status_t parser_parse_chunky_body(
* Description: Read headers at the end of the chunked entity
*
* Returns:
* PARSE_NO_MATCH
* PARSE_INCOMPLETE
* PARSE_FAILURE -- entity length > content-length value
* PARSE_FAILURE
* PARSE_SUCCESS
************************************************************************/
static UPNP_INLINE parse_status_t
@@ -1659,18 +1684,18 @@ parser_parse_chunky_headers( INOUT http_parser_t * parser )
save_pos = parser->scanner.cursor;
status = parser_parse_headers( parser );
if( status == PARSE_OK ) {
if( status == ( parse_status_t ) PARSE_OK ) {
/* finally, done with the whole msg */
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,
( 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;
} else {
return status;
@@ -1683,12 +1708,12 @@ parser_parse_chunky_headers( INOUT http_parser_t * parser )
* Parameters:
* 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:
* PARSE_INCOMPLETE
* PARSE_FAILURE -- entity length > content-length value
* PARSE_SUCCESS
* PARSE_FAILURE
* PARSE_NO_MATCH
* PARSE_CONTINUE_1
************************************************************************/
static UPNP_INLINE parse_status_t
@@ -1705,7 +1730,7 @@ parser_parse_chunky_entity( INOUT http_parser_t * parser )
/* get size of chunk, discard extension, discard CRLF */
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;
UpnpPrintf( UPNP_INFO, HTTP, __FILE__, __LINE__,
"CHUNK COULD NOT BE PARSED\n" );
@@ -1716,10 +1741,10 @@ parser_parse_chunky_entity( INOUT http_parser_t * parser )
( scanner->cursor - save_pos ) );
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 */
parser->msg.entity.length = parser->scanner.cursor -
parser->entity_start_position;
parser->entity_start_position + parser->msg.amount_discarded;
/* read entity headers */
parser->ent_position = ENTREAD_CHUNKY_HEADERS;
@@ -1737,7 +1762,7 @@ parser_parse_chunky_entity( INOUT http_parser_t * parser )
* Parameters:
* 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:
* PARSE_INCOMPLETE_ENTITY
@@ -1753,7 +1778,8 @@ parser_parse_entity_until_close( INOUT http_parser_t * parser )
cursor = parser->msg.msg.length;
/* update entity length */
parser->msg.entity.length = cursor - parser->entity_start_position;
parser->msg.entity.length = cursor - parser->entity_start_position +
parser->msg.amount_discarded;
/* update pointer */
parser->msg.entity.buf =
@@ -1773,9 +1799,9 @@ parser_parse_entity_until_close( INOUT http_parser_t * parser )
* Description: Determines method to read entity
*
* Returns:
* PARSE_OK
* PARSE_CONTINUE_1
* PARSE_FAILURE
* PARSE_COMPLETE -- no more reading to do
* PARSE_SUCCESS -- no more reading to do
************************************************************************/
UPNP_INLINE parse_status_t
parser_get_entity_read_method( INOUT http_parser_t * parser )
@@ -1788,7 +1814,7 @@ parser_get_entity_read_method( INOUT http_parser_t * parser )
/* entity points to start of msg body */
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 */
parser->entity_start_position = parser->scanner.cursor;
@@ -1820,11 +1846,11 @@ parser_get_entity_read_method( INOUT http_parser_t * parser )
if( response_code == 204 ||
response_code == 304 ||
( response_code >= 100 && response_code <= 199 ) ||
hmsg->request_method == HTTPMETHOD_HEAD ||
hmsg->request_method == HTTPMETHOD_MSEARCH ||
hmsg->request_method == HTTPMETHOD_SUBSCRIBE ||
hmsg->request_method == HTTPMETHOD_UNSUBSCRIBE ||
hmsg->request_method == HTTPMETHOD_NOTIFY ) {
hmsg->request_method == ( http_method_t ) HTTPMETHOD_HEAD ||
hmsg->request_method == ( http_method_t ) HTTPMETHOD_MSEARCH ||
hmsg->request_method == ( http_method_t ) HTTPMETHOD_SUBSCRIBE ||
hmsg->request_method == ( http_method_t ) HTTPMETHOD_UNSUBSCRIBE ||
hmsg->request_method == ( http_method_t ) HTTPMETHOD_NOTIFY ) {
parser->position = POS_COMPLETE;
return PARSE_SUCCESS;
}
@@ -1853,7 +1879,7 @@ parser_get_entity_read_method( INOUT http_parser_t * parser )
if( hmsg->is_request ) {
/* set hack flag for NOTIFY methods; if set to true this is */
/* a valid SSDP notify msg */
if( hmsg->method == HTTPMETHOD_NOTIFY ) {
if( hmsg->method == ( http_method_t ) HTTPMETHOD_NOTIFY ) {
parser->valid_ssdp_notify_hack = TRUE;
}
@@ -1871,17 +1897,19 @@ parser_get_entity_read_method( INOUT http_parser_t * parser )
* Parameters:
* INOUT http_parser_t* parser ; HTTP Parser object
*
* Description: Determines method to read entity
* Description: Read HTTP entity body
*
* Returns:
* PARSE_OK
* 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
parser_parse_entity( INOUT http_parser_t * parser )
{
parse_status_t status = PARSE_OK;
parse_status_t status;
assert( parser->position == POS_ENTITY );
@@ -1912,10 +1940,11 @@ parser_parse_entity( INOUT http_parser_t * parser )
break;
default:
status = PARSE_FAILURE;
assert( 0 );
}
} while( status == PARSE_CONTINUE_1 );
} while( status == ( parse_status_t ) PARSE_CONTINUE_1 );
return status;
}
@@ -1958,7 +1987,7 @@ parser_response_init( OUT http_parser_t * parser,
parser_init( parser );
parser->msg.is_request = FALSE;
parser->msg.request_method = request_method;
parser->msg.entity_offset = 0;
parser->msg.amount_discarded = (size_t)0;
parser->position = POS_RESPONSE_LINE;
}
@@ -1972,7 +2001,11 @@ parser_response_init( OUT http_parser_t * parser,
* parser object the actual parsing function is invoked
*
* Returns:
* void
* PARSE_SUCCESS
* PARSE_FAILURE
* PARSE_INCOMPLETE
* PARSE_INCOMPLETE_ENTITY
* PARSE_NO_MATCH
************************************************************************/
parse_status_t
parser_parse( INOUT http_parser_t * parser )
@@ -2012,7 +2045,7 @@ parser_parse( INOUT http_parser_t * parser )
}
}
} while( status == PARSE_OK );
} while( status == ( parse_status_t ) PARSE_OK );
return status;
@@ -2027,11 +2060,14 @@ parser_parse( INOUT http_parser_t * parser )
* buffer
* IN size_t buf_length ; Size of the buffer
*
* Description: The parser function. Depending on the position of the
* parser object the actual parsing function is invoked
* Description: Append date to HTTP parser, and do the parsing.
*
* Returns:
* void
* PARSE_SUCCESS
* PARSE_FAILURE
* PARSE_INCOMPLETE
* PARSE_INCOMPLETE_ENTITY
* PARSE_NO_MATCH
************************************************************************/
parse_status_t
parser_append( INOUT http_parser_t * parser,
@@ -2071,7 +2107,7 @@ int raw_to_int(IN memptr *raw_value, IN int base)
long num;
char *end_ptr;
if (raw_value->length == 0)
if (raw_value->length == (size_t)0)
return -1;
errno = 0;
num = strtol(raw_value->buf, &end_ptr, base);

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* 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);
/* find 'content-type' header which must have text/xml */
if (httpmsg_find_hdr(hmsg, HDR_CONTENT_TYPE, &hdr_value) &&
matchstr(hdr_value.buf, hdr_value.length, "%itext%w/%wxml" ) == PARSE_OK) {
return TRUE;
if (httpmsg_find_hdr(hmsg, HDR_CONTENT_TYPE, &hdr_value)) {
switch (matchstr(hdr_value.buf, hdr_value.length, "%itext%w/%wxml" )) {
case PARSE_OK:
return TRUE;
default:
break;
}
}
return FALSE;
}

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -87,14 +88,19 @@ static const char *Http4xxStr =
"Unsupported Media Type\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 *Http5xxStr =
"Internal Server Error\0"
"Not Implemented\0"
"Bad Gateway\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;
@@ -128,7 +134,7 @@ init_table( IN const char *encoded_str,
for( i = 0; i < tbl_size; i++ ) {
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();
}
if( statusCode < 100 && statusCode >= 600 ) {
if( statusCode < 100 || statusCode >= 600 ) {
return NULL;
}

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -38,8 +39,9 @@
#include "config.h"
#include "webserver.h"
#if EXCLUDE_WEB_SERVER == 0
#include "webserver.h"
#include "httpparser.h"
#include "httpreadwrite.h"
@@ -51,6 +53,8 @@
#include "unixutil.h"
#include "upnp.h"
#include "upnpapi.h"
#include "UpnpIntTypes.h"
#include "UpnpStdInt.h"
#include "upnputil.h"
#include "VirtualDir.h"
@@ -58,18 +62,8 @@
#include <fcntl.h>
#include <sys/stat.h>
#ifdef UPNP_USE_BCBPP
/* Do not #include <inttypes.h> */
/* Do not #include <stdint.h> */
#else
#include <inttypes.h>
#include <stdint.h>
#endif /* !UPNP_USE_BCBPP */
#ifdef WIN32
/* Do not #include <unistd.h> */
#else
#include <unistd.h>
#define snprintf _snprintf
#endif
/*!
@@ -135,9 +129,23 @@ static const char *gMediaTypes[] = {
#define TEXT_INDEX 5
/* general */
#define NUM_MEDIA_TYPES 69
#define NUM_MEDIA_TYPES 70
#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 */
static const char *gEncodedMediaTypes =
"aif\0" AUDIO_STR "aiff\0"
@@ -148,6 +156,7 @@ static const char *gEncodedMediaTypes =
"au\0" AUDIO_STR "basic\0"
"avi\0" VIDEO_STR "msvideo\0"
"bmp\0" IMAGE_STR "bmp\0"
"css\0" TEXT_STR "css\0"
"dcr\0" APPLICATION_STR "x-director\0"
"dib\0" IMAGE_STR "bmp\0"
"dir\0" APPLICATION_STR "x-director\0"
@@ -312,15 +321,14 @@ static UPNP_INLINE int get_content_type(
int ctype_found = FALSE;
char *temp = NULL;
size_t length = 0;
int rc = 0;
(*content_type) = NULL;
/* get ext */
extension = strrchr(filename, '.');
if (extension != NULL) {
if (search_extension(extension + 1, &type, &subtype) == 0) {
if (extension != NULL)
if (search_extension(extension + 1, &type, &subtype) == 0)
ctype_found = TRUE;
}
}
if (!ctype_found) {
/* unknown content type */
type = gMediaTypes[APPLICATION_INDEX];
@@ -328,16 +336,18 @@ static UPNP_INLINE int get_content_type(
}
length = strlen(type) + strlen("/") + strlen(subtype) + 1;
temp = malloc(length);
if (!temp) {
if (!temp)
return UPNP_E_OUTOF_MEMORY;
rc = snprintf(temp, length, "%s/%s", type, subtype);
if (rc < 0 || (unsigned int) rc >= length) {
free(temp);
return UPNP_E_OUTOF_MEMORY;
}
sprintf(temp, "%s/%s", type, subtype);
(*content_type) = ixmlCloneDOMString(temp);
free(temp);
if (!content_type) {
if (!(*content_type))
return UPNP_E_OUTOF_MEMORY;
}
return 0;
}
@@ -424,18 +434,14 @@ int web_server_set_alias(const char *alias_name,
alias.ct = NULL;
do {
/* insert leading /, if missing */
if (*alias_name != '/') {
if (membuffer_assign_str(&alias.name, "/") != 0) {
if (*alias_name != '/')
if (membuffer_assign_str(&alias.name, "/") != 0)
break; /* error; out of mem */
}
}
ret_code = membuffer_append_str(&alias.name, alias_name);
if (ret_code != 0) {
if (ret_code != 0)
break; /* error */
}
if ((alias.ct = (int *)malloc(sizeof(int))) == NULL) {
if ((alias.ct = (int *)malloc(sizeof(int))) == NULL)
break; /* error */
}
*alias.ct = 1;
membuffer_attach(&alias.doc, (char *)alias_content,
alias_content_length);
@@ -447,18 +453,19 @@ int web_server_set_alias(const char *alias_name,
return 0;
} while (FALSE);
/* error handler */
/* free temp alias */
membuffer_destroy(&alias.name);
membuffer_destroy(&alias.doc);
free(alias.ct);
return UPNP_E_OUTOF_MEMORY;
}
int web_server_init()
{
int ret = 0;
if (bWebServerState == WEB_SERVER_DISABLED) {
/* decode media list */
media_list_init();
@@ -474,11 +481,10 @@ int web_server_init()
virtualDirCallback.seek = NULL;
virtualDirCallback.close = NULL;
if (ithread_mutex_init(&gWebMutex, NULL) == -1) {
if (ithread_mutex_init(&gWebMutex, NULL) == -1)
ret = UPNP_E_OUTOF_MEMORY;
} else {
else
bWebServerState = WEB_SERVER_ENABLED;
}
}
return ret;
@@ -486,8 +492,6 @@ int web_server_init()
void web_server_destroy(void)
{
int ret;
if (bWebServerState == WEB_SERVER_ENABLED) {
membuffer_destroy(&gDocumentRootDir);
alias_release(&gAliasDoc);
@@ -496,8 +500,7 @@ void web_server_destroy(void)
memset(&gAliasDoc, 0, sizeof(struct xml_alias_t));
ithread_mutex_unlock(&gWebMutex);
ret = ithread_mutex_destroy(&gWebMutex);
assert(ret == 0);
ithread_mutex_destroy(&gWebMutex);
bWebServerState = WEB_SERVER_DISABLED;
}
}
@@ -521,38 +524,33 @@ static int get_file_info(
struct stat s;
FILE *fp;
int rc = 0;
struct tm date;
char buffer[ASCTIME_R_BUFFER_SIZE];
ixmlFreeDOMString(info->content_type);
info->content_type = NULL;
code = stat(filename, &s);
if (code == -1) {
if (code == -1)
return -1;
}
if (S_ISDIR(s.st_mode)) {
if (S_ISDIR(s.st_mode))
info->is_directory = TRUE;
} else if (S_ISREG(s.st_mode)) {
else if (S_ISREG(s.st_mode))
info->is_directory = FALSE;
} else {
else
return -1;
}
/* check readable */
fp = fopen(filename, "r");
info->is_readable = (fp != NULL);
if (fp) {
if (fp)
fclose(fp);
}
info->file_length = s.st_size;
info->last_modified = s.st_mtime;
rc = get_content_type(filename, &info->content_type);
UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__,
"file info: %s, length: %lld, last_mod=%s readable=%d\n",
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;
}
@@ -563,15 +561,13 @@ int web_server_set_root_dir(const char *root_dir)
int ret;
ret = membuffer_assign_str(&gDocumentRootDir, root_dir);
if (ret != 0) {
if (ret != 0)
return ret;
}
/* remove trailing '/', if any */
if (gDocumentRootDir.length > 0) {
index = gDocumentRootDir.length - 1; /* last char */
if (gDocumentRootDir.buf[index] == '/') {
if (gDocumentRootDir.buf[index] == '/')
membuffer_delete(&gDocumentRootDir, index, 1);
}
}
return 0;
@@ -675,17 +671,15 @@ static char *StrStr(
if (!Str1)
goto error1;
Str2 = strdup(s2);
if (!Str2) {
if (!Str2)
goto error2;
}
ToUpperCase(Str1);
ToUpperCase(Str2);
Ptr = strstr(Str1, Str2);
if (!Ptr) {
if (!Ptr)
ret = NULL;
} else {
else
ret = s1 + (Ptr - Str1);
}
free(Str2);
error2:
@@ -743,13 +737,11 @@ static int GetNextRange(
int64_t L = -1;
int Is_Suffix_byte_Range = 1;
if (*SrcRangeStr == NULL) {
if (*SrcRangeStr == NULL)
return -1;
}
Tok = StrTok(SrcRangeStr, ",");
if ((Ptr = strstr(Tok, "-")) == NULL) {
if ((Ptr = strstr(Tok, "-")) == NULL)
return -1;
}
*Ptr = ' ';
sscanf(Tok, "%" SCNd64 "%" SCNd64, &F, &L);
if (F == -1 || L == -1) {
@@ -780,7 +772,7 @@ static int GetNextRange(
*
* \return
* \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_OK
*/
@@ -795,15 +787,15 @@ static int CreateHTTPRangeResponseHeader(
off_t FirstByte, LastByte;
char *RangeInput;
char *Ptr;
int rc = 0;
Instr->IsRangeActive = 1;
Instr->ReadSendSize = FileLength;
if (!ByteRangeSpecifier)
return HTTP_BAD_REQUEST;
RangeInput = malloc(strlen(ByteRangeSpecifier) + 1);
RangeInput = strdup(ByteRangeSpecifier);
if (!RangeInput)
return UPNP_E_OUTOF_MEMORY;
strcpy(RangeInput, ByteRangeSpecifier);
return HTTP_INTERNAL_SERVER_ERROR;
/* CONTENT-RANGE: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
if (StrStr(RangeInput, "bytes") == NULL ||
(Ptr = StrStr(RangeInput, "=")) == NULL) {
@@ -828,27 +820,38 @@ static int CreateHTTPRangeResponseHeader(
Instr->RangeOffset = FirstByte;
Instr->ReadSendSize = LastByte - FirstByte + 1;
/* Data between two range. */
sprintf(Instr->RangeHeader,
rc = snprintf(Instr->RangeHeader,
sizeof(Instr->RangeHeader),
"CONTENT-RANGE: bytes %" PRId64
"-%" PRId64 "/%" PRId64 "\r\n",
(int64_t)FirstByte,
(int64_t)LastByte,
(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
&& FirstByte < FileLength) {
Instr->RangeOffset = FirstByte;
Instr->ReadSendSize = FileLength - FirstByte;
sprintf(Instr->RangeHeader,
rc = snprintf(Instr->RangeHeader,
sizeof(Instr->RangeHeader),
"CONTENT-RANGE: bytes %" PRId64
"-%" PRId64 "/%" PRId64 "\r\n",
(int64_t)FirstByte,
(int64_t)(FileLength - 1),
(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) {
if (LastByte >= FileLength) {
Instr->RangeOffset = 0;
Instr->ReadSendSize = FileLength;
sprintf(Instr->RangeHeader,
rc = snprintf(Instr->RangeHeader,
sizeof(Instr->RangeHeader),
"CONTENT-RANGE: bytes 0-%" PRId64
"/%" PRId64 "\r\n",
(int64_t)(FileLength - 1),
@@ -856,13 +859,18 @@ static int CreateHTTPRangeResponseHeader(
} else {
Instr->RangeOffset = FileLength - LastByte;
Instr->ReadSendSize = LastByte;
sprintf(Instr->RangeHeader,
rc = snprintf(Instr->RangeHeader,
sizeof(Instr->RangeHeader),
"CONTENT-RANGE: bytes %" PRId64
"-%" PRId64 "/%" PRId64 "\r\n",
(int64_t)(FileLength - LastByte + 1),
(int64_t)FileLength,
(int64_t)(FileLength - LastByte),
(int64_t)FileLength - 1,
(int64_t)FileLength);
}
if (rc < 0 || (unsigned int) rc >= sizeof(Instr->RangeHeader)) {
free(RangeInput);
return HTTP_INTERNAL_SERVER_ERROR;
}
} else {
free(RangeInput);
return HTTP_REQUEST_RANGE_NOT_SATISFIABLE;
@@ -882,7 +890,7 @@ static int CreateHTTPRangeResponseHeader(
*
* \return
* \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_OK
*/
@@ -899,10 +907,11 @@ static int CheckOtherHTTPHeaders(
/*NNS: dlist_node* node; */
int index, RetCode = HTTP_OK;
char *TmpBuf;
size_t TmpBufSize = LINE_SIZE;
TmpBuf = (char *)malloc(LINE_SIZE);
TmpBuf = (char *)malloc(TmpBufSize);
if (!TmpBuf)
return UPNP_E_OUTOF_MEMORY;
return HTTP_INTERNAL_SERVER_ERROR;
node = ListHead(&Req->headers);
while (node != NULL) {
header = (http_header_t *) node->item;
@@ -910,11 +919,12 @@ static int CheckOtherHTTPHeaders(
index = map_str_to_int((const char *)header->name.buf,
header->name.length, Http_Header_Names,
NUM_HTTP_HEADER_NAMES, FALSE);
if (header->value.length >= LINE_SIZE) {
if (header->value.length >= TmpBufSize) {
free(TmpBuf);
TmpBuf = (char *)malloc(header->value.length + 1);
TmpBufSize = header->value.length + 1;
TmpBuf = (char *)malloc(TmpBufSize);
if (!TmpBuf)
return UPNP_E_OUTOF_MEMORY;
return HTTP_INTERNAL_SERVER_ERROR;
}
memcpy(TmpBuf, header->value.buf, header->value.length);
TmpBuf[header->value.length] = '\0';
@@ -944,8 +954,14 @@ static int CheckOtherHTTPHeaders(
}
break;
case HDR_ACCEPT_LANGUAGE:
memcpy(RespInstr->AcceptLanguageHeader, TmpBuf,
sizeof(RespInstr->AcceptLanguageHeader) - 1);
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,
header->value.length + 1);
}
break;
default:
/*
@@ -987,8 +1003,8 @@ static int CheckOtherHTTPHeaders(
}
node = ListNext(&Req->headers, node);
}
free(TmpBuf);
return RetCode;
}
@@ -997,8 +1013,11 @@ static int CheckOtherHTTPHeaders(
*
* \return
* \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_FORBIDDEN
* \li \c HTTP_NOT_FOUND
* \li \c HTTP_NOT_ACCEPTABLE
* \li \c HTTP_OK
*/
static int process_request(
@@ -1037,6 +1056,7 @@ static int process_request(
req->method == HTTPMETHOD_POST ||
req->method == HTTPMETHOD_SIMPLEGET);
/* init */
memset(&finfo, 0, sizeof(finfo));
request_doc = NULL;
finfo.content_type = NULL;
alias_grabbed = FALSE;
@@ -1184,20 +1204,36 @@ static int process_request(
}
RespInstr->ReadSendSize = finfo.file_length;
/* Check other header field. */
if ((err_code =
if ((code =
CheckOtherHTTPHeaders(req, RespInstr,
finfo.file_length)) != HTTP_OK) {
err_code = code;
goto error_handler;
}
if (req->method == HTTPMETHOD_POST) {
*rtype = RESP_POST;
err_code = UPNP_E_SUCCESS;
err_code = HTTP_OK;
goto error_handler;
}
/*extra_headers = UpnpFileInfo_get_ExtraHeaders(finfo); */
if (!extra_headers) {
extra_headers = "";
}
/* Check if chunked encoding should be used. */
if (using_virtual_dir && finfo.file_length == UPNP_USING_CHUNKED) {
/* Chunked encoding is only supported by HTTP 1.1 clients */
if (resp_major == 1 && resp_minor == 1) {
RespInstr->IsChunkActive = 1;
} else {
/* The virtual callback indicates that we should use
* chunked encoding however the client doesn't support
* it. Return with an internal server error. */
err_code = HTTP_NOT_ACCEPTABLE;
goto error_handler;
}
}
if (RespInstr->IsRangeActive && RespInstr->IsChunkActive) {
/* Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
/* Transfer-Encoding: chunked */
@@ -1214,7 +1250,6 @@ static int process_request(
}
} else if (RespInstr->IsRangeActive && !RespInstr->IsChunkActive) {
/* Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
/* Transfer-Encoding: chunked */
if (http_MakeMessage(headers, resp_major, resp_minor,
"R" "N" "T" "GLD" "s" "tcS" "Xc" "sCc",
HTTP_PARTIAL_CONTENT, /* status code */
@@ -1228,7 +1263,6 @@ static int process_request(
goto error_handler;
}
} else if (!RespInstr->IsRangeActive && RespInstr->IsChunkActive) {
/* Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
/* Transfer-Encoding: chunked */
if (http_MakeMessage(headers, resp_major, resp_minor,
"RK" "TLD" "s" "tcS" "Xc" "sCc",
@@ -1243,8 +1277,6 @@ static int process_request(
} else {
/* !RespInstr->IsRangeActive && !RespInstr->IsChunkActive */
if (RespInstr->ReadSendSize >= 0) {
/* Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
/* Transfer-Encoding: chunked */
if (http_MakeMessage(headers, resp_major, resp_minor,
"R" "N" "TLD" "s" "tcS" "Xc" "sCc",
HTTP_OK, /* status code */
@@ -1258,8 +1290,6 @@ static int process_request(
goto error_handler;
}
} else {
/* Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT */
/* Transfer-Encoding: chunked */
if (http_MakeMessage(headers, resp_major, resp_minor,
"R" "TLD" "s" "tcS" "Xc" "sCc",
HTTP_OK, /* status code */
@@ -1289,12 +1319,12 @@ static int process_request(
if (req->method == HTTPMETHOD_SIMPLEGET) {
membuffer_destroy(headers);
}
err_code = UPNP_E_SUCCESS;
err_code = HTTP_OK;
error_handler:
free(request_doc);
ixmlFreeDOMString(finfo.content_type);
if (err_code != UPNP_E_SUCCESS && alias_grabbed) {
if (err_code != HTTP_OK && alias_grabbed) {
alias_release(alias);
}
@@ -1307,7 +1337,8 @@ static int process_request(
* \return
* \li \c HTTP_INTERNAL_SERVER_ERROR
* \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
*/
static int http_RecvPostMessage(
@@ -1329,25 +1360,22 @@ static int http_RecvPostMessage(
int ok_on_close = FALSE;
size_t entity_offset = 0;
int num_read = 0;
int ret_code = 0;
int ret_code = HTTP_OK;
if (Instr && Instr->IsVirtualFile) {
Fp = (virtualDirCallback.open) (filename, UPNP_WRITE);
if (Fp == NULL) {
if (Fp == NULL)
return HTTP_INTERNAL_SERVER_ERROR;
}
} else {
Fp = fopen(filename, "wb");
if (Fp == NULL) {
if (Fp == NULL)
return HTTP_UNAUTHORIZED;
}
}
parser->position = POS_ENTITY;
do {
/* first parse what has already been gotten */
if (parser->position != POS_COMPLETE) {
if (parser->position != POS_COMPLETE)
status = parser_parse_entity(parser);
}
if (status == PARSE_INCOMPLETE_ENTITY) {
/* read until close */
ok_on_close = TRUE;
@@ -1355,8 +1383,8 @@ static int http_RecvPostMessage(
&& (status != PARSE_CONTINUE_1)
&& (status != PARSE_INCOMPLETE)) {
/* error */
fclose(Fp);
return HTTP_BAD_REQUEST;
ret_code = HTTP_BAD_REQUEST;
goto ExitFunction;
}
/* read more if necessary entity */
while (entity_offset + Data_Buf_Size > parser->msg.entity.length &&
@@ -1364,13 +1392,13 @@ static int http_RecvPostMessage(
num_read = sock_read(info, Buf, sizeof(Buf), &Timeout);
if (num_read > 0) {
/* append data to buffer */
ret_code = membuffer_append(&parser->msg.msg,
Buf, (size_t)num_read);
if (ret_code != 0) {
if (membuffer_append(&parser->msg.msg,
Buf, (size_t)num_read) != 0) {
/* set failure status */
parser->http_error_code =
HTTP_INTERNAL_SERVER_ERROR;
return HTTP_INTERNAL_SERVER_ERROR;
ret_code = HTTP_INTERNAL_SERVER_ERROR;
goto ExitFunction;
}
status = parser_parse_entity(parser);
if (status == PARSE_INCOMPLETE_ENTITY) {
@@ -1379,7 +1407,8 @@ static int http_RecvPostMessage(
} else if ((status != PARSE_SUCCESS)
&& (status != PARSE_CONTINUE_1)
&& (status != PARSE_INCOMPLETE)) {
return HTTP_BAD_REQUEST;
ret_code = HTTP_BAD_REQUEST;
goto ExitFunction;
}
} else if (num_read == 0) {
if (ok_on_close) {
@@ -1391,10 +1420,12 @@ static int http_RecvPostMessage(
} else {
/* partial msg or response */
parser->http_error_code = HTTP_BAD_REQUEST;
return HTTP_BAD_REQUEST;
ret_code = HTTP_BAD_REQUEST;
goto ExitFunction;
}
} else {
return num_read;
ret_code = HTTP_SERVICE_UNAVAILABLE;
goto ExitFunction;
}
}
if ((entity_offset + Data_Buf_Size) > parser->msg.entity.length) {
@@ -1405,28 +1436,29 @@ static int http_RecvPostMessage(
&parser->msg.msg.buf[parser->entity_start_position + 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);
if (n < 0) {
virtualDirCallback.close(Fp);
return HTTP_INTERNAL_SERVER_ERROR;
ret_code = HTTP_INTERNAL_SERVER_ERROR;
goto ExitFunction;
}
} else {
size_t n = fwrite(Buf, 1, Data_Buf_Size, Fp);
if (n != Data_Buf_Size) {
fclose(Fp);
return HTTP_INTERNAL_SERVER_ERROR;
ret_code = HTTP_INTERNAL_SERVER_ERROR;
goto ExitFunction;
}
}
} while (parser->position != POS_COMPLETE ||
entity_offset != parser->msg.entity.length);
if (Instr->IsVirtualFile) {
ExitFunction:
if (Instr && Instr->IsVirtualFile) {
virtualDirCallback.close(Fp);
} else {
fclose(Fp);
}
return HTTP_OK;
return ret_code;
}
void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
@@ -1455,7 +1487,7 @@ void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
/*the type of request. */
ret = process_request(req, &rtype, &headers, &filename, &xmldoc,
&RespInstr);
if (ret != UPNP_E_SUCCESS) {
if (ret != HTTP_OK) {
/* send error code */
http_SendStatusResponse(info, ret, req->major_version,
req->minor_version);
@@ -1497,7 +1529,7 @@ void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
/* Send response. */
http_MakeMessage(&headers, 1, 1,
"RTLSXcCc",
ret, "text/html", X_USER_AGENT);
ret, "text/html", &RespInstr, X_USER_AGENT);
http_SendMessage(info, &timeout, "b",
headers.buf, headers.length);
break;
@@ -1512,4 +1544,5 @@ void web_server_callback(http_parser_t *parser, INOUT http_message_t *req,
membuffer_destroy(&headers);
membuffer_destroy(&filename);
}
#endif /* EXCLUDE_WEB_SERVER */

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -30,6 +31,10 @@
**************************************************************************/
/*!
* \addtogroup Sock
*
* @{
*
* \file
*
* \brief Implements the sockets functionality.
@@ -39,11 +44,16 @@
#include "sock.h"
#include "unixutil.h" /* for socklen_t, EAFNOSUPPORT */
#include "unixutil.h" /* for socklen_t, EAFNOSUPPORT */
#include "upnp.h"
#include "UpnpStdInt.h" /* for ssize_t */
#include "upnpdebug.h"
#include "upnputil.h"
#include <assert.h>
#include <errno.h>
#include <fcntl.h> /* for F_GETFL, F_SETFL, O_NONBLOCK */
#include <time.h>
#include <string.h>
@@ -51,7 +61,7 @@
#define MSG_NOSIGNAL 0
#endif
int sock_init(OUT SOCKINFO *info, IN SOCKET sockfd)
int sock_init(SOCKINFO *info, SOCKET sockfd)
{
assert(info);
@@ -61,8 +71,8 @@ int sock_init(OUT SOCKINFO *info, IN SOCKET sockfd)
return UPNP_E_SUCCESS;
}
int sock_init_with_ip(OUT SOCKINFO *info, IN SOCKET sockfd,
IN struct sockaddr *foreign_sockaddr)
int sock_init_with_ip(SOCKINFO *info, SOCKET sockfd,
struct sockaddr *foreign_sockaddr)
{
int ret;
@@ -77,16 +87,21 @@ int sock_init_with_ip(OUT SOCKINFO *info, IN SOCKET sockfd,
return UPNP_E_SUCCESS;
}
int sock_destroy(INOUT SOCKINFO *info, int ShutdownMethod)
int sock_destroy(SOCKINFO *info, int ShutdownMethod)
{
int ret = UPNP_E_SUCCESS;
char errorBuffer[ERROR_BUFFER_LEN];
if (info->socket != -1) {
shutdown(info->socket, ShutdownMethod);
if (info->socket != INVALID_SOCKET) {
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) {
ret = UPNP_E_SOCKET_ERROR;
}
info->socket = -1;
info->socket = INVALID_SOCKET;
}
return ret;
@@ -102,16 +117,16 @@ int sock_destroy(INOUT SOCKINFO *info, int ShutdownMethod)
* \li \c UPNP_E_SOCKET_ERROR - Error on socket calls
*/
static int sock_read_write(
/*! Socket Information Object. */
IN SOCKINFO *info,
/*! Buffer to get data to or send data from. */
OUT char *buffer,
/*! Size of the buffer. */
IN int bufsize,
/*! timeout value. */
IN int *timeoutSecs,
/*! Boolean value specifying read or write option. */
IN int bRead)
/*! [in] Socket Information Object. */
SOCKINFO *info,
/*! [out] Buffer to get data to or send data from. */
char *buffer,
/*! [in] Size of the buffer. */
size_t bufsize,
/*! [in] timeout value. */
int *timeoutSecs,
/*! [in] Boolean value specifying read or write option. */
int bRead)
{
int retCode;
fd_set readSet;
@@ -121,8 +136,8 @@ static int sock_read_write(
time_t start_time = time(NULL);
SOCKET sockfd = info->socket;
long bytes_sent = 0;
long byte_left = 0;
long num_written;
size_t byte_left = (size_t)0;
ssize_t num_written;
if (*timeoutSecs < 0)
return UPNP_E_TIMEDOUT;
@@ -161,14 +176,14 @@ static int sock_read_write(
#endif
if (bRead) {
/* read data. */
numBytes = (long)recv(sockfd, buffer, (size_t)bufsize, MSG_NOSIGNAL);
numBytes = (long)recv(sockfd, buffer, bufsize, MSG_NOSIGNAL);
} else {
byte_left = bufsize;
bytes_sent = 0;
while (byte_left > 0) {
while (byte_left != (size_t)0) {
/* write data. */
num_written = send(sockfd,
buffer + bytes_sent, (size_t)byte_left,
buffer + bytes_sent, byte_left,
MSG_DONTROUTE | MSG_NOSIGNAL);
if (num_written == -1) {
#ifdef SO_NOSIGPIPE
@@ -177,7 +192,7 @@ static int sock_read_write(
#endif
return (int)num_written;
}
byte_left = byte_left - num_written;
byte_left -= (size_t)num_written;
bytes_sent += num_written;
}
numBytes = bytes_sent;
@@ -195,15 +210,48 @@ static int sock_read_write(
return (int)numBytes;
}
int sock_read(IN SOCKINFO *info, OUT char *buffer, IN int bufsize,
INOUT int *timeoutSecs)
int sock_read(SOCKINFO *info, char *buffer, size_t bufsize, int *timeoutSecs)
{
return sock_read_write(info, buffer, bufsize, timeoutSecs, TRUE);
}
int sock_write(IN SOCKINFO *info, IN const char *buffer, IN int bufsize,
INOUT int *timeoutSecs)
int sock_write(SOCKINFO *info, const char *buffer, size_t bufsize, int *timeoutSecs)
{
/* Consciently removing constness. */
return sock_read_write(info, (char *)buffer, bufsize, timeoutSecs, FALSE);
}
int sock_make_blocking(SOCKET sock)
{
#ifdef WIN32
u_long val = 0;
return ioctlsocket(sock, FIONBIO, &val);
#else
int val;
val = fcntl(sock, F_GETFL, 0);
if (fcntl(sock, F_SETFL, val & ~O_NONBLOCK) == -1) {
return -1;
}
#endif
return 0;
}
int sock_make_no_blocking(SOCKET sock)
{
#ifdef WIN32
u_long val = 1;
return ioctlsocket(sock, FIONBIO, &val);
#else /* WIN32 */
int val;
val = fcntl(sock, F_GETFL, 0);
if (fcntl(sock, F_SETFL, val | O_NONBLOCK) == -1) {
return -1;
}
#endif /* WIN32 */
return 0;
}
/* @} Sock */

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -43,6 +44,9 @@
#include <lwres/netdb.h>
#endif
#endif
#ifdef WIN32
#define snprintf _snprintf
#endif
#include <assert.h>
@@ -65,7 +69,7 @@ static int is_reserved(
/*! [in] Char to be matched for RESERVED characters. */
char in)
{
if (strchr(RESERVED, in)) {
if (strchr(RESERVED, (int)in)) {
return 1;
} else {
return 0;
@@ -83,7 +87,7 @@ int is_mark(
/*! [in] Char to be matched for MARKED characters. */
char in)
{
if (strchr(MARK, in)) {
if (strchr(MARK, (int)in)) {
return 1;
} else {
return 0;
@@ -132,17 +136,17 @@ int replace_escaped(char *in, size_t index, size_t *max)
{
int tempInt = 0;
char tempChar = 0;
size_t i = 0;
size_t j = 0;
size_t i = (size_t)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
* characters. */
if (sscanf(&in[index + 1], "%2x", &tempInt) != 1) {
if (sscanf(&in[index + (size_t)1], "%2x", &tempInt) != 1) {
return 0;
}
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;
if (i < *max) {
tempChar = in[i];
@@ -150,7 +154,7 @@ int replace_escaped(char *in, size_t index, size_t *max)
tempChar = 0;
}
}
*max -= 2;
*max -= (size_t)2;
return 1;
} else {
return 0;
@@ -172,12 +176,12 @@ static size_t parse_uric(
/*! [out] Token object where the string of characters is copied. */
token *out)
{
size_t i = 0;
size_t i = (size_t)0;
while (i < max &&
(is_unreserved(in[i]) ||
is_reserved(in[i]) ||
((i + 2 < max) && is_escaped(&in[i])))) {
((i + (size_t)2 < max) && is_escaped(&in[i])))) {
i++;
}
@@ -209,12 +213,12 @@ static void copy_token(
int copy_URL_list(URL_list *in, URL_list *out)
{
size_t len = strlen(in->URLs) + 1;
size_t i = 0;
size_t len = strlen(in->URLs) + (size_t)1;
size_t i = (size_t)0;
out->URLs = NULL;
out->parsedURLs = NULL;
out->size = 0;
out->size = (size_t)0;
out->URLs = malloc(len);
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)
return UPNP_E_OUTOF_MEMORY;
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 */
out->parsedURLs[i].type = in->parsedURLs[i].type;
copy_token( &in->parsedURLs[i].scheme, in->URLs,
@@ -253,7 +257,7 @@ void free_URL_list(URL_list *list)
if (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);
}
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,
size_t max,
/*! [out] Output parameter where the host and port are represented as
* an internet address. */
hostport_type *out)
{
char workbuf[256];
@@ -328,8 +341,9 @@ int parse_hostport(
int ret;
memset(out, 0, sizeof(hostport_type));
memset(workbuf, 0, sizeof(workbuf));
/* Work on a copy of the input string. */
strncpy(workbuf, in, sizeof(workbuf));
strncpy(workbuf, in, sizeof(workbuf) - 1);
c = workbuf;
if (*c == '[') {
/* IPv6 addresses are enclosed in square brackets. */
@@ -374,15 +388,17 @@ int parse_hostport(
ret = getaddrinfo(srvname, NULL, &hints, &res0);
if (ret == 0) {
for (res = res0; res; res = res->ai_next) {
if (res->ai_family == AF_INET ||
res->ai_family == AF_INET6) {
switch (res->ai_family) {
case AF_INET:
case AF_INET6:
/* Found a valid IPv4 or IPv6 address. */
memcpy(&out->IPaddress,
res->ai_addr,
res->ai_addrlen);
break;
goto found;
}
}
found:
freeaddrinfo(res0);
if (res == NULL)
/* Didn't find an AF_INET or AF_INET6 address. */
@@ -404,24 +420,27 @@ int parse_hostport(
return UPNP_E_INVALID_URL;
} else
/* Port was not specified, use default port. */
port = 80;
port = 80u;
/* The length of the host and port string can be calculated by */
/* subtracting pointers. */
hostport_size = (size_t)(c - workbuf);
hostport_size = (size_t)c - (size_t)workbuf;
/* Fill in the 'out' information. */
if (af == AF_INET) {
sai4->sin_family = AF_INET;
switch (af) {
case AF_INET:
sai4->sin_family = (sa_family_t)af;
sai4->sin_port = htons(port);
ret = inet_pton(AF_INET, srvname, &sai4->sin_addr);
} else if (af == AF_INET6) {
sai6->sin6_family = AF_INET6;
break;
case AF_INET6:
sai6->sin6_family = (sa_family_t)af;
sai6->sin6_port = htons(port);
sai6->sin6_scope_id = gIF_INDEX;
ret = inet_pton(AF_INET6, srvname, &sai6->sin6_addr);
} else {
break;
default:
/* IP address was set by the hostname (getaddrinfo). */
/* Override port: */
if (out->IPaddress.ss_family == AF_INET)
if (out->IPaddress.ss_family == (sa_family_t)AF_INET)
sai4->sin_port = htons(port);
else
sai6->sin6_port = htons(port);
@@ -434,7 +453,6 @@ int parse_hostport(
out->text.buff = in;
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. */
token *out)
{
size_t i = 0;
size_t i = (size_t)0;
out->size = 0;
out->size = (size_t)0;
out->buff = NULL;
if( ( max == 0 ) || ( !isalpha( in[0] ) ) )
return 0;
if( ( max == (size_t)0 ) || ( !isalpha( in[0] ) ) )
return (size_t)0;
i++;
while( ( i < max ) && ( in[i] != ':' ) ) {
if( !( isalnum( in[i] ) || ( in[i] == '+' ) || ( in[i] == '-' )
|| ( in[i] == '.' ) ) )
return 0;
return (size_t)0;
i++;
}
if( i < max ) {
@@ -476,15 +494,15 @@ static size_t parse_scheme(
return i;
}
return 0;
return (size_t)0;
}
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);
}
@@ -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 *copyFrom = in;
char *max = in + size;
char **Segments = NULL;
int lastSegment = -1;
char *in = buf;
char *out = buf;
char *max = buf + size;
Segments = malloc( sizeof( char * ) * size );
while (!is_end_path(in[0])) {
assert (buf <= out);
assert (out <= in);
assert (in < max);
if( Segments == NULL )
return UPNP_E_OUTOF_MEMORY;
Segments[0] = NULL;
UpnpPrintf( UPNP_ALL, API, __FILE__, __LINE__,
"REMOVE_DOTS: before: %s\n", in );
while( ( copyFrom < max ) && ( *copyFrom != '?' )
&& ( *copyFrom != '#' ) ) {
if( ( ( *copyFrom ) == '.' )
&& ( ( copyFrom == in ) || ( *( copyFrom - 1 ) == '/' ) ) ) {
if( ( copyFrom + 1 == max )
|| ( *( copyFrom + 1 ) == '/' ) ) {
copyFrom += 2;
continue;
} else if( ( *( copyFrom + 1 ) == '.' )
&& ( ( copyFrom + 2 == max )
|| ( *( copyFrom + 2 ) == '/' ) ) ) {
copyFrom += 3;
if( lastSegment > 0 ) {
copyTo = Segments[--lastSegment];
} else {
free( Segments );
/*TRACE("ERROR RESOLVING URL, ../ at ROOT"); */
return UPNP_E_INVALID_URL;
}
continue;
/* case 2.A: */
if (strncmp(in, "./", 2) == 0) {
in += 2;
} else if (strncmp(in, "../", 3) == 0) {
in += 3;
/* case 2.B: */
} else if (strncmp(in, "/./", 3) == 0) {
in += 2;
} else if (strncmp(in, "/.", 2) == 0 && is_end_path(in[2])) {
in += 1;
in[0] = '/';
/* case 2.C: */
} else if (strncmp(in, "/../", 4) == 0 || (strncmp(in, "/..", 3) == 0 && is_end_path(in[3]))) {
/* Make the next character in the input buffer a '/': */
if (is_end_path(in[3])) { /* terminating "/.." case */
in += 2;
in[0] = '/';
} else { /* "/../" prefix case */
in += 3;
}
}
if( ( *copyFrom ) == '/' ) {
lastSegment++;
Segments[lastSegment] = copyTo + 1;
}
( *copyTo ) = ( *copyFrom );
copyTo++;
copyFrom++;
}
if( copyFrom < max ) {
while( copyFrom < max ) {
( *copyTo ) = ( *copyFrom );
copyTo++;
copyFrom++;
/* Trim the last component from the output buffer, or empty it. */
while (buf < out)
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 {
/* move initial '/' character (if any) */
if (in[0] == '/')
*out++ = *in++;
/* move first segment up to, but not including, the next '/' character */
while (in < max && in[0] != '/' && !is_end_path(in[0]))
*out++ = *in++;
#ifdef DEBUG
if (out < in)
out[0] = '\0';
#endif
}
}
( *copyTo ) = 0;
free( Segments );
UpnpPrintf( UPNP_ALL, API, __FILE__, __LINE__,
"REMOVE_DOTS: after: %s\n", in );
while (in < max)
*out++ = *in++;
if (out < max)
out[0] = '\0';
return UPNP_E_SUCCESS;
}
@@ -562,117 +593,121 @@ char *resolve_rel_url(char *base_url, char *rel_url)
{
uri_type base;
uri_type rel;
char temp_path = '/';
int rv;
size_t i = 0;
char *finger = NULL;
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
if (!base_url) {
if (!rel_url)
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;
if (rel.type == (enum uriType)ABSOLUTE)
return strdup(rel_url);
size_t len_base = strlen(base_url);
if ((parse_uri(base_url, len_base, &base) != HTTP_SUCCESS)
|| (base.type != (enum uriType)ABSOLUTE))
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);
if (out == NULL)
return NULL;
memset(out, 0, len);
char *out_finger = out;
/* 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;
}
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;
}
if( ( parse_uri( rel_url, strlen( rel_url ), &rel ) ) == HTTP_SUCCESS ) {
if( rel.type == 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;
}
}
}
}
} else {
free(out);
/* free(rel_url); */
return NULL;
}
}
/* 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 {
free(out);
/* free(rel_url); */
return NULL;
}
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;
/* free(rel_url); */
return out;
error:
free(out);
return NULL;
}
int parse_uri(const char *in, size_t max, uri_type *out)
{
int begin_path = 0;
size_t begin_hostport = 0;
size_t begin_fragment = 0;
size_t begin_hostport = (size_t)0;
size_t begin_fragment = (size_t)0;
begin_hostport = parse_scheme(in, max, &out->scheme);
if (begin_hostport) {
@@ -683,12 +718,11 @@ int parse_uri(const char *in, size_t max, uri_type *out)
out->type = RELATIVE;
out->path_type = REL_PATH;
}
if (begin_hostport + 1 < max &&
if (begin_hostport + (size_t)1 < max &&
in[begin_hostport] == '/' &&
in[begin_hostport + 1] == '/') {
begin_hostport += 2;
in[begin_hostport + (size_t)1] == '/') {
begin_hostport += (size_t)2;
begin_path = parse_hostport(&in[begin_hostport],
max - begin_hostport,
&out->hostport);
if (begin_path >= 0) {
begin_path += (int)begin_hostport;
@@ -710,7 +744,7 @@ int parse_uri(const char *in, size_t max, uri_type *out)
&out->fragment);
} else {
out->fragment.buff = NULL;
out->fragment.size = 0;
out->fragment.size = (size_t)0;
}
return HTTP_SUCCESS;
@@ -724,10 +758,10 @@ int parse_uri_and_unescape(char *in, size_t max, uri_type *out)
return ret;
}
if (out->pathquery.size > 0) {
if (out->pathquery.size > (size_t)0) {
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);
}

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -42,6 +43,7 @@
#ifdef INCLUDE_DEVICE_APIS
#if EXCLUDE_GENA == 0
/************************************************************************
* Function : copy_subscription
*
@@ -299,15 +301,16 @@ FindServiceEventURLPath( service_table * table,
if( ( table )
&&
( parse_uri
( eventURLPath, strlen( eventURLPath ), &parsed_url_in ) ) ) {
( parse_uri( eventURLPath,
strlen( eventURLPath ),
&parsed_url_in ) == HTTP_SUCCESS ) ) {
finger = table->serviceList;
while( finger ) {
if( finger->eventURL )
if( ( parse_uri
( finger->eventURL, strlen( finger->eventURL ),
&parsed_url ) ) ) {
&parsed_url ) == HTTP_SUCCESS ) ) {
if( !token_cmp
( &parsed_url.pathquery,
@@ -321,6 +324,7 @@ FindServiceEventURLPath( service_table * table,
return NULL;
}
#endif /* EXCLUDE_GENA */
/************************************************************************
* Function : FindServiceControlURLPath
@@ -338,6 +342,7 @@ FindServiceEventURLPath( service_table * table,
*
* Note :
************************************************************************/
#if EXCLUDE_SOAP == 0
service_info *
FindServiceControlURLPath( service_table * table,
const char *controlURLPath )
@@ -350,13 +355,13 @@ FindServiceControlURLPath( service_table * table,
&&
( parse_uri
( controlURLPath, strlen( controlURLPath ),
&parsed_url_in ) ) ) {
&parsed_url_in ) == HTTP_SUCCESS ) ) {
finger = table->serviceList;
while( finger ) {
if( finger->controlURL )
if( ( parse_uri
( finger->controlURL, strlen( finger->controlURL ),
&parsed_url ) ) ) {
&parsed_url ) == HTTP_SUCCESS) ) {
if( !token_cmp
( &parsed_url.pathquery,
&parsed_url_in.pathquery ) )
@@ -369,6 +374,7 @@ FindServiceControlURLPath( service_table * table,
return NULL;
}
#endif /* EXCLUDE_SOAP */
/************************************************************************
* Function : printService
@@ -514,6 +520,7 @@ void printServiceTable(
printServiceList( table->serviceList, level, module );}
#endif
#if EXCLUDE_GENA == 0
/************************************************************************
* Function : freeService
*
@@ -737,8 +744,8 @@ service_info *getServiceList(
service_info *current = NULL;
service_info *previous = NULL;
IXML_NodeList *serviceNodeList = NULL;
long unsigned int NumOfServices = 0;
long unsigned int i = 0;
long unsigned int NumOfServices = 0lu;
long unsigned int i = 0lu;
int fail = 0;
if (getSubElement("UDN", node, &UDN) &&
@@ -747,7 +754,7 @@ service_info *getServiceList(
(IXML_Element *)serviceList, "service");
if (serviceNodeList != NULL) {
NumOfServices = ixmlNodeList_length(serviceNodeList);
for (i = 0; i < NumOfServices; i++) {
for (i = 0lu; i < NumOfServices; i++) {
current_service =
ixmlNodeList_item(serviceNodeList, i);
fail = 0;
@@ -761,6 +768,7 @@ service_info *getServiceList(
}
if (!current) {
freeServiceList(head);
ixmlNodeList_free(serviceNodeList);
return NULL;
}
current->next = NULL;
@@ -860,8 +868,8 @@ getAllServiceList( IXML_Node * node,
IXML_NodeList *deviceList = NULL;
IXML_Node *currentDevice = NULL;
long unsigned int NumOfDevices = 0;
long unsigned int i = 0;
long unsigned int NumOfDevices = 0lu;
long unsigned int i = 0lu;
(*out_end) = NULL;
@@ -869,7 +877,7 @@ getAllServiceList( IXML_Node * node,
(IXML_Element *)node, "device");
if (deviceList) {
NumOfDevices = ixmlNodeList_length(deviceList);
for (i = 0; i < NumOfDevices; i++) {
for (i = 0lu; i < NumOfDevices; i++) {
currentDevice = ixmlNodeList_item(deviceList, i);
if (head) {
end->next = getServiceList(currentDevice,
@@ -912,23 +920,20 @@ removeServiceTable( IXML_Node * node,
IXML_Node *currentUDN = NULL;
DOMString UDN = NULL;
IXML_NodeList *deviceList = NULL;
IXML_Node *currentDevice = NULL;
service_info *current_service = NULL;
service_info *start_search = NULL;
service_info *prev_service = NULL;
long unsigned int NumOfDevices = 0;
long unsigned int i = 0;
long unsigned int NumOfDevices = 0lu;
long unsigned int i = 0lu;
if( getSubElement( "root", node, &root ) ) {
current_service = in->serviceList;
start_search = in->serviceList;
deviceList =
ixmlElement_getElementsByTagName( ( IXML_Element * ) root,
"device" );
if( deviceList != NULL ) {
NumOfDevices = ixmlNodeList_length( deviceList );
for( i = 0; i < NumOfDevices; i++ ) {
currentDevice = ixmlNodeList_item( deviceList, i );
for( i = 0lu; i < NumOfDevices; i++ ) {
if( ( start_search )
&& ( ( getSubElement( "UDN", node, &currentUDN ) )
&& ( UDN = getElementValue( currentUDN ) ) ) ) {
@@ -939,7 +944,8 @@ removeServiceTable( IXML_Node * node,
while( ( current_service )
&& ( strcmp( current_service->UDN, UDN ) ) ) {
current_service = current_service->next;
prev_service = current_service->next;
if( current_service != NULL)
prev_service = current_service->next;
}
while( ( current_service )
&& ( !strcmp( current_service->UDN, UDN ) ) ) {
@@ -954,6 +960,8 @@ removeServiceTable( IXML_Node * node,
freeService( current_service );
current_service = start_search;
}
ixmlFreeDOMString( UDN );
UDN = NULL;
}
}
@@ -1060,6 +1068,7 @@ getServiceTable( IXML_Node * node,
return 0;
}
#endif /* EXCLUDE_GENA */
#endif /* INCLUDE_DEVICE_APIS */

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -29,291 +30,144 @@
*
******************************************************************************/
/************************************************************************
* Purpose: This file contains functions that operate on memory and
* buffers, allocation, re-allocation, and modification of the memory
************************************************************************/
/*
* \file
*
* \brief This file contains functions that operate on memory and buffers,
* allocation, re-allocation, and modification of the memory
*/
#include "config.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <membuffer.h>
#include "membuffer.h"
#include "upnp.h"
#include "unixutil.h"
/************************************************************************
* string *
************************************************************************/
/************************************************************************
* Function : str_alloc
*
* Parameters :
* IN const char* str ; input string object
* IN size_t str_len ; input string length
*
* Description : Allocate memory and copy information from the input
* string to the newly allocated memory.
*
* Return : char* ;
* Pointer to the newly allocated memory.
* NULL if memory cannot be allocated.
*
* Note :
************************************************************************/
char *
str_alloc( IN const char *str,
IN size_t str_len )
char *str_alloc(const char *str, size_t str_len)
{
char *s;
char *s;
s = ( char * )malloc( str_len + 1 );
if( s == NULL ) {
return NULL; /* no mem */
}
s = (char *)malloc(str_len + (size_t)1);
if (s == NULL) {
return NULL; /* no mem */
}
memcpy( s, str, str_len );
s[str_len] = '\0';
memcpy(s, str, str_len);
s[str_len] = '\0';
return s;
return s;
}
/************************************************************************
* memptr *
************************************************************************/
/************************************************************************
* Function : memptr_cmp
*
* Parameters :
* IN memptr* m ; input memory object
* IN const char* s ; constatnt string for the memory object to be
* compared with
*
* Description : Compares characters of strings passed for number of
* bytes. If equal for the number of bytes, the length of the bytes
* determines which buffer is shorter.
*
* Return : int ;
* < 0 string1 substring less than string2 substring
* 0 string1 substring identical to string2 substring
* > 0 string1 substring greater than string2 substring
*
* Note :
************************************************************************/
int
memptr_cmp( IN memptr * m,
IN const char *s )
int memptr_cmp(memptr * m, const char *s)
{
int cmp;
int cmp;
cmp = strncmp( m->buf, s, m->length );
cmp = strncmp(m->buf, s, m->length);
if( cmp == 0 && m->length < strlen( s ) ) {
/* both strings equal for 'm->length' chars */
/* if m is shorter than s, then s is greater */
return -1;
}
if (cmp == 0 && m->length < strlen(s)) {
/* both strings equal for 'm->length' chars */
/* if m is shorter than s, then s is greater */
return -1;
}
return cmp;
return cmp;
}
/************************************************************************
* Function : memptr_cmp_nocase
*
* Parameters :
* IN memptr* m ; input memory object
* IN const char* s ; constatnt string for the memory object to be
* compared with
*
* Description : Compares characters of 2 strings irrespective of the
* case for a specific count of bytes If the character comparison
* is the same the length of the 2 srings determines the shorter
* of the 2 strings.
*
* Return : int ;
* < 0 string1 substring less than string2 substring
* 0 string1 substring identical to string2 substring
* > 0 string1 substring greater than string2 substring
*
* Note :
************************************************************************/
int
memptr_cmp_nocase( IN memptr * m,
IN const char *s )
int memptr_cmp_nocase(memptr * m, const char *s)
{
int cmp;
int cmp;
cmp = strncasecmp( m->buf, s, m->length );
if( cmp == 0 && m->length < strlen( s ) ) {
/* both strings equal for 'm->length' chars */
/* if m is shorter than s, then s is greater */
return -1;
}
cmp = strncasecmp(m->buf, s, m->length);
if (cmp == 0 && m->length < strlen(s)) {
/* both strings equal for 'm->length' chars */
/* if m is shorter than s, then s is greater */
return -1;
}
return cmp;
return cmp;
}
/************************************************************************
* membuffer *
************************************************************************/
/************************************************************************
* Function : membuffer_initialize
*
* Parameters :
* INOUT membuffer* m ; buffer to be initialized
*
* Description : Initialize the buffer
*
* Return : void ;
*
* Note :
************************************************************************/
static UPNP_INLINE void
membuffer_initialize( INOUT membuffer * m )
/*!
* \brief Initialize the buffer.
*/
static UPNP_INLINE void membuffer_initialize(
/*! [in,out] Buffer to be initialized. */
membuffer *m)
{
m->buf = NULL;
m->length = 0;
m->capacity = 0;
m->buf = NULL;
m->length = (size_t)0;
m->capacity = (size_t)0;
}
/************************************************************************
* Function : membuffer_set_size
*
* Parameters :
* INOUT membuffer* m ; buffer whose size is to be modified
* IN size_t new_length ; new size to which the buffer will be
* modified
*
* Description : Increases or decreases buffer cap so that at least
* 'new_length' bytes can be stored
*
* Return : int ;
* UPNP_E_SUCCESS - On Success
* UPNP_E_OUTOF_MEMORY - On failure to allocate memory.
*
* Note :
************************************************************************/
int
membuffer_set_size( INOUT membuffer * m,
IN size_t new_length )
int membuffer_set_size(membuffer *m, size_t new_length)
{
size_t diff;
size_t alloc_len;
char *temp_buf;
size_t diff;
size_t alloc_len;
char *temp_buf;
if( new_length >= m->length ) /* increase length */
{
/* need more mem? */
if( new_length <= m->capacity ) {
return 0; /* have enough mem; done */
}
if (new_length >= m->length) { /* increase length */
/* need more mem? */
if (new_length <= m->capacity) {
return 0; /* have enough mem; done */
}
diff = new_length - m->length;
alloc_len = MAXVAL( m->size_inc, diff ) + m->capacity;
} else /* decrease length */
{
assert( new_length <= m->length );
diff = new_length - m->length;
alloc_len = MAXVAL(m->size_inc, diff) + m->capacity;
} else { /* decrease length */
/* if diff is 0..m->size_inc, don't free */
if( ( m->capacity - new_length ) <= m->size_inc ) {
return 0;
}
assert(new_length <= m->length);
alloc_len = new_length + m->size_inc;
}
/* if diff is 0..m->size_inc, don't free */
if ((m->capacity - new_length) <= m->size_inc) {
return 0;
}
assert( alloc_len >= new_length );
alloc_len = new_length + m->size_inc;
}
temp_buf = realloc( m->buf, alloc_len + 1 ); /*LEAK_FIX_MK */
assert(alloc_len >= new_length);
/*temp_buf = Realloc( m->buf,m->length, alloc_len + 1 );LEAK_FIX_MK */
temp_buf = realloc(m->buf, alloc_len + (size_t)1); /*LEAK_FIX_MK */
if( temp_buf == NULL ) {
/* try smaller size */
alloc_len = new_length;
temp_buf = realloc( m->buf, alloc_len + 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 ) {
return UPNP_E_OUTOF_MEMORY;
}
}
/* save */
m->buf = temp_buf;
m->capacity = alloc_len;
return 0;
if (temp_buf == NULL) {
/* try smaller size */
alloc_len = new_length;
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 */
if (temp_buf == NULL) {
return UPNP_E_OUTOF_MEMORY;
}
}
/* save */
m->buf = temp_buf;
m->capacity = alloc_len;
return 0;
}
/************************************************************************
* Function : membuffer_init
*
* Parameters :
* INOUT membuffer* m ; buffer to be initialized
*
* Description : Wrapper to membuffer_initialize().
* Set the size of the buffer to MEMBUF_DEF_SIZE_INC
* Initializes m->buf to NULL, length=0
*
* Return : void ;
*
* Note :
************************************************************************/
void
membuffer_init( INOUT membuffer * m )
void membuffer_init(membuffer *m)
{
assert( m != NULL );
assert(m != NULL);
m->size_inc = MEMBUF_DEF_SIZE_INC;
membuffer_initialize( m );
m->size_inc = MEMBUF_DEF_SIZE_INC;
membuffer_initialize(m);
}
/************************************************************************
* Function : membuffer_destroy
*
* Parameters :
* INOUT membuffer* m ; buffer to be destroyed
*
* Description : Free's memory allocated for membuffer* m.
*
* Return : void ;
*
* Note :
************************************************************************/
void
membuffer_destroy( INOUT membuffer * m )
void membuffer_destroy(membuffer *m)
{
if( m == NULL ) {
return;
}
if (m == NULL) {
return;
}
free( m->buf );
membuffer_init( m );
free(m->buf);
membuffer_init(m);
}
/************************************************************************
* Function : membuffer_assign
*
* Parameters :
* INOUT membuffer* m ; buffer whose memory is to be allocated and
* assigned.
* IN const void* buf ; source buffer whose contents will be copied
* IN size_t buf_len ; length of the source buffer
*
* Description : Allocate memory to membuffer* m and copy the contents
* of the in parameter IN const void* buf.
*
* Return : int ;
* UPNP_E_SUCCESS
* UPNP_E_OUTOF_MEMORY
*
* Note :
************************************************************************/
int membuffer_assign( INOUT membuffer * m,
IN const void *buf,
IN size_t buf_len )
int membuffer_assign(membuffer *m, const void *buf, size_t buf_len)
{
int return_code;
@@ -338,78 +192,25 @@ int membuffer_assign( INOUT membuffer * m,
return 0;
}
/************************************************************************
* Function : membuffer_assign_str
*
* Parameters :
* INOUT membuffer* m ; buffer to be allocated and assigned
* IN const char* c_str ; source buffer whose contents will be
* copied
*
* Description : Wrapper function for membuffer_assign()
*
* Return : int ;
* UPNP_E_SUCCESS
* UPNP_E_OUTOF_MEMORY
*
* Note :
************************************************************************/
int
membuffer_assign_str( INOUT membuffer * m,
IN const char *c_str )
int membuffer_assign_str(membuffer *m, const char *c_str)
{
return membuffer_assign( m, c_str, strlen( c_str ) );
return membuffer_assign(m, c_str, strlen(c_str));
}
/************************************************************************
* Function : membuffer_append
*
* Parameters :
* INOUT membuffer* m ; buffer whose memory is to be appended.
* IN const void* buf ; source buffer whose contents will be
* copied
* IN size_t buf_len ; length of the source buffer
*
* Description : Invokes function to appends data from a constant buffer
* to the buffer
*
* Return : int ;
*
* Note :
************************************************************************/
int
membuffer_append( INOUT membuffer * m,
IN const void *buf,
IN size_t buf_len )
int membuffer_append(membuffer *m, const void *buf, size_t buf_len)
{
assert( m != NULL );
assert(m != NULL);
return membuffer_insert( m, buf, buf_len, m->length );
return membuffer_insert(m, buf, buf_len, m->length);
}
/************************************************************************
* Function : membuffer_append_str
*
* Parameters :
* INOUT membuffer* m ; buffer whose memory is to be appended.
* IN const char* c_str ; source buffer whose contents will be
* copied
*
* Description : Invokes function to appends data from a constant string
* to the buffer
*
* Return : int ;
*
* Note :
************************************************************************/
int
membuffer_append_str( INOUT membuffer * m,
IN const char *c_str )
int membuffer_append_str(membuffer *m, const char *c_str)
{
return membuffer_insert( m, c_str, strlen( c_str ), m->length );
return membuffer_insert(m, c_str, strlen(c_str), m->length);
}
int membuffer_insert(membuffer *m, const void *buf, size_t buf_len, size_t index)
int membuffer_insert(membuffer * m, const void *buf, size_t buf_len,
size_t index)
{
int return_code;
@@ -436,7 +237,7 @@ int membuffer_insert(membuffer *m, const void *buf, size_t buf_len, size_t index
return 0;
}
void membuffer_delete(membuffer *m, size_t index, size_t num_bytes)
void membuffer_delete(membuffer * m, size_t index, size_t num_bytes)
{
int return_value;
size_t new_length;
@@ -450,7 +251,7 @@ void membuffer_delete(membuffer *m, size_t index, size_t num_bytes)
if (index + num_bytes > m->length) {
num_bytes = m->length - index;
/* every thing at and after index purged */
copy_len = 0;
copy_len = (size_t)0;
} else {
/* calc num bytes after deleted string */
copy_len = m->length - (index + num_bytes);
@@ -461,68 +262,34 @@ void membuffer_delete(membuffer *m, size_t index, size_t num_bytes)
return_value = membuffer_set_size(m, new_length);
/* shrinking should always work */
assert(return_value == 0);
if (return_value != 0)
return;
/* don't modify until buffer is set */
m->length = new_length;
m->buf[new_length] = 0;
}
/************************************************************************
* Function : membuffer_detach
*
* Parameters :
* INOUT membuffer* m ; buffer to be returned and updated.
*
* Description : Detaches current buffer and returns it. The caller
* must free the returned buffer using free().
* After this call, length becomes 0.
*
* Return : char* ;
* a pointer to the current buffer
*
* Note :
************************************************************************/
char *
membuffer_detach( INOUT membuffer * m )
char *membuffer_detach(membuffer *m)
{
char *buf;
char *buf;
assert( m != NULL );
assert(m != NULL);
buf = m->buf;
buf = m->buf;
/* free all */
membuffer_initialize( m );
/* free all */
membuffer_initialize(m);
return buf;
return buf;
}
/************************************************************************
* Function : membuffer_attach
*
* Parameters :
* INOUT membuffer* m ; buffer to be updated
* IN char* new_buf ; source buffer which will be assigned to the
* buffer to be updated
* IN size_t buf_len ; length of the source buffer
*
* Description : Free existing memory in membuffer and assign the new
* buffer in its place.
*
* Return : void ;
*
* Note : 'new_buf' must be allocted using malloc or realloc so
* that it can be freed using free()
************************************************************************/
void
membuffer_attach( INOUT membuffer * m,
IN char *new_buf,
IN size_t buf_len )
void membuffer_attach(membuffer *m, char *new_buf, size_t buf_len)
{
assert( m != NULL );
assert(m != NULL);
membuffer_destroy( m );
m->buf = new_buf;
m->length = buf_len;
m->capacity = buf_len;
membuffer_destroy(m);
m->buf = new_buf;
m->length = buf_len;
m->capacity = buf_len;
}

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -44,14 +45,14 @@
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. */
dest[LINE_SIZE - 1] = '\0';
}
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. */
dest[NAME_SIZE - 1] = '\0';
}
@@ -60,7 +61,7 @@ void linecopylen(char dest[LINE_SIZE], const char *src, size_t srclen)
{
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);
dest[len] = '\0';
}

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* 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
/* configure --enable-webserver --enable-device */
/* configure --enable-webserver */
#if UPNP_HAVE_WEBSERVER
# define INTERNAL_WEB_SERVER 1
#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_MINISERVER
@@ -452,7 +476,7 @@
#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
# define EXCLUDE_MINISERVER 1
# if INTERNAL_WEB_SERVER
@@ -461,7 +485,7 @@
#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
# define EXCLUDE_MINISERVER 0
# if EXCLUDE_WEB_SERVER == 0 && !defined INTERNAL_WEB_SERVER

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -183,6 +184,10 @@ typedef struct {
int status_code;
/*! response only. */
membuffer status_msg;
/*! response only. the amount of data that's been read by the user, that's no
* longer in the raw message buffer.
*/
size_t amount_discarded;
/* fields used in both request or response messages. */
/*! if TRUE, msg is a request, else response. */
int is_request;
@@ -199,8 +204,6 @@ typedef struct {
membuffer msg;
/*! storage for url string. */
char *urlbuf;
/*! . */
size_t entity_offset;
} http_message_t;
typedef struct {
@@ -215,7 +218,9 @@ typedef struct {
parser_pos_t position;
int ent_position;
unsigned int content_length;
int chunk_size;
size_t chunk_size;
/*! offset in the the raw message buffer, which contains the message body.
* preceding this are the headers of the messsage. */
size_t entity_start_position;
scanner_t scanner;
} http_parser_t;
@@ -425,7 +430,7 @@ parse_status_t parser_append( INOUT http_parser_t* parser,
* PARSE_NO_MATCH -- failure to match pattern 'fmt'
* 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

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -45,7 +46,13 @@
#define HTTP_DEFAULT_TIMEOUT 30
#ifdef __cplusplus
#extern "C" {
extern "C" {
#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);
@@ -78,22 +85,19 @@ int http_FixStrUrl(
/*! [out] Fixed and corrected URL. */
uri_type *fixed_url);
/************************************************************************
* Function: http_Connect
/*!
* \brief Gets destination address from URL and then connects to the
* remote end.
*
* Parameters:
* IN uri_type* destination_url; URL containing destination information
* OUT uri_type *url; Fixed and corrected URL
*
* Description:
* Gets destination address from URL and then connects to the remote end
*
* Returns:
* socket descriptor on success
* UPNP_E_OUTOF_SOCKET
* UPNP_E_SOCKET_CONNECT on error
************************************************************************/
int http_Connect( IN uri_type* destination_url, OUT uri_type *url );
* \return Socket descriptor on success, or on error:
* \li \c UPNP_E_OUTOF_SOCKET
* \li \c UPNP_E_SOCKET_CONNECT
*/
SOCKET http_Connect(
/*! [in] URL containing destination information. */
uri_type *destination_url,
/*! [out] Fixed and corrected URL. */
uri_type *url);
/************************************************************************
@@ -561,6 +565,7 @@ int http_OpenHttpGetEx(IN const char *url_str,
*
* Parameters:
* OUT char *info; buffer to store the operating system information
* IN size_t infoSize; size of buffer
*
* Description:
* Returns the server information for the operating system
@@ -568,7 +573,7 @@ int http_OpenHttpGetEx(IN const char *url_str,
* Return:
* UPNP_INLINE void
************************************************************************/
void get_sdk_info( OUT char *info );
void get_sdk_info( OUT char *info, IN size_t infoSize );
#ifdef __cplusplus
} /* #extern "C" */

View File

@@ -1,9 +1,6 @@
#ifndef INET_PTON
#define INET_PTON
#ifdef WIN32
#ifdef IPV6_
@@ -12,12 +9,10 @@
#include "unixutil.h"
#include <errno.h>
#include <stdio.h>
#include <string.h>
/*!
* \file
*
@@ -30,59 +25,14 @@
*
*/
/*!
* \brief format an IPv4 address
*
* \return `dst' (as a const)
*
* \note
* \li (1) uses no statics
* \li (2) takes a u_char* not an in_addr as input
*
*/
extern const char *inet_ntop4(const u_char *src, char *dst, socklen_t size);
/*!
* \brief convert IPv6 binary address into presentation (printable) format
*/
#ifdef INET_IPV6
extern const char *inet_ntop6(const u_char *src, char *dst, socklen_t size);
#endif /* INET_IPV6 */
/*!
* \brief like inet_aton() but without all the hexadecimal and shorthand.
*
* \return 1 if `src' is a valid dotted quad, else 0.
*
* \note does not touch `dst' unless it's returning 1.
*/
extern inet_pton4(const char *src,u_char *dst);
/*!
* \brief convert presentation level address to network order binary form.
*
* \return 1 if `src' is a valid [RFC1884 2.2] address, else 0.
*
* \note
* \li (1) does not touch `dst' unless it's returning 1.
* \li (2) :: in a full address is silently ignored.
*/
#ifdef INET_IPV6
extern int inet_pton6(const char *src, u_char *dst);
#endif /* INET_IPV6 */
/*!
* \brief convert a network format address to presentation format.
*
* \return
* pointer to presentation format address (`dst'), or NULL (see errno).
*/
extern const char *inet_ntop(int af,const void *src,char *dst,socklen_t size);
extern const char *inet_ntop(int af, const void *src, char *dst,
socklen_t size);
/*!
* \brief convert from presentation format (which usually means ASCII printable)
@@ -93,11 +43,8 @@ extern const char *inet_ntop(int af,const void *src,char *dst,socklen_t size);
* \li 0 if the address wasn't valid (`dst' is untouched in this case)
* \li -1 if some other error occurred (`dst' is untouched in this case, too)
*/
extern int inet_pton(int af,const char *src,void *dst);
extern int inet_pton(int af, const char *src, void *dst);
#endif /* WIN32 */
#endif /* INET_PTON */

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -43,19 +44,16 @@
#define MAXVAL( a, b ) ( (a) > (b) ? (a) : (b) )
/*! pointer to a chunk of memory. */
typedef struct
{
typedef struct {
/*! start of memory (read/write). */
char *buf;
/*! length of memory (read-only). */
size_t length;
} memptr;
/*! Maintains a block of dynamically allocated memory
* note: Total length/capacity should not exceed MAX_INT */
typedef struct
{
typedef struct {
/*! mem buffer; must not write beyond buf[length-1] (read/write). */
char *buf;
/*! length of buffer (read-only). */
@@ -65,197 +63,143 @@ typedef struct
/*! used to increase size; MUST be > 0; (read/write). */
size_t size_inc;
/*! default value of size_inc. */
#define MEMBUF_DEF_SIZE_INC 5
#define MEMBUF_DEF_SIZE_INC (size_t)5
} membuffer;
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/************************************************************************
* Function : str_alloc
*
* Parameters :
* IN const char* str ; input string object
* IN size_t str_len ; input string length
*
* Description : Allocate memory and copy information from the input
* string to the newly allocated memory.
*
* Return : char* ;
* Pointer to the newly allocated memory.
* NULL if memory cannot be allocated.
*
* Note :
************************************************************************/
char *str_alloc( IN const char* str, IN size_t str_len );
/*!
* \brief Allocate memory and copy information from the input string to the
* newly allocated memory.
*
* \return Pointer to the newly allocated memory.
* NULL if memory cannot be allocated.
*/
char *str_alloc(
/*! [in] Input string object. */
const char *str,
/*! [in] Input string length. */
size_t str_len);
/************************************************************************
* Function : memptr_cmp
*
* Parameters :
* IN memptr* m ; input memory object
* IN const char* s ; constatnt string for the memory object to be
* compared with
*
* Description : Compares characters of strings passed for number of
* bytes. If equal for the number of bytes, the length of the bytes
* determines which buffer is shorter.
*
* Return : int ;
* < 0 string1 substring less than string2 substring
* 0 string1 substring identical to string2 substring
* > 0 string1 substring greater than string2 substring
*
* Note :
************************************************************************/
int memptr_cmp( IN memptr* m, IN const char* s );
/*!
* \brief Compares characters of strings passed for number of bytes.
* If equal for the number of bytes, the length of the bytes determines
* which buffer is shorter.
*
* \return
* \li < 0 string1 substring less than string2 substring
* \li == 0 string1 substring identical to string2 substring
* \li > 0 string1 substring greater than string2 substring
*/
int memptr_cmp(
/*! [in] Input memory object. */
memptr *m,
/*! [in] Constatnt string for the memory object to be compared with. */
const char *s);
/************************************************************************
* Function : memptr_cmp_nocase
*
* Parameters :
* IN memptr* m ; input memory object
* IN const char* s ; constatnt string for the memory object to be
* compared with
*
* Description : Compares characters of 2 strings irrespective of the
* case for a specific count of bytes If the character comparison
* is the same the length of the 2 srings determines the shorter
* of the 2 strings.
*
* Return : int ;
* < 0 string1 substring less than string2 substring
* 0 string1 substring identical to string2 substring
* > 0 string1 substring greater than string2 substring
*
* Note :
************************************************************************/
int memptr_cmp_nocase( IN memptr* m, IN const char* s );
/*!
* \brief Compares characters of 2 strings irrespective of the case for a
* specific count of bytes.
*
* If the character comparison is the same the length of the 2 srings
* determines the shorter of the 2 strings.
*
* \return
* \li < 0 string1 substring less than string2 substring
* \li == 0 string1 substring identical to string2 substring
* \li > 0 string1 substring greater than string2 substring
*/
int memptr_cmp_nocase(
/*! [in] Input memory object. */
memptr *m,
/*! [in] Constatnt string for the memory object to be compared with. */
const char *s);
/*!
* \brief Increases or decreases buffer cap so that at least 'new_length'
* bytes can be stored.
*
* \return
* \li UPNP_E_SUCCESS - On Success
* \li UPNP_E_OUTOF_MEMORY - On failure to allocate memory.
*/
int membuffer_set_size(
/*! [in,out] buffer whose size is to be modified. */
membuffer *m,
/*! [in] new size to which the buffer will be modified. */
size_t new_length);
/************************************************************************
* Function : membuffer_set_size
*
* Parameters :
* INOUT membuffer* m ; buffer whose size is to be modified
* IN size_t new_length ; new size to which the buffer will be
* modified
*
* Description : Increases or decreases buffer cap so that at least
* 'new_length' bytes can be stored
*
* Return : int ;
* UPNP_E_SUCCESS - On Success
* UPNP_E_OUTOF_MEMORY - On failure to allocate memory.
*
* Note :
************************************************************************/
int membuffer_set_size( INOUT membuffer* m, IN size_t new_length );
/*!
* \brief Wrapper to membuffer_initialize().
*
* Set the size of the buffer to MEMBUF_DEF_SIZE_INC and Initializes
* m->buf to NULL, length = 0.
*/
void membuffer_init(
/*! [in,out] Buffer to be initialized. */
membuffer *m);
/************************************************************************
* Function : membuffer_init
*
* Parameters :
* INOUT membuffer* m ; buffer to be initialized
*
* Description : Wrapper to membuffer_initialize().
* Set the size of the buffer to MEMBUF_DEF_SIZE_INC
* Initializes m->buf to NULL, length=0
*
* Return : void ;
*
* Note :
************************************************************************/
void membuffer_init( INOUT membuffer* m );
/*!
* \brief Free's memory allocated for membuffer* m.
*/
void membuffer_destroy(
/*! [in,out] Buffer to be destroyed. */
membuffer *m);
/************************************************************************
* Function : membuffer_destroy
*
* Parameters :
* INOUT membuffer* m ; buffer to be destroyed
*
* Description : Free's memory allocated for membuffer* m.
*
* Return : void ;
*
* Note :
************************************************************************/
void membuffer_destroy( INOUT membuffer* m );
/*!
* \brief Allocate memory to membuffer *m and copy the contents of the in
* parameter const void *buf.
*
* \return
* \li UPNP_E_SUCCESS
* \li UPNP_E_OUTOF_MEMORY
*/
int membuffer_assign(
/*! [in,out] Buffer whose memory is to be allocated and assigned. */
membuffer *m,
/*! [in] Source buffer whose contents will be copied. */
const void *buf,
/*! [in] Length of the source buffer. */
size_t buf_len);
/*!
* \brief Wrapper function for membuffer_assign().
*
* \return
* \li UPNP_E_SUCCESS
* \li UPNP_E_OUTOF_MEMORY
*/
int membuffer_assign_str(
/*! [in,out] Buffer to be allocated and assigned. */
membuffer *m,
/*! [in] Source buffer whose contents will be copied. */
const char *c_str);
/************************************************************************
* Function : membuffer_assign
*
* Parameters :
* INOUT membuffer* m ; buffer whose memory is to be allocated and
* assigned.
* IN const void* buf ; source buffer whose contents will be copied
* IN size_t buf_len ; length of the source buffer
*
* Description : Allocate memory to membuffer* m and copy the contents
* of the in parameter IN const void* buf.
*
* Return : int ;
* UPNP_E_SUCCESS
* UPNP_E_OUTOF_MEMORY
*
* Note :
************************************************************************/
int membuffer_assign( INOUT membuffer* m, IN const void* buf, IN size_t buf_len );
/*!
* \brief Invokes function to appends data from a constant buffer to the buffer.
*
* \return int.
*/
int membuffer_append(
/*! [in,out] Buffer whose memory is to be appended. */
membuffer *m,
/*! [in] Source buffer whose contents will be copied. */
const void *buf,
/*! [in] Length of the source buffer. */
size_t buf_len);
/************************************************************************
* Function : membuffer_assign_str
*
* Parameters :
* INOUT membuffer* m ; buffer to be allocated and assigned
* IN const char* c_str ; source buffer whose contents will be
* copied
*
* Description : Wrapper function for membuffer_assign()
*
* Return : int ;
* UPNP_E_SUCCESS
* UPNP_E_OUTOF_MEMORY
*
* Note :
************************************************************************/
int membuffer_assign_str( INOUT membuffer* m, IN const char* c_str );
/************************************************************************
* Function : membuffer_append
*
* Parameters :
* INOUT membuffer* m ; buffer whose memory is to be appended.
* IN const void* buf ; source buffer whose contents will be
* copied
* IN size_t buf_len ; length of the source buffer
*
* Description : Invokes function to appends data from a constant buffer
* to the buffer
*
* Return : int ;
*
* Note :
************************************************************************/
int membuffer_append( INOUT membuffer* m, IN const void* buf, IN size_t buf_len );
/************************************************************************
* Function : membuffer_append_str
*
* Parameters :
* INOUT membuffer* m ; buffer whose memory is to be appended.
* IN const char* c_str ; source buffer whose contents will be
* copied
*
* Description : Invokes function to appends data from a constant string
* to the buffer
*
* Return : int ;
*
* Note :
************************************************************************/
int membuffer_append_str( INOUT membuffer* m, IN const char* c_str );
/*!
* \brief Invokes function to appends data from a constant string to the buffer.
*
* \return int.
*/
int membuffer_append_str(
/*! [in,out] Buffer whose memory is to be appended. */
membuffer *m,
/*! [in] Source buffer whose contents will be copied. */
const char *c_str);
/*!
* \brief Allocates memory for the new data to be inserted. Does
@@ -265,69 +209,57 @@ int membuffer_append_str( INOUT membuffer* m, IN const char* c_str );
* \return 0 if successful, error code if error.
*/
int membuffer_insert(
/* [in,out] Buffer whose memory size is to be increased and appended. */
membuffer *m,
/* [in] source buffer whose contents will be copied. */
/*! [in,out] Buffer whose memory size is to be increased and appended. */
membuffer * m,
/*! [in] source buffer whose contents will be copied. */
const void *buf,
/* [in] size of the source buffer. */
/*! [in] size of the source buffer. */
size_t buf_len,
/* [in] index to determine the bounds while movinf the data. */
/*! [in] index to determine the bounds while movinf the data. */
size_t index);
/*!
* \brief Shrink the size of the buffer depending on the current size of the
* bufer and te input parameters. Move contents from the old buffer to the
* new sized buffer.
*/
void membuffer_delete(
/* [in,out] Buffer whose memory size is to be decreased and copied
/*! [in,out] Buffer whose memory size is to be decreased and copied
* to the modified location. */
INOUT membuffer *m,
/* [in] Index to determine bounds while moving data. */
IN size_t index,
/* [in] Number of bytes that the data needs to shrink by. */
IN size_t num_bytes);
membuffer * m,
/*! [in] Index to determine bounds while moving data. */
size_t index,
/*! [in] Number of bytes that the data needs to shrink by. */
size_t num_bytes);
/*
* \brief Detaches current buffer and returns it. The caller must free the
* returned buffer using free(). After this call, length becomes 0.
*
* \return A pointer to the current buffer.
*/
char *membuffer_detach(
/*! [in,out] Buffer to be returned and updated. */
membuffer *m);
/************************************************************************
* Function : membuffer_detach
*
* Parameters :
* INOUT membuffer* m ; buffer to be returned and updated.
*
* Description : Detaches current buffer and returns it. The caller
* must free the returned buffer using free().
* After this call, length becomes 0.
*
* Return : char* ;
* a pointer to the current buffer
*
* Note :
************************************************************************/
char* membuffer_detach( INOUT membuffer* m );
/*
* \brief Free existing memory in membuffer and assign the new buffer in its
* place.
*
* \note 'new_buf' must be allocted using malloc or realloc so that it can be
* freed using free().
*/
void membuffer_attach(
/*! [in,out] Buffer to be updated. */
membuffer *m,
/*! [in] Source buffer which will be assigned to the buffer to be
* updated. */
char *new_buf,
/*! [in] Length of the source buffer. */
size_t buf_len);
/************************************************************************
* Function : membuffer_attach
*
* Parameters :
* INOUT membuffer* m ; buffer to be updated
* IN char* new_buf ; source buffer which will be assigned to the
* buffer to be updated
* IN size_t buf_len ; length of the source buffer
*
* Description : Free existing memory in membuffer and assign the new
* buffer in its place.
*
* Return : void ;
*
* Note : 'new_buf' must be allocted using malloc or realloc so
* that it can be freed using free()
************************************************************************/
void membuffer_attach( INOUT membuffer* m, IN char* new_buf, IN size_t buf_len );
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* GENLIB_UTIL_H */
} /* extern "C" */
#endif /* __cplusplus */
#endif /* GENLIB_UTIL_MEMBUFFER_H */

View File

@@ -1,3 +1,6 @@
#ifndef MINISERVER_H
#define MINISERVER_H
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
@@ -29,22 +32,16 @@
*
**************************************************************************/
#ifndef MINISERVER_H
#define MINISERVER_H
/*!
* \file
*/
#include "sock.h"
#include "httpparser.h"
#include "UpnpStdInt.h"
extern SOCKET gMiniServerStopSock;
typedef struct MServerSockArray {
/*! IPv4 socket for listening for miniserver requests. */
SOCKET miniServerSock4;
@@ -74,22 +71,19 @@ typedef struct MServerSockArray {
#endif /* INCLUDE_CLIENT_APIS */
} MiniServerSockArray;
/*! . */
typedef void (*MiniServerCallback)(
typedef void (*MiniServerCallback) (
/* ! . */
IN http_parser_t *parser,
IN http_parser_t * parser,
/* ! . */
IN http_message_t* request,
IN http_message_t * request,
/* ! . */
IN SOCKINFO *info);
IN SOCKINFO * info);
#ifdef __cplusplus
extern "C" {
#endif
/*!
* \brief Set HTTP Get Callback.
*/
@@ -97,7 +91,6 @@ void SetHTTPGetCallback(
/*! [in] HTTP Callback to be invoked . */
MiniServerCallback callback);
/*!
* \brief Set SOAP Callback.
*/
@@ -105,11 +98,9 @@ void SetHTTPGetCallback(
void SetSoapCallback(
/*! [in] SOAP Callback to be invoked . */
MiniServerCallback callback);
#else /* INCLUDE_DEVICE_APIS */
static UPNP_INLINE void SetSoapCallback(MiniServerCallback callback) {}
#else /* INCLUDE_DEVICE_APIS */
static UPNP_INLINE void SetSoapCallback(MiniServerCallback callback) {}
#endif /* INCLUDE_DEVICE_APIS */
/*!
* \brief Set GENA Callback.
*/
@@ -117,7 +108,6 @@ void SetGenaCallback(
/*! [in] GENA Callback to be invoked. */
MiniServerCallback callback);
/*!
* \brief Initialize the sockets functionality for the Miniserver.
*
@@ -136,11 +126,10 @@ void SetGenaCallback(
int StartMiniServer(
/*! [in,out] Port on which the server listens for incoming IPv4
* connections. */
unsigned short *listen_port4,
uint16_t *listen_port4,
/*! [in,out] Port on which the server listens for incoming IPv6
* connections. */
unsigned short *listen_port6);
uint16_t *listen_port6);
/*!
* \brief Stop and Shutdown the MiniServer and free socket resources.
@@ -149,11 +138,8 @@ int StartMiniServer(
*/
int StopMiniServer();
#ifdef __cplusplus
} /* extern C */
} /* extern C */
#endif
#endif /* MINISERVER_H */

View File

@@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -49,7 +50,7 @@ extern "C" {
#include <stdio.h>
#include <time.h>
#define SID_SIZE 41
#define SID_SIZE (size_t)41
#ifdef INCLUDE_DEVICE_APIS

View File

@@ -1,7 +1,11 @@
#ifndef GENLIB_NET_SOCK_H
#define GENLIB_NET_SOCK_H
/**************************************************************************
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (c) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -29,20 +33,16 @@
*
**************************************************************************/
#ifndef GENLIB_NET_SOCK_H
#define GENLIB_NET_SOCK_H
/*!
* \defgroup Sock Network Socket Library
*
* @{
*
* \file
*/
#include "upnputil.h"
#ifdef WIN32
/* Do not #include <netinet/in.h> */
#else
#include <netinet/in.h>
#endif
#include "UpnpInet.h" /* for SOCKET, netinet/in */
#include "UpnpGlobal.h" /* for UPNP_INLINE */
/* The following are not defined under winsock.h */
#ifndef SD_RECEIVE
@@ -61,9 +61,26 @@ typedef struct
} SOCKINFO;
#ifdef __cplusplus
#extern "C" {
extern "C" {
#endif
/*!
* \brief Closes the socket if it is different from -1.
*
* \return -1 if an error occurred or if the socket is -1.
*/
static UPNP_INLINE int sock_close(
/*! Socket descriptor. */
SOCKET sock)
{
int ret = -1;
if (sock != INVALID_SOCKET)
ret = UpnpCloseSocket(sock);
return ret;
}
/*!
* \brief Assign the passed in socket descriptor to socket descriptor in the
* SOCKINFO structure.
@@ -74,10 +91,10 @@ typedef struct
* \li \c UPNP_E_SOCKET_ERROR
*/
int sock_init(
/*! Socket Information Object. */
OUT SOCKINFO *info,
/*! Socket Descriptor. */
IN SOCKET sockfd);
/*! [out] Socket Information Object. */
SOCKINFO *info,
/*! [in] Socket Descriptor. */
SOCKET sockfd);
/*!
* \brief Calls the sock_init function and assigns the passed in IP address
@@ -89,48 +106,12 @@ int sock_init(
* \li \c UPNP_E_SOCKET_ERROR
*/
int sock_init_with_ip(
/*! Socket Information Object. */
OUT SOCKINFO* info,
/*! Socket Descriptor. */
IN SOCKET sockfd,
/*! Remote socket address. */
IN struct sockaddr *foreign_sockaddr);
/*!
* \brief Reads data on socket in sockinfo.
*
* \return Integer:
* \li \c numBytes - On Success, no of bytes received.
* \li \c UPNP_E_TIMEDOUT - Timeout.
* \li \c UPNP_E_SOCKET_ERROR - Error on socket calls.
*/
int sock_read(
/*! Socket Information Object. */
IN SOCKINFO *info,
/*! Buffer to get data to. */
OUT char* buffer,
/*! Size of the buffer. */
IN int bufsize,
/*! timeout value. */
INOUT int *timeoutSecs);
/*!
* \brief Writes data on the socket in sockinfo.
*
* \return Integer:
* \li \c numBytes - On Success, no of bytes received.
* \li \c UPNP_E_TIMEDOUT - Timeout.
* \li \c UPNP_E_SOCKET_ERROR - Error on socket calls.
*/
int sock_write(
/*! Socket Information Object. */
IN SOCKINFO *info,
/*! Buffer to send data from. */
IN const char *buffer,
/*! Size of the buffer. */
IN int bufsize,
/*! timeout value. */
INOUT int *timeoutSecs);
/*! [out] Socket Information Object. */
SOCKINFO* info,
/*! [in] Socket Descriptor. */
SOCKET sockfd,
/*! [in] Remote socket address. */
struct sockaddr *foreign_sockaddr);
/*!
* \brief Shutsdown the socket using the ShutdownMethod to indicate whether
@@ -144,33 +125,69 @@ int sock_write(
* \li \c UPNP_E_SUCCESS on success.
*/
int sock_destroy(
/*! Socket Information Object. */
INOUT SOCKINFO* info,
/*! How to shutdown the socket. Used by sockets's shutdown(). */
/*! [in,out] Socket Information Object. */
SOCKINFO* info,
/*! [in] How to shutdown the socket. Used by sockets's shutdown(). */
int ShutdownMethod);
/*!
* \brief Closes the socket if it is different from -1.
* \brief Reads data on socket in sockinfo.
*
* \return -1 if an error occurred or if the socket is -1.
* \return Integer:
* \li \c numBytes - On Success, no of bytes received.
* \li \c UPNP_E_TIMEDOUT - Timeout.
* \li \c UPNP_E_SOCKET_ERROR - Error on socket calls.
*/
static UPNP_INLINE int sock_close(
/*! Socket descriptor. */
SOCKET sock)
{
int ret = -1;
int sock_read(
/*! [in] Socket Information Object. */
SOCKINFO *info,
/*! [out] Buffer to get data to. */
char* buffer,
/*! [in] Size of the buffer. */
size_t bufsize,
/*! [in,out] timeout value. */
int *timeoutSecs);
if (sock != -1) {
ret = UpnpCloseSocket(sock);
}
/*!
* \brief Writes data on the socket in sockinfo.
*
* \return Integer:
* \li \c numBytes - On Success, no of bytes received.
* \li \c UPNP_E_TIMEDOUT - Timeout.
* \li \c UPNP_E_SOCKET_ERROR - Error on socket calls.
*/
int sock_write(
/*! [in] Socket Information Object. */
SOCKINFO *info,
/*! [in] Buffer to send data from. */
const char *buffer,
/*! [in] Size of the buffer. */
size_t bufsize,
/*! [in,out] timeout value. */
int *timeoutSecs);
return ret;
}
/*!
* \brief Make socket blocking.
*
* \return 0 if successful, -1 otherwise.
*/
int sock_make_blocking(
/* [in] socket. */
SOCKET sock);
/*!
* \brief Make socket non-blocking.
*
* \return 0 if successful, -1 otherwise.
*/
int sock_make_no_blocking(
/* [in] socket. */
SOCKET sock);
#ifdef __cplusplus
} /* #extern "C" */
#endif
/* @} Sock Network Socket Library */
#endif /* GENLIB_NET_SOCK_H */

Some files were not shown because too many files have changed in this diff Show More