Commit Graph

208 Commits

Author SHA1 Message Date
Marcelo Roberto Jimenez
bc724a8073 Forward port of svn rev. 572:
* SOCKET ssdpSock6UlaGua: created variable for later use.

Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@573 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 21:43:54 +00:00
Marcelo Roberto Jimenez
7ff1d56906 Forward port of svn rev. 569:
* SSDP_IPV6_SITELOCAL: new macro.

Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@571 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 21:36:22 +00: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
5bb3621626 Forward port of svn rev. 566:
* InitHandleList() has never been implemented, I guess no one has ever
called it, so remove it.
* GetFreeHandle() and FreeHandle() are now static as they should.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@567 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 21:15:39 +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
bc551a1ab3 Forward port of svn rev. 562: English mispelling.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@563 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-19 13:56:00 +00:00
Marcelo Roberto Jimenez
a13d09176f Forward port of svn rev. 560: libUPnP does support IPV6 now.
Patch submitted by Ronan Menard.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@561 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-19 13:50:21 +00:00
Marcelo Roberto Jimenez
03c858af51 Backport of svn rev. 558: HTTP version equal to 1.0 should failed as required
by the UPnP certification tool.

Patch submitted by Ronan Menard.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@559 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-19 13:39:44 +00:00
Marcelo Roberto Jimenez
b2e38b2fca SF Bug Tracker [ 3022490 ] String declaration fix for patch applied in 3007407
Hello,

	When my patch for tracker ID 3007407 was accepted, the definition of the
	serviceList string was changed from

	#define SERVICELIST_STR "serviceList"

	to

	static const char *SERVICELIST_STR = "serviceList";

	During internal code review of the final patch, it was pointed out that 
	sizeof(SERVICELIST_STR) == 4 since SERVICELIST_STR is now declared as
	a pointer instead of an array.

	If you wish to use a variable instead of a define, I suggest the
	following instead:

	static const char SERVICELIST_STR[] = "serviceList";

	Thanks,
	Chuck Thomason



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@556 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-06-28 20:36:30 +00:00
Marcelo Roberto Jimenez
338b22b754 SF Bug Tracker [ 3007407 ] Service traversal issue in AdvertiseAndReply()
Submitted: Chuck Thomason ( cyt4 ) - 2010-05-26 15:07:39 UTC

	When the UPnP server is started, one alive message is broadcast for each
	service in each device. It appears that libupnp's implementation of the
	alive message generation does not correctly navigate the XML description
	document when locating the services. This can result in the wrong UDN
	being used in the alive message sent for a service.

	In my specific case (see attached XML), the root EchoSTB device contains
	no services, but its embedded MediaServer device contains 2 services.
	When the existing libupnp code traverses the EchoSTB device in the XML,
	it searches the global list of serviceLists within the document instead
	of searching for a serviceList that is its direct child node. The
	ContentDirectory and ConnectionManager services are then announced with
	the UDN of EchoSTB1 (the root device) instead of with the UDN of
	MediaServer, which is actually their parent device.

	I discovered this behavior using libupnp-1.6.6. I have generated a patch
	against branch-1.6.x that corrects the XML navigation such that all
	services are traversed from their parent device, which results in the
	correct UDN being sent in the alive message for each service. I built
	from branch-1.6.x without this patch, tested, and confirmed that the
	issue still exists as I observed it in libupnp-1.6.6. I then built
	from branch-1.6.x with this patch, tested, and confirmed that the
	issue was resolved.

	Thanks,
	Chuck Thomason



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@552 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-06-17 17:02:03 +00:00
Marcelo Roberto Jimenez
54727b2a9e Forward port of svn revision 548:
[svn] SF Bug Tracker [ 2995758 ] libupnp 1.6.6, wrong bind when reuseaddr is 1.
Submitted: viallard anthony ( homer242 )
When trying to use reuseaddr option in miniserver/miniserver.c, there
isn't a affectation of the port chosen (serverAddr.sin_port isn't
receive listen_port variable value).


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@549 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-05-07 11:20:00 +00:00
Marcelo Roberto Jimenez
99758f2dff Changelog update.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@545 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-25 14:57:48 +00:00
Marcelo Roberto Jimenez
3772ad4595 Define PROTOTYPES to be one by default in global.h. This affects the
RSA MD5 code.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@544 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-25 14:51:57 +00:00
Marcelo Roberto Jimenez
d33ad5c03e Separation of the ClientSubscription object.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@543 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-25 13:57:25 +00:00
Marcelo Roberto Jimenez
472cc5a993 Protect the object destructors agains null pointers on deletion, which
should be something valid.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@534 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-04-25 00:18:43 +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
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
3fb182aa95 * Added API to ithread, created the following functions:
- int ithread_initialize_library(void);
	- int ithread_cleanup_library(void);
	- int ithread_initialize_thread(void);
	- int ithread_cleanup_thread(void);
	* SF Bug Tracker [ 2876374 ] Access Violation when compiling with Visual Studio 2008
	Submitted: Stulle ( stulleamgym ) - 2009-10-10 19:05

	Hi,

	I am one of the devs of the MorphXT project and I use this lib in some
	other of my projects, too. When I tried to upgrade the lib earlier for one
	of my projects I had to realise that something did not work at first and
	while most of the things were reasonably ease to be fixed. Now, the last
	thing I encountered was not so easy to fix and I am uncertain if my fix is
	any good so I'll just post it here and wait for some comments.

	The problem was that I got an Access Violation when calling "UpnpInit". It
	would call "ithread_rwlock_init(&GlobalHndRWLock, NULL)" which eventually
	led to calling "pthread_cond_init" and I got the error notice at
	"EnterCriticalSection (&ptw32_cond_list_lock);". It appeared that
	"ptw32_cond_list_lock" was NULL. Now, I found two ways to fix this. Firstly
	moving the whole block after at least one of the "ThreadPoolInit" calls
	will fix the issue. Secondly, you could add:
	#ifdef WIN32
	#ifdef PTW32_STATIC_LIB
	// to get the following working we need this... is it a good patch or
	not... I do not know!
	pthread_win32_process_attach_np();
	#endif
	#endif
	right before "ithread_rwlock_init(&GlobalHndRWLock, NULL)".

	Just so you know, I am using libupnp 1.6.6 and libpthreads 2.8.0 and both
	are linked static into the binaries. I am currently using Visual Studio
	2008 for development with Windows being the target OS. Any comment at your
	end?

	Regards, Stulle



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@527 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-27 19:46:16 +00:00
Marcelo Roberto Jimenez
9c440e2cbf Forward port of svn revision 525:
SF Patch Tracker [ 2836704 ] Patch for Solaris10 compilation and usage.
	Submitted By: zephyrus ( zephyrus00jp )
	This second part covers the issue on linking with -lsocket -lnsl -lrt.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@526 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-27 14:55:57 +00:00
