Compare commits

...

7 Commits

Author SHA1 Message Date
Oxy
d0014a1ae5 workaround for Linux-applications that do not catch SIGPIPE backported
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/tags/release-1.4.1@76 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2006-08-07 05:49:19 +00:00
Oxy
dee7744256 Windows-port: some special code and switches for statical libraries added
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/tags/release-1.4.1@73 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2006-07-31 05:32:33 +00:00
Oxy
adcc34aeac fixes from main branch backported
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/tags/release-1.4.1@72 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2006-07-27 05:31:17 +00:00
Marcelo Roberto Jimenez
3a11a7b113 Merge of r65.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/tags/release-1.4.1@66 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2006-07-20 11:53:02 +00:00
Marcelo Roberto Jimenez
af5db93bb1 Merge of r59.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/tags/release-1.4.1@60 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2006-07-20 02:49:37 +00:00
Oxy
579a6fdee4 email addresses modified to hide them from spambots (in SVNWeb)
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/tags/release-1.4.1@57 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2006-07-18 06:39:45 +00:00
Marcelo Roberto Jimenez
5a505c72ec Created release 1.4.1 from branch-1.4.x.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/tags/release-1.4.1@56 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2006-07-14 14:43:13 +00:00
15 changed files with 203 additions and 121 deletions

View File

