Commit Graph

112 Commits

Author SHA1 Message Date
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
3ec9b0c015 Ivan Romanov's system file inclusion patch for WIN32 (mingw).
(cherry picked from commit 1ee8cd9e1a)
2010-12-21 08:35:43 -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
3ad98ad746 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
(cherry picked from commit b2a88aa70b)
2010-12-19 19:10:44 -02:00
Marcelo Roberto Jimenez
b1ae4db35a 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-19 19:09:35 -02:00
Marcelo Roberto Jimenez
dd75baab6b White spaces.
(cherry picked from commit d6418b3e17)
2010-12-19 19:07:18 -02:00
Marcelo Roberto Jimenez
59c70e2a0e Doxygen.
(cherry picked from commit e8106e4f05)
2010-12-19 19:07:03 -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
c45640f619 upnp: fix for compiler warnings.
(cherry picked from commit 9b3a0999a9)
2010-11-18 15:12:18 -02:00
Marcelo Roberto Jimenez
ec0035ca83 upnp: fix for compiler warnings and incorrect API. 2010-11-18 15:12:18 -02:00
Marcelo Roberto Jimenez
bc8eebf6f8 Deal with -ansi in list.h. 2010-11-16 22:11:03 -02:00
Marcelo Roberto Jimenez
ab27615855 Removes C++ style comments. 2010-11-16 11:57:37 -02:00
Marcelo Roberto Jimenez
a15d46e142 Deal with "inline" when "-ansi" compiler option is active.
This mode can be recognized by the macro __STRICT_ANSI__.

From man gcc:

-ansi
 In C mode, this is equivalent to -std=c89. In C++ mode, it is equivalent to
-std=c++98.

 This turns off certain features of GCC that are incompatible with ISO C90
(when compiling C code), or of standard (when compiling code), such as the
asm and typeof keywords, and predefined macros such as unix and vax that
identify the type of system you are using. It also enables the undesirable
and rarely used ISO trigraph feature. For the C compiler, it disables
recognition of style // comments as well as the inline keyword.

 The alternate keywords _ _asm_ _, _ _extension_ _, _ _inline_ _ and
_ _typeof_ _ continue to work despite -ansi. You would not want to use them
in an ISO C program, of course, but it is useful to put them in header files
that might be included in compilations done with -ansi. Alternate predefined
macros such as _ _unix_ _ and _ _vax_ _ are also available, with or without
-ansi.

 The -ansi option does not cause non-ISO programs to be rejected gratuitously.
For that, -pedantic is required in addition to -ansi.

 The macro _ _STRICT_ANSI_ _ is predefined when the -ansi option is used.
Some header files may notice this macro and refrain from declaring certain
functions or defining certain macros that the ISO standard doesn't call for;
this is to avoid interfering with any programs that might use these names for
other things.

 Functions that would normally be built in but do not have semantics defined
by ISO C (such as alloca and ffs) are not built-in functions when -ansi is
used.
(cherry picked from commit da7f3bf1c1)
2010-11-16 03:15:42 -02:00
Marcelo Roberto Jimenez
dd2624ebfe Added the convenience function UpnpResolveURL2() to upnptools.c.
This function avoids some unecessary memory allocation.
The memory alloc'd by this function must be freed later by the caller.
(cherry picked from commit 8651174861)
2010-11-15 01:02:07 -02:00
Marcelo Roberto Jimenez
5c8d118899 Fixes for list.h and poison.h to be used in C++ code.
- Add list.h and poison.h to Makefile.am;
- list.h cannot use the C++ reserved keyword new;
- Cast void pointers to the proper type;
- Proper C++ pointer arithmetic on poison.h.
2010-11-15 00:07:14 -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
8418b06bf1 Fixed a typo in upnp/inc/ActionComplete.h. 2010-11-07 19:01:30 -02:00
Stefan Sommerfeld
7b212cadc8 Fix for size_t in template. 2010-11-07 19:01:30 -02:00
Stefan Sommerfeld
818d61abc7 Fixed some typos.
(cherry picked from commit 508b782c79)
2010-11-07 18:59:53 -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
127b123c2c Consistent usage of win32 INVALID_SOCKET and SOCKET_ERROR.
On win32 socket() returns INVALID_SOCKET, which is unsigned,
on error, not -1.

