Commit Graph

63 Commits

Author SHA1 Message Date
Fabrice Fontaine
daec6a0321 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.
(cherry picked from commit 11f9a2bafe)
2011-03-15 18:19:59 -03:00
Marcelo Roberto Jimenez
e07ba67188 Remove unnecessary inclusion of param.h.
(cherry picked from commit 4b0c8d52b8)
2010-12-22 11:56:38 -02:00
Marcelo Roberto Jimenez
66bdf6effb Less include file mess and doxygenation. 2010-12-19 20:00:56 -02:00
Marcelo Roberto Jimenez
d6f1b5de59 Doxygenation of SSDP library. 2010-12-19 19:57:04 -02:00
Marcelo Roberto Jimenez
f260a0e9d6 Template object for ssdp_ResultData. 2010-11-22 10:22:06 -02:00
Marcelo Roberto Jimenez
9e7e7e3b89 Doxygen, reformating, compiler warnings. 2010-11-21 22:36:14 -02:00
Marcelo Roberto Jimenez
ec0035ca83 upnp: fix for compiler warnings and incorrect API. 2010-11-18 15:12:18 -02:00
Fabrice Fontaine
6c64b7eeb5 Support for "polling" select in sock_read_write.
Currently, in sock_read_write function, if the timeout is 0, pupnp
realizes a "blocking" select (with an infinite timeout). With this
patch, if timeout is set to 0, pupnp will realize a "polling" select
and returns immediately if it can not read or write on the socket. This
is very useful for GENA notifications when pupnp is trying to send
events to a disconnected Control Point. "Blocking" select can now be
done by putting a negative timeout value.
2010-11-11 21:24:49 -02:00
Stefan Sommerfeld
51bf17911a Fix for size_t related warnings.
(cherry picked from commit fcb5e7c438)
2010-11-07 18:59:52 -02:00
Marcelo Roberto Jimenez
b6ec42b439 Misplaced declaration of UpnpCloseSocket.
(cherry picked from commit 5b40cfa272)
2010-10-15 12:43:16 -03:00
Fabrice Fontaine
935f5af066 Broken IPv6.
IPv6 is currently broken in latest release of branch-1.6.x, so find
a patch attached that correct the issue (small fixes on define,
undef and retVal).
(cherry picked from commit 55d581481f)
2010-09-16 08:23:31 -03:00
Chandra Penke
7f1e164a5a SUMMARY: Minor change in comment for SetMaxContentLenght in upnp.h
This is a follow up from issue 6 in tracker id 3056713: calling UpnpSetMaxContentLength() by passing '0' disables the content length checking. This is useful for developing some prototype applications that deal with a lot of XML/SOAP data, and for debugging.

The corresponding c file change is already in the pupnp tree. Copy/pasting the relevant block of code here for clarity:

In upnp/src/genlib/net/http/httpreadwrite.c:

if (g_maxContentLength > 0 && parser->content_length > (unsigned int)g_maxContentLength) {
	*http_error_code = HTTP_REQ_ENTITY_TOO_LARGE;
	line = __LINE__;
	ret = UPNP_E_OUTOF_BOUNDS;
	goto ExitFunction;
}

This block of code checks only does the bounds check if g_maxContentLength > 0, and it's only place g_maxContentLength is checked.