@@ -1,28 +1,28 @@
2006-07-07 Oxy <virtual_worlds@gmx.de> 2006-07-07 Oxy <virtual_worlds(at)gmx.de>
* full support for Windows added, static library and DLL are fully * full support for Windows added, static library and DLL are fully
working, code compiles with Borland Builder C++ and MS Visual working, code compiles with Borland Builder C++ and MS Visual
C/C++ C/C++
2006-07-05 Nektarios K. Papadopoulos <npapadop@inaccessnetworks.com> 2006-07-05 Nektarios K. Papadopoulos <npapadop(at)inaccessnetworks.com>
* Include prebuilt documentation (html,pdf), dropping doc++ * Include prebuilt documentation (html,pdf), dropping doc++
dependancy. dependancy.
2006-07-03 Marcelo Jimenez <mroberto@users.sourceforge.net> 2006-07-03 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* Patch for FreeBSD, thanks to Markus Strobl. * Patch for FreeBSD, thanks to Markus Strobl.
2006-06-26 Marcelo Jimenez <mroberto@users.sourceforge.net> 2006-06-26 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* Fix for missing "else" in httpreadwrite.c. Thanks to npapadop * Fix for missing "else" in httpreadwrite.c. Thanks to npapadop
for the patch. for the patch.
2006-06-26 Marcelo Jimenez <mroberto@users.sourceforge.net> 2006-06-26 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* Fix for va_list initialization in x86_64 architectures. * Fix for va_list initialization in x86_64 architectures.
2006-06-08 Oxy <virtual_worlds@gmx.de> 2006-06-08 Oxy <virtual_worlds(at)gmx.de>
* Patch to fix memory leaks and reasons for crashes added (thanks * Patch to fix memory leaks and reasons for crashes added (thanks
to loigu) to loigu)
@@ -31,19 +31,19 @@
Release of version 1.4.0 Release of version 1.4.0
************************************************************************* *************************************************************************
2006-05-26 Oxy <virtual_worlds@gmx.de> 2006-05-26 Oxy <virtual_worlds(at)gmx.de>
* defines in iasnprintf.h changed to work with GCC-version < 3 * defines in iasnprintf.h changed to work with GCC-version < 3
2006-05-22 Oxy <virtual_worlds@gmx.de> 2006-05-22 Oxy <virtual_worlds(at)gmx.de>
* BSD-patch added (not tested yet on an BSD system) * BSD-patch added (not tested yet on an BSD system)
2006-05-19 Oxy <virtual_worlds@gmx.de> 2006-05-19 Oxy <virtual_worlds(at)gmx.de>
* Patch added for bug: ixml parser colapsed on empty args (arg="") * Patch added for bug: ixml parser colapsed on empty args (arg="")
2006-05-18 Oxy <virtual_worlds@gmx.de> 2006-05-18 Oxy <virtual_worlds(at)gmx.de>
* DSM-320 patch added (fetched from project MediaTomb) * DSM-320 patch added (fetched from project MediaTomb)
* httpGet additons atch added, Added proxy support by introducing * httpGet additons atch added, Added proxy support by introducing
@@ -56,14 +56,14 @@ Release of version 1.4.0
FORK FROM DEAD libupnp FORK FROM DEAD libupnp
************************************************************************* *************************************************************************
2006-04-29 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-04-29 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* THANKS: new file with list of contributors * THANKS: new file with list of contributors
* upnp/src/gena/gena_device.c (respond_ok): add 'Content-Length: 0' * upnp/src/gena/gena_device.c (respond_ok): add 'Content-Length: 0'
in subscription response. Patch by Chaos (Bug # 1455367). in subscription response. Patch by Chaos (Bug # 1455367).
2006-04-08 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-04-08 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/doc/UPnP_Programming_Guide.pdf: replace this document with * upnp/doc/UPnP_Programming_Guide.pdf: replace this document with
the one in libupnp-doc-1.2.1 because current CVS version the one in libupnp-doc-1.2.1 because current CVS version
@@ -74,20 +74,20 @@ FORK FROM DEAD libupnp
* changes applied to several files to work under Sparc Solaris, temporarily * changes applied to several files to work under Sparc Solaris, temporarily
requiring a define SPARC_SOLARIS requiring a define SPARC_SOLARIS
2006-04-03 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-04-03 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/Makefile.am: install upnp samples in $(docdir)/examples * upnp/Makefile.am: install upnp samples in $(docdir)/examples
2006-03-28 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-03-28 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* configure.ac: add --with-docdir option to choose where documentation * configure.ac: add --with-docdir option to choose where documentation
is installed (or -without-docdir to not install the documentation) is installed (or -without-docdir to not install the documentation)
2006-03-27 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-03-27 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* ixml/test: add simple test suite for xml parser * ixml/test: add simple test suite for xml parser
2006-03-26 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-03-26 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* ixml/src/ixmlparser.c (Parser_processCDSect): fix bug which prevents * ixml/src/ixmlparser.c (Parser_processCDSect): fix bug which prevents
CDATA sections which contain a 0 (zero) to be parsed (instead the CDATA sections which contain a 0 (zero) to be parsed (instead the
@@ -98,18 +98,18 @@ FORK FROM DEAD libupnp
option, and move samples compilation from check_PROGRAMS to option, and move samples compilation from check_PROGRAMS to
noinst_PROGRAMS noinst_PROGRAMS
2006-03-25 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-03-25 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/src/genlib/miniserver/miniserver.c (get_miniserver_sockets): * upnp/src/genlib/miniserver/miniserver.c (get_miniserver_sockets):
fix bug if new socket created has fd 0 (can only occur when stdin fix bug if new socket created has fd 0 (can only occur when stdin
has been closed). Patch by Oskar Liljeblad 2004-07-02 : has been closed). Patch by Oskar Liljeblad 2004-07-02 :
http://sourceforge.net/mailarchive/message.php?msg_id=8870528 http://sourceforge.net/mailarchive/message.php?msg_id=8870528
2006-03-21 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-03-21 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/test/test_init.c: add some version checks and exit if failure * upnp/test/test_init.c: add some version checks and exit if failure
2006-03-05 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-03-05 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* libupnp version 1.3.1 * libupnp version 1.3.1
@@ -124,11 +124,11 @@ FORK FROM DEAD libupnp
dependencies between upnp and ixml / threadutil, so that programs dependencies between upnp and ixml / threadutil, so that programs
linking against upnp only still work. linking against upnp only still work.
2006-03-04 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-03-04 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* libupnp version 1.3.0 * libupnp version 1.3.0
2006-03-03 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-03-03 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/src/genlib/net/http/httpreadwrite.c (get_sdk_info): use * upnp/src/genlib/net/http/httpreadwrite.c (get_sdk_info): use
package version string from configure to set sdk info package version string from configure to set sdk info
@@ -136,7 +136,7 @@ FORK FROM DEAD libupnp
* upnp/Makefile.am: add sample/tvdevice/web/ files in EXTRA_DIST * upnp/Makefile.am: add sample/tvdevice/web/ files in EXTRA_DIST
+ do not distribute generated upnpconfig.h file. + do not distribute generated upnpconfig.h file.
2006-02-28 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-02-28 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/src/inc/config.h, configure.ac: use only new defines * upnp/src/inc/config.h, configure.ac: use only new defines
UPNP_HAVE_xx instead of INCLUDE_yyy_APIS and INTERNAL_WEB_SERVER UPNP_HAVE_xx instead of INCLUDE_yyy_APIS and INTERNAL_WEB_SERVER
@@ -145,7 +145,7 @@ FORK FROM DEAD libupnp
the librarie LDFLAGS in order to export only the symbols defined the librarie LDFLAGS in order to export only the symbols defined
in the API in the API
2006-02-27 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-02-27 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* configure.ac: add libtool versions for the 3 libraries * configure.ac: add libtool versions for the 3 libraries
@@ -153,7 +153,7 @@ FORK FROM DEAD libupnp
* threadutil/src/ThreadPool.c (SetSeed): add missing 'static' * threadutil/src/ThreadPool.c (SetSeed): add missing 'static'
2006-02-26 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-02-26 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* threadutil/inc/iasnprintf.h: add gcc __printf__ format attribute * threadutil/inc/iasnprintf.h: add gcc __printf__ format attribute
to "iasnprintf" to "iasnprintf"
@@ -174,11 +174,11 @@ FORK FROM DEAD libupnp
the configuration of the installed libraries (generates installed the configuration of the installed libraries (generates installed
file <upnp/upnpconfig.h>) file <upnp/upnpconfig.h>)
2006-02-22 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-02-22 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/ : add missing include of config.h in some .c files * upnp/ : add missing include of config.h in some .c files
2006-02-21 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-02-21 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/inc/upnp.h: move some definitions which should not be * upnp/inc/upnp.h: move some definitions which should not be
exported into "upnp/src/inc/util.h" exported into "upnp/src/inc/util.h"
@@ -186,12 +186,12 @@ FORK FROM DEAD libupnp
* import all modifications below from libupnp in djmount 0.51 * import all modifications below from libupnp in djmount 0.51
into official libupnp into official libupnp
2006-01-17 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-01-17 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* threadutil/Makefile.am (libthreadutil_la_SOURCES): remove extraneous * threadutil/Makefile.am (libthreadutil_la_SOURCES): remove extraneous
file file
2006-01-15 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-01-15 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* configure.ac: add checks for large-file support * configure.ac: add checks for large-file support
@@ -211,53 +211,53 @@ FORK FROM DEAD libupnp
* ixml/src/node.c (ixmlNode_getNodeType): fix compilation warning * ixml/src/node.c (ixmlNode_getNodeType): fix compilation warning
on const return type on const return type
2006-01-12 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-01-12 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/src/inc/readwrite.h : suppress unused C++ header file * upnp/src/inc/readwrite.h : suppress unused C++ header file
2006-01-11 R<>mi Turboult <r3mi@users.sourceforge.net> 2006-01-11 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/inc/config.h, upnp/src/inc/upnpapi.h, * upnp/inc/config.h, upnp/src/inc/upnpapi.h,
upnp/src/inc/httpreadwrite.h: remove internal configuration variable upnp/src/inc/httpreadwrite.h: remove internal configuration variable
MINIMUM_DELAY (no clear purpose) MINIMUM_DELAY (no clear purpose)
2005-12-05 R<>mi Turboult <r3mi@users.sourceforge.net> 2005-12-05 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/inc/upnp.h: re-declare obsolete method UpnpSetContentLength, * upnp/inc/upnp.h: re-declare obsolete method UpnpSetContentLength,
for binary compatibility with previous libupnp version. for binary compatibility with previous libupnp version.
* upnp/src/api/upnpapi.c: correct type of g_maxContentLength to size_t * upnp/src/api/upnpapi.c: correct type of g_maxContentLength to size_t
2005-11-01 R<>mi Turboult <r3mi@users.sourceforge.net> 2005-11-01 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* autoconfiscate library : replace all makefiles by Makefile.am * autoconfiscate library : replace all makefiles by Makefile.am
for automake support, + preliminary autoconf support for automake support, + preliminary autoconf support
(generated config.h not yet used in source files) (generated config.h not yet used in source files)
2005-10-18 R<>mi Turboult <r3mi@users.sourceforge.net> 2005-10-18 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/src/makefile: fix location of DEBUG STATIC libupnp library * upnp/src/makefile: fix location of DEBUG STATIC libupnp library
* upnp/sample/tvctrlpt/linux/Makefile, * upnp/sample/tvctrlpt/linux/Makefile,
upnp/sample/tvdevice/linux/Makefile: fix STATIC library support upnp/sample/tvdevice/linux/Makefile: fix STATIC library support
2005-10-16 R<>mi Turboult <r3mi@users.sourceforge.net> 2005-10-16 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* threadutil/src/Makefile (clean): remove built library * threadutil/src/Makefile (clean): remove built library
2005-08-28 R<>mi Turboult <r3mi@users.sourceforge.net> 2005-08-28 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* ixml/src/ixml.h, ixml/src/ixml.c (ixmlRelaxParser) : new function * ixml/src/ixml.h, ixml/src/ixml.c (ixmlRelaxParser) : new function
* ixml/src/ixmlparser.h, ixml/src/ixmlparser.c (Parser_setErrorChar) : * ixml/src/ixmlparser.h, ixml/src/ixmlparser.c (Parser_setErrorChar) :
new function new function
2005-08-02 R<>mi Turboult <r3mi@users.sourceforge.net> 2005-08-02 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* ixml/src/Makefile: correct bug for static library being incorrectly * ixml/src/Makefile: correct bug for static library being incorrectly
stripped when building non-debug stripped when building non-debug
2005-06-09 R<>mi Turboult <r3mi@users.sourceforge.net> 2005-06-09 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* ixml/src/element.c (ixmlElement_removeAttributeNode): * ixml/src/element.c (ixmlElement_removeAttributeNode):
remove some compilation warning remove some compilation warning
@@ -268,7 +268,7 @@ FORK FROM DEAD libupnp
* upnp/inc/upnptools.h, upnp/src/api/upnptools.c : * upnp/inc/upnptools.h, upnp/src/api/upnptools.c :
add missing const's in public API add missing const's in public API
2005-05-28 R<>mi Turboult <r3mi@users.sourceforge.net> 2005-05-28 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/inc/config.h: suppress HTTP_READ_BYTES (unused) * upnp/inc/config.h: suppress HTTP_READ_BYTES (unused)
and replace by DEFAULT_SOAP_CONTENT_LENGTH (previously in upnpapi.h) and replace by DEFAULT_SOAP_CONTENT_LENGTH (previously in upnpapi.h)
@@ -289,7 +289,7 @@ FORK FROM DEAD libupnp
* upnp/src/genlib/net/http/httpreadwrite.c : corrected an incorrect * upnp/src/genlib/net/http/httpreadwrite.c : corrected an incorrect
sprintf format sprintf format
2005-05-27 R<>mi Turboult <r3mi@users.sourceforge.net> 2005-05-27 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/makefile, upnp/src/makefile, * upnp/makefile, upnp/src/makefile,
ixml/Makefile, ixml/src/Makefile, ixml/Makefile, ixml/src/Makefile,
@@ -297,7 +297,7 @@ FORK FROM DEAD libupnp
implement STATIC library support (from patch at implement STATIC library support (from patch at
http://sourceforge.net/tracker/?group_id=7189&atid=307189 ) http://sourceforge.net/tracker/?group_id=7189&atid=307189 )
2005-05-26 R<>mi Turboult <r3mi@users.sourceforge.net> 2005-05-26 R<>mi Turboult <r3mi(at)users.sourceforge.net>
* upnp/src/api/upnpapi.c, upnp/src/soap/soap_device.c, * upnp/src/api/upnpapi.c, upnp/src/soap/soap_device.c,
upnp/src/soap/makefile : upnp/src/soap/makefile :

View File

@@ -12,7 +12,14 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-debug --enable-samples
SUBDIRS = ixml threadutil upnp docs/dist SUBDIRS = ixml threadutil upnp docs/dist
EXTRA_DIST = libupnp.pc.in LICENSE THANKS libupnp.spec EXTRA_DIST = libupnp.pc.in LICENSE THANKS libupnp.spec \
build/libupnp.bpf \
build/libupnp.bpr \
build/libupnp.dsp \
build/libupnp.dsw \
build/inc/autoconfig.h \
build/inc/config.h \
build/inc/upnpconfig.h
# This variable must have 'exec' in its name, in order to be installed # This variable must have 'exec' in its name, in order to be installed

71
README
View File

@@ -1,4 +1,4 @@
Linux* SDK for UPnP* Devices (libupnp) Portable SDK for UPnP* Devices (libupnp)
Copyright (c) 2000-2003 Intel Corporation - All Rights Reserved. Copyright (c) 2000-2003 Intel Corporation - All Rights Reserved.
Copyright (c) 2005-2006 R<>mi Turboult <r3mi@users.sourceforge.net> Copyright (c) 2005-2006 R<>mi Turboult <r3mi@users.sourceforge.net>
@@ -22,8 +22,8 @@ sections:
1) Release Contents 1) Release Contents
------------------------------------------- -------------------------------------------
The Linux SDK for UPnP Devices is an SDK for development of UPnP device The Portable SDK for UPnP Devices is an SDK for development of UPnP device
and control point applications for Linux. It consists of the core UPnP and control point applications. It consists of the core UPnP
protocols along with a UPnP-specific eXtensible Markup Language (XML) parser protocols along with a UPnP-specific eXtensible Markup Language (XML) parser
supporting the Document Object Model (DOM) Level 2 API and an optional, supporting the Document Object Model (DOM) Level 2 API and an optional,
integrated mini web server for serving UPnP related documents. integrated mini web server for serving UPnP related documents.
@@ -32,7 +32,7 @@ integrated mini web server for serving UPnP related documents.
2) Package Contents 2) Package Contents
------------------------------------------- -------------------------------------------
The Linux SDK for UPnP Devices contains the following: The SDK for UPnP Devices contains the following:
README This file. Contains the installation and build instructions. README This file. Contains the installation and build instructions.
LICENSE The licensing terms the SDK is distributed under. LICENSE The licensing terms the SDK is distributed under.
@@ -55,11 +55,10 @@ upnp\sample A sample device and control point application, illustrating the
3) System Requirements 3) System Requirements
------------------------------------------- -------------------------------------------
The SDK for UPnP Devices is designed to compile and run under the The SDK for UPnP Devices is designed to compile and run under several
Linux operating system. It does, however, have dependencies on some operating systems. It does, however, have dependencies on some
packages that may not be installed by default. All packages that it packages that may not be installed by default. All packages that it
requires are listed below. The name of the package and where it can be requires are listed below.
found is dependent on the distribution of Linux being used.
libpthread The header and library are installed as part of the glibc-devel libpthread The header and library are installed as part of the glibc-devel
package (or equivalent). package (or equivalent).
@@ -83,7 +82,7 @@ ps2pdf The final step to making the PDF is converting the PostStript
into Portable Document Format. The ghostscript package provides into Portable Document Format. The ghostscript package provides
this tool. this tool.
For the UPnP library to function correctly, Linux networking must be configured For the UPnP library to function correctly, networking must be configured
properly for multicasting. To do this: properly for multicasting. To do this:
route add -net 239.0.0.0 netmask 255.0.0.0 eth0 route add -net 239.0.0.0 netmask 255.0.0.0 eth0
@@ -93,14 +92,6 @@ this addition, device advertisements and control point searches will not
function. function.
libupnp has been built and tested on the following configurations:
* MandrakeLinux 10.1 (kernel 2.6.8.1-12mdk, gcc 3.4.1, glibc-2.3.3)
* Ubuntu 5.10 "Breezy Badger" (Linux kernel 2.6.12-9-386, gcc 4.0.2 20050808
prerelease, libc6 2.3.5-1ubuntu12)
4) Build Instructions 4) Build Instructions
------------------------------------------- -------------------------------------------
@@ -169,7 +160,7 @@ To build without:
% make % make
The SDK for Linux also contains some additional helper APIs, declared in The SDK also contains some additional helper APIs, declared in
inc/tools/upnptools.h. If these additional tools are not required, they can inc/tools/upnptools.h. If these additional tools are not required, they can
be compiled out: be compiled out:
@@ -249,6 +240,45 @@ sub-directory. Example :
% ../../upnp_tv_device % ../../upnp_tv_device
SOLARIS BUILD
The building process for the Solaris operating system is similar to the one
described above. Only the call to ./configure has to be done using an
additional parameter:
./configure CFLAGS="-mcpu=<cputype> -mtune=<cputype> -DSPARC_SOLARIS"
where <cputype> has to be replaced by the appropriate CPU tuning flag (e.g.
"supersparc"). Afterwards
make
make install
can be called as described above.
WINDOWS BUILD
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
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)
For building a static library instead of a DLL and for using the static
pthreads-w32 library following switches need to be defined additionally:
UPNP_STATIC_LIB - for creating a statically linkable UPnP-library
PTW32_STATIC_LIB - for using the static pthreads32 library
5) Install/Uninstall Instructions 5) Install/Uninstall Instructions
------------------------------------------- -------------------------------------------
@@ -290,9 +320,8 @@ See NEWS file.
8) Support and Contact Information 8) Support and Contact Information
------------------------------------------- -------------------------------------------
Intel is not providing support for the Linux SDK for UPnP Devices. Two Intel is not providing support for the SDK for UPnP Devices. Mailing lists
mailing lists for the SDK are available on http://upnp.sourceforge.net/. and discussion boards can be found at http://www.libupnp.org/.
Questions and problems should be addressed on the appropriate mailing list.
If you find this SDK useful, please send an email to upnp@intel.com and let If you find this SDK useful, please send an email to upnp@intel.com and let
us know. us know.

