Commit Graph

264 Commits

Author SHA1 Message Date
Marcelo Roberto Jimenez
947599710d Issue regarding the GENA notifications. A string termination indicator was added
at the end of the notification ("\r\n") in notify_send_and_recv() in
upnp/src/gena/gena_device.c.

Patch by Fabrice Fontaine.
(cherry picked from commit ebc941f265)
2010-09-07 11:45:59 -03:00
Marcelo Roberto Jimenez
a15e0c99d7 * upnp/src/api/Discovery.c: Fix a serious bug and memory leak in
UpnpDiscovery_strcpy_DeviceType(). Thanks to David Blanchet for the
patch.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@584 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-22 11:32:09 +00:00
Marcelo Roberto Jimenez
36d6a34f5d Forward port of svn rev. 580:
The last part of Ronan Menard's patch.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@582 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-22 02:11:44 +00:00
Marcelo Roberto Jimenez
9763158d69 Forward port of svn rev. 578:
* upnp/src/ssdp/ssdp_device.c: Fix for IPV6 ULA/GUA issues.
* upnp/src/ssdp/ssdp_ctrlpt.c: Fix for IPV6 ULA/GUA issues.
* upnp/src/ssdp/ssdp_server.c: Fix for IPV6 ULA/GUA issues.

Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@579 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-22 01:44:25 +00:00
Marcelo Roberto Jimenez
2963919081 Forward port of svn rev. 576:
* upnp/src/genlib/miniserver/miniserver.c: Fix for IPV6 ULA/GUA issues.

Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@577 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 22:16:24 +00:00
Marcelo Roberto Jimenez
9f7936781e Forward port of svn rev. 574:
* gena_subscribe(): Fix for IPV6 ULA/GUA issues.

Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@575 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-08-21 21:57:40 +00:00
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
Marcelo Roberto Jimenez
c9463545a8 Small fix for changelog.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@235 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-06 02:43:44 +00:00
Marcelo Roberto Jimenez
de1d7e81a3 Adjusting libtool library numbers to reflect the last changes.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@234 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-06 02:41:34 +00:00
Marcelo Roberto Jimenez
f87dbf8115 GlobalHndMutex, which was a mutex is now GlobalHndRWLock, which is a
rwlock. HandleLock() is mapped to HandleWriteLock() while all other
instances have not been checked. One instance in AdvertiseAndReply()
has been changed to HandleReadLock(). Thanks to Alex (afaucher) for the 
bug report and suggestions.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@233 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-06 02:29:03 +00:00
Marcelo Roberto Jimenez
83ee32afb7 Added support for rwlocks.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@232 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-06 02:04:38 +00:00
Marcelo Roberto Jimenez
5b744169d5 SF Bug Tracker [ 1825929 ] woker thread still alive after UpnpFinish()
Submitted By: Luke Kim - nereusuj
	Worker thread still alive after calling UpnpFinish() because
	ThreadPoolShutdown() is in the #ifdef DEBUG block.
	421
	422 #ifdef DEBUG
	423 ThreadPoolShutdown( &gSendThreadPool );
	424 ThreadPoolShutdown( &gRecvThreadPool );



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@228 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-11-05 13:07:54 +00:00
Marcelo Roberto Jimenez
6455ac6eea Changed the calls to virtualDirCallback.open(filename, UPNP_WRITE)
to (virtualDirCallback.open)(filename, UPNP_WRITE) (notice the
parenthesis) due to a change in glibc that produces compilation
errors.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@223 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-09-01 16:58:58 +00:00
Marcelo Roberto Jimenez
0728ab3b25 Initialization of the "randomness" struct so that valgrind does not complain.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@221 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-08-28 14:37:41 +00:00
Marcelo Roberto Jimenez
b2757d9d55 Changelog fix.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@215 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-08-06 05:12:17 +00:00
Marcelo Roberto Jimenez
7967a0cd45 Merge of patch submitted By Keith Brindley - brindlk
SF Bug Tracker [ 1762758 ] Seek not working for large files.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@214 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-08-06 05:11:07 +00:00
Marcelo Roberto Jimenez
67b51187b9 Merge of Mac OS X patch from Stéphane Corthésy (davelopper),
SF Bug Tracker [ 1686420 ] Modifications for MacOSX.
Some of the proposed changes were already done by Rene Hexel's patch.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@213 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-08-06 02:07:41 +00:00
Marcelo Roberto Jimenez
c856356414 Changelog of the last commit.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@208 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-06-10 03:54:47 +00:00
Marcelo Roberto Jimenez
5151d45203 * [pupnp-devel] NetBSD & Mac OS X packages and patches.
Rene Hexel's <rh@netbsd.org> patch to compile in NetBSD and Mac OS X.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@205 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-06-09 13:40:22 +00:00
Marcelo Roberto Jimenez
114389589d * Updated the macro files acx_pthread.m4, ax_cflags_gcc_option.m4,
ax_cflags_warn_all.m4, m4/ax_cflags_warn_all_ansi.m4,
m4/type_socklen_t.m4.
* Fixed an issue with the instalation of the file upnpdebug.h. Since
the last modifications that removed the macro DEBUV_ONLY, this file
must be installed even on a non-debug build.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@204 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-26 15:44:52 +00:00
Marcelo Roberto Jimenez
b817ec5152 * SF Bug Tracker [ 1711325 ] Bad DestAddr in Upnp_Discovery structure
Submitted By: Bob Ciora
The field DestAddr of the structure Upnp_Discovery is now a full
SOCKADDRIN instead of a pointer to SOCKADDRIN. Commented code sugests
that in a previous moment, the function ssdp_handle_ctrlpt_msg() did
not use a postponed thread to call ctrlpt_callback(). Now the code
uses a thread, and most probably the original data would get lost and
the pointer would point to an invalid memory region. This fix caused
an interface change in the library and the minor library version was
bumped. Also, the libtool library numbers were changed accordingly.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@203 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-26 05:54:23 +00:00
Marcelo Roberto Jimenez
d9de9a486c * Added support for the Basic Device
(http://www.upnp.org/standardizeddcps/basic.asp) as suggested by Titus Winters.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@202 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-26 03:56:25 +00:00
Marcelo Roberto Jimenez
13ebb40e08 Fixed the file libupnp.pc.in to generate a correct path for the
include files.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@201 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-26 01:58:13 +00:00
Marcelo Roberto Jimenez
9bc187d4c6 * Removing the Dbg_Level, InitLog, SetLogFileNames and CloseLog
defines. These were just aliases, no reason to keep them.
* Changed the comments of the include files that expose the UPnP API
to use only C89 comments and no C99 comments.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@198 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-25 15:02:12 +00:00
Nektarios K. Papadopoulos
80517f26a6 * Add ChangLog entry for the tvcombo sample
* Fix a missing -I flag for tvcombo
* Chnage uuid of tvcombo device description to avoid conflicts with tvdevice
sample.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@197 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-24 11:20:01 +00:00
Nektarios K. Papadopoulos
d71db4c57c Add ChangeLog entry for the SF Tracker [ 1570020 ] fix.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@195 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-24 10:19:33 +00:00
Nektarios K. Papadopoulos
8f7fd0fc6d * Modified tvdevice (control and picture) service descriptions to make
compatible with WinXP/IE control point. 'in' arguments must appear before
'out' arguments in argument list.
Thanks to Martin Tremblay for pointing out the solution originally
provided by MORIOKA Yasuhiro.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@193 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-24 08:10:28 +00:00
Marcelo Roberto Jimenez
81635d74c1 * More MSVC fixes, using XINLINE instead of inline, MSVC has troubles
with inline. Thanks to David Maass for reporting.
* Changed XINLINE to UPNP_INLINE.
* Lots of white space changes.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@192 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-23 13:20:55 +00:00
Marcelo Roberto Jimenez
907eb0636a Added the file build/inc/msvc/inttypes.h. This file is for use with
MSVC only, because it does not provide C99 compatibility.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@189 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-21 22:18:28 +00:00
Marcelo Roberto Jimenez
83fb96fbe2 Removed all uses of the DEVICEONLY(x) macro.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@187 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-19 02:10:02 +00:00
Marcelo Roberto Jimenez
2c1dba2942 - Fixed a bug in UpnpPrintf, function could call va_start() and return
befor calling va_end().

- Removed all uses of the DBGONLY(x) macro. A static inline empty
function now is used and the compiler takes care of optimizing it out.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@185 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-18 13:31:21 +00:00
Marcelo Roberto Jimenez
4ceb6c67d1 * EXPORT_SPEC missing on some declarations in ixml/inc/ixml.h.
Thanks to David Maass.

* sizeof is unsigned, so %zu is more adequate than %zd.

* Using an invented printf directive PRIzu that on MSVC
expands to "lu", and on normal C99 compilers expands to "zu".

* Rewrote raw_find_str. Now it no longer uses strcasestr(), but it
transforms the first input buffer into lowercase.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@184 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-16 02:02:16 +00:00
Marcelo Roberto Jimenez
3fa207984a Moved upnp_tv_ctrlpt and upnp_tv_device executables from folder
upnp to folder upnp/sample. Moved folder upnp/sample/tvdevice/web
to folder upnp/sample/web. This way, if someone compiles the
tarball and executes upnp_tv_device from its creation directory,
there will be no error -108 for not finding directory web.

Also changed svnignore in the process.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@183 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-11 05:00:43 +00:00
Marcelo Roberto Jimenez
b82c9c6009 Added inttypes.h as a header requirement in configure.ac.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@182 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-05-08 23:45:21 +00:00
Marcelo Roberto Jimenez
dee3e96a63 Bumping library version.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@177 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-04-30 14:43:26 +00:00
Marcelo Roberto Jimenez
23e8160417 Changelog of last modification.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@172 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-04-30 12:41:45 +00:00
Marcelo Roberto Jimenez
fb4e7f659d Bumping library version.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@170 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-04-28 19:41:42 +00:00
Marcelo Roberto Jimenez
28799f26c9 [pupnp-devel] Type mixup on x86_64 causes UPNP_E_OUTOF_MEMORY
Submitted By: Glen Masgai
after an UpnpSendActionAsync() for example, i get UPNP_E_OUTOF_MEMORY
in the callback using 1.4.4 on a x86_64 system. This happens in
http_MakeMessage(), which in some cases get called with wrong types
(int instead of size_t) in combination with format "b" and "Q".
The attached patch should fix this.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@166 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-04-28 18:42:14 +00:00
Marcelo Roberto Jimenez
c1e5e4d6a4 SF Tracker [ 1703533 ] Patch to make it compile under FreeBSD
Submitted By: Timothy Redaelli - drittz
I made some patches to make it compile under FreeBSD using
gethostbyaddr_r when supported.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@165 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-04-28 17:45:34 +00:00
Marcelo Roberto Jimenez
e04192e1d0 Removing extra semicolon and Changelog.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@162 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-04-26 11:14:27 +00:00
Marcelo Roberto Jimenez
5c0893928c Bumping library version for next release.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@159 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-04-19 13:07:18 +00:00
Marcelo Roberto Jimenez
948c959be5 Case insensitive comparison in raw_find_str() (httpparser.c) as
suggested by Craig Nelson in SF Tracker [ 1689382 ] DLINK DIR-625 patch.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@158 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-04-19 13:05:33 +00:00
Marcelo Roberto Jimenez
286a45d4ad * SF Tracker [ 1652827 ] UpnpRegisterRootDevice returned -104
Submitted By: Michael Andersen - miwer

	Issue was found to be related to sizeof (size_t) != sizeof (int)
	on AMD64 systems. Emil Ljungdahl's AMD64 patch has been applied along
	with some other fixes. Original user report follows:

	When I run upnpd I get the above mentioned error (UPNP_E_OUTOF_MEMORY).
	I've tried with 1.4.1 and 1.4.2-RC3, it's the same. I don't understand why,
	because I have plenty of RAM, and I even tried closing some applications,
	but it didn't help.

	$ upnpd eth1 br0

	The following is logged in the /var/log/messages:
	Feb 6 01:33:47 server upnpd[6933]: Error registering the root device with
	descDocUrl: http://192.168.0.1:49152/gatedesc.xml
	Feb 6 01:33:47 server upnpd[6933]: UpnpRegisterRootDevice returned -104


	I tried enabling debugging and it looks like it cannot allocate memory
	through the membuffer_append function. It's wierd because it's only a few
	bytes.

	Please note, that I enabled some extra debugging lines that were commented,
	in order to get more information. See attached files.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@154 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-04-17 03:55:20 +00:00
Marcelo Roberto Jimenez
59e0e015be SF Tracker [ 1695399 ] Typo in util.h
Submitted By: Luke Kim - nereusuj
Unix sleep is in seconds but WIN32 Sleep is in milliseconds.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@153 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-04-06 11:22:49 +00:00
Marcelo Roberto Jimenez
41cb45146c SF Tracker [ 1663004 ] Compile on Cygwin
Submitted By: Jon Foster - jongfoster
	This patch gives basic support for building under Cygwin - it compiles,
	links, and a simple UPnP device application can initialise. I'm not sure
	if it actually works yet, but this is definitely a step in the right
	direction.
	
	Patch is against the 1.4.1 release. Changes are:
	
	* threadutil/inc/ithread.h: Fix the ithread mutex support to use
	documented, portable APIs (if present) rather than the Non-Portable (_NP)
	ones it uses now. This is required because Cygwin implements only the
	portable API.
	
	* threadutil/src/ThreadPool.c: Fake SetPolicyType() to do nothing on Cygwin
	because otherwise it fails. Should probably investigate why it fails and
	add a proper implementation later.
	
	* upnp/src/api/upnpapi.c: On Cygwin, zero out the GlobalHndMutex structure
	before initialising it. Without this, the initialisation fails. This
	appears to be a bug in Cygwin.
	
	* upnp/src/genlib/net/uri/uri.c: Use gethostbyname() on Cygwin.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@151 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-03-13 03:27:10 +00:00
Marcelo Roberto Jimenez
2c2a5f7c18 Version number.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@147 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-03-06 10:30:31 +00:00
Oxy
047b9534bb git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@143 119443c7-1b9e-41f8-b6fc-b9c35fce742c 2007-03-05 13:19:05 +00:00
Marcelo Roberto Jimenez
88076a3c4b Fixed nasty segmentation fault bug on membuffer.c.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@142 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-03-03 15:01:59 +00:00
Marcelo Roberto Jimenez
08834bf0f0 32/64 bits portability issues on *printf.
Use %zd for size_t, and cast to (long long) for off_t.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@129 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-02-09 19:54:22 +00:00
Marcelo Roberto Jimenez
ed9a594e73 Use dist-bzip2 to create a .bz2 distribution file.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@124 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-02-02 04:21:21 +00:00
Marcelo Roberto Jimenez
039b5fdae6 Fixed ChangeLog version.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@123 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2007-02-02 04:05:01 +00:00