Attached is a patch against the latest sources.
2010-09-10 00:41:17 -03:00
Chandra Penke
6b0d84fc95 Add support for conditionally enabling ipv6 2010-09-10 00:08:16 -03:00
Marcelo Roberto Jimenez
2150bdc5b6 Forward port of svn rev. 568:
The scope of the macro NUM_HANDLE is now restricted to upnpapi.c.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@570 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 21:34:17 +00:00
Marcelo Roberto Jimenez
b895fce678 Forward port of svn rev. 564:
* New internal buffer added to store global/ula IPV6 address.
* Macros to test whether an IPV6 address is global or ula.
* UpnpGetServerUlaGuaIp6Address(): added interface.
* IN6_IS_ADDR_GLOBAL, IN6_IS_ADDR_ULA: new macros.
* gIF_IPV6_ULA_GUA: new buffer.
* UpnpRegisterRootDevice3(): Change to the test of already registered
devices for IPV6.
* UpnpGetIfInfo(): gua/ula issues.

Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@565 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 20:51:29 +00:00
Marcelo Roberto Jimenez
71ec18a3a9 Remove ifdef's code from upnp.h.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@547 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-05-01 02:25:06 +00:00
Marcelo Roberto Jimenez
8f852b1ee9 Code base convergence.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@531 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-01 20:36:35 +00:00
Marcelo Roberto Jimenez
6b0272d66b SF Patch Tracker [ 2857611 ] Declare a few functions to have proper
(void) argument list.
	Submitted By: zephyrus ( zephyrus00jp )
	
	In a publicly installed headers, a few functions are declared without any
	arguments at all, a la "()".
	When I used gcc's -Wimplict and -Wstrict-prototypes to check for the
	mismatch of
	function prototype declarations and their usage in my own program,
	some headers from libupnp-1.6.6 produced warnings.

	They are not strictly bugs, but pretty much annoying. This is 2009, and
	almost all the important compilers
	understand ISO-C.

	So the offending functions are declared as "(void") to show that they have
	no arguments at all.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@493 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-15 15:33:40 +00:00
Marcelo Roberto Jimenez
b77fead68a SF Patch Tracker [ 2964685 ] patch for avoiding inet_ntoa (1.8.0)
Seems like SF's tracker won't let me add a patch to someone else's issue ?!
	This refers to https://sourceforge.net/support/tracker.php?aid=2724578
	
	The calls to inet_ntoa are in getlocalhostname(), which is called from
	UpnpInit when it is returning the bound IP address. 
	UpnpInit/getlocalhostname hasn't been updated to IPv6, I presume this is
	deliberate so that it doesn't start returning IPv6 addresses and
	overwriting the caller's IPv4-sized allocation.
	
	The attached patch just updates getlocalhostname to use inet_ntop instead
	of inet_ntoa, and also documents the fact that UpnpInit is IPv4 only whilst
	UpnpInnit2 is both IPv4 and IPv6.
	
	A fuller solution might be to change UpnpInit to use some variant on
	UpnpGetIfInfo. UpnpInit could still be left as IPv4 only if desired -
	perhaps UpnpGetIfInfo could take an option for the desired address family.
	getlocalhostname and its own copy of the interface scanning code would then
	be redundant. I don't have IPv6 capability here though so I'm reluctant to
	change the IPv6 code, as I have no way to test it.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@491 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-15 03:19:08 +00:00