2
THANKS
View File

@@ -6,6 +6,8 @@ suggesting various improvements or submitting actual code.
Here is a list of these people. Help us keep it complete and Here is a list of these people. Help us keep it complete and
exempt of errors. exempt of errors.
- Erwan Velu
- Paul Vixie
- Arno Willig - Arno Willig
- Eric Tanguy - Eric Tanguy
- Oskar Liljeblad - Oskar Liljeblad

View File

@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBUPNP_EXPORTS" /YX /FD /c # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBUPNP_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "E:\svnupnp\trunk\ixml\src\inc" /I "E:\svnupnp\trunk\ixml\inc" /I "E:\svnupnp\trunk\threadutil\inc" /I "E:\svnupnp\trunk\upnp\inc" /I "E:\svnupnp\trunk\upnp\src\inc" /I "E:\svnupnp\trunk\build\inc" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBUPNP_EXPORTS" /FR /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "..\pthreads\include" /I "..\ixml\src\inc" /I "..\ixml\inc" /I "..\threadutil\inc" /I "..\upnp\inc" /I "..\upnp\src\inc" /I ".\inc" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBUPNP_EXPORTS" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD BASE RSC /l 0x407 /d "NDEBUG"
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib E:\svnupnp\trunk\libupnp\build\bin\pthreadvc2.lib ws2_32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\pthreads\lib\pthreadvc2.lib ws2_32.lib /nologo /dll /machine:I386
!ELSEIF "$(CFG)" == "libupnp - Win32 Debug" !ELSEIF "$(CFG)" == "libupnp - Win32 Debug"
@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBUPNP_EXPORTS" /YX /FD /GZ /c # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBUPNP_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "E:\svnupnp\trunk\ixml\src\inc" /I "E:\svnupnp\trunk\ixml\inc" /I "E:\svnupnp\trunk\threadutil\inc" /I "E:\svnupnp\trunk\upnp\inc" /I "E:\svnupnp\trunk\upnp\src\inc" /I "E:\svnupnp\trunk\build\inc" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBUPNP_EXPORTS" /FR /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\pthreads\include" /I "..\ixml\src\inc" /I "..\ixml\inc" /I "..\threadutil\inc" /I "..\upnp\inc" /I "..\upnp\src\inc" /I "..\build\inc" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBUPNP_EXPORTS" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG" # ADD BASE RSC /l 0x407 /d "_DEBUG"
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib E:\svnupnp\trunk\libupnp\build\bin\pthreadvc2.lib ws2_32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\pthreads\lib\pthreadvc2.lib ws2_32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
!ENDIF !ENDIF