Marcelo Roberto Jimenez
35392132af Forward port of svn revision 520:
* SF Bug Tracker [ 2392166 ] ithread_detach not called for finished worker thread
	Submitted: Ulrik ( ulsv_enea ) - 2008-12-05 08:24

	Valgrind reports a memory leak due to that the function ithread_detach is
	not called for finished worker threads in ThreadPool.c.

	==21137== 2,176 bytes in 8 blocks are possibly lost in loss record 5 of 5
	==21137== at 0x4C20F3F: calloc (vg_replace_malloc.c:279)
	==21137== by 0x4010F58: _dl_allocate_tls (in /lib/ld-2.6.1.so)
	==21137== by 0x544BA92: pthread_create@@GLIBC_2.2.5 (in
	/lib/libpthread-2.6.1.so)
	==21137== by 0x5F94592: CreateWorker (ThreadPool.c:639)
	==21137== by 0x5F95079: ThreadPoolInit (ThreadPool.c:784)

	I'm using libupnp 1.6.6

	For more info on pthread_detach, see:
	http://gelorakan.wordpress.com/2007/11/26/pthead_create-valgrind-memory-lea
	k-solved/



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@521 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 23:10:44 +00:00
Marcelo Roberto Jimenez
5eccaf4b64 Forward port of svn revision 518:
* SF Bug Tracker [ 2392304 ] Memory leak in SSDP AdvertiseAndReply
	Submitted: Ulrik ( ulsv_enea ) - 2008-12-05 08:24

	Valgrind reports a memory leak function in AdvertiseAndReply
	(ssdp/ssdp_server.c) in libupnp 1.6.6

	There are continue statements in many places in AdvertiseAndReply. In some
	of those error handling cases the variable nodelist is not free'ed before
	continuing to the next iteration. The next iteration will take care of
	free'ing the nodelist from the previous iteration in most cases, but not
	when breaking out of the for loop after the last element.

	I belive this memory leak can be solved by makeing sure that the rows

	ixmlNodeList_free( nodeList );
	nodeList = NULL;

	are always executed, also in the beginning of the last iteration when we
	found out that there are not more elements.

	==29110== at 0x4C21C16: malloc (vg_replace_malloc.c:149)
	==29110== by 0x5D8DE0E: ixmlNodeList_addToNodeList (nodeList.c:106)
	==29110== by 0x5D8B7E2: ixmlNode_getElementsByTagNameRecursive
	(node.c:1438)
	==29110== by 0x5D8E587: ixmlElement_getElementsByTagName
	(element.c:491)
	==29110== by 0x5B6C0F1: AdvertiseAndReply (ssdp_server.c:201)
	==29110== by 0x5B7AB74: UpnpSendAdvertisement (upnpapi.c:1495)



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@519 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 21:32:44 +00:00
Marcelo Roberto Jimenez
bf169e434c libupnp and multi-flows scenario patch
Submited by Carlo Parata from STMicroelectronics.
Hi Roberto and Nektarios,
after an analysis of the problem of libupnp with a multi-flows scenario, I
noticed that the only cause of the freezed system is the ThreadPool
management. There are not mutex problems. In practise, if all threads in the
thread pool are busy executing jobs, a new worker thread should be created if
a job is scheduled (I inspired to tombupnp library). So I solved the problem
with a little patch in threadutil library that you can find attached in this
e-mail. I hope to have helped you.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@514 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 19:47:19 +00:00
Marcelo Roberto Jimenez
1e6c3331ed SF Patch Tracker [ 2964973 ] install: will not overwrite just-created
...blah... with...
	Submitted: Nick Leverton ( leveret ) - 2010-03-07 05:18

	Full error:
	/usr/bin/install: will not overwrite just-created
	`/tmp/buildd/libupnp-1.6.6/debian/tmp/usr/share/doc/libupnp3-dev/examples/s
	ample_util.c' with `common/sample_util.c'

	This seems to be from Automake 1.11 which doesn't like having duplicate
	files in a Makefile.am. Patch attached, kindly provided by Stefan Potyra
	for Debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=543068)

	This fix will be needed for both 1.6.x and 1.8.x branches.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@510 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 16:13:16 +00:00