Marcelo Roberto Jimenez
f00752efbd Doxygen and include file reorganization.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@430 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-09 23:19:00 +00:00
Marcelo Roberto Jimenez
aa63ef88f1 Removed all #include's from ixml.h.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@422 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-06 22:19:14 +00:00
Marcelo Roberto Jimenez
37ecd99305 Include file reorganization.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@419 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-06 21:32:51 +00:00
Marcelo Roberto Jimenez
9fc2c364fa Added EXPORT_SPEC to the new API functions, so that these functions get
exported on win32 DLLs. Also did some doxygenation.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@418 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-05 22:41:50 +00:00
Marcelo Roberto Jimenez
ef0835d038 Doxygen.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@407 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-04 03:48:50 +00:00
Marcelo Roberto Jimenez
c1ac15fccc Doxygen.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@401 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-02 22:42:33 +00:00
Marcelo Roberto Jimenez
1175a0cadb Doxygen.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@399 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-02 03:43:25 +00:00
Marcelo Roberto Jimenez
a8521c09cf More doxygen. Now some gena files are documented.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@394 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-26 02:19:24 +00:00
Marcelo Roberto Jimenez
494518b14b Doxygenation and improove debugging in gena.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@392 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-26 00:10:49 +00:00
Marcelo Roberto Jimenez
724700be0d Ported Peter Hartley's patch to compile with mingw.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@391 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-25 00:49:43 +00:00
Marcelo Roberto Jimenez
35db3e9bba Header file reordering and sanity. White space patch.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@384 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-23 21:55:04 +00:00
Marcelo Roberto Jimenez
9a98f25b95 Improoving IXML debugging.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@378 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-08 17:21:59 +00:00
Marcelo Roberto Jimenez
263e616403 Some white spaces, some doxygen, some code reorganizing.
We should try to return only at the end of the function so that
we can use "objects" reliably.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@375 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-06 19:29:24 +00:00
Marcelo Roberto Jimenez
e56a9d68a3 Removing the useless, unused and undocumented function UpnpFree().
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@371 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-05 23:26:37 +00:00
Marcelo Roberto Jimenez
9e54783740 More doxygen. It's a dirty job, but someone has to do it...
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@369 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-05 22:32:44 +00:00
Marcelo Roberto Jimenez
164dce7fc2 More doxygen.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@368 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-05 00:25:22 +00:00
Marcelo Roberto Jimenez
9326b73d06 Doxygenation.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@366 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-04 19:56:15 +00:00
Marcelo Roberto Jimenez
0fb20847a7 Proper name for a hidden data structure.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@365 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-04 01:52:55 +00:00
Marcelo Roberto Jimenez
6b7dc5d340 Coherent name for the EventSubscribe externally exposed data structure.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@364 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-04 01:36:07 +00:00
Marcelo Roberto Jimenez
a86a127f44 White spaces.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@363 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-04 00:57:07 +00:00
Marcelo Roberto Jimenez
7acfd52f6b Hiding UpnpVirtualDirCallbacks and struct virtual_Dir_List.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@362 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-04 00:33:50 +00:00
Marcelo Roberto Jimenez
be2fa49891 White spaces.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@361 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-03 21:49:43 +00:00
Marcelo Roberto Jimenez
d2c34a15de Upnp_Subscription_Request becomes UpnpSubscriptionRequest. One less externally visible data structure.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@360 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-03 21:19:08 +00:00
Marcelo Roberto Jimenez
98a45e17b5 struct Upnp_Event becomes UpnpEvent. One less externally visible data structure.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@359 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-03 15:35:14 +00:00
Marcelo Roberto Jimenez
2e4a96f034 Merged Charles Nepveu's IPv6 work. libupnp now is IPv6 enabled.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@358 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-02 17:04:22 +00:00
Marcelo Roberto Jimenez
7206e80127 Start of 1.8.x development. Sorry for the big commit, but in fact it should have been bigger.
The fact that we now have an active developer on branch ipv6 made me do this before I would like to.
The idea here is to hide libupnp internal data structures from the outside world so that
developers can be free to change them without breaking the interface. There is still some work to do
before a formal release, but the samples (device and control point) should be working.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@353 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-04-26 01:20:09 +00:00
Marcelo Roberto Jimenez
0b39b2ad6c * SF Bug Tracker [ 1902668 ] Cannot compile on MSVC
Submitted By Luke Kim - nereusuj
Version 1.6.5 cannot be compiled because of some changes in 1.6.3.
MSVC does not support stdint.h, gettimeofday(), sys/param.h, const int
variables in array size and Windows does not define _WINDOWS_ but define
_WINDOWS.
* MSVC does not understand "const int"'s as declarators of array
dimensions, we must use #define'd constants.
* Use WIN32 instead of _WINDOWS_ or _WINDOWS.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@331 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-03-09 01:16:58 +00:00
Marcelo Roberto Jimenez
156ee82358 Slightly improved error report by showing the sys_errlist string corresponding
to errno.
Also, got rid of two useless constants: UPNP_SOCKETERROR and
UPNP_INVALID_SOCKET. They both mean the same, that a network API function has
failed. -1 is the value to check, not an invented constant.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@319 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-02-06 18:32:09 +00:00
Marcelo Roberto Jimenez
5bc8cae4ea Reverting Peter Hartley's last patch.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@303 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-27 01:23:54 +00:00
Marcelo Roberto Jimenez
77f1cff5d5 Peter Hartley's patch for "extra-headers".
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@299 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-25 05:04:36 +00:00
Marcelo Roberto Jimenez
5756f589d7 SF Patches Tracker [ 1865812 ] typo in docs comment
Submitted By: Hartmut Holzgraefe - hholzgra
typo in docs comment ACCAPTED instead of ACCEPTED in
@name UPNP_E_UNSUBSCRIBE_UNACCAPTED [-302]
Also, the documentation file name was mispelled and was corrected in
the Makefile.am.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@287 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-07 12:02:33 +00:00