View File

@@ -38,6 +38,7 @@
#include <assert.h> #include <assert.h>
#ifdef WIN32 #ifdef WIN32
#ifndef UPNP_STATIC_LIB
#ifdef LIBUPNP_EXPORTS #ifdef LIBUPNP_EXPORTS
// set up declspec for dll export to make functions visible to library users // set up declspec for dll export to make functions visible to library users
#define EXPORT_SPEC __declspec(dllexport) #define EXPORT_SPEC __declspec(dllexport)
@@ -47,6 +48,9 @@
#else #else
#define EXPORT_SPEC #define EXPORT_SPEC
#endif #endif
#else
#define EXPORT_SPEC
#endif
typedef int BOOL; typedef int BOOL;

View File

@@ -527,6 +527,7 @@ extern "C" {
#define imillisleep(x) usleep(1000*x) #define imillisleep(x) usleep(1000*x)
#ifdef WIN32 #ifdef WIN32
#ifndef UPNP_STATIC_LIB
#ifdef LIBUPNP_EXPORTS #ifdef LIBUPNP_EXPORTS
// set up declspec for dll export to make functions visible to library users // set up declspec for dll export to make functions visible to library users
#define EXPORT_SPEC __declspec(dllexport) #define EXPORT_SPEC __declspec(dllexport)
@@ -536,6 +537,9 @@ extern "C" {
#else #else
#define EXPORT_SPEC #define EXPORT_SPEC
#endif #endif
#else
#define EXPORT_SPEC
#endif
//NK: Added for satisfying the gcc compiler //NK: Added for satisfying the gcc compiler

View File

@@ -289,7 +289,8 @@ SetRelTimeout( struct timespec *time,
* Parameters: * Parameters:
* ThreadPoolStats *stats must be valid non null stats structure * ThreadPoolStats *stats must be valid non null stats structure
*****************************************************************************/ *****************************************************************************/
STATSONLY( static void StatsInit( ThreadPoolStats * stats ) { #ifdef STATS
static void StatsInit( ThreadPoolStats * stats ) {
assert( stats != NULL ); stats->totalIdleTime = 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; //average wait in HQ assert( stats != NULL ); stats->totalIdleTime = 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; //average wait in HQ
stats->avgWaitMQ = 0; //average wait in MQ stats->avgWaitMQ = 0; //average wait in MQ
stats->avgWaitLQ = 0; stats->avgWaitLQ = 0;
@@ -297,7 +298,7 @@ STATSONLY( static void StatsInit( ThreadPoolStats * stats ) {
stats->idleThreads = 0; stats->idleThreads = 0;
stats->persistentThreads = 0; stats->persistentThreads = 0;
stats->maxThreads = 0; stats->totalThreads = 0;} stats->maxThreads = 0; stats->totalThreads = 0;}
) #endif
/**************************************************************************** /****************************************************************************
* Function: CalcWaitTime * Function: CalcWaitTime
@@ -313,7 +314,8 @@ STATSONLY( static void StatsInit( ThreadPoolStats * stats ) {
* ThreadPriority p * ThreadPriority p
* ThreadPoolJob *job * ThreadPoolJob *job
*****************************************************************************/ *****************************************************************************/
STATSONLY( static void CalcWaitTime( ThreadPool * tp, #ifdef STATS
static void CalcWaitTime( ThreadPool * tp,
ThreadPriority p, ThreadPriority p,
ThreadPoolJob * job ) { ThreadPoolJob * job ) {
struct timeb now; struct timeb now;
@@ -329,7 +331,7 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
assert( 0 );} assert( 0 );}
} }
) #endif
/**************************************************************************** /****************************************************************************
* Function: SetSeed * Function: SetSeed
@@ -380,6 +382,12 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
int retCode = 0; int retCode = 0;
int persistent = -1; int persistent = -1;
ThreadPool *tp = ( ThreadPool * ) arg; ThreadPool *tp = ( ThreadPool * ) arg;
//leuk_he allow static linking
#ifdef WIN32
#ifdef PTW32_STATIC_LIB
pthread_win32_thread_attach_np();
#endif
#endif
assert( tp != NULL ); assert( tp != NULL );
@@ -447,7 +455,12 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
tp->totalThreads--; tp->totalThreads--;
ithread_cond_broadcast( &tp->start_and_shutdown ); ithread_cond_broadcast( &tp->start_and_shutdown );
ithread_mutex_unlock( &tp->mutex ); ithread_mutex_unlock( &tp->mutex );
//leuk_he
#ifdef WIN32
#ifdef PTW32_STATIC_LIB
pthread_win32_thread_detach_np ();
#endif
#endif
return NULL; return NULL;
} }
@@ -476,6 +489,12 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
ithread_cond_broadcast( &tp->start_and_shutdown ); ithread_cond_broadcast( &tp->start_and_shutdown );
ithread_mutex_unlock( &tp->mutex ); ithread_mutex_unlock( &tp->mutex );
//leuk_he
#ifdef WIN32
#ifdef PTW32_STATIC_LIB
pthread_win32_thread_detach_np ();
#endif
#endif
return NULL; return NULL;
} else { } else {
@@ -703,6 +722,12 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
if( tp == NULL ) { if( tp == NULL ) {
return EINVAL; return EINVAL;
} }
//leuk_he
#ifdef WIN32
#ifdef PTW32_STATIC_LIB
pthread_win32_process_attach_np();
#endif
#endif
retCode += ithread_mutex_init( &tp->mutex, NULL ); retCode += ithread_mutex_init( &tp->mutex, NULL );
assert( retCode == 0 ); assert( retCode == 0 );
@@ -1461,7 +1486,8 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
return 0; return 0;
} }
STATSONLY( void ThreadPoolPrintStats( ThreadPoolStats * stats ) { #ifdef STATS
void ThreadPoolPrintStats( ThreadPoolStats * stats ) {
assert( stats != NULL ); if( stats == NULL ) { assert( stats != NULL ); if( stats == NULL ) {
return;} return;}
@@ -1471,13 +1497,13 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
printf( "ThreadPoolStats at Time: %ld\n", time( NULL ) ); printf( "ThreadPoolStats at Time: %ld\n", time( NULL ) );
#endif #endif
printf printf
( "Average Wait in High Priority Q in milliseconds: %lf\n", ( "Average Wait in High Priority Q in milliseconds: %f\n",
stats->avgWaitHQ ); stats->avgWaitHQ );
printf printf
( "Average Wait in Med Priority Q in milliseconds: %lf\n", ( "Average Wait in Med Priority Q in milliseconds: %f\n",
stats->avgWaitMQ ); stats->avgWaitMQ );
printf printf
( "Averate Wait in Low Priority Q in milliseconds: %lf\n", ( "Averate Wait in Low Priority Q in milliseconds: %f\n",
stats->avgWaitLQ ); stats->avgWaitLQ );
printf( "Max Threads Active: %d\n", stats->maxThreads ); printf( "Max Threads Active: %d\n", stats->maxThreads );
printf( "Current Worker Threads: %d\n", printf( "Current Worker Threads: %d\n",
@@ -1486,11 +1512,11 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
stats->persistentThreads ); stats->persistentThreads );
printf( "Current Idle Threads: %d\n", stats->idleThreads ); printf( "Current Idle Threads: %d\n", stats->idleThreads );
printf( "Total Threads : %d\n", stats->totalThreads ); printf( "Total Threads : %d\n", stats->totalThreads );
printf( "Total Time spent Working in seconds: %lf\n", printf( "Total Time spent Working in seconds: %f\n",
stats->totalWorkTime ); stats->totalWorkTime );
printf( "Total Time spent Idle in seconds : %lf\n", printf( "Total Time spent Idle in seconds : %f\n",
stats->totalIdleTime );} stats->totalIdleTime );}
) #endif
/**************************************************************************** /****************************************************************************
* Function: ThreadPoolGetStats * Function: ThreadPoolGetStats
@@ -1505,7 +1531,8 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
* Returns: * Returns:
* Always returns 0. * Always returns 0.
*****************************************************************************/ *****************************************************************************/
STATSONLY( int #ifdef STATS
int
ThreadPoolGetStats( ThreadPool * tp, ThreadPoolGetStats( ThreadPool * tp,
ThreadPoolStats * stats ) { ThreadPoolStats * stats ) {
@@ -1542,4 +1569,4 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff; break; default:
return 0;} return 0;}
) #endif

View File

@@ -150,7 +150,10 @@ EXTRA_DIST = LICENSE \
sample/tvdevice/web/tvcontrolSCPD.xml \ sample/tvdevice/web/tvcontrolSCPD.xml \
sample/tvdevice/web/tvdevicedesc.xml \ sample/tvdevice/web/tvdevicedesc.xml \
sample/tvdevice/web/tvdevicepres.html \ sample/tvdevice/web/tvdevicepres.html \
sample/tvdevice/web/tvpictureSCPD.xml sample/tvdevice/web/tvpictureSCPD.xml \
src/inc/inet_pton.h \
src/inet_pton.c \
src/win_dll.c

View File

@@ -47,6 +47,7 @@
#endif #endif
#ifdef WIN32 #ifdef WIN32
#ifndef UPNP_STATIC_LIB
#ifdef LIBUPNP_EXPORTS #ifdef LIBUPNP_EXPORTS
// set up declspec for dll export to make functions visible to library users // set up declspec for dll export to make functions visible to library users
#define EXPORT_SPEC __declspec(dllexport) #define EXPORT_SPEC __declspec(dllexport)
@@ -56,6 +57,9 @@
#else #else
#define EXPORT_SPEC #define EXPORT_SPEC
#endif #endif
#else
#define EXPORT_SPEC
#endif
#ifndef WIN32 #ifndef WIN32
#define UpnpCloseSocket close #define UpnpCloseSocket close

View File

@@ -415,6 +415,13 @@ UpnpFinish( )
// remove all virtual dirs // remove all virtual dirs
UpnpRemoveAllVirtualDirs( ); UpnpRemoveAllVirtualDirs( );
//leuk_he allow static linking:
#ifdef WIN32
#ifdef PTW32_STATIC_LIB
pthread_win32_thread_detach_np ();
#endif
#endif
UpnpSdkInit = 0; UpnpSdkInit = 0;

View File

@@ -348,14 +348,9 @@ UpnpMakeAction( const char *ActionName,
va_list ArgList; va_list ArgList;
IXML_Document *out = NULL; IXML_Document *out = NULL;
if( NumArg > 0 ) {
va_start( ArgList, Arg ); va_start( ArgList, Arg );
}
out = makeAction( 0, ActionName, ServType, NumArg, Arg, ArgList ); out = makeAction( 0, ActionName, ServType, NumArg, Arg, ArgList );
if( NumArg > 0 ) {
va_end( ArgList ); va_end( ArgList );
}
return out; return out;
} }
@@ -390,14 +385,9 @@ UpnpMakeActionResponse( const char *ActionName,
va_list ArgList; va_list ArgList;
IXML_Document *out = NULL; IXML_Document *out = NULL;
if( NumArg > 0 ) {
va_start( ArgList, Arg ); va_start( ArgList, Arg );
}
out = makeAction( 1, ActionName, ServType, NumArg, Arg, ArgList ); out = makeAction( 1, ActionName, ServType, NumArg, Arg, ArgList );
if( NumArg > 0 ) {
va_end( ArgList ); va_end( ArgList );
}
return out; return out;
} }

View File

@@ -41,6 +41,7 @@
#include "statcodes.h" #include "statcodes.h"
#include "httpparser.h" #include "httpparser.h"
#include "httpreadwrite.h" #include "httpreadwrite.h"
#include "ssdplib.h"
#include "unixutil.h" #include "unixutil.h"
@@ -755,8 +756,8 @@ genaInitNotifyExt( IN UpnpDevice_Handle device_handle,
} }
sprintf( headers, "CONTENT-TYPE: text/xml\r\nCONTENT-LENGTH: " sprintf( headers, "CONTENT-TYPE: text/xml\r\nCONTENT-LENGTH: "
"%d\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\n", "%ld\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\n",
strlen( propertySet ) + 1 ); (long) strlen( propertySet ) + 1 );
//schedule thread for initial notification //schedule thread for initial notification
@@ -892,8 +893,8 @@ genaNotifyAllExt( IN UpnpDevice_Handle device_handle,
//changed to add null terminator at end of content //changed to add null terminator at end of content
//content length = (length in bytes of property set) + null char //content length = (length in bytes of property set) + null char
sprintf( headers, "CONTENT-TYPE: text/xml\r\nCONTENT-LENGTH: " sprintf( headers, "CONTENT-TYPE: text/xml\r\nCONTENT-LENGTH: "
"%d\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\n", "%ld\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\n",
strlen( propertySet ) + 1 ); (long) strlen( propertySet ) + 1 );
HandleLock( ); HandleLock( );
@@ -1053,9 +1054,9 @@ genaNotifyAll( IN UpnpDevice_Handle device_handle,
} }
//changed to add null terminator at end of content //changed to add null terminator at end of content
//content length = (length in bytes of property set) + null char //content length = (length in bytes of property set) + null char
sprintf( headers, "CONTENT-TYPE: text/xml\r\nCONTENT-LENGTH: %d\r\nNT:" sprintf( headers, "CONTENT-TYPE: text/xml\r\nCONTENT-LENGTH: %ld\r\nNT:"
" upnp:event\r\nNTS: upnp:propchange\r\n", " upnp:event\r\nNTS: upnp:propchange\r\n",
strlen( propertySet ) + 1 ); (long) strlen( propertySet ) + 1 );
HandleLock( ); HandleLock( );
@@ -1166,7 +1167,7 @@ respond_ok( IN SOCKINFO * info,
response.size_inc = 30; response.size_inc = 30;
if( http_MakeMessage( &response, major, minor, if( http_MakeMessage( &response, major, minor,
"R" "D" "S" "N" "Xc" "ssc" "sc" "c", "R" "D" "S" "N" "Xc" "ssc" "sc" "c",
HTTP_OK, 0, HTTP_OK, 0, X_USER_AGENT,
"SID: ", sub->sid, timeout_str ) != 0 ) { "SID: ", sub->sid, timeout_str ) != 0 ) {
membuffer_destroy( &response ); membuffer_destroy( &response );
error_respond( info, HTTP_INTERNAL_SERVER_ERROR, request ); error_respond( info, HTTP_INTERNAL_SERVER_ERROR, request );

View File

@@ -870,7 +870,7 @@ match_int( INOUT scanner_t * scanner,
memptr token; memptr token;
token_type_t tok_type; token_type_t tok_type;
parse_status_t status; parse_status_t status;
int num; long num;
char *end_ptr; char *end_ptr;
size_t save_pos; size_t save_pos;
@@ -2391,7 +2391,7 @@ int
raw_to_int( IN memptr * raw_value, raw_to_int( IN memptr * raw_value,
IN int base ) IN int base )
{ {
int num; long num;
char *end_ptr; char *end_ptr;
if( raw_value->length == 0 ) { if( raw_value->length == 0 ) {

View File

@@ -53,6 +53,10 @@
#endif #endif
#include "unixutil.h" #include "unixutil.h"
#ifndef MSG_NOSIGNAL
#define MSG_NOSIGNAL 0
#endif
/************************************************************************ /************************************************************************
* Function : sock_init * Function : sock_init
* *
@@ -229,7 +233,7 @@ sock_read_write( IN SOCKINFO * info,
if( bRead ) { if( bRead ) {
// read data // read data
numBytes = recv( sockfd, buffer, bufsize,0); // MSG_NOSIGNAL is not a good idea in portable code, here SIGPIPE/SIGEPIPE has to be used instead numBytes = recv( sockfd, buffer, bufsize,MSG_NOSIGNAL);
} else { } else {
byte_left = bufsize; byte_left = bufsize;
bytes_sent = 0; bytes_sent = 0;
@@ -237,7 +241,7 @@ sock_read_write( IN SOCKINFO * info,
// write data // write data
num_written = num_written =
send( sockfd, buffer + bytes_sent, byte_left, send( sockfd, buffer + bytes_sent, byte_left,
MSG_DONTROUTE); // | MSG_NOSIGNAL is not a good idea in portable code, here SIGPIPE/SIGEPIPE has to be used instead MSG_DONTROUTE|MSG_NOSIGNAL);
if( num_written == -1 ) { if( num_written == -1 ) {
return num_written; return num_written;
} }