Marcelo Roberto Jimenez
c7806de98c Changelog update.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@508 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 15:42:29 +00:00
Marcelo Roberto Jimenez
f6a30b842c Forward port of svn revision 505:
SF Patch Tracker [ 2836704 ] Patch for Solaris10 compilation and usage.
	Submitted By: zephyrus ( zephyrus00jp )



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@506 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-21 11:50:26 +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
Marcelo Roberto Jimenez
0c578f7962 Forward port of svn revision 502:
SF Patch Tracker [ 2836704 ] Search for nested serviceList (not
	stopping at the first lis
	Submitted By: zephyrus ( zephyrus00jp )
	
	Internet Gateway Device description contains nested serviceList (rootdevice
	-> servicelist, subdevice
	and subdevice has the lower-level serviceList, etc..)

	Unfrotunately, the sample code sample_util.c used by tv_device sample,
	etc.
	has a code that looks for only the first top-level serviceList.
	This results in the failure to read all the services of an IGD xml
	description.

	Attached patch modifies this behavior and looks for the service by
	visiting all the serviceList in xml document in turn.

	With the modified patch (ad additional modification), I could
	simulate an IGD device and created a modified control program for that.

	Patch against 1.6.6

	TIA.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@503 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-20 21:35:04 +00:00
Marcelo Roberto Jimenez
500eb1df8f Changelog date fix.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@501 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-20 21:30:29 +00:00
Marcelo Roberto Jimenez
8eac74ee50 SF Patch Tracker [ 2973319 ] Problem in commit 499
Submitted By: Nick Leverton (leveret)
	Afraid that this doesn't compile, it seems retval should be retVal in two
	places.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@500 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-20 21:27:51 +00:00
Marcelo Roberto Jimenez
b80e888ae2 Fix for the ithread_mutex_unlock() logic in UpnpInit().
Thanks for Nicholas Kraft.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@499 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-17 01:00:47 +00:00
Marcelo Roberto Jimenez
82a3114379 * SF Patch Tracker [ 2203721 ] timeb.h check obsolete
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@497 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-15 23:50:18 +00:00
Marcelo Roberto Jimenez
218d4bf5dd * SF Patch Tracker [ 2970872 ] Update ErrorMessages for latest return
code list
	Submitted By: Nick Leverton ( leveret )
	
	ErrorMessage[] in upnptools.c has got a bit out of sync, the attached
	patch (generated from grep 'define UPNP_E_') should bring it up to date.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@495 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-15 23:38:33 +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
aca89457ae SF Patch Tracker [ 2962606 ] Autorenewal errors: invalid SID,
too-short renewal interval
	Submitted By: Nick Leverton (leveret)
	
	Auto-renewals send an invalid SID due to a missing UpnpString_get_String
	call. They also send a renewal interval of 0 instead of copying it from
	the original subscription.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@492 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-15 03:30:11 +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
44cb915b1b SF Patch Tracker [ 2724578 ] patch for avoiding memory leaks when
add devices.

	each time a device been added, UpnpInit() is called, on exit, UpnpFinish()
	is called, but the memories allocated by ThreadPoolInit() may lost because
	there's no code to call ThreadPoolShutdown() to release the memories. And
	inet_ntoa() is not thread safe, so in my patch, I substitute inet_ntoa()
	with inet_ntop().



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@489 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-15 03:05:16 +00:00
Marcelo Roberto Jimenez
bb55b1ed9c * SF Patch Tracker [ 2964687 ] Add new string based accessors to upnp
object API

	As per email to pupnp-devel, this is the patch to add the _strget_
	accessors for string-like objects in the interface.
	
	Will add a further patch shortly to udpate the sample programs.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@488 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-15 01:48:24 +00:00
Marcelo Roberto Jimenez
5c61b05ee9 Changelog update.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@485 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-14 18:28:48 +00:00
Marcelo Roberto Jimenez
285f6a2a72 SF Patch Tracker [ 2546532 ] Missing carriage return between
SOAPACTION and User-Agent headers.

	There is something going wrong in soap_ctrlpt.c at line 931 (based on
	version 1.6.6 release).
	
	The http_Makemessage call looks as follows:
	
	if (http_MakeMessage(
	&request, 1, 1,
	"Q" "sbc" "N" "s" "s" "Ucc" "sss",
	SOAPMETHOD_POST, path.buf, path.length,
	"HOST: ", host.buf, host.length,
	content_length,
	ContentTypeHeader,
	"SOAPACTION:
	\"urn:schemas-upnp-org:control-1-0#QueryStateVariable\"",
	xml_start, var_name, xml_end ) != 0 ) {
	return UPNP_E_OUTOF_MEMORY;
	}
	
	This will result in the SOAPACTION header to be immediately followed by the
	User-Agent header, while a cr-lf should separate the two. I propose to fix
	this by changing the second "s" to "sc" to force the addition of a cr-lf
	after the SOAPACTION. This looks consistent to the other Makemessage calls.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@484 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-14 17:39:30 +00:00
Oxy
34b5a5ce90 wrong order in parameters corrected
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@482 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2009-03-06 09:38:24 +00:00
Marcelo Roberto Jimenez
8ab8265fd2 Added upnp/m4/libupnp.m4 to the distribution tarball.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@468 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-25 03:52:31 +00:00
Marcelo Roberto Jimenez
443cc8ea37 Changelog update of backported patch.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@467 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-25 03:43:23 +00:00
Marcelo Roberto Jimenez
cd6d5822fb Fixed a missing HandleUnlock() in upnp/src/gena/gena_device.c plus several
white space changes.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@464 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-25 03:27:42 +00:00
Marcelo Roberto Jimenez
c9484d4f20 Changelog fix for backported patch in svn 453.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@459 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-24 11:38:59 +00:00
Marcelo Roberto Jimenez
8180a54f41 SF Bug Tracker [ 2026431 ] pupnp does not build on GNU/KfreeBSD.
Submitted By: Nick Leverton - leveret
	Gnu/KFreeBSD is one of the Debian architectures, it includes a FreeBSD
	kernel with GNU userspace (glibc etc). The Gnu/KfreeBSD developers
	provided the attached patch to test the appropriate #define and allow pupnp
	to build in their environment, and asked me to forward it to you.

	Since the test is a simple check for defined(__GLIBC__), this would
	presumably also help with other ports of GNU libc to non-Linux kernels.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@457 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-24 11:29:47 +00:00
Marcelo Roberto Jimenez
7d1e026c0c Andre Sodermans (wienerschnitzel) patch for building libupnp under
windows systems with VC9. This one fixes a missing include.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@452 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-07-17 20:08:57 +00:00
Marcelo Roberto Jimenez
40b43458f1 Added an m4 macro to deal with finding libupnp in the users' configure script.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@445 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-30 05:53:55 +00:00
Marcelo Roberto Jimenez
3182593c01 Nicholas Kraft's patch to fix some IPv6 copy/paste issues. He
reported to be getting infinite loops with the svn code.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@444 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-27 11:38:03 +00:00
Marcelo Roberto Jimenez
46bc551a48 Undoing the patch that fixed this problem. In fact, there was no
problem and the patch was wrong.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@442 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-13 19:15:25 +00:00
Marcelo Roberto Jimenez
4578ff8452 Fixed a buffer overflow due to a bug in the calculation of the
CONTENT-TYPE header line size, the length was beeing calculated with
the wrong string, there was a missing colon.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@434 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-11 23:22:08 +00:00
Marcelo Roberto Jimenez
8e03b34739 Ingo Hofmann's patch for "Content-Type in Subscription responses".
Adds charset="utf-8" attribute to the CONTENT-TYPE header line.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@433 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-11 16:48:54 +00:00
Marcelo Roberto Jimenez
0ea80ee482 Fixed the ixml document tree printing routine to output the namespace tag.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@412 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-04 22:52:11 +00:00
Marcelo Roberto Jimenez
441cf2e471 Bob Ciora's patch for "UpnpCreatePropertySet can leak memory".
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@403 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-02 23:08:02 +00:00
Marcelo Roberto Jimenez
1401fce206 Charles Nepveu's suggestion of not allocating a thread for MiniServer when it is not compiled.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@398 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-06-01 04:42:52 +00:00
Marcelo Roberto Jimenez
b4b4ee982f Bob Ciora's patch for lazy UpnpAcceptSubscription().
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@395 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-27 00:24:12 +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
bad7c80e5e Changelog update.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@390 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-24 23:27:43 +00:00
Marcelo Roberto Jimenez
ddb2f2c478 Changelog update.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@389 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-05-24 23:27:10 +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
4f2075b7c9 Merge of revision 355 from branch-1.6.x into trunk.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@356 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-04-29 18:10:17 +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
5e742f04e3 Added thread id's to the UpnpPrintf debug messages.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@350 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-04-25 13:32:05 +00:00
Marcelo Roberto Jimenez
2c094ee8ea * SF Bug Tracker [ 1948586 ] Uppercase U in in "xmlns:U" in Invoke Action causes seg. f.
Submitted By: Thomas Norheim - kjakan_no
Device no longer segfaults with the following malformed xml action:
<u:SetColor xmlns:U="urn:schemas-upnp-org:service:tvpicture:1">
	<Color>2</Color>
</u:SetColor>



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@348 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-04-24 03:34:16 +00:00
Marcelo Roberto Jimenez
a4a7dda7ef Use -O0 in debug builds so that variables do not get optimized out.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@347 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-04-23 19:33:03 +00:00
Marcelo Roberto Jimenez
f18abdb52d Apostolos Syropoulos changes for OpenSolaris x86.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@341 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-04-10 17:36:21 +00:00
Marcelo Roberto Jimenez
0a173ca0c3 Andre Sodermans (wienerschnitzel) patch for building libupnp under
windows systems with VC9.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@335 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-03-22 17:10:29 +00:00
Marcelo Roberto Jimenez
e599661068 Andre Sodermans (wienerschnitzel) patch for building libupnp under
windows systems.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@333 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-03-20 23:34:45 +00:00
Marcelo Roberto Jimenez
3846fcc9ba Fixed a printf format problem on the upnp_tv_device.c from both
upnp/sample/tvdevie and upnp/sample/tvcombo directories. The variable
port was a short int instead of an unsigned short and it was beeing
print as a negative value.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@332 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-03-09 02:10:18 +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
04f80795c2 No longer ignore "upnp:rootdevice" advertisement. Thanks to Bob Ciora.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@326 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-02-22 04:16:11 +00:00
Marcelo Roberto Jimenez
6223b7521f Changed "sys_errlist[errno]", which is deprecated, by "strerror_r()",
which is thread safe.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@323 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-02-10 02:15:09 +00:00
Marcelo Roberto Jimenez
04b2ccca92 Changelog update.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@321 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-02-08 02:27:48 +00:00
Marcelo Roberto Jimenez
59784a134c Homekeeping for the next release.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@316 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-02-03 02:38:11 +00:00
Marcelo Roberto Jimenez
d2d2081230 Peter Hartley's fix for wrong sized variable beeing passed to
http_MakeMessage() on 64 bit architectures.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@309 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-02-02 23:31:34 +00:00
Marcelo Roberto Jimenez
37558fb793 Homekeeping for the next release.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@308 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-27 02:35:53 +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
332064ce09 Workaround for a problem with the new automake AM_CONDITIONAL macro
from autotools-1.10. Thanks to Ingo Hofmann for helping with debugging
this one.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@297 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-23 11:59:30 +00:00
Marcelo Roberto Jimenez
93d2b99446 White spaces.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@296 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-22 13:18:11 +00:00
Marcelo Roberto Jimenez
bcfedbc45e Added quoting to macros AC_CONFIG_AUX_DIR, AC_CONFIG_MACRO_DIR and
AC_CONFIG_SRCDIR in configure.ac. Also changed the name of the
auxiliary directory in AC_CONFIG_AUX_DIR to build-aux.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@295 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-22 13:16:38 +00:00
Marcelo Roberto Jimenez
757caf9284 Fix for setsockopt() in Threadpool.c to allow more than one process
to join the multicast-group on OSX. Thanks to Ingo Hofmann.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@292 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-22 10:39:59 +00:00
Marcelo Roberto Jimenez
3b38c5fe68 Using defined(__OSX__) || defined(__APPLE__) instead of just
defined(__OSX__) in the code. Thanks to Ingo Hofmann and Chris
Pickel.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@291 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-22 10:36:07 +00:00
Marcelo Roberto Jimenez
1ab5221db5 Fix for isFileInVirtualDir. Thanks to Peter Hartley for the patch.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@290 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-21 23:35:08 +00:00
Marcelo Roberto Jimenez
f94b090c80 Putting back a "defined(__OSX__)" that has been removed in the
previous *BSD patch. Thanks to Chris Pickel for pointing it out.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@289 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2008-01-13 05:33:35 +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
Marcelo Roberto Jimenez
ad479caddf Homekeeping for the next release.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@286 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-27 02:20:24 +00:00
Marcelo Roberto Jimenez
16c883932a Using pthread flags for the whole project, not just at the places
individually indicated by several Makefile.am files spread all over
the directories. That was too much error prone.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@282 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-25 18:29:52 +00:00
Marcelo Roberto Jimenez
4a6014c6f6 Proper thanks and some nicks.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@277 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-24 21:21:48 +00:00
Marcelo Roberto Jimenez
b66f2646c3 Added a configure test to check if pthread_rwlock_t is available.
Define _GNU_SOURCE if needed. The fallback behaviou will only be
implemented if _GNU_SOURCE prooves to be insufficient on some
platforms.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@274 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-24 03:39:50 +00:00
Marcelo Roberto Jimenez
34e18c2444 Removed unused iasnprintf.{c,h} files.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@273 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-17 11:05:22 +00:00
Marcelo Roberto Jimenez
e156038d5c Removed STATSONLY() macro from ThreadPool.{c,h}.
Removed time() usage from ThreadPool.c.
Fixed STATS = 0 compilation.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@271 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-17 10:39:57 +00:00
Marcelo Roberto Jimenez
9bfac585af Library was not compiling on FreeBSD 7. Code now no longer uses
ftime(), using gettimeofday() instead. Thanks to Josh Carroll.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@270 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-17 01:15:53 +00:00
Marcelo Roberto Jimenez
66ed0d8f69 Homekeeping for the next release.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@267 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-11 09:26:19 +00:00
Marcelo Roberto Jimenez
c2f8e8789a Fixed a compilation error due to a missing #ifdef in
upnp/src/genlib/miniserver/miniserver.c. Thanks to Eugene Christensen.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@258 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-12-10 22:12:54 +00:00
Marcelo Roberto Jimenez
9f5d49f9fd Fixed a memory leak in upnpapi.c to delete gMiniServerThreadPool in
the call to UpnpFinish(). Thanks to Fabrice Fontaine.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@256 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-27 05:02:50 +00:00
Marcelo Roberto Jimenez
d2eaa23b59 Changelog fix to document the unreleased 1.4.7.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@253 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-19 14:39:21 +00:00
Marcelo Roberto Jimenez
f42bbb6dc2 "make check" was failing because ixml/test/test_document.sh did not
have the executable flag set. Thanks to Steve Bresson.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@245 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-12 03:27:58 +00:00
Marcelo Roberto Jimenez
bd6027c3d1 Changelog update.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@244 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-09 13:17:30 +00:00
Marcelo Roberto Jimenez
0103424b91 Homekeeping for the next release.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@239 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-08 02:25:38 +00:00
Marcelo Roberto Jimenez
13a1fff7a1 SF Bug Tracker [ 1825278 ] AdvertiseAndReply sleeps with handle lock out
Applied patch from Alex (afaucher) to change some write locks to read
locks.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@237 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-08 01:54:50 +00:00