Also, most network functions return SOCKET_ERROR.

This patch tries to make the usage consistent.
(cherry picked from commit f384e54fc6)
2010-11-07 18:59:52 -02:00
Marcelo Roberto Jimenez
499753ba46 Remove the object from the list upon destruction. 2010-10-21 08:29:52 -02:00
Marcelo Roberto Jimenez
224c07de81 Copyright notice. 2010-10-21 08:29:52 -02:00
Marcelo Roberto Jimenez
45461f738d Template object for lists. 2010-10-21 00:27:57 -02:00
Marcelo Roberto Jimenez
d3a7912741 New function, sock_close().
(cherry picked from commit 8401a59ed5)
2010-10-15 12:43:17 -03:00
Marcelo Roberto Jimenez
b6ec42b439 Misplaced declaration of UpnpCloseSocket.
(cherry picked from commit 5b40cfa272)
2010-10-15 12:43:16 -03:00
Marcelo Roberto Jimenez
420c87761a Update build/inc/autoconfig.h and build/inc/upnpconfig.h at configure
time.
(cherry picked from commit a9b5081a08)
2010-10-04 10:53:33 -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
Marcelo Roberto Jimenez
fe778cfd00 Template object for SubscriptionRequest. 2010-09-12 00:28:35 -03:00
Marcelo Roberto Jimenez
c90d6492e8 Template object for StateVarRequest. 2010-09-12 00:28:35 -03:00
Marcelo Roberto Jimenez
942e0ec809 Template object for StateVarComplete. 2010-09-12 00:28:35 -03:00
Marcelo Roberto Jimenez
2616d4c76a Template object for FileInfo. 2010-09-12 00:28:35 -03:00
Marcelo Roberto Jimenez
86a7ec499a Template object for EventSubscribe. 2010-09-12 00:28:35 -03:00
Marcelo Roberto Jimenez
43621874e9 Template object for Event. 2010-09-12 00:28:35 -03:00
Marcelo Roberto Jimenez
9c7bdcffb4 Template object for Discovery. 2010-09-12 00:28:35 -03:00
Marcelo Roberto Jimenez
5e6b9c119a Template object for ActionRequest. 2010-09-12 00:28:35 -03:00
Marcelo Roberto Jimenez
c7475fab70 Template object for ActionComplete. 2010-09-12 00:28:35 -03:00
Marcelo Roberto Jimenez
cf79479b2b Introducing template object methods. 2010-09-12 00:28:22 -03:00
Marcelo Roberto Jimenez
81b28fbb90 Added UpnpString_cmp() and UpnpString_casecmp() methods to UpnpString.
UpnpString_set_String() and UpnpString_set_StringN now return error values.
String lenghts are size_t.
2010-09-11 17:53:49 -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
a627df4d10 SF Patch Tracker [ 2987390 ] upnp_debug vs. ixml_debug
Thanks for the load of updates, I'm still assimilating them ! Could I make
	a suggestion though? The addition of printNodes(IXML_Node) to upnpdebug a
	dds a new dependency on ixml.h for anything using upnpdebug.h. I'm making
	quite a bit of use of upnpdebug in porting things to version 1.8.0, and I'd
	prefer it if printNodes could be added to ixmldebug.h instead. I'm attach
	ing a patch, what do you think ?

	Nick



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@532 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-16 13:38: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
59ec1fd641 White spaces and code reorganization.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@528 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-31 17:47:55 +00:00
Marcelo Roberto Jimenez
cbbbb14e21 SF Patch Tracker [ 2969188 ] 1.8.0: patch for FreeBSD compilation
Submitted By: Nick Leverton (leveret)
	Fix the order of header inclusion for FreeBSD.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@504 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-20 22:09:23 